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-challenger: fix the wrong variable name and some additional fix #11179

Merged
merged 4 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 3 additions & 3 deletions op-challenger/game/fault/contracts/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
)

const ConstractSubsystem = "contracts"
const ConstructSubsystem = "contracts"

type EndTimer func()

Expand All @@ -28,15 +28,15 @@ 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{
"method",
}),
ContractRequestDurationSeconds: factory.NewHistogramVec(prometheus.HistogramOpts{
Namespace: ns,
Subsystem: ConstractSubsystem,
Subsystem: ConstructSubsystem,
Name: "requests_duration_seconds",
Help: "Histogram of contract request durations",
}, []string{
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/scripts/L2Genesis.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
20 changes: 10 additions & 10 deletions packages/contracts-bedrock/scripts/go-ffi/differential-testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand All @@ -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.
Expand All @@ -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),
Expand Down