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

cannon: Fix cli --stop-at-preimage value parsing #12234

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cannon/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func Run(ctx *cli.Context) error {
}
stopAtPreimageKeyPrefix = common.FromHex(parts[0])
if len(parts) == 2 {
x, err := strconv.ParseUint(parts[1], 10, arch.WordSizeBytes)
x, err := strconv.ParseUint(parts[1], 10, arch.WordSize)
if err != nil {
return fmt.Errorf("invalid preimage offset: %w", err)
}
Expand Down
3 changes: 2 additions & 1 deletion op-e2e/faultproofs/cannon_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

op_e2e "github.com/ethereum-optimism/optimism/op-e2e"
"github.com/ethereum-optimism/optimism/op-e2e/config"
"github.com/ethereum-optimism/optimism/op-e2e/system/e2esys"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
Expand All @@ -37,7 +38,7 @@ func TestBenchmarkCannon_FPP(t *testing.T) {

op_e2e.InitParallel(t, op_e2e.UsesCannon)
ctx := context.Background()
cfg := e2esys.DefaultSystemConfig(t)
cfg := e2esys.DefaultSystemConfig(t, e2esys.WithAllocType(config.AllocTypeFromEnv()))
// We don't need a verifier - just the sequencer is enough
delete(cfg.Nodes, "verifier")
// Use a small sequencer window size to avoid test timeout while waiting for empty blocks
Expand Down
3 changes: 2 additions & 1 deletion op-e2e/faultproofs/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"crypto/ecdsa"
"testing"

"github.com/ethereum-optimism/optimism/op-e2e/config"
"github.com/ethereum-optimism/optimism/op-e2e/system/e2esys"
"github.com/ethereum-optimism/optimism/op-e2e/system/helpers"

Expand Down Expand Up @@ -50,7 +51,7 @@ func WithSequencerWindowSize(size uint64) faultDisputeConfigOpts {
}

func StartFaultDisputeSystem(t *testing.T, opts ...faultDisputeConfigOpts) (*e2esys.System, *ethclient.Client) {
cfg := e2esys.DefaultSystemConfig(t)
cfg := e2esys.DefaultSystemConfig(t, e2esys.WithAllocType(config.AllocTypeFromEnv()))
delete(cfg.Nodes, "verifier")
cfg.Nodes["sequencer"].SafeDBPath = t.TempDir()
cfg.DeployConfig.SequencerWindowSize = 4
Expand Down