From f5c2e5d3427b09e2e36d42fdeec4303de4a5ba8c Mon Sep 17 00:00:00 2001 From: inphi Date: Tue, 1 Oct 2024 16:22:48 -0400 Subject: [PATCH 1/2] cannon: Fix cli --stop-at-preimage value parsing --- cannon/cmd/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cannon/cmd/run.go b/cannon/cmd/run.go index b9854082c5a9..eea8fd4d3a74 100644 --- a/cannon/cmd/run.go +++ b/cannon/cmd/run.go @@ -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) } From f38236a6a59812fa2c8677a3a81cef8df085283e Mon Sep 17 00:00:00 2001 From: inphi Date: Tue, 1 Oct 2024 16:59:20 -0400 Subject: [PATCH 2/2] Setup alloc type in system config --- op-e2e/faultproofs/cannon_benchmark_test.go | 3 ++- op-e2e/faultproofs/util.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/op-e2e/faultproofs/cannon_benchmark_test.go b/op-e2e/faultproofs/cannon_benchmark_test.go index 7171d1211764..71b4d0f9a3b4 100644 --- a/op-e2e/faultproofs/cannon_benchmark_test.go +++ b/op-e2e/faultproofs/cannon_benchmark_test.go @@ -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" @@ -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 diff --git a/op-e2e/faultproofs/util.go b/op-e2e/faultproofs/util.go index 5beebafd88a6..bbe20b3cde16 100644 --- a/op-e2e/faultproofs/util.go +++ b/op-e2e/faultproofs/util.go @@ -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" @@ -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