Commit d8cde654 authored by Inphi's avatar Inphi Committed by GitHub

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

* cannon: Fix cli --stop-at-preimage value parsing

* Setup alloc type in system config
parent dd2b21ce
...@@ -297,7 +297,7 @@ func Run(ctx *cli.Context) error { ...@@ -297,7 +297,7 @@ func Run(ctx *cli.Context) error {
} }
stopAtPreimageKeyPrefix = common.FromHex(parts[0]) stopAtPreimageKeyPrefix = common.FromHex(parts[0])
if len(parts) == 2 { 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 { if err != nil {
return fmt.Errorf("invalid preimage offset: %w", err) return fmt.Errorf("invalid preimage offset: %w", err)
} }
......
...@@ -12,6 +12,7 @@ import ( ...@@ -12,6 +12,7 @@ import (
"time" "time"
op_e2e "github.com/ethereum-optimism/optimism/op-e2e" 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-optimism/optimism/op-e2e/system/e2esys"
"github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind"
...@@ -37,7 +38,7 @@ func TestBenchmarkCannon_FPP(t *testing.T) { ...@@ -37,7 +38,7 @@ func TestBenchmarkCannon_FPP(t *testing.T) {
op_e2e.InitParallel(t, op_e2e.UsesCannon) op_e2e.InitParallel(t, op_e2e.UsesCannon)
ctx := context.Background() 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 // We don't need a verifier - just the sequencer is enough
delete(cfg.Nodes, "verifier") delete(cfg.Nodes, "verifier")
// Use a small sequencer window size to avoid test timeout while waiting for empty blocks // Use a small sequencer window size to avoid test timeout while waiting for empty blocks
......
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"crypto/ecdsa" "crypto/ecdsa"
"testing" "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/e2esys"
"github.com/ethereum-optimism/optimism/op-e2e/system/helpers" "github.com/ethereum-optimism/optimism/op-e2e/system/helpers"
...@@ -50,7 +51,7 @@ func WithSequencerWindowSize(size uint64) faultDisputeConfigOpts { ...@@ -50,7 +51,7 @@ func WithSequencerWindowSize(size uint64) faultDisputeConfigOpts {
} }
func StartFaultDisputeSystem(t *testing.T, opts ...faultDisputeConfigOpts) (*e2esys.System, *ethclient.Client) { 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") delete(cfg.Nodes, "verifier")
cfg.Nodes["sequencer"].SafeDBPath = t.TempDir() cfg.Nodes["sequencer"].SafeDBPath = t.TempDir()
cfg.DeployConfig.SequencerWindowSize = 4 cfg.DeployConfig.SequencerWindowSize = 4
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment