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

op-deployer does not support L1 chainID past u32 #12837

Open
Rjected opened this issue Nov 6, 2024 · 1 comment
Open

op-deployer does not support L1 chainID past u32 #12837

Rjected opened this issue Nov 6, 2024 · 1 comment
Assignees

Comments

@Rjected
Copy link

Rjected commented Nov 6, 2024

Bug Description
op-deployer currently panics if you provide a l1 chain id outside of the range:

panic: failed to derive key of path m/44'/60'/2'/4294967296/6 (key description: chain(4294967296)-l1-proxy-admin-owner): component 4294967296 out of allowed range [0, 4294967295]

goroutine 1 [running]:
github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer.Init.func1(...)
 /home/dan/optimism/op-deployer/pkg/deployer/init.go:108
github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer.Init({{0x112fd1d, 0x4}, 0x100000000, {0xc000038004, 0x22}, {0xc000118860, 0x1, 0x1}})
 /home/dan/optimism/op-deployer/pkg/deployer/init.go:113 +0x10da
main.main.InitCLI.func1(0xc00016ae00)
 /home/dan/optimism/op-deployer/pkg/deployer/init.go:69 +0x330
github.com/urfave/cli/v2.(*Command).Run(0xc000330000, 0xc00016ae00, {0xc0000f8690, 0x5, 0x5})
 /home/dan/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:276 +0x97d
github.com/urfave/cli/v2.(*Command).Run(0xc0003306e0, 0xc00016abc0, {0xc0000361e0, 0x6, 0x6})
 /home/dan/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:269 +0xbb7
github.com/urfave/cli/v2.(*App).RunContext(0xc0002aa000, {0x151fca0, 0x1d508a0}, {0xc0000361e0, 0x6, 0x6})
 /home/dan/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:333 +0x5a5
github.com/urfave/cli/v2.(*App).Run(...)
 /home/dan/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:307
main.main()
 /home/dan/optimism/op-deployer/cmd/op-deployer/main.go:58 +0x458

Steps to Reproduce
Run op-deployer with a L1 chain id over u32:

./op-deployer init --l1-chain-id 4294967296 --l2-chain-ids 1337

Expected behavior
L1 chain IDs can be over u32 and I would expect this to not panic

Environment Information:

  • Operating System: Ubuntu 20.04
  • Package Version (or commit hash): op-deployer b20ca5db16da5dbe66f64ea97a2ac60915caa4ea

⚠️ Notice: Issues that do not include the following sections will be subject to closure:

  • Bug Description
  • Steps to Reproduce
  • Environment Information

Please ensure all required sections are filled out accurately to expedite the debugging process and improve issue resolution efficiency.

@tynes
Copy link
Contributor

tynes commented Nov 14, 2024

Ah this is a good catch, we should likely mod by u32 when deriving the keys

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

No branches or pull requests

3 participants