Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(devnet): loosened devnet chain id restrictions #448

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Trantorian1
Copy link
Collaborator

Pull Request type

  • Bugfix

What is the current behavior?

Current restrictions around devnet chain id to avoid replay attacks do not make entire sense and are a bit too strict.

Resolves: #302

What is the new behavior?

Devnet chain id restrictions have been loosed to only forbid devnets with STARKNET_MAINNET or STARKNET_SEPOLIA chain ids. An additinal warning has been added to the README to warn agains such potential replay attacks

Does this introduce a breaking change?

No

@Trantorian1 Trantorian1 added bug Something isn't working sequencer The label for sequencing related issues labels Dec 30, 2024
@Trantorian1 Trantorian1 self-assigned this Dec 30, 2024
// to avoid accidental setups which would allow for replay attacks. This is
// possible if the devnet has the same chain id as another popular chain,
// allowing txs which occur on it to also be replayed on that other chain.
if run_cmd.devnet && (chain_config.chain_id == ChainId::Mainnet || chain_config.chain_id == ChainId::Sepolia) {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we not want to give an option to force this? like if I really need to run a devnet with sepolia mode just so I can test some script or something else that I have?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Idk, this seems liek something which would eventually make its way to prod 😅. Any situation in particular where you think this could be useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sequencer The label for sequencing related issues
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

bug(devnet): incorrect error message when chain id isn't devnet
2 participants