diff --git a/.circleci/config.yml b/.circleci/config.yml index ed1d41b189d0..acc32ae6dc20 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 parameters: ci_builder_image: type: string - default: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.50.0 + default: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.51.0 ci_builder_rust_image: type: string default: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder-rust:latest diff --git a/cannon/cmd/log.go b/cannon/cmd/log.go index 30e92e3e4007..9270b2261709 100644 --- a/cannon/cmd/log.go +++ b/cannon/cmd/log.go @@ -2,9 +2,9 @@ package cmd import ( "io" + "log/slog" "os" - "golang.org/x/exp/slog" "golang.org/x/term" "github.com/ethereum/go-ethereum/log" diff --git a/cannon/mipsevm/tests/evm_test.go b/cannon/mipsevm/tests/evm_test.go index f7ca26589c80..41826be04d72 100644 --- a/cannon/mipsevm/tests/evm_test.go +++ b/cannon/mipsevm/tests/evm_test.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/vm" "github.com/stretchr/testify/require" @@ -40,7 +41,7 @@ func TestEVM(t *testing.T) { require.NoError(t, err) contracts, addrs := testContractsSetup(t) - var tracer vm.EVMLogger // no-tracer by default, but test_util.MarkdownTracer + var tracer *tracing.Hooks // no-tracer by default, but test_util.MarkdownTracer for _, f := range testFiles { t.Run(f.Name(), func(t *testing.T) { @@ -102,7 +103,7 @@ func TestEVM(t *testing.T) { func TestEVM_CloneFlags(t *testing.T) { //contracts, addrs := testContractsSetup(t) - //var tracer vm.EVMLogger + //var tracer *tracing.Hooks cases := []struct { name string @@ -156,7 +157,7 @@ func TestEVM_CloneFlags(t *testing.T) { func TestEVMSingleStep(t *testing.T) { contracts, addrs := testContractsSetup(t) - var tracer vm.EVMLogger + var tracer *tracing.Hooks cases := []struct { name string @@ -194,7 +195,7 @@ func TestEVMSingleStep(t *testing.T) { func TestEVMSysWriteHint(t *testing.T) { contracts, addrs := testContractsSetup(t) - var tracer vm.EVMLogger + var tracer *tracing.Hooks cases := []struct { name string @@ -375,7 +376,7 @@ func TestEVMSysWriteHint(t *testing.T) { func TestEVMFault(t *testing.T) { contracts, addrs := testContractsSetup(t) - var tracer vm.EVMLogger // no-tracer by default, but see test_util.MarkdownTracer + var tracer *tracing.Hooks // no-tracer by default, but see test_util.MarkdownTracer sender := common.Address{0x13, 0x37} env, evmState := testutil.NewEVMEnv(contracts, addrs) @@ -422,7 +423,7 @@ func TestEVMFault(t *testing.T) { func TestHelloEVM(t *testing.T) { contracts, addrs := testContractsSetup(t) - var tracer vm.EVMLogger // no-tracer by default, but see test_util.MarkdownTracer + var tracer *tracing.Hooks // no-tracer by default, but see test_util.MarkdownTracer evm := testutil.NewMIPSEVM(contracts, addrs) evm.SetTracer(tracer) testutil.LogStepFailureAtCleanup(t, evm) @@ -464,7 +465,7 @@ func TestHelloEVM(t *testing.T) { func TestClaimEVM(t *testing.T) { contracts, addrs := testContractsSetup(t) - var tracer vm.EVMLogger // no-tracer by default, but see test_util.MarkdownTracer + var tracer *tracing.Hooks // no-tracer by default, but see test_util.MarkdownTracer evm := testutil.NewMIPSEVM(contracts, addrs) evm.SetTracer(tracer) testutil.LogStepFailureAtCleanup(t, evm) diff --git a/cannon/mipsevm/testutil/evm.go b/cannon/mipsevm/testutil/evm.go index 29edd6a63fe5..7cd48403b986 100644 --- a/cannon/mipsevm/testutil/evm.go +++ b/cannon/mipsevm/testutil/evm.go @@ -6,6 +6,7 @@ import ( "math/big" "os" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/eth/tracers/logger" "github.com/ethereum-optimism/optimism/op-chain-ops/foundry" @@ -122,6 +123,6 @@ func (d *testChain) GetHeader(h common.Hash, n uint64) *types.Header { } } -func MarkdownTracer() vm.EVMLogger { - return logger.NewMarkdownLogger(&logger.Config{}, os.Stdout) +func MarkdownTracer() *tracing.Hooks { + return logger.NewMarkdownLogger(&logger.Config{}, os.Stdout).Hooks() } diff --git a/cannon/mipsevm/testutil/mips.go b/cannon/mipsevm/testutil/mips.go index d79b5040c316..2b45ab2d39ce 100644 --- a/cannon/mipsevm/testutil/mips.go +++ b/cannon/mipsevm/testutil/mips.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/vm" "github.com/stretchr/testify/require" @@ -33,7 +34,7 @@ func NewMIPSEVM(artifacts *Artifacts, addrs *Addresses) *MIPSEVM { return &MIPSEVM{env, evmState, addrs, nil, artifacts, math.MaxUint64, nil} } -func (m *MIPSEVM) SetTracer(tracer vm.EVMLogger) { +func (m *MIPSEVM) SetTracer(tracer *tracing.Hooks) { m.env.Config.Tracer = tracer } diff --git a/go.mod b/go.mod index 8e6d7ed4f198..7914ba567f40 100644 --- a/go.mod +++ b/go.mod @@ -8,11 +8,11 @@ require ( github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 github.com/cockroachdb/pebble v0.0.0-20231018212520-f6cde3fc2fa4 github.com/consensys/gnark-crypto v0.12.1 - github.com/crate-crypto/go-kzg-4844 v0.7.0 + github.com/crate-crypto/go-kzg-4844 v1.0.0 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240803025447-c92ef420eec2 - github.com/ethereum/go-ethereum v1.13.15 + github.com/ethereum/go-ethereum v1.14.7 github.com/fsnotify/fsnotify v1.7.0 github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb github.com/google/go-cmp v0.6.0 @@ -51,9 +51,9 @@ require ( require ( github.com/BurntSushi/toml v1.4.0 // indirect - github.com/DataDog/zstd v1.5.5 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/VictoriaMetrics/fastcache v1.12.1 // indirect + github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/allegro/bigcache v1.2.1 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/benbjohnson/clock v1.3.5 // indirect @@ -63,8 +63,8 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/btcutil v1.1.5 // indirect github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect @@ -72,28 +72,29 @@ require ( github.com/containerd/cgroups v1.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect - github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect - github.com/deckarep/golang-set/v2 v2.3.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect github.com/deepmap/oapi-codegen v1.8.2 // indirect github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0 // indirect github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/elastic/gosigar v0.14.2 // indirect - github.com/ethereum/c-kzg-4844 v0.4.0 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/ethereum/c-kzg-4844 v1.0.0 // indirect + github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/felixge/fgprof v0.9.3 // indirect github.com/ferranbt/fastssz v0.1.2 // indirect github.com/fjl/memsize v0.0.2 // indirect github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect - github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect - github.com/getsentry/sentry-go v0.20.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-ini/ini v1.67.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect @@ -103,7 +104,7 @@ require ( github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect github.com/google/uuid v1.6.0 // indirect @@ -129,7 +130,8 @@ require ( github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 // indirect - github.com/karalabe/usb v0.0.3-0.20230711191512-61db3e06439c // indirect + github.com/karalabe/hid v1.0.1-0.20240306101548-573246063e52 // indirect + github.com/kilic/bls12-381 v0.1.0 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/koron/go-ssdp v0.0.4 // indirect github.com/kr/pretty v0.3.1 // indirect @@ -189,6 +191,9 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect + github.com/protolambda/bls12-381-util v0.1.0 // indirect + github.com/protolambda/zrnt v0.32.2 // indirect + github.com/protolambda/ztyp v0.2.2 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/quic-go v0.44.0 // indirect github.com/quic-go/webtransport-go v0.8.0 // indirect @@ -221,14 +226,14 @@ require ( golang.org/x/text v0.16.0 // indirect golang.org/x/tools v0.23.0 // indirect google.golang.org/protobuf v1.34.1 // indirect - gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) -replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101315.3-rc.2 +replace github.com/ethereum/go-ethereum v1.14.7 => github.com/ethereum-optimism/op-geth v1.101407.0-rc.1 //replace github.com/ethereum/go-ethereum v1.13.9 => ../op-geth diff --git a/go.sum b/go.sum index 80ac4747d06b..c46caed5aed5 100644 --- a/go.sum +++ b/go.sum @@ -14,13 +14,13 @@ github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0 github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= -github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e h1:ZIWapoIRN1VqT8GR8jAwb1Ie9GyehWjVcGh32Y2MznE= +github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= -github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= +github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= +github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -82,8 +82,9 @@ github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -96,8 +97,8 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= -github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/pebble v0.0.0-20231018212520-f6cde3fc2fa4 h1:PuHFhOUMnD62r80dN+Ik5qco2drekgsUSVdcHsvllec= @@ -121,10 +122,10 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= -github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= -github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= -github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c h1:uQYC5Z1mdLRPrZhHjHxufI8+2UG/i25QG92j0Er9p6I= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= +github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= +github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -134,8 +135,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= -github.com/deckarep/golang-set/v2 v2.3.0 h1:qs18EKUfHm2X9fA50Mr/M5hccg2tNnVqsiBImnyDs0g= -github.com/deckarep/golang-set/v2 v2.3.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= @@ -158,6 +159,8 @@ github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnm github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0 h1:C7t6eeMaEQVy6e8CarIhscYQlNmw5e3G36y7l7Y21Ao= +github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0/go.mod h1:56wL82FO0bfMU5RvfXoIwSOP2ggqqxT+tAfNEIyxuHw= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5RVoRccG8a5DhOdWdQ4zN62zzo= github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= @@ -171,15 +174,17 @@ github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/ github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z8veEq5ZO3DfIhZ7xgRP9WTc= github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs= -github.com/ethereum-optimism/op-geth v1.101315.3-rc.2 h1:4Ne3RUZ09uqY5QnbVuDVD2Xt8JbxegCv3mkICt3aT6c= -github.com/ethereum-optimism/op-geth v1.101315.3-rc.2/go.mod h1:nZ3TvP4mhOsfKkrgaT3GrDO4oCn5awPXFHKpVHuO63s= +github.com/ethereum-optimism/op-geth v1.101407.0-rc.1 h1:bE6V8GG46s7IX2s7prH26sKcVwW0/FbId3CEe5GYulQ= +github.com/ethereum-optimism/op-geth v1.101407.0-rc.1/go.mod h1:Zn0xPY3I/xX3Bm51kjXz9VSd+2ai7bEslVEAFTdVcpM= github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240803025447-c92ef420eec2 h1:ySJykDUyb8RbcfLL3pz0Cs5Ji6NMVT7kmAY634DOCoE= github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240803025447-c92ef420eec2/go.mod h1:zy9f3TNPS7pwW4msMitF83fp0Wf452tZ6+Fg6d4JyXM= -github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= -github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= +github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= +github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= github.com/ferranbt/fastssz v0.1.2 h1:Dky6dXlngF6Qjc+EfDipAkE83N5I5DE68bY6O0VLNPk= @@ -198,12 +203,10 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= -github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getsentry/sentry-go v0.20.0 h1:bwXW98iMRIWxn+4FgPW7vMrjmbym6HblXALmhjHmQaQ= -github.com/getsentry/sentry-go v0.20.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= @@ -258,8 +261,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= @@ -340,6 +343,7 @@ github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6w github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= +github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -386,8 +390,10 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/karalabe/usb v0.0.3-0.20230711191512-61db3e06439c h1:AqsttAyEyIEsNz5WLRwuRwjiT5CMDUfLk6cFJDVPebs= -github.com/karalabe/usb v0.0.3-0.20230711191512-61db3e06439c/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/karalabe/hid v1.0.1-0.20240306101548-573246063e52 h1:msKODTL1m0wigztaqILOtla9HeW1ciscYG4xjLtvk5I= +github.com/karalabe/hid v1.0.1-0.20240306101548-573246063e52/go.mod h1:qk1sX/IBgppQNcGCRoj90u6EGC056EBoIc1oEjCWla8= +github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4= +github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -654,8 +660,14 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/protolambda/bls12-381-util v0.1.0 h1:05DU2wJN7DTU7z28+Q+zejXkIsA/MF8JZQGhtBZZiWk= +github.com/protolambda/bls12-381-util v0.1.0/go.mod h1:cdkysJTRpeFeuUVx/TXGDQNMTiRAalk1vQw3TYTHcE4= github.com/protolambda/ctxlock v0.1.0 h1:rCUY3+vRdcdZXqT07iXgyr744J2DU2LCBIXowYAjBCE= github.com/protolambda/ctxlock v0.1.0/go.mod h1:vefhX6rIZH8rsg5ZpOJfEDYQOppZi19SfPiGOFrNnwM= +github.com/protolambda/zrnt v0.32.2 h1:KZ48T+3UhsPXNdtE/5QEvGc9DGjUaRI17nJaoznoIaM= +github.com/protolambda/zrnt v0.32.2/go.mod h1:A0fezkp9Tt3GBLATSPIbuY4ywYESyAuc/FFmPKg8Lqs= +github.com/protolambda/ztyp v0.2.2 h1:rVcL3vBu9W/aV646zF6caLS/dyn9BN8NYiuJzicLNyY= +github.com/protolambda/ztyp v0.2.2/go.mod h1:9bYgKGqg3wJqT9ac1gI2hnVb0STQq7p/1lapqrqY1dU= github.com/prysmaticlabs/gohashtree v0.0.1-alpha.0.20220714111606-acbb2962fb48 h1:cSo6/vk8YpvkLbk9v3FO97cakNmUoxwi2KMP8hd5WIw= github.com/prysmaticlabs/gohashtree v0.0.1-alpha.0.20220714111606-acbb2962fb48/go.mod h1:4pWaT30XoEx1j8KNJf3TV+E3mQkaufn7mf+jRNb/Fuk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= @@ -911,6 +923,7 @@ golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -937,6 +950,7 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -1037,8 +1051,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/op-batcher/batcher/channel_builder_test.go b/op-batcher/batcher/channel_builder_test.go index 188a46ecc82a..2d5187d3b25d 100644 --- a/op-batcher/batcher/channel_builder_test.go +++ b/op-batcher/batcher/channel_builder_test.go @@ -62,7 +62,7 @@ func newMiniL2BlockWithNumberParentAndL1Information(numTx int, l2Number *big.Int Difficulty: common.Big0, Number: big.NewInt(l1Number), Time: blockTime, - }, nil, nil, nil, trie.NewStackTrie(nil)) + }, nil, nil, trie.NewStackTrie(nil)) l1InfoTx, err := derive.L1InfoDeposit(&defaultTestRollupConfig, eth.SystemConfig{}, 0, eth.BlockToInfo(l1Block), blockTime) if err != nil { panic(err) @@ -77,7 +77,7 @@ func newMiniL2BlockWithNumberParentAndL1Information(numTx int, l2Number *big.Int return types.NewBlock(&types.Header{ Number: l2Number, ParentHash: parent, - }, txs, nil, nil, trie.NewStackTrie(nil)) + }, &types.Body{Transactions: txs}, nil, trie.NewStackTrie(nil)) } // addTooManyBlocks adds blocks to the channel until it hits an error, diff --git a/op-batcher/batcher/channel_config_provider_test.go b/op-batcher/batcher/channel_config_provider_test.go index 9e512fbb8867..169d122e210a 100644 --- a/op-batcher/batcher/channel_config_provider_test.go +++ b/op-batcher/batcher/channel_config_provider_test.go @@ -3,6 +3,7 @@ package batcher import ( "context" "errors" + "log/slog" "math/big" "testing" "time" @@ -10,7 +11,6 @@ import ( "github.com/ethereum-optimism/optimism/op-service/eth" "github.com/ethereum-optimism/optimism/op-service/testlog" "github.com/stretchr/testify/require" - "golang.org/x/exp/slog" ) type mockGasPricer struct { diff --git a/op-batcher/batcher/channel_manager_test.go b/op-batcher/batcher/channel_manager_test.go index d6c3d2e9336e..474942ce5e87 100644 --- a/op-batcher/batcher/channel_manager_test.go +++ b/op-batcher/batcher/channel_manager_test.go @@ -67,19 +67,19 @@ func ChannelManagerReturnsErrReorg(t *testing.T, batchType uint) { a := types.NewBlock(&types.Header{ Number: big.NewInt(0), - }, nil, nil, nil, nil) + }, nil, nil, nil) b := types.NewBlock(&types.Header{ Number: big.NewInt(1), ParentHash: a.Hash(), - }, nil, nil, nil, nil) + }, nil, nil, nil) c := types.NewBlock(&types.Header{ Number: big.NewInt(2), ParentHash: b.Hash(), - }, nil, nil, nil, nil) + }, nil, nil, nil) x := types.NewBlock(&types.Header{ Number: big.NewInt(2), ParentHash: common.Hash{0xff}, - }, nil, nil, nil, nil) + }, nil, nil, nil) require.NoError(t, m.AddL2Block(a)) require.NoError(t, m.AddL2Block(b)) @@ -169,7 +169,7 @@ func ChannelManager_Clear(t *testing.T, batchType uint) { b := types.NewBlock(&types.Header{ Number: big.NewInt(1), ParentHash: a.Hash(), - }, nil, nil, nil, nil) + }, nil, nil, nil) require.NoError(m.AddL2Block(b)) require.Len(m.blocks, 1) require.Equal(b.Hash(), m.tip) diff --git a/op-chain-ops/cmd/check-ecotone/main.go b/op-chain-ops/cmd/check-ecotone/main.go index dcdc4c3a29fb..2f46f03d29d0 100644 --- a/op-chain-ops/cmd/check-ecotone/main.go +++ b/op-chain-ops/cmd/check-ecotone/main.go @@ -271,7 +271,8 @@ func check4844Precompile(ctx context.Context, env *actionEnv) error { return fmt.Errorf("failed to compute commitment: %w", err) } point := kzg4844.Point{} - proof, claim, err := kzg4844.ComputeProof(kzg4844.Blob(x), point) + blob := kzg4844.Blob(x) + proof, claim, err := kzg4844.ComputeProof(&blob, point) if err != nil { return fmt.Errorf("failed to compute proof: %w", err) } diff --git a/op-chain-ops/cmd/op-simulate/main.go b/op-chain-ops/cmd/op-simulate/main.go index cec69c2454f7..83aab8714218 100644 --- a/op-chain-ops/cmd/op-simulate/main.go +++ b/op-chain-ops/cmd/op-simulate/main.go @@ -11,6 +11,7 @@ import ( "path" "time" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/holiman/uint256" "github.com/pkg/profile" "github.com/urfave/cli/v2" @@ -258,7 +259,7 @@ func simulate(ctx context.Context, logger log.Logger, conf *params.ChainConfig, } for addr, acc := range dump { state.CreateAccount(addr) - state.SetBalance(addr, uint256.MustFromBig((*big.Int)(&acc.Balance))) + state.SetBalance(addr, uint256.MustFromBig((*big.Int)(&acc.Balance)), tracing.BalanceChangeUnspecified) state.SetNonce(addr, acc.Nonce) state.SetCode(addr, acc.Code) state.SetStorage(addr, acc.Storage) diff --git a/op-chain-ops/cmd/protocol-version/main.go b/op-chain-ops/cmd/protocol-version/main.go index a5bd6b434921..cf4fef1efd06 100644 --- a/op-chain-ops/cmd/protocol-version/main.go +++ b/op-chain-ops/cmd/protocol-version/main.go @@ -3,11 +3,11 @@ package main import ( "encoding/hex" "fmt" + "log/slog" "os" "github.com/mattn/go-isatty" "github.com/urfave/cli/v2" - "golang.org/x/exp/slog" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" diff --git a/op-chain-ops/cmd/receipt-reference-builder/main.go b/op-chain-ops/cmd/receipt-reference-builder/main.go index 0418e92193e7..90cd9bd4568b 100644 --- a/op-chain-ops/cmd/receipt-reference-builder/main.go +++ b/op-chain-ops/cmd/receipt-reference-builder/main.go @@ -1,12 +1,12 @@ package main import ( + "log/slog" "os" "time" "github.com/mattn/go-isatty" "github.com/urfave/cli/v2" - "golang.org/x/exp/slog" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" diff --git a/op-chain-ops/cmd/receipt-reference-builder/pull.go b/op-chain-ops/cmd/receipt-reference-builder/pull.go index d6fa95eef33c..3c692955026c 100644 --- a/op-chain-ops/cmd/receipt-reference-builder/pull.go +++ b/op-chain-ops/cmd/receipt-reference-builder/pull.go @@ -298,7 +298,7 @@ func processBlockRange( // process each transaction in the block for j := 0; j < len(b.Transactions); j++ { tx := b.Transactions[j] - ok, err := checkTransaction(ctx, c, *tx, log) + ok, err := checkTransaction(ctx, c, tx, log) if err != nil { log.Error("Failed to Check Tx", "Err", err) return []result{}, err @@ -346,8 +346,8 @@ func batchBlockByNumber(ctx context.Context, c *ethclient.Client, blockNumbers [ } // checkTransaction will check if a transaction is a user deposit, and not initiated by the system address -func checkTransaction(ctx context.Context, c *ethclient.Client, tx types.Transaction, log log.Logger) (bool, error) { - from, err := types.Sender(types.LatestSignerForChainID(tx.ChainId()), &tx) +func checkTransaction(ctx context.Context, c *ethclient.Client, tx *types.Transaction, log log.Logger) (bool, error) { + from, err := types.Sender(types.LatestSignerForChainID(tx.ChainId()), tx) if err != nil { log.Error("Failed to Get Sender", "Err", err) return false, err @@ -355,7 +355,7 @@ func checkTransaction(ctx context.Context, c *ethclient.Client, tx types.Transac // we are filtering for deposit transactions which are not system transactions if tx.Type() == depositType && from != systemAddress { - log.Info("Got Transaction", "From", from, "Nonce", *tx.EffectiveNonce(), "Type", tx.Type()) + log.Info("Got Transaction", "From", from, "Nonce", tx.EffectiveNonce(), "Type", tx.Type()) return true, nil } return false, nil diff --git a/op-chain-ops/srcmap/solutil.go b/op-chain-ops/srcmap/solutil.go index 01b1add4bc29..9944db558710 100644 --- a/op-chain-ops/srcmap/solutil.go +++ b/op-chain-ops/srcmap/solutil.go @@ -3,7 +3,6 @@ package srcmap import ( "fmt" "io" - "math/big" "os" "strconv" "strings" @@ -192,20 +191,6 @@ type SourceMapTracer struct { out io.Writer } -func (s *SourceMapTracer) CaptureTxStart(gasLimit uint64) {} - -func (s *SourceMapTracer) CaptureTxEnd(restGas uint64) {} - -func (s *SourceMapTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { -} - -func (s *SourceMapTracer) CaptureEnd(output []byte, gasUsed uint64, err error) {} - -func (s *SourceMapTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { -} - -func (s *SourceMapTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} - func (s *SourceMapTracer) info(codeAddr *common.Address, pc uint64) string { info := "non-contract" if codeAddr != nil { @@ -243,5 +228,3 @@ func (s *SourceMapTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64 fmt.Fprintf(s.out, "%3d: %x\n", -i, stack[len(stack)-1-i].Bytes32()) } } - -var _ vm.EVMLogger = (*SourceMapTracer)(nil) diff --git a/op-challenger/game/fault/contracts/faultdisputegame.go b/op-challenger/game/fault/contracts/faultdisputegame.go index d2c13060ffe0..1c71d20bebcb 100644 --- a/op-challenger/game/fault/contracts/faultdisputegame.go +++ b/op-challenger/game/fault/contracts/faultdisputegame.go @@ -307,7 +307,7 @@ func (f *FaultDisputeGameContractLatest) ClaimCreditTx(ctx context.Context, reci call := f.contract.Call(methodClaimCredit, recipient) _, err := f.multiCaller.SingleCall(ctx, rpcblock.Latest, call) if err != nil { - return txmgr.TxCandidate{}, fmt.Errorf("%w: %v", ErrSimulationFailed, err.Error()) + return txmgr.TxCandidate{}, fmt.Errorf("%w: %w", ErrSimulationFailed, err) } return call.ToTxCandidate() } diff --git a/op-challenger/game/fault/trace/utils/preimage.go b/op-challenger/game/fault/trace/utils/preimage.go index b13333a566f6..09a48ee912f6 100644 --- a/op-challenger/game/fault/trace/utils/preimage.go +++ b/op-challenger/game/fault/trace/utils/preimage.go @@ -89,7 +89,8 @@ func (l *PreimageLoader) loadBlobPreimage(proof *ProofData) (*types.PreimageOrac // Compute the KZG proof for the required field element var point kzg4844.Point new(big.Int).SetUint64(requiredFieldElement).FillBytes(point[:]) - kzgProof, claim, err := kzg4844.ComputeProof(kzg4844.Blob(blob), point) + data := kzg4844.Blob(blob) + kzgProof, claim, err := kzg4844.ComputeProof(&data, point) if err != nil { return nil, fmt.Errorf("failed to compute kzg proof: %w", err) } diff --git a/op-challenger/game/fault/trace/utils/preimage_test.go b/op-challenger/game/fault/trace/utils/preimage_test.go index e2c9e87ede75..46778f080c37 100644 --- a/op-challenger/game/fault/trace/utils/preimage_test.go +++ b/op-challenger/game/fault/trace/utils/preimage_test.go @@ -63,15 +63,15 @@ func TestPreimageLoader_SimpleTypes(t *testing.T) { } func TestPreimageLoader_BlobPreimage(t *testing.T) { - blob := testBlob() - commitment, err := kzg4844.BlobToCommitment(kzg4844.Blob(blob)) + blob := kzg4844.Blob(testBlob()) + commitment, err := kzg4844.BlobToCommitment(&blob) require.NoError(t, err) fieldIndex := uint64(24) elementData := blob[fieldIndex<<5 : (fieldIndex+1)<<5] var point kzg4844.Point new(big.Int).SetUint64(fieldIndex).FillBytes(point[:]) - kzgProof, claim, err := kzg4844.ComputeProof(kzg4844.Blob(blob), point) + kzgProof, claim, err := kzg4844.ComputeProof(&blob, point) require.NoError(t, err) elementDataWithLengthPrefix := make([]byte, len(elementData)+lengthPrefixSize) binary.BigEndian.PutUint64(elementDataWithLengthPrefix[:lengthPrefixSize], uint64(len(elementData))) @@ -129,7 +129,7 @@ func TestPreimageLoader_BlobPreimage(t *testing.T) { t.Run("Valid", func(t *testing.T) { kv := kvstore.NewMemKV() loader := NewPreimageLoader(kv.Get) - storeBlob(t, kv, gokzg4844.KZGCommitment(commitment), blob) + storeBlob(t, kv, gokzg4844.KZGCommitment(commitment), gokzg4844.Blob(blob)) actual, err := loader.LoadPreimage(proof) require.NoError(t, err) diff --git a/op-challenger/game/keccak/fetcher/fetcher_test.go b/op-challenger/game/keccak/fetcher/fetcher_test.go index cedff735e9f9..2a976b3e6df0 100644 --- a/op-challenger/game/keccak/fetcher/fetcher_test.go +++ b/op-challenger/game/keccak/fetcher/fetcher_test.go @@ -437,7 +437,7 @@ func (s *stubL1Source) BlockByNumber(_ context.Context, number *big.Int) (*types if !ok { return nil, errors.New("not found") } - return (&types.Block{}).WithBody(txs, nil), nil + return (&types.Block{}).WithBody(types.Body{Transactions: txs}), nil } func (s *stubL1Source) TransactionReceipt(_ context.Context, txHash common.Hash) (*types.Receipt, error) { diff --git a/op-e2e/actions/l1_miner.go b/op-e2e/actions/l1_miner.go index c378cd9f5cfd..97ca5c091ccc 100644 --- a/op-e2e/actions/l1_miner.go +++ b/op-e2e/actions/l1_miner.go @@ -207,10 +207,13 @@ func (s *L1Miner) ActL1EndBlock(t Testing) { s.l1Building = false s.l1BuildingHeader.GasUsed = s.l1BuildingHeader.GasLimit - uint64(*s.l1GasPool) s.l1BuildingHeader.Root = s.l1BuildingState.IntermediateRoot(s.l1Cfg.Config.IsEIP158(s.l1BuildingHeader.Number)) - block := types.NewBlock(s.l1BuildingHeader, s.l1Transactions, nil, s.l1Receipts, trie.NewStackTrie(nil)) + + var withdrawals []*types.Withdrawal if s.l1Cfg.Config.IsShanghai(s.l1BuildingHeader.Number, s.l1BuildingHeader.Time) { - block = block.WithWithdrawals(make([]*types.Withdrawal, 0)) + withdrawals = make([]*types.Withdrawal, 0) } + + block := types.NewBlock(s.l1BuildingHeader, &types.Body{Transactions: s.l1Transactions, Withdrawals: withdrawals}, s.l1Receipts, trie.NewStackTrie(nil)) if s.l1Cfg.Config.IsCancun(s.l1BuildingHeader.Number, s.l1BuildingHeader.Time) { parent := s.l1Chain.GetHeaderByHash(s.l1BuildingHeader.ParentHash) var ( diff --git a/op-e2e/actions/l1_replica.go b/op-e2e/actions/l1_replica.go index 430dffa3920d..fb042757065e 100644 --- a/op-e2e/actions/l1_replica.go +++ b/op-e2e/actions/l1_replica.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/txpool/blobpool" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth" @@ -54,6 +55,8 @@ func NewL1Replica(t Testing, log log.Logger, genesis *core.Genesis) *L1Replica { NetworkId: genesis.Config.ChainID.Uint64(), Genesis: genesis, RollupDisableTxPoolGossip: true, + StateScheme: rawdb.HashScheme, + NoPruning: true, BlobPool: blobpool.Config{ Datadir: t.TempDir(), Datacap: blobpool.DefaultConfig.Datacap, @@ -80,7 +83,6 @@ func NewL1Replica(t Testing, log log.Logger, genesis *core.Genesis) *L1Replica { backend, err := eth.New(n, ethCfg) require.NoError(t, err) - backend.Merger().FinalizePoS() n.RegisterAPIs(tracers.APIs(backend.APIBackend)) diff --git a/op-e2e/actions/l2_engine.go b/op-e2e/actions/l2_engine.go index 88d40ec2a3b9..54267ee9da58 100644 --- a/op-e2e/actions/l2_engine.go +++ b/op-e2e/actions/l2_engine.go @@ -5,6 +5,7 @@ import ( "github.com/ethereum-optimism/optimism/op-e2e/e2eutils" "github.com/ethereum-optimism/optimism/op-program/client/l2/engineapi" + "github.com/ethereum/go-ethereum/core/rawdb" "github.com/stretchr/testify/require" "github.com/ethereum/go-ethereum/common" @@ -83,8 +84,10 @@ func NewL2Engine(t Testing, log log.Logger, genesis *core.Genesis, rollupGenesis func newBackend(t e2eutils.TestingBase, genesis *core.Genesis, jwtPath string, options []EngineOption) (*node.Node, *geth.Ethereum, *engineApiBackend) { ethCfg := ðconfig.Config{ - NetworkId: genesis.Config.ChainID.Uint64(), - Genesis: genesis, + NetworkId: genesis.Config.ChainID.Uint64(), + Genesis: genesis, + StateScheme: rawdb.HashScheme, + NoPruning: true, } nodeCfg := &node.Config{ Name: "l2-geth", diff --git a/op-e2e/actions/reorg_test.go b/op-e2e/actions/reorg_test.go index 66273bd62457..2370c9774f13 100644 --- a/op-e2e/actions/reorg_test.go +++ b/op-e2e/actions/reorg_test.go @@ -397,7 +397,7 @@ func DeepReorg(gt *testing.T, deltaTimeOffset *hexutil.Uint64) { // Create a var to store the ref for the second to last block of the second sequencing window var blockA39 eth.L1BlockRef - var aliceL2TxBlock types.Block + var aliceL2TxBlock *types.Block // Mine enough empty blocks on L1 to reach two sequence windows. for i := uint64(0); i < sd.RollupCfg.SeqWindowSize*3; i++ { // At block #50, send a batch to L1 containing all L2 blocks built up to this point. @@ -448,7 +448,7 @@ func DeepReorg(gt *testing.T, deltaTimeOffset *hexutil.Uint64) { b0, err := l2Client.BlockByNumber(t.Ctx(), big.NewInt(int64(sequencer.L2Unsafe().Number))) require.NoError(t, err, "failed to fetch unsafe head of L2 after submitting alice's transaction") - aliceL2TxBlock = *b0 + aliceL2TxBlock = b0 } // Ask sequencer to handle new L1 head and build L2 blocks up to the L1 head @@ -572,6 +572,8 @@ func DeepReorg(gt *testing.T, deltaTimeOffset *hexutil.Uint64) { require.Equal(t, verifier.L2Safe(), verifier.L2Unsafe(), "L2 safe and unsafe head should be equal") checkVerifEngine() + require.NotNil(gt, aliceL2TxBlock) + // Ensure that the parent of the L2 block containing Alice's transaction still exists b0, err := l2Client.BlockByHash(t.Ctx(), aliceL2TxBlock.ParentHash()) require.NoError(t, err, "Parent of the L2 block containing Alice's transaction should still exist on L2") diff --git a/op-e2e/actions/sync_test.go b/op-e2e/actions/sync_test.go index e8c6b9a7824f..7ff35eab47dc 100644 --- a/op-e2e/actions/sync_test.go +++ b/op-e2e/actions/sync_test.go @@ -243,12 +243,12 @@ func TestBackupUnsafe(gt *testing.T) { To: &dp.Addresses.Bob, Value: e2eutils.Ether(2), }) - block = block.WithBody([]*types.Transaction{block.Transactions()[0], validTx}, []*types.Header{}) + block = block.WithBody(types.Body{Transactions: []*types.Transaction{block.Transactions()[0], validTx}}) } if i == 3 { // Make block B3 as an invalid block invalidTx := testutils.RandomTx(rng, big.NewInt(100), signer) - block = block.WithBody([]*types.Transaction{block.Transactions()[0], invalidTx}, []*types.Header{}) + block = block.WithBody(types.Body{Transactions: []*types.Transaction{block.Transactions()[0], invalidTx}}) } // Add A1, B2, B3, B4, B5 into the channel err = channelOut.AddBlock(sd.RollupCfg, block) @@ -404,12 +404,12 @@ func TestBackupUnsafeReorgForkChoiceInputError(gt *testing.T) { To: &dp.Addresses.Bob, Value: e2eutils.Ether(2), }) - block = block.WithBody([]*types.Transaction{block.Transactions()[0], validTx}, []*types.Header{}) + block = block.WithBody(types.Body{Transactions: []*types.Transaction{block.Transactions()[0], validTx}}) } if i == 3 { // Make block B3 as an invalid block invalidTx := testutils.RandomTx(rng, big.NewInt(100), signer) - block = block.WithBody([]*types.Transaction{block.Transactions()[0], invalidTx}, []*types.Header{}) + block = block.WithBody(types.Body{Transactions: []*types.Transaction{block.Transactions()[0], invalidTx}}) } // Add A1, B2, B3, B4, B5 into the channel err = channelOut.AddBlock(sd.RollupCfg, block) @@ -537,12 +537,12 @@ func TestBackupUnsafeReorgForkChoiceNotInputError(gt *testing.T) { To: &dp.Addresses.Bob, Value: e2eutils.Ether(2), }) - block = block.WithBody([]*types.Transaction{block.Transactions()[0], validTx}, []*types.Header{}) + block = block.WithBody(types.Body{Transactions: []*types.Transaction{block.Transactions()[0], validTx}}) } if i == 3 { // Make block B3 as an invalid block invalidTx := testutils.RandomTx(rng, big.NewInt(100), signer) - block = block.WithBody([]*types.Transaction{block.Transactions()[0], invalidTx}, []*types.Header{}) + block = block.WithBody(types.Body{Transactions: []*types.Transaction{block.Transactions()[0], invalidTx}}) } // Add A1, B2, B3, B4, B5 into the channel err = channelOut.AddBlock(sd.RollupCfg, block) @@ -919,7 +919,7 @@ func TestInvalidPayloadInSpanBatch(gt *testing.T) { if i == 8 { // Make block A8 as an invalid block invalidTx := testutils.RandomTx(rng, big.NewInt(100), signer) - block = block.WithBody([]*types.Transaction{block.Transactions()[0], invalidTx}, []*types.Header{}) + block = block.WithBody(types.Body{Transactions: []*types.Transaction{block.Transactions()[0], invalidTx}}) } // Add A1 ~ A12 into the channel err = channelOut.AddBlock(sd.RollupCfg, block) @@ -968,7 +968,7 @@ func TestInvalidPayloadInSpanBatch(gt *testing.T) { Data: data, }) // Create valid new block B1 at the same height as A1 - block = block.WithBody([]*types.Transaction{block.Transactions()[0], tx}, []*types.Header{}) + block = block.WithBody(types.Body{Transactions: []*types.Transaction{block.Transactions()[0], tx}}) } // Add B1, A2 ~ A12 into the channel err = channelOut.AddBlock(sd.RollupCfg, block) diff --git a/op-e2e/config/init.go b/op-e2e/config/init.go index 54ad51d57a60..526c7a96b389 100644 --- a/op-e2e/config/init.go +++ b/op-e2e/config/init.go @@ -5,13 +5,12 @@ import ( "errors" "flag" "fmt" + "log/slog" "os" "path/filepath" "testing" "time" - "golang.org/x/exp/slog" - "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/log" diff --git a/op-e2e/devnet/devnet_test.go b/op-e2e/devnet/devnet_test.go index f8bbf865c13f..2a9b4be8aa5d 100644 --- a/op-e2e/devnet/devnet_test.go +++ b/op-e2e/devnet/devnet_test.go @@ -2,6 +2,7 @@ package devnet import ( "context" + "log/slog" "testing" "time" @@ -10,7 +11,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/exp/slog" ) func TestDevnet(t *testing.T) { diff --git a/op-e2e/e2eutils/geth/geth.go b/op-e2e/e2eutils/geth/geth.go index d79900bf717d..ee03b82c1546 100644 --- a/op-e2e/e2eutils/geth/geth.go +++ b/op-e2e/e2eutils/geth/geth.go @@ -3,11 +3,13 @@ package geth import ( "fmt" "math/big" + "time" "github.com/ethereum-optimism/optimism/op-service/clock" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/txpool/blobpool" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/eth/catalyst" @@ -31,6 +33,15 @@ func InitL1(chainID uint64, blockTime uint64, finalizedDistance uint64, genesis Datacap: blobpool.DefaultConfig.Datacap, PriceBump: blobpool.DefaultConfig.PriceBump, }, + StateScheme: rawdb.HashScheme, + Miner: miner.Config{ + PendingFeeRecipient: common.Address{}, + ExtraData: nil, + GasCeil: 0, + GasPrice: nil, + // enough to build blocks within 1 second, but high enough to avoid unnecessary test CPU cycles. + Recommit: time.Millisecond * 400, + }, } nodeConfig := &node.Config{ Name: "l1-geth", @@ -46,8 +57,6 @@ func InitL1(chainID uint64, blockTime uint64, finalizedDistance uint64, genesis if err != nil { return nil, nil, err } - // Activate merge - l1Eth.Merger().FinalizePoS() // Instead of running a whole beacon node, we run this fake-proof-of-stake sidecar that sequences L1 blocks using the Engine API. l1Node.RegisterLifecycle(&fakePoS{ @@ -84,16 +93,16 @@ type GethOption func(ethCfg *ethconfig.Config, nodeCfg *node.Config) error // InitL2 inits a L2 geth node. func InitL2(name string, l2ChainID *big.Int, genesis *core.Genesis, jwtPath string, opts ...GethOption) (*node.Node, *eth.Ethereum, error) { ethConfig := ðconfig.Config{ - NetworkId: l2ChainID.Uint64(), - Genesis: genesis, + NetworkId: l2ChainID.Uint64(), + Genesis: genesis, + StateScheme: rawdb.HashScheme, Miner: miner.Config{ - Etherbase: common.Address{}, - ExtraData: nil, - GasFloor: 0, - GasCeil: 0, - GasPrice: nil, - Recommit: 0, - NewPayloadTimeout: 0, + PendingFeeRecipient: common.Address{}, + ExtraData: nil, + GasCeil: 0, + GasPrice: nil, + // enough to build blocks within 1 second, but high enough to avoid unnecessary test CPU cycles. + Recommit: time.Millisecond * 400, }, } nodeConfig := defaultNodeConfig(fmt.Sprintf("l2-geth-%v", name), jwtPath) @@ -110,6 +119,7 @@ func createGethNode(l2 bool, nodeCfg *node.Config, ethCfg *ethconfig.Config, opt return nil, nil, fmt.Errorf("failed to apply geth option %d: %w", i, err) } } + ethCfg.StateScheme = rawdb.HashScheme ethCfg.NoPruning = true // force everything to be an archive node n, err := node.New(nodeCfg) if err != nil { diff --git a/op-e2e/e2eutils/transactions/blobs.go b/op-e2e/e2eutils/transactions/blobs.go index 980c357a1b68..e176ca7c91b2 100644 --- a/op-e2e/e2eutils/transactions/blobs.go +++ b/op-e2e/e2eutils/transactions/blobs.go @@ -8,14 +8,14 @@ import ( ) var ( - emptyBlob kzg4844.Blob + emptyBlob *kzg4844.Blob emptyBlobCommit kzg4844.Commitment emptyBlobProof kzg4844.Proof ) func init() { var err error - emptyBlob = kzg4844.Blob{} + emptyBlob = &kzg4844.Blob{} emptyBlobCommit, err = kzg4844.BlobToCommitment(emptyBlob) if err != nil { panic("failed to create empty blob commitment: " + err.Error()) @@ -30,7 +30,7 @@ func init() { // https://github.com/ethereum/go-ethereum/commit/2a6beb6a39d7cb3c5906dd4465d65da6efcc73cd func CreateEmptyBlobTx(withSidecar bool, chainID uint64) *types.BlobTx { sidecar := &types.BlobTxSidecar{ - Blobs: []kzg4844.Blob{emptyBlob}, + Blobs: []kzg4844.Blob{*emptyBlob}, Commitments: []kzg4844.Commitment{emptyBlobCommit}, Proofs: []kzg4844.Proof{emptyBlobProof}, } diff --git a/op-e2e/external_geth/main.go b/op-e2e/external_geth/main.go index f68fbd073be2..c97061d868ff 100644 --- a/op-e2e/external_geth/main.go +++ b/op-e2e/external_geth/main.go @@ -111,6 +111,7 @@ func initialize(binPath string, config external.Config) error { cmd := exec.Command( binPath, "--datadir", config.DataDir, + "--state.scheme=hash", "init", config.GenesisPath, ) return cmd.Run() @@ -146,6 +147,7 @@ func execute(binPath string, config external.Config) (*gethSession, error) { "--ws.port", "0", "--ws.api", "debug,eth,txpool,net,engine", "--syncmode=full", + "--state.scheme=hash", "--nodiscover", "--port", "0", "--maxpeers", "0", diff --git a/op-node/p2p/pings_test.go b/op-node/p2p/pings_test.go index 75aa6fd93595..f1dbb60446b2 100644 --- a/op-node/p2p/pings_test.go +++ b/op-node/p2p/pings_test.go @@ -3,6 +3,7 @@ package p2p import ( "context" "errors" + "log/slog" "sync/atomic" "testing" "time" @@ -10,7 +11,6 @@ import ( "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/p2p/protocol/ping" "github.com/stretchr/testify/require" - "golang.org/x/exp/slog" "github.com/ethereum-optimism/optimism/op-service/clock" "github.com/ethereum-optimism/optimism/op-service/testlog" diff --git a/op-node/rollup/chain_spec_test.go b/op-node/rollup/chain_spec_test.go index f42cd30ec643..231aca92bc7e 100644 --- a/op-node/rollup/chain_spec_test.go +++ b/op-node/rollup/chain_spec_test.go @@ -1,6 +1,7 @@ package rollup import ( + "log/slog" "math/big" "testing" @@ -8,7 +9,6 @@ import ( "github.com/ethereum-optimism/optimism/op-service/testlog" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "golang.org/x/exp/slog" ) func u64ptr(n uint64) *uint64 { diff --git a/op-node/rollup/derive/batch_test.go b/op-node/rollup/derive/batch_test.go index 3dc554a59325..9e48f265d745 100644 --- a/op-node/rollup/derive/batch_test.go +++ b/op-node/rollup/derive/batch_test.go @@ -6,12 +6,11 @@ import ( "math/rand" "testing" - "github.com/stretchr/testify/require" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" + "github.com/stretchr/testify/require" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/eth" diff --git a/op-node/rollup/derive/batch_test_utils.go b/op-node/rollup/derive/batch_test_utils.go index 3b931cc4f03b..5783b5ec39bf 100644 --- a/op-node/rollup/derive/batch_test_utils.go +++ b/op-node/rollup/derive/batch_test_utils.go @@ -21,7 +21,7 @@ func RandomSingularBatch(rng *rand.Rand, txCount int, chainID *big.Int) *Singula if err != nil { panic("tx Marshal binary" + err.Error()) } - txsEncoded = append(txsEncoded, hexutil.Bytes(txEncoded)) + txsEncoded = append(txsEncoded, txEncoded) } return &SingularBatch{ ParentHash: testutils.RandomHash(rng), diff --git a/op-node/rollup/derive/channel_out_test.go b/op-node/rollup/derive/channel_out_test.go index 0c82bbb9895b..e2eda7344eb5 100644 --- a/op-node/rollup/derive/channel_out_test.go +++ b/op-node/rollup/derive/channel_out_test.go @@ -63,10 +63,11 @@ func TestChannelOutAddBlock(t *testing.T) { cout := tcase.ChannelOut(t, &rollupCfg) header := &types.Header{Number: big.NewInt(1), Difficulty: big.NewInt(100)} block := types.NewBlockWithHeader(header).WithBody( - []*types.Transaction{ - types.NewTx(&types.DynamicFeeTx{}), + types.Body{ + Transactions: []*types.Transaction{ + types.NewTx(&types.DynamicFeeTx{}), + }, }, - nil, ) err := cout.AddBlock(&rollupCfg, block) require.Error(t, err) diff --git a/op-node/rollup/derive/fuzz_parsers_test.go b/op-node/rollup/derive/fuzz_parsers_test.go index 4054eb7f2370..95ce94bc7cc8 100644 --- a/op-node/rollup/derive/fuzz_parsers_test.go +++ b/op-node/rollup/derive/fuzz_parsers_test.go @@ -5,6 +5,7 @@ import ( "math/big" "testing" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/google/go-cmp/cmp" "github.com/holiman/uint256" "github.com/stretchr/testify/require" @@ -234,7 +235,7 @@ func FuzzUnmarshallLogEvent(f *testing.F) { // Set the EVM state up once to fuzz against state, err := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) require.NoError(f, err) - state.SetBalance(from, uint256.MustFromBig(BytesToBigInt([]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}))) + state.SetBalance(from, uint256.MustFromBig(BytesToBigInt([]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff})), tracing.BalanceChangeUnspecified) _, addr, _, err := runtime.Create(common.FromHex(bindings.OptimismPortalMetaData.Bin), &runtime.Config{ Origin: from, State: state, diff --git a/op-node/rollup/derive/span_batch_tx.go b/op-node/rollup/derive/span_batch_tx.go index cd0a471ab266..5f5bffb02b8b 100644 --- a/op-node/rollup/derive/span_batch_tx.go +++ b/op-node/rollup/derive/span_batch_tx.go @@ -175,7 +175,7 @@ func (tx *spanBatchTx) convertToFullTx(nonce, gas uint64, to *common.Address, ch } // newSpanBatchTx converts types.Transaction to spanBatchTx -func newSpanBatchTx(tx types.Transaction) (*spanBatchTx, error) { +func newSpanBatchTx(tx *types.Transaction) (*spanBatchTx, error) { var inner spanBatchTxData switch tx.Type() { case types.LegacyTxType: diff --git a/op-node/rollup/derive/span_batch_tx_test.go b/op-node/rollup/derive/span_batch_tx_test.go index c846f65812b9..55a9101da5e7 100644 --- a/op-node/rollup/derive/span_batch_tx_test.go +++ b/op-node/rollup/derive/span_batch_tx_test.go @@ -39,7 +39,7 @@ func TestSpanBatchTxConvert(t *testing.T) { tx := testCase.mkTx(rng, signer) v, r, s := tx.RawSignatureValues() - sbtx, err := newSpanBatchTx(*tx) + sbtx, err := newSpanBatchTx(tx) require.NoError(t, err) tx2, err := sbtx.convertToFullTx(tx.Nonce(), tx.Gas(), tx.To(), chainID, v, r, s) @@ -77,7 +77,7 @@ func TestSpanBatchTxRoundTrip(t *testing.T) { for txIdx := 0; txIdx < testCase.trials; txIdx++ { tx := testCase.mkTx(rng, signer) - sbtx, err := newSpanBatchTx(*tx) + sbtx, err := newSpanBatchTx(tx) require.NoError(t, err) sbtxEncoded, err := sbtx.MarshalBinary() @@ -100,7 +100,7 @@ func (txData *spanBatchDummyTxData) txType() byte { return types.DepositTxType } func TestSpanBatchTxInvalidTxType(t *testing.T) { // span batch never contain deposit tx depositTx := types.NewTx(&types.DepositTx{}) - _, err := newSpanBatchTx(*depositTx) + _, err := newSpanBatchTx(depositTx) require.ErrorContains(t, err, "invalid tx type") var sbtx spanBatchTx diff --git a/op-node/rollup/derive/span_batch_txs.go b/op-node/rollup/derive/span_batch_txs.go index 305aafefe9da..e4bc73d0f987 100644 --- a/op-node/rollup/derive/span_batch_txs.go +++ b/op-node/rollup/derive/span_batch_txs.go @@ -424,7 +424,7 @@ func (sbtx *spanBatchTxs) AddTxs(txs [][]byte, chainID *big.Int) error { totalBlockTxCount := uint64(len(txs)) offset := sbtx.totalBlockTxCount for idx := 0; idx < int(totalBlockTxCount); idx++ { - var tx types.Transaction + tx := &types.Transaction{} if err := tx.UnmarshalBinary(txs[idx]); err != nil { return errors.New("failed to decode tx") } diff --git a/op-node/rollup/derive/test/random.go b/op-node/rollup/derive/test/random.go index 57ad0d8d9579..ba9600da8c82 100644 --- a/op-node/rollup/derive/test/random.go +++ b/op-node/rollup/derive/test/random.go @@ -16,7 +16,8 @@ import ( // RandomL2Block returns a random block whose first transaction is a random pre-Ecotone upgrade // L1 Info Deposit transaction. func RandomL2Block(rng *rand.Rand, txCount int, t time.Time) (*types.Block, []*types.Receipt) { - l1Block := types.NewBlock(testutils.RandomHeader(rng), nil, nil, nil, trie.NewStackTrie(nil)) + body := types.Body{} + l1Block := types.NewBlock(testutils.RandomHeader(rng), &body, nil, trie.NewStackTrie(nil)) rollupCfg := rollup.Config{} if testutils.RandomBool(rng) { t := uint64(0) @@ -45,5 +46,5 @@ func RandomL2BlockWithChainIdAndTime(rng *rand.Rand, txCount int, chainId *big.I for i := 0; i < txCount; i++ { txs = append(txs, testutils.RandomTx(rng, big.NewInt(int64(rng.Uint32())), signer)) } - return block.WithBody(txs, nil) + return block.WithBody(types.Body{Transactions: txs}) } diff --git a/op-node/rollup/event/tracer_log.go b/op-node/rollup/event/tracer_log.go index 483fb9781326..a699df2e29d6 100644 --- a/op-node/rollup/event/tracer_log.go +++ b/op-node/rollup/event/tracer_log.go @@ -1,10 +1,9 @@ package event import ( + "log/slog" "time" - "golang.org/x/exp/slog" - "github.com/ethereum/go-ethereum/log" ) diff --git a/op-program/client/l2/db.go b/op-program/client/l2/db.go index 018b79ed9356..3dfa5ec0d6b9 100644 --- a/op-program/client/l2/db.go +++ b/op-program/client/l2/db.go @@ -74,7 +74,7 @@ func (o *OracleKeyValueStore) Delete(key []byte) error { panic("not supported") } -func (o *OracleKeyValueStore) Stat(property string) (string, error) { +func (o *OracleKeyValueStore) Stat() (string, error) { panic("not supported") } diff --git a/op-program/client/l2/db_test.go b/op-program/client/l2/db_test.go index 00b70c810d73..c85f99e2c55f 100644 --- a/op-program/client/l2/db_test.go +++ b/op-program/client/l2/db_test.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb" @@ -130,12 +131,12 @@ func TestUpdateState(t *testing.T) { statedb, err := state.New(genesisBlock.Root(), state.NewDatabase(rawdb.NewDatabase(db)), nil) require.NoError(t, err) - statedb.SetBalance(userAccount, uint256.NewInt(50)) + statedb.SetBalance(userAccount, uint256.NewInt(50), tracing.BalanceChangeUnspecified) require.Equal(t, uint256.NewInt(50), statedb.GetBalance(userAccount)) statedb.SetNonce(userAccount, uint64(5)) require.Equal(t, uint64(5), statedb.GetNonce(userAccount)) - statedb.SetBalance(unknownAccount, uint256.NewInt(60)) + statedb.SetBalance(unknownAccount, uint256.NewInt(60), tracing.BalanceChangeUnspecified) require.Equal(t, uint256.NewInt(60), statedb.GetBalance(unknownAccount)) statedb.SetCode(codeAccount, []byte{1}) require.Equal(t, []byte{1}, statedb.GetCode(codeAccount)) diff --git a/op-program/client/l2/engine_test.go b/op-program/client/l2/engine_test.go index 18d9a4c26cf6..28c9f8006dce 100644 --- a/op-program/client/l2/engine_test.go +++ b/op-program/client/l2/engine_test.go @@ -179,7 +179,10 @@ func createL2Block(t *testing.T, number int) *types.Block { Number: big.NewInt(int64(number)), BaseFee: big.NewInt(7), } - return types.NewBlock(header, []*types.Transaction{types.NewTx(tx)}, nil, nil, trie.NewStackTrie(nil)) + body := &types.Body{ + Transactions: []*types.Transaction{types.NewTx(tx)}, + } + return types.NewBlock(header, body, nil, trie.NewStackTrie(nil)) } type stubEngineBackend struct { diff --git a/op-program/client/l2/engineapi/block_processor.go b/op-program/client/l2/engineapi/block_processor.go index d81212db206c..9e56445f5511 100644 --- a/op-program/client/l2/engineapi/block_processor.go +++ b/op-program/client/l2/engineapi/block_processor.go @@ -124,7 +124,11 @@ func (b *BlockProcessor) AddTx(tx *types.Transaction) error { } func (b *BlockProcessor) Assemble() (*types.Block, error) { - return b.dataProvider.Engine().FinalizeAndAssemble(b.dataProvider, b.header, b.state, b.transactions, nil, b.receipts, nil) + body := types.Body{ + Transactions: b.transactions, + } + + return b.dataProvider.Engine().FinalizeAndAssemble(b.dataProvider, b.header, b.state, &body, b.receipts) } func (b *BlockProcessor) Commit() error { diff --git a/op-program/client/l2/oracle.go b/op-program/client/l2/oracle.go index 6aa049e15992..0563079a830e 100644 --- a/op-program/client/l2/oracle.go +++ b/op-program/client/l2/oracle.go @@ -66,7 +66,7 @@ func (p *PreimageOracle) BlockByHash(blockHash common.Hash) *types.Block { header := p.headerByBlockHash(blockHash) txs := p.LoadTransactions(blockHash, header.TxHash) - return types.NewBlockWithHeader(header).WithBody(txs, nil) + return types.NewBlockWithHeader(header).WithBody(types.Body{Transactions: txs}) } func (p *PreimageOracle) LoadTransactions(blockHash common.Hash, txHash common.Hash) []*types.Transaction { diff --git a/op-program/client/mpt/db.go b/op-program/client/mpt/db.go index fe9e234cf2df..5d9e9147ced9 100644 --- a/op-program/client/mpt/db.go +++ b/op-program/client/mpt/db.go @@ -31,7 +31,7 @@ func (p DB) Delete(key []byte) error { return nil } -func (p DB) Stat(property string) (string, error) { +func (p DB) Stat() (string, error) { panic("not supported") } diff --git a/op-service/client/http_test.go b/op-service/client/http_test.go index 60fd9fd9873f..df84e48299c2 100644 --- a/op-service/client/http_test.go +++ b/op-service/client/http_test.go @@ -2,13 +2,12 @@ package client import ( "context" + "log/slog" "net/http" "net/http/httptest" "net/url" "testing" - "golang.org/x/exp/slog" - "github.com/ethereum-optimism/optimism/op-service/testlog" "github.com/stretchr/testify/require" ) diff --git a/op-service/crypto/signature.go b/op-service/crypto/signature.go index c0abd3ef2afd..0b0afc02ecef 100644 --- a/op-service/crypto/signature.go +++ b/op-service/crypto/signature.go @@ -91,6 +91,9 @@ func SignerFactoryFromConfig(l log.Logger, privateKey, mnemonic, hdPath string, return nil, common.Address{}, fmt.Errorf("failed to parse the private key: %w", err) } } + // we force the curve to Geth's instance, because Geth does an equality check in the nocgo version: + // https://github.com/ethereum/go-ethereum/blob/723b1e36ad6a9e998f06f74cc8b11d51635c6402/crypto/signature_nocgo.go#L82 + privKey.PublicKey.Curve = crypto.S256() fromAddress = crypto.PubkeyToAddress(privKey.PublicKey) signer = func(chainID *big.Int) SignerFn { s := PrivateKeySignerFn(privKey, chainID) diff --git a/op-service/crypto/signature_test.go b/op-service/crypto/signature_test.go new file mode 100644 index 000000000000..1cd52165bf5b --- /dev/null +++ b/op-service/crypto/signature_test.go @@ -0,0 +1,56 @@ +package crypto + +import ( + "context" + "math/big" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/ethereum-optimism/optimism/op-service/signer" + "github.com/ethereum-optimism/optimism/op-service/testlog" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/log" +) + +// should be run with CGO_ENABLED=0 + +func TestSignerFactoryFromMnemonic(t *testing.T) { + mnemonic := "test test test test test test test test test test test junk" + hdPath := "m/44'/60'/0'/0/1" + testSigner(t, "", mnemonic, hdPath, signer.CLIConfig{}) +} + +func TestSignerFactoryFromKey(t *testing.T) { + priv := "59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d" + testSigner(t, priv, "", "", signer.CLIConfig{}) +} + +func testSigner(t *testing.T, priv, mnemonic, hdPath string, cfg signer.CLIConfig) { + logger := testlog.Logger(t, log.LevelDebug) + + factoryFn, addr, err := SignerFactoryFromConfig(logger, priv, mnemonic, hdPath, cfg) + require.NoError(t, err) + expectedAddr := common.HexToAddress("0x70997970C51812dc3A010C7d01b50e0d17dc79C8") + require.Equal(t, expectedAddr, addr) + chainID := big.NewInt(10) + signerFn := factoryFn(chainID) // for chain ID 10 + tx := types.NewTx(&types.DynamicFeeTx{ + ChainID: chainID, + Nonce: 0, + GasTipCap: big.NewInt(1), + GasFeeCap: big.NewInt(1), + Gas: 21000, + To: nil, + Value: big.NewInt(0), + Data: []byte("test"), + }) + signedTx, err := signerFn(context.Background(), addr, tx) + require.NoError(t, err) + gethSigner := types.LatestSignerForChainID(chainID) + sender, err := gethSigner.Sender(signedTx) + require.NoError(t, err) + require.Equal(t, expectedAddr, sender) +} diff --git a/op-service/dial/rollup_sync_test.go b/op-service/dial/rollup_sync_test.go index 1d3898e8fdb8..9ed3e2a39bdd 100644 --- a/op-service/dial/rollup_sync_test.go +++ b/op-service/dial/rollup_sync_test.go @@ -3,6 +3,7 @@ package dial import ( "context" "errors" + "log/slog" "testing" "time" @@ -10,7 +11,6 @@ import ( "github.com/ethereum-optimism/optimism/op-service/testlog" "github.com/ethereum-optimism/optimism/op-service/testutils" "github.com/stretchr/testify/require" - "golang.org/x/exp/slog" ) func TestWaitRollupSync(t *testing.T) { diff --git a/op-service/eth/blob.go b/op-service/eth/blob.go index da871215da85..9e51c568634f 100644 --- a/op-service/eth/blob.go +++ b/op-service/eth/blob.go @@ -57,7 +57,7 @@ func (b *Blob) TerminalString() string { } func (b *Blob) ComputeKZGCommitment() (kzg4844.Commitment, error) { - return kzg4844.BlobToCommitment(*b.KZGBlob()) + return kzg4844.BlobToCommitment(b.KZGBlob()) } // KZGToVersionedHash computes the "blob hash" (a.k.a. versioned-hash) of a blob-commitment, as used in a blob-tx. @@ -70,7 +70,7 @@ func KZGToVersionedHash(commitment kzg4844.Commitment) (out common.Hash) { // VerifyBlobProof verifies that the given blob and proof corresponds to the given commitment, // returning error if the verification fails. func VerifyBlobProof(blob *Blob, commitment kzg4844.Commitment, proof kzg4844.Proof) error { - return kzg4844.VerifyBlobProof(*blob.KZGBlob(), commitment, proof) + return kzg4844.VerifyBlobProof(blob.KZGBlob(), commitment, proof) } // FromData encodes the given input data into this blob. The encoding scheme is as follows: diff --git a/op-service/log/cli.go b/op-service/log/cli.go index ab4718d5e4a2..2bd3c693009b 100644 --- a/op-service/log/cli.go +++ b/op-service/log/cli.go @@ -3,11 +3,11 @@ package log import ( "fmt" "io" + "log/slog" "os" "strings" "github.com/urfave/cli/v2" - "golang.org/x/exp/slog" "golang.org/x/term" "github.com/ethereum/go-ethereum/log" diff --git a/op-service/log/dynamic.go b/op-service/log/dynamic.go index 72f23f505bbc..0259fb15b201 100644 --- a/op-service/log/dynamic.go +++ b/op-service/log/dynamic.go @@ -2,8 +2,7 @@ package log import ( "context" - - "golang.org/x/exp/slog" + "log/slog" ) type LvlSetter interface { diff --git a/op-service/log/dynamic_test.go b/op-service/log/dynamic_test.go index 3a992710b4d8..25076246364c 100644 --- a/op-service/log/dynamic_test.go +++ b/op-service/log/dynamic_test.go @@ -2,10 +2,10 @@ package log import ( "context" + "log/slog" "testing" "github.com/stretchr/testify/require" - "golang.org/x/exp/slog" "github.com/ethereum/go-ethereum/log" ) diff --git a/op-service/log/writer.go b/op-service/log/writer.go index 0a1731383068..e3c658d3a7b8 100644 --- a/op-service/log/writer.go +++ b/op-service/log/writer.go @@ -1,10 +1,9 @@ package log import ( + "log/slog" "sync" - "golang.org/x/exp/slog" - "github.com/ethereum/go-ethereum/log" ) diff --git a/op-service/log/writer_test.go b/op-service/log/writer_test.go index 2e9cf14b3a75..274a2aa2a3d0 100644 --- a/op-service/log/writer_test.go +++ b/op-service/log/writer_test.go @@ -2,10 +2,10 @@ package log_test import ( "io" + "log/slog" "testing" "github.com/stretchr/testify/require" - "golang.org/x/exp/slog" "github.com/ethereum/go-ethereum/log" diff --git a/op-service/sources/batching/bound.go b/op-service/sources/batching/bound.go index 33e19c3dfbfa..75a2a3f12a03 100644 --- a/op-service/sources/batching/bound.go +++ b/op-service/sources/batching/bound.go @@ -43,11 +43,11 @@ func (b *BoundContract) DecodeCall(data []byte) (string, *CallResult, error) { method, err := b.abi.MethodById(data[:4]) if err != nil { // ABI doesn't return a nicely typed error so treat any failure to find the method as unknown - return "", nil, fmt.Errorf("%w: %v", ErrUnknownMethod, err.Error()) + return "", nil, fmt.Errorf("%w: %w", ErrUnknownMethod, err) } args, err := method.Inputs.Unpack(data[4:]) if err != nil { - return "", nil, fmt.Errorf("%w: %v", ErrInvalidCall, err.Error()) + return "", nil, fmt.Errorf("%w: %w", ErrInvalidCall, err) } return method.Name, &CallResult{args}, nil } @@ -58,7 +58,7 @@ func (b *BoundContract) DecodeEvent(log *types.Log) (string, *CallResult, error) } event, err := b.abi.EventByID(log.Topics[0]) if err != nil { - return "", nil, fmt.Errorf("%w: %v", ErrUnknownEvent, err.Error()) + return "", nil, fmt.Errorf("%w: %w", ErrUnknownEvent, err) } argsMap := make(map[string]interface{}) @@ -69,13 +69,13 @@ func (b *BoundContract) DecodeEvent(log *types.Log) (string, *CallResult, error) } } if err := abi.ParseTopicsIntoMap(argsMap, indexed, log.Topics[1:]); err != nil { - return "", nil, fmt.Errorf("%w indexed topics: %v", ErrInvalidEvent, err.Error()) + return "", nil, fmt.Errorf("%w indexed topics: %w", ErrInvalidEvent, err) } nonIndexed := event.Inputs.NonIndexed() if len(nonIndexed) > 0 { if err := nonIndexed.UnpackIntoMap(argsMap, log.Data); err != nil { - return "", nil, fmt.Errorf("%w non-indexed topics: %v", ErrInvalidEvent, err.Error()) + return "", nil, fmt.Errorf("%w non-indexed topics: %w", ErrInvalidEvent, err) } } args := make([]interface{}, 0, len(event.Inputs)) diff --git a/op-service/sources/l1_beacon_client_test.go b/op-service/sources/l1_beacon_client_test.go index ef4ede18c68d..086cb0f9dae4 100644 --- a/op-service/sources/l1_beacon_client_test.go +++ b/op-service/sources/l1_beacon_client_test.go @@ -25,8 +25,8 @@ func makeTestBlobSidecar(index uint64) (eth.IndexedBlobHash, *eth.BlobSidecar) { // make first byte of test blob match its index so we can easily verify if is returned in the // expected order blob[0] = byte(index) - commit, _ := kzg4844.BlobToCommitment(blob) - proof, _ := kzg4844.ComputeBlobProof(blob, commit) + commit, _ := kzg4844.BlobToCommitment(&blob) + proof, _ := kzg4844.ComputeBlobProof(&blob, commit) hash := eth.KZGToVersionedHash(commit) idh := eth.IndexedBlobHash{ diff --git a/op-service/sources/rollupclient.go b/op-service/sources/rollupclient.go index 14c38d35b4e8..acd0f84b3917 100644 --- a/op-service/sources/rollupclient.go +++ b/op-service/sources/rollupclient.go @@ -2,10 +2,10 @@ package sources import ( "context" + "log/slog" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "golang.org/x/exp/slog" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/client" diff --git a/op-service/testlog/capturing.go b/op-service/testlog/capturing.go index 6e1edb09b504..28a8a4926078 100644 --- a/op-service/testlog/capturing.go +++ b/op-service/testlog/capturing.go @@ -2,10 +2,9 @@ package testlog import ( "context" + "log/slog" "strings" - "golang.org/x/exp/slog" - "github.com/ethereum/go-ethereum/log" ) diff --git a/op-service/testlog/testlog.go b/op-service/testlog/testlog.go index 0ff544225599..fe7ede207cbc 100644 --- a/op-service/testlog/testlog.go +++ b/op-service/testlog/testlog.go @@ -21,14 +21,13 @@ import ( "bufio" "bytes" "context" + "log/slog" "os" "runtime" "strconv" "strings" "sync" - "golang.org/x/exp/slog" - "github.com/ethereum/go-ethereum/log" ) diff --git a/op-service/testutils/random.go b/op-service/testutils/random.go index f065d2583765..a3021ad463b6 100644 --- a/op-service/testutils/random.go +++ b/op-service/testutils/random.go @@ -299,7 +299,10 @@ func RandomBlockPrependTxsWithTime(rng *rand.Rand, txCount int, t uint64, ptxs . } header.GasUsed = cumulativeGasUsed header.GasLimit = cumulativeGasUsed + uint64(rng.Int63n(int64(cumulativeGasUsed))) - block := types.NewBlock(header, txs, nil, receipts, trie.NewStackTrie(nil)) + body := types.Body{ + Transactions: txs, + } + block := types.NewBlock(header, &body, receipts, trie.NewStackTrie(nil)) logIndex := uint(0) for i, r := range receipts { r.BlockHash = block.Hash() diff --git a/op-service/txmgr/txmgr.go b/op-service/txmgr/txmgr.go index 72ef1d1c7518..602ed863a7a3 100644 --- a/op-service/txmgr/txmgr.go +++ b/op-service/txmgr/txmgr.go @@ -326,8 +326,8 @@ func MakeSidecar(blobs []*eth.Blob) (*types.BlobTxSidecar, []common.Hash, error) sidecar := &types.BlobTxSidecar{} blobHashes := make([]common.Hash, 0, len(blobs)) for i, blob := range blobs { - rawBlob := *blob.KZGBlob() - sidecar.Blobs = append(sidecar.Blobs, rawBlob) + rawBlob := blob.KZGBlob() + sidecar.Blobs = append(sidecar.Blobs, *rawBlob) commitment, err := kzg4844.BlobToCommitment(rawBlob) if err != nil { return nil, nil, fmt.Errorf("cannot compute KZG commitment of blob %d in tx candidate: %w", i, err) diff --git a/op-service/txmgr/txmgr_test.go b/op-service/txmgr/txmgr_test.go index 330f2482b1a2..0b1ad933b37a 100644 --- a/op-service/txmgr/txmgr_test.go +++ b/op-service/txmgr/txmgr_test.go @@ -564,7 +564,7 @@ func TestTxMgr_CraftBlobTx(t *testing.T) { // verify the blobs for i := range sidecar.Blobs { - require.NoError(t, kzg4844.VerifyBlobProof(sidecar.Blobs[i], sidecar.Commitments[i], sidecar.Proofs[i])) + require.NoError(t, kzg4844.VerifyBlobProof(&sidecar.Blobs[i], sidecar.Commitments[i], sidecar.Proofs[i])) } b1 := eth.Blob(sidecar.Blobs[0]) d1, err := b1.ToData() diff --git a/op-wheel/cheat/cheat.go b/op-wheel/cheat/cheat.go index 61c8d74d09f3..26138dfc2875 100644 --- a/op-wheel/cheat/cheat.go +++ b/op-wheel/cheat/cheat.go @@ -10,6 +10,7 @@ import ( "path/filepath" "strings" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/holiman/uint256" "github.com/ethereum/go-ethereum/common" @@ -337,7 +338,7 @@ func StoragePatch(patch io.Reader, address common.Address) HeadFn { func SetBalance(addr common.Address, amount *big.Int) HeadFn { return func(_ *types.Header, headState *state.StateDB) error { - headState.SetBalance(addr, uint256.MustFromBig(amount)) + headState.SetBalance(addr, uint256.MustFromBig(amount), tracing.BalanceChangeUnspecified) return nil } } diff --git a/op-wheel/cmd/main.go b/op-wheel/cmd/main.go index 03d29c72c055..9da15270eda9 100644 --- a/op-wheel/cmd/main.go +++ b/op-wheel/cmd/main.go @@ -31,9 +31,9 @@ func main() { oplog.SetGlobalLogHandler(log.NewTerminalHandlerWithLevel(os.Stdout, lvl, true)) return nil } - app.Action = cli.ActionFunc(func(c *cli.Context) error { + app.Action = func(c *cli.Context) error { return errors.New("see 'cheat' and 'engine' subcommands and --help") - }) + } app.Writer = os.Stdout app.ErrWriter = os.Stderr app.Commands = []*cli.Command{ diff --git a/op-wheel/engine/engine.go b/op-wheel/engine/engine.go index f76fc753ac4b..bd834ec032ef 100644 --- a/op-wheel/engine/engine.go +++ b/op-wheel/engine/engine.go @@ -44,7 +44,7 @@ func getBlock(ctx context.Context, client client.RPC, method string, tag string) if err != nil { return nil, err } - return types.NewBlockWithHeader(&bl.Header).WithBody(bl.Transactions, nil), nil + return types.NewBlockWithHeader(&bl.Header).WithBody(types.Body{Transactions: bl.Transactions}), nil } func getHeader(ctx context.Context, client client.RPC, method string, tag string) (*types.Header, error) { diff --git a/ops-bedrock/l1-geth.Dockerfile b/ops-bedrock/l1-geth.Dockerfile index 988d79bec023..51c4933026ea 100644 --- a/ops-bedrock/l1-geth.Dockerfile +++ b/ops-bedrock/l1-geth.Dockerfile @@ -1,4 +1,4 @@ -FROM ethereum/client-go:v1.13.15 +FROM ethereum/client-go:v1.14.7 RUN apk add --no-cache jq bash