From d73b9ccc553514952b07ada6ea92e2a841819dec Mon Sep 17 00:00:00 2001 From: Dee Date: Fri, 19 Jul 2024 00:21:44 +0800 Subject: [PATCH 1/4] fix from differential-testing --- .../scripts/go-ffi/differential-testing.go | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/contracts-bedrock/scripts/go-ffi/differential-testing.go b/packages/contracts-bedrock/scripts/go-ffi/differential-testing.go index ca92b7f4d016..3186c88b0cba 100644 --- a/packages/contracts-bedrock/scripts/go-ffi/differential-testing.go +++ b/packages/contracts-bedrock/scripts/go-ffi/differential-testing.go @@ -365,17 +365,17 @@ func DiffTestUtils() { panic("Error: cannonMemoryProofWithProof requires 2 or 4 arguments") } pc, err := strconv.ParseUint(args[1], 10, 32) - checkErr(err, "Error decocding addr") + checkErr(err, "Error decoding addr") insn, err := strconv.ParseUint(args[2], 10, 32) - checkErr(err, "Error decocding insn") + checkErr(err, "Error decoding insn") mem.SetMemory(uint32(pc), uint32(insn)) var insnProof, memProof [896]byte if len(args) == 5 { memAddr, err := strconv.ParseUint(args[3], 10, 32) - checkErr(err, "Error decocding memAddr") + checkErr(err, "Error decoding memAddr") memValue, err := strconv.ParseUint(args[4], 10, 32) - checkErr(err, "Error decocding memValue") + checkErr(err, "Error decoding memValue") mem.SetMemory(uint32(memAddr), uint32(memValue)) memProof = mem.MerkleProof(uint32(memAddr)) } @@ -398,16 +398,16 @@ func DiffTestUtils() { panic("Error: cannonMemoryProofWrongLeaf requires 4 arguments") } pc, err := strconv.ParseUint(args[1], 10, 32) - checkErr(err, "Error decocding addr") + checkErr(err, "Error decoding addr") insn, err := strconv.ParseUint(args[2], 10, 32) - checkErr(err, "Error decocding insn") + checkErr(err, "Error decoding insn") mem.SetMemory(uint32(pc), uint32(insn)) var insnProof, memProof [896]byte memAddr, err := strconv.ParseUint(args[3], 10, 32) - checkErr(err, "Error decocding memAddr") + checkErr(err, "Error decoding memAddr") memValue, err := strconv.ParseUint(args[4], 10, 32) - checkErr(err, "Error decocding memValue") + checkErr(err, "Error decoding memValue") mem.SetMemory(uint32(memAddr), uint32(memValue)) // Compute a valid proof for the root, but for the wrong leaves. @@ -426,9 +426,9 @@ func DiffTestUtils() { fmt.Print(hexutil.Encode(packed[32:])) case "encodeScalarEcotone": basefeeScalar, err := strconv.ParseUint(args[1], 10, 32) - checkErr(err, "Error decocding basefeeScalar") + checkErr(err, "Error decoding basefeeScalar") blobbasefeeScalar, err := strconv.ParseUint(args[2], 10, 32) - checkErr(err, "Error decocding blobbasefeeScalar") + checkErr(err, "Error decoding blobbasefeeScalar") encoded := eth.EncodeScalar(eth.EcotoneScalars{ BaseFeeScalar: uint32(basefeeScalar), From 614b67be4b5a508e65e3b61e7a231e3655b29552 Mon Sep 17 00:00:00 2001 From: Dee Date: Fri, 19 Jul 2024 00:23:32 +0800 Subject: [PATCH 2/4] fix from L2Genesis --- packages/contracts-bedrock/scripts/L2Genesis.s.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/contracts-bedrock/scripts/L2Genesis.s.sol b/packages/contracts-bedrock/scripts/L2Genesis.s.sol index e1e43efebc8c..5fc9acf86873 100644 --- a/packages/contracts-bedrock/scripts/L2Genesis.s.sol +++ b/packages/contracts-bedrock/scripts/L2Genesis.s.sol @@ -463,13 +463,13 @@ contract L2Genesis is Deployer { vm.resetNonce(address(eas)); } - /// @notice This predeploy is following the saftey invariant #2. + /// @notice This predeploy is following the safety invariant #2. /// This contract has no initializer. function setCrossL2Inbox() internal { _setImplementationCode(Predeploys.CROSS_L2_INBOX); } - /// @notice This predeploy is following the saftey invariant #2. + /// @notice This predeploy is following the safety invariant #2. /// This contract has no initializer. function setL2ToL2CrossDomainMessenger() internal { _setImplementationCode(Predeploys.L2_TO_L2_CROSS_DOMAIN_MESSENGER); From 470ebfb0e627f7f7e248881fe9f70a70ad967361 Mon Sep 17 00:00:00 2001 From: Dee Date: Fri, 19 Jul 2024 00:24:58 +0800 Subject: [PATCH 3/4] fix variable name --- op-challenger/game/fault/contracts/metrics/metrics.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/op-challenger/game/fault/contracts/metrics/metrics.go b/op-challenger/game/fault/contracts/metrics/metrics.go index 9a47a0669517..9dc8aa7663ac 100644 --- a/op-challenger/game/fault/contracts/metrics/metrics.go +++ b/op-challenger/game/fault/contracts/metrics/metrics.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/client_golang/prometheus" ) -const ConstractSubsystem = "contracts" +const ConstructSubsystem = "contracts" type EndTimer func() @@ -28,7 +28,7 @@ func MakeContractMetrics(ns string, factory Factory) *ContractMetrics { return &ContractMetrics{ ContractRequestsTotal: factory.NewCounterVec(prometheus.CounterOpts{ Namespace: ns, - Subsystem: ConstractSubsystem, + Subsystem: ConstructSubsystem, Name: "requests_total", Help: "Total requests to the contracts", }, []string{ @@ -36,7 +36,7 @@ func MakeContractMetrics(ns string, factory Factory) *ContractMetrics { }), ContractRequestDurationSeconds: factory.NewHistogramVec(prometheus.HistogramOpts{ Namespace: ns, - Subsystem: ConstractSubsystem, + Subsystem: ConstructSubsystem, Name: "requests_duration_seconds", Help: "Histogram of contract request durations", }, []string{ From 8becb6d6d4c70697635dbd3f1db0b82876b91261 Mon Sep 17 00:00:00 2001 From: AaronS Date: Fri, 19 Jul 2024 04:16:05 +1100 Subject: [PATCH 4/4] Update metrics.go --- op-challenger/game/fault/contracts/metrics/metrics.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/op-challenger/game/fault/contracts/metrics/metrics.go b/op-challenger/game/fault/contracts/metrics/metrics.go index 9dc8aa7663ac..60e8b67c1c07 100644 --- a/op-challenger/game/fault/contracts/metrics/metrics.go +++ b/op-challenger/game/fault/contracts/metrics/metrics.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/client_golang/prometheus" ) -const ConstructSubsystem = "contracts" +const ContractsSubsystem = "contracts" type EndTimer func() @@ -28,7 +28,7 @@ func MakeContractMetrics(ns string, factory Factory) *ContractMetrics { return &ContractMetrics{ ContractRequestsTotal: factory.NewCounterVec(prometheus.CounterOpts{ Namespace: ns, - Subsystem: ConstructSubsystem, + Subsystem: ContractsSubsystem, Name: "requests_total", Help: "Total requests to the contracts", }, []string{ @@ -36,7 +36,7 @@ func MakeContractMetrics(ns string, factory Factory) *ContractMetrics { }), ContractRequestDurationSeconds: factory.NewHistogramVec(prometheus.HistogramOpts{ Namespace: ns, - Subsystem: ConstructSubsystem, + Subsystem: ContractsSubsystem, Name: "requests_duration_seconds", Help: "Histogram of contract request durations", }, []string{