Skip to content

Add Starknet#2322

Merged
pablomendezroyo merged 12 commits intodevelopfrom
add_starknet
Dec 23, 2025
Merged

Add Starknet#2322
pablomendezroyo merged 12 commits intodevelopfrom
add_starknet

Conversation

@hcastc00
Copy link
Copy Markdown
Contributor

@hcastc00 hcastc00 commented Dec 4, 2025

Context

Provide context of this PR: why it was created? what does it fixes? what new feature does it provides? ...

Approach

Define the solution for the issue or feature that this PR aims to fix

Test instructions

@hcastc00 hcastc00 requested a review from a team as a code owner December 4, 2025 12:10
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 4, 2025

@github-actions github-actions bot temporarily deployed to commit December 10, 2025 11:23 Inactive
@github-actions github-actions bot temporarily deployed to commit December 10, 2025 16:50 Inactive
@github-actions github-actions bot temporarily deployed to commit December 11, 2025 14:28 Inactive
@github-actions github-actions bot temporarily deployed to commit December 11, 2025 16:20 Inactive
@github-actions github-actions bot temporarily deployed to commit December 11, 2025 16:24 Inactive
Comment on lines +19 to +27
[Network.Lukso]: db.mevBoostLukso
[Network.Lukso]: db.mevBoostLukso,
[Network.StarknetMainnet]: { get: () => false, set: async () => {} },
[Network.StarknetSepolia]: { get: () => false, set: async () => {} }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why define this in a different way? Can it be done like

 [Network.StarknetMainnet]:  db.mevBoostStarknetMainnet
 [Network.StarknetSepolia]:  db.mevBoostStarknetMainnet

I know it will probably be always "false", but just for the sake of maintainability

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Comment on lines +1822 to +1846
consensusClients: [],
web3Signer: {
status: "ok",
dnpName: "starknetstaking-sepolia.dnp.dappnode.eth",
isInstalled: false,
isRunning: false,
isUpdated: false,
isSelected: false,
avatarUrl: "",
data: {
dnpName: "package",
reqVersion: "0.1.0",
semVersion: "0.1.0",
imageFile: {
hash: "QM..",
source: "ipfs",
size: 123
},
warnings: {},
signedSafe: true,
manifest: {
name: "starknetstaking-sepolia.dnp.dappnode.eth",
description: "Starknet Sepolia Staking Application",
shortDescription: "Starknet Sepolia Staking",
version: "0.1.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is starknetstaking part of web3signer object?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As starknetstaking packages manages your validator keys I treated it as a signer

Comment on lines +35 to +36
STARKNET_CLIENT_MAINNET: "_DAPPNODE_GLOBAL_STARKNET_CLIENT_MAINNET", // "juno.dnp.dappnode.eth"
STARKNET_CLIENT_SEPOLIA: "_DAPPNODE_GLOBAL_STARKNET_CLIENT_SEPOLIA", // "juno-sepolia.dnp.dappnode.eth"
Copy link
Copy Markdown
Contributor

@Marketen Marketen Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what package use these variables?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None at the moment. Is it best to delete them?

Pathfinder = "pathfinder.dnp.dappnode.eth"
}
export enum SignerStarknetMainnet {
Web3signer = "starknetstaking.dnp.dappnode.eth"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we add keys in starknetstacking dnp package? why treat it as web3signer?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your validator keys are in the starknetstacking package yep. I treated it as a signer for its similarity

Pathfinder = "pathfinder-sepolia.dnp.dappnode.eth"
}
export enum SignerStarknetSepolia {
Web3signer = "starknetstaking-sepolia.dnp.dappnode.eth"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Comment on lines +77 to +82
[Network.Lukso]: [
{ dnpName: ConsensusClientLukso.Prysm, minVersion: "0.1.0" },
{ dnpName: ConsensusClientLukso.Teku, minVersion: "0.1.0" }
]
],
[Network.StarknetMainnet]: [],
[Network.StarknetSepolia]: []
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have a min version of 0.1.0 like in the other networks when the first version of the package is the first one to be released?

just for maintainability

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Starknet uses fullnodes, I included them in the execution.ts, so empty CC list

Comment on lines 80 to +90
{ dnpName: ExecutionClientSepolia.Reth, minVersion: "0.1.0" }
],
[Network.Lukso]: [{ dnpName: ExecutionClientLukso.Geth, minVersion: "0.1.0" }]
[Network.Lukso]: [{ dnpName: ExecutionClientLukso.Geth, minVersion: "0.1.0" }],
[Network.StarknetMainnet]: [
{ dnpName: StarknetClientMainnet.Juno, minVersion: "0.1.0" },
{ dnpName: StarknetClientMainnet.Pathfinder, minVersion: "0.1.0" }
],
[Network.StarknetSepolia]: [
{ dnpName: StarknetClientSepolia.Juno, minVersion: "0.1.0" },
{ dnpName: StarknetClientSepolia.Pathfinder, minVersion: "0.1.0" }
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compatibility is well done here with 0.1.0

Comment on lines 146 to +179
@@ -162,10 +166,17 @@ function getChanges({
};

// Not allowed if changes AND (EC or CC are deselected) AND (signer or mev boost)
if (!isExecAndConsSelected && (newStakerConfig.web3signerDnpName || newStakerConfig.mevBoostDnpName))
// Exception: Starknet networks only need execution client
const hasRequiredClients = isStarknetNetwork
? Boolean(newStakerConfig.executionDnpName)
: isExecAndConsSelected;

if (!hasRequiredClients && (newStakerConfig.web3signerDnpName || newStakerConfig.mevBoostDnpName))
return {
isAllowed: false,
reason: "To enable web3signer and/or MEV boost, execution and consensus clients must be selected",
reason: isStarknetNetwork
? "To enable web3signer and/or MEV boost, execution client must be selected"
: "To enable web3signer and/or MEV boost, execution and consensus clients must be selected",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is doable but makes code messy. What do you think @pablomendezroyo ?

import { getInstallerPath } from "pages/installer";
import { useNavigate } from "react-router-dom";

export default function StarknetSigner({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed?

import { getInstallerPath } from "pages/installer";
import { useNavigate } from "react-router-dom";

export default function StarknetFullNode({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, why is this needed? can the fullnode of stakers be reused?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its the component for rendering the different starknet full nodes


const netOf = (r: RouteType): Network | undefined =>
isStakerRoute(r) ? (r.element as React.ReactElement).props?.network : undefined;
const isStakerRoute = (r: RouteType) =>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this change needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, the STARKNET tab is not shown

@github-actions github-actions bot temporarily deployed to commit December 16, 2025 12:36 Inactive
import StakerNetwork from "pages/stakers/components/StakerNetwork";
import Starknet from "pages/rollups/components/Starknet";

const isStakerRoute = (r: RouteType) => React.isValidElement(r.element) && r.element.type === StakerNetwork;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot could you make a commit suggestion reverting the code from this file to the original one and implement the same for starknet that whats being done right now for optimism?

currentRoute?.subPath === "optimism" || currentRoute?.subPath === "starknet"

will that make the tab render?

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 18, 2025

@pablomendezroyo I've opened a new pull request, #2331, to work on those changes. Once the pull request is ready, I'll request review from you.

@github-actions github-actions bot temporarily deployed to commit December 18, 2025 09:41 Inactive
* Initial plan

* Apply Optimism pattern to Starknet in useFilterStakersNetworks

Co-authored-by: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com>

* Add support for starknet-sepolia testnet route

Co-authored-by: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to commit December 18, 2025 10:37 Inactive
@github-actions github-actions bot temporarily deployed to commit December 18, 2025 12:18 Inactive
* starknet-ec-cc

* starknet exec global envs

* fix types

* signer fix

* staking app

* staking app
@github-actions github-actions bot temporarily deployed to commit December 18, 2025 14:09 Inactive
* Set starknet envs from frontend

* fix service name

* print starknetstaking envs (#2335)

* print starknetstaking envs

* fill placeholder with current values

* remove log that could print privkey

* set fullnode to starknet

---------

Co-authored-by: Pablo Mendez <pablo@dappnode.io>

* fix color in dark mode

* fix apply changes button enable

---------

Co-authored-by: Pablo Mendez <pablo@dappnode.io>
Co-authored-by: Marc Font <36164126+Marketen@users.noreply.github.com>
@pablomendezroyo pablomendezroyo merged commit 342c173 into develop Dec 23, 2025
6 checks passed
@pablomendezroyo pablomendezroyo deleted the add_starknet branch December 23, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants