Commit 2838df83 authored by Axel Kingsley's avatar Axel Kingsley Committed by GitHub

geth: update to v1.13.15 (#10353)

* point at op-geth v1.13.13

* update triedb import path

* update deprecated core structs to types package

* Update op-geth with tx pool fix.

* point at v1.13.14

* point at geth v1.13.15

* fix NewStackTrie call

* remove pin

* use op-geth v1.101315.0-rc.1

---------
Co-authored-by: default avatarAdrian Sutton <adrian@oplabs.co>
parent a6074a7d
...@@ -12,7 +12,7 @@ require ( ...@@ -12,7 +12,7 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240418160534-4156733e7232 github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240418160534-4156733e7232
github.com/ethereum/go-ethereum v1.13.11 github.com/ethereum/go-ethereum v1.13.15
github.com/fsnotify/fsnotify v1.7.0 github.com/fsnotify/fsnotify v1.7.0
github.com/go-chi/chi/v5 v5.0.12 github.com/go-chi/chi/v5 v5.0.12
github.com/go-chi/docgen v1.2.0 github.com/go-chi/docgen v1.2.0
...@@ -29,7 +29,6 @@ require ( ...@@ -29,7 +29,6 @@ require (
github.com/ipfs/go-ds-leveldb v0.5.0 github.com/ipfs/go-ds-leveldb v0.5.0
github.com/jackc/pgtype v1.14.3 github.com/jackc/pgtype v1.14.3
github.com/jackc/pgx/v5 v5.5.5 github.com/jackc/pgx/v5 v5.5.5
github.com/kataras/iris/v12 v12.2.10
github.com/libp2p/go-libp2p v0.32.0 github.com/libp2p/go-libp2p v0.32.0
github.com/libp2p/go-libp2p-mplex v0.9.0 github.com/libp2p/go-libp2p-mplex v0.9.0
github.com/libp2p/go-libp2p-pubsub v0.10.1 github.com/libp2p/go-libp2p-pubsub v0.10.1
...@@ -56,17 +55,11 @@ require ( ...@@ -56,17 +55,11 @@ require (
) )
require ( require (
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
github.com/CloudyKit/jet/v6 v6.2.0 // indirect
github.com/DataDog/zstd v1.5.2 // indirect github.com/DataDog/zstd v1.5.2 // indirect
github.com/Joker/jade v1.1.3 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/allegro/bigcache v1.2.1 // indirect github.com/allegro/bigcache v1.2.1 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/armon/go-metrics v0.4.1 // indirect github.com/armon/go-metrics v0.4.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect github.com/benbjohnson/clock v1.3.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect
...@@ -89,6 +82,7 @@ require ( ...@@ -89,6 +82,7 @@ require (
github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect
github.com/deepmap/oapi-codegen v1.8.2 // 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/dlclark/regexp2 v1.7.0 // indirect
github.com/docker/go-units v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect
github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect
...@@ -96,10 +90,9 @@ require ( ...@@ -96,10 +90,9 @@ require (
github.com/elastic/gosigar v0.14.2 // indirect github.com/elastic/gosigar v0.14.2 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fatih/color v1.15.0 // indirect github.com/fatih/color v1.15.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/felixge/fgprof v0.9.3 // indirect github.com/felixge/fgprof v0.9.3 // indirect
github.com/fjl/memsize v0.0.1 // indirect github.com/ferranbt/fastssz v0.1.2 // indirect
github.com/flosch/pongo2/v4 v4.0.2 // indirect github.com/fjl/memsize v0.0.2 // indirect
github.com/flynn/noise v1.0.0 // indirect github.com/flynn/noise v1.0.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect github.com/francoispqt/gojay v1.2.13 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
...@@ -114,10 +107,8 @@ require ( ...@@ -114,10 +107,8 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // 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.3 // indirect
github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47 // indirect
github.com/google/gopacket v1.1.19 // indirect github.com/google/gopacket v1.1.19 // indirect
github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b // indirect github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gorilla/websocket v1.5.1 // indirect github.com/gorilla/websocket v1.5.1 // indirect
github.com/graph-gophers/graphql-go v1.3.0 // indirect github.com/graph-gophers/graphql-go v1.3.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect
...@@ -128,7 +119,7 @@ require ( ...@@ -128,7 +119,7 @@ require (
github.com/hashicorp/go-msgpack/v2 v2.1.1 // indirect github.com/hashicorp/go-msgpack/v2 v2.1.1 // indirect
github.com/hashicorp/golang-lru v0.5.0 // indirect github.com/hashicorp/golang-lru v0.5.0 // indirect
github.com/hashicorp/golang-lru/arc/v2 v2.0.5 // indirect github.com/hashicorp/golang-lru/arc/v2 v2.0.5 // indirect
github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/huin/goupnp v1.3.0 // indirect github.com/huin/goupnp v1.3.0 // indirect
github.com/influxdata/influxdb-client-go/v2 v2.4.0 // indirect github.com/influxdata/influxdb-client-go/v2 v2.4.0 // indirect
...@@ -136,7 +127,6 @@ require ( ...@@ -136,7 +127,6 @@ require (
github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 // indirect github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-cid v0.4.1 // indirect
github.com/ipfs/go-log/v2 v2.5.1 // indirect github.com/ipfs/go-log/v2 v2.5.1 // indirect
github.com/iris-contrib/schema v0.0.6 // indirect
github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
...@@ -147,13 +137,7 @@ require ( ...@@ -147,13 +137,7 @@ require (
github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 // indirect github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect github.com/jinzhu/now v1.1.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/karalabe/usb v0.0.3-0.20230711191512-61db3e06439c // indirect github.com/karalabe/usb v0.0.3-0.20230711191512-61db3e06439c // indirect
github.com/kataras/blocks v0.0.8 // indirect
github.com/kataras/golog v0.1.11 // indirect
github.com/kataras/pio v0.0.13 // indirect
github.com/kataras/sitemap v0.0.6 // indirect
github.com/kataras/tunnel v0.0.4 // indirect
github.com/klauspost/compress v1.17.6 // indirect github.com/klauspost/compress v1.17.6 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/koron/go-ssdp v0.0.4 // indirect github.com/koron/go-ssdp v0.0.4 // indirect
...@@ -170,12 +154,9 @@ require ( ...@@ -170,12 +154,9 @@ require (
github.com/libp2p/go-netroute v0.2.1 // indirect github.com/libp2p/go-netroute v0.2.1 // indirect
github.com/libp2p/go-reuseport v0.4.0 // indirect github.com/libp2p/go-reuseport v0.4.0 // indirect
github.com/libp2p/go-yamux/v4 v4.0.1 // indirect github.com/libp2p/go-yamux/v4 v4.0.1 // indirect
github.com/mailgun/raymond/v2 v2.0.48 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/microcosm-cc/bluemonday v1.0.26 // indirect
github.com/miekg/dns v1.1.56 // indirect github.com/miekg/dns v1.1.56 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
...@@ -194,6 +175,7 @@ require ( ...@@ -194,6 +175,7 @@ require (
github.com/multiformats/go-varint v0.0.7 // indirect github.com/multiformats/go-varint v0.0.7 // indirect
github.com/naoina/go-stringutil v0.1.0 // indirect github.com/naoina/go-stringutil v0.1.0 // indirect
github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 // indirect github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/onsi/ginkgo/v2 v2.15.0 // indirect github.com/onsi/ginkgo/v2 v2.15.0 // indirect
github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/opencontainers/runtime-spec v1.1.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect
...@@ -213,24 +195,16 @@ require ( ...@@ -213,24 +195,16 @@ require (
github.com/rs/cors v1.9.0 // indirect github.com/rs/cors v1.9.0 // indirect
github.com/rs/xid v1.5.0 // indirect github.com/rs/xid v1.5.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/status-im/keycard-go v0.2.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect github.com/stretchr/objx v0.5.2 // indirect
github.com/supranational/blst v0.3.11 // indirect github.com/supranational/blst v0.3.11 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
github.com/tdewolff/minify/v2 v2.20.14 // indirect
github.com/tdewolff/parse/v2 v2.7.8 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect github.com/tklauser/numcpus v0.6.1 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yosssi/ace v0.0.5 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.uber.org/automaxprocs v1.5.2 // indirect go.uber.org/automaxprocs v1.5.2 // indirect
go.uber.org/dig v1.17.1 // indirect go.uber.org/dig v1.17.1 // indirect
...@@ -252,7 +226,7 @@ require ( ...@@ -252,7 +226,7 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect rsc.io/tmplfunc v0.0.3 // indirect
) )
replace github.com/ethereum/go-ethereum v1.13.11 => github.com/ethereum-optimism/op-geth v1.101311.1-rc.1 replace github.com/ethereum/go-ethereum v1.13.15 => github.com/ethereum-optimism/op-geth v1.101315.0-rc.1
//replace github.com/ethereum/go-ethereum v1.13.9 => ../op-geth //replace github.com/ethereum/go-ethereum v1.13.9 => ../op-geth
......
This diff is collapsed.
...@@ -14,7 +14,6 @@ import ( ...@@ -14,7 +14,6 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core"
gstate "github.com/ethereum/go-ethereum/core/state" gstate "github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
...@@ -827,11 +826,11 @@ func (d *ForgeDump) UnmarshalJSON(b []byte) error { ...@@ -827,11 +826,11 @@ func (d *ForgeDump) UnmarshalJSON(b []byte) error {
} }
type ForgeAllocs struct { type ForgeAllocs struct {
Accounts core.GenesisAlloc `json:"accounts"` Accounts types.GenesisAlloc `json:"accounts"`
} }
func (d *ForgeAllocs) Copy() *ForgeAllocs { func (d *ForgeAllocs) Copy() *ForgeAllocs {
out := make(core.GenesisAlloc, len(d.Accounts)) out := make(types.GenesisAlloc, len(d.Accounts))
maps.Copy(out, d.Accounts) maps.Copy(out, d.Accounts)
return &ForgeAllocs{Accounts: out} return &ForgeAllocs{Accounts: out}
} }
...@@ -851,10 +850,10 @@ func (d *ForgeAllocs) UnmarshalJSON(b []byte) error { ...@@ -851,10 +850,10 @@ func (d *ForgeAllocs) UnmarshalJSON(b []byte) error {
if err := json.Unmarshal(b, &allocs); err != nil { if err := json.Unmarshal(b, &allocs); err != nil {
return err return err
} }
d.Accounts = make(core.GenesisAlloc, len(allocs.Accounts)) d.Accounts = make(types.GenesisAlloc, len(allocs.Accounts))
for addr, acc := range allocs.Accounts { for addr, acc := range allocs.Accounts {
acc := acc acc := acc
d.Accounts[addr] = core.GenesisAccount{ d.Accounts[addr] = types.Account{
Code: acc.Code, Code: acc.Code,
Storage: acc.Storage, Storage: acc.Storage,
Balance: acc.Balance.ToInt(), Balance: acc.Balance.ToInt(),
......
...@@ -111,7 +111,7 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro ...@@ -111,7 +111,7 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro
GasUsed: uint64(config.L2GenesisBlockGasUsed), GasUsed: uint64(config.L2GenesisBlockGasUsed),
ParentHash: config.L2GenesisBlockParentHash, ParentHash: config.L2GenesisBlockParentHash,
BaseFee: baseFee.ToInt(), BaseFee: baseFee.ToInt(),
Alloc: map[common.Address]core.GenesisAccount{}, Alloc: map[common.Address]types.Account{},
} }
if optimismChainConfig.IsEcotone(genesis.Timestamp) { if optimismChainConfig.IsEcotone(genesis.Timestamp) {
...@@ -200,7 +200,7 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) { ...@@ -200,7 +200,7 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) {
GasUsed: uint64(config.L1GenesisBlockGasUsed), GasUsed: uint64(config.L1GenesisBlockGasUsed),
ParentHash: config.L1GenesisBlockParentHash, ParentHash: config.L1GenesisBlockParentHash,
BaseFee: baseFee.ToInt(), BaseFee: baseFee.ToInt(),
Alloc: map[common.Address]core.GenesisAccount{}, Alloc: map[common.Address]types.Account{},
}, nil }, nil
} }
......
...@@ -70,7 +70,7 @@ func BuildL2Genesis(config *DeployConfig, dump *ForgeAllocs, l1StartBlock *types ...@@ -70,7 +70,7 @@ func BuildL2Genesis(config *DeployConfig, dump *ForgeAllocs, l1StartBlock *types
return genspec, nil return genspec, nil
} }
func HasAnyDevAccounts(allocs core.GenesisAlloc) (bool, error) { func HasAnyDevAccounts(allocs types.GenesisAlloc) (bool, error) {
wallet, err := hdwallet.NewFromMnemonic(testMnemonic) wallet, err := hdwallet.NewFromMnemonic(testMnemonic)
if err != nil { if err != nil {
return false, fmt.Errorf("failed to create wallet: %w", err) return false, fmt.Errorf("failed to create wallet: %w", err)
......
...@@ -47,9 +47,9 @@ func (db *MemoryStateDB) Genesis() *core.Genesis { ...@@ -47,9 +47,9 @@ func (db *MemoryStateDB) Genesis() *core.Genesis {
return db.genesis return db.genesis
} }
// GetAccount is a getter for a core.GenesisAccount found in // GetAccount is a getter for a types.Account found in
// the core.Genesis // the core.Genesis
func (db *MemoryStateDB) GetAccount(addr common.Address) *core.GenesisAccount { func (db *MemoryStateDB) GetAccount(addr common.Address) *types.Account {
db.rw.RLock() db.rw.RLock()
defer db.rw.RUnlock() defer db.rw.RUnlock()
...@@ -71,7 +71,7 @@ func (db *MemoryStateDB) CreateAccount(addr common.Address) { ...@@ -71,7 +71,7 @@ func (db *MemoryStateDB) CreateAccount(addr common.Address) {
func (db *MemoryStateDB) createAccount(addr common.Address) { func (db *MemoryStateDB) createAccount(addr common.Address) {
if _, ok := db.genesis.Alloc[addr]; !ok { if _, ok := db.genesis.Alloc[addr]; !ok {
db.genesis.Alloc[addr] = core.GenesisAccount{ db.genesis.Alloc[addr] = types.Account{
Code: []byte{}, Code: []byte{},
Storage: make(map[common.Hash]common.Hash), Storage: make(map[common.Hash]common.Hash),
Balance: big.NewInt(0), Balance: big.NewInt(0),
......
...@@ -10,8 +10,8 @@ import ( ...@@ -10,8 +10,8 @@ import (
"github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/triedb"
"github.com/ethereum/go-ethereum/trie/triedb/hashdb" "github.com/ethereum/go-ethereum/triedb/hashdb"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils" "github.com/ethereum-optimism/optimism/op-e2e/e2eutils"
...@@ -60,7 +60,7 @@ func TestL1Replica_ActL1Sync(gt *testing.T) { ...@@ -60,7 +60,7 @@ func TestL1Replica_ActL1Sync(gt *testing.T) {
genesisBlock := sd.L1Cfg.ToBlock() genesisBlock := sd.L1Cfg.ToBlock()
consensus := beacon.New(ethash.NewFaker()) consensus := beacon.New(ethash.NewFaker())
db := rawdb.NewMemoryDatabase() db := rawdb.NewMemoryDatabase()
tdb := trie.NewDatabase(db, &trie.Config{HashDB: hashdb.Defaults}) tdb := triedb.NewDatabase(db, &triedb.Config{HashDB: hashdb.Defaults})
sd.L1Cfg.MustCommit(db, tdb) sd.L1Cfg.MustCommit(db, tdb)
chainA, _ := core.GenerateChain(sd.L1Cfg.Config, genesisBlock, consensus, db, 10, func(n int, g *core.BlockGen) { chainA, _ := core.GenerateChain(sd.L1Cfg.Config, genesisBlock, consensus, db, 10, func(n int, g *core.BlockGen) {
......
...@@ -14,8 +14,8 @@ import ( ...@@ -14,8 +14,8 @@ import (
"github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/triedb"
"github.com/ethereum/go-ethereum/trie/triedb/hashdb" "github.com/ethereum/go-ethereum/triedb/hashdb"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
...@@ -35,7 +35,7 @@ func TestL2EngineAPI(gt *testing.T) { ...@@ -35,7 +35,7 @@ func TestL2EngineAPI(gt *testing.T) {
genesisBlock := sd.L2Cfg.ToBlock() genesisBlock := sd.L2Cfg.ToBlock()
consensus := beacon.New(ethash.NewFaker()) consensus := beacon.New(ethash.NewFaker())
db := rawdb.NewMemoryDatabase() db := rawdb.NewMemoryDatabase()
tdb := trie.NewDatabase(db, &trie.Config{HashDB: hashdb.Defaults}) tdb := triedb.NewDatabase(db, &triedb.Config{HashDB: hashdb.Defaults})
sd.L2Cfg.MustCommit(db, tdb) sd.L2Cfg.MustCommit(db, tdb)
engine := NewL2Engine(t, log, sd.L2Cfg, sd.RollupCfg.Genesis.L1, jwtPath) engine := NewL2Engine(t, log, sd.L2Cfg, sd.RollupCfg.Genesis.L1, jwtPath)
...@@ -98,7 +98,7 @@ func TestL2EngineAPIBlockBuilding(gt *testing.T) { ...@@ -98,7 +98,7 @@ func TestL2EngineAPIBlockBuilding(gt *testing.T) {
log := testlog.Logger(t, log.LevelDebug) log := testlog.Logger(t, log.LevelDebug)
genesisBlock := sd.L2Cfg.ToBlock() genesisBlock := sd.L2Cfg.ToBlock()
db := rawdb.NewMemoryDatabase() db := rawdb.NewMemoryDatabase()
tdb := trie.NewDatabase(db, &trie.Config{HashDB: hashdb.Defaults}) tdb := triedb.NewDatabase(db, &triedb.Config{HashDB: hashdb.Defaults})
sd.L2Cfg.MustCommit(db, tdb) sd.L2Cfg.MustCommit(db, tdb)
engine := NewL2Engine(t, log, sd.L2Cfg, sd.RollupCfg.Genesis.L1, jwtPath) engine := NewL2Engine(t, log, sd.L2Cfg, sd.RollupCfg.Genesis.L1, jwtPath)
......
...@@ -5,13 +5,13 @@ import ( ...@@ -5,13 +5,13 @@ import (
"sort" "sort"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-chain-ops/crossdomain" "github.com/ethereum-optimism/optimism/op-chain-ops/crossdomain"
) )
func collectAllocAddrs(alloc core.GenesisAlloc) []common.Address { func collectAllocAddrs(alloc types.GenesisAlloc) []common.Address {
var out []common.Address var out []common.Address
for addr := range alloc { for addr := range alloc {
out = append(out, addr) out = append(out, addr)
......
...@@ -9,6 +9,7 @@ import ( ...@@ -9,6 +9,7 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
...@@ -86,8 +87,8 @@ type SetupData struct { ...@@ -86,8 +87,8 @@ type SetupData struct {
// These allocations override existing allocations per account, // These allocations override existing allocations per account,
// i.e. the allocations are merged with AllocParams having priority. // i.e. the allocations are merged with AllocParams having priority.
type AllocParams struct { type AllocParams struct {
L1Alloc core.GenesisAlloc L1Alloc types.GenesisAlloc
L2Alloc core.GenesisAlloc L2Alloc types.GenesisAlloc
PrefundTestUsers bool PrefundTestUsers bool
} }
...@@ -111,7 +112,7 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) * ...@@ -111,7 +112,7 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
require.NoError(t, err, "failed to create l1 genesis") require.NoError(t, err, "failed to create l1 genesis")
if alloc.PrefundTestUsers { if alloc.PrefundTestUsers {
for _, addr := range deployParams.Addresses.All() { for _, addr := range deployParams.Addresses.All() {
l1Genesis.Alloc[addr] = core.GenesisAccount{ l1Genesis.Alloc[addr] = types.Account{
Balance: Ether(1e12), Balance: Ether(1e12),
} }
} }
...@@ -132,7 +133,7 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) * ...@@ -132,7 +133,7 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
require.NoError(t, err, "failed to create l2 genesis") require.NoError(t, err, "failed to create l2 genesis")
if alloc.PrefundTestUsers { if alloc.PrefundTestUsers {
for _, addr := range deployParams.Addresses.All() { for _, addr := range deployParams.Addresses.All() {
l2Genesis.Alloc[addr] = core.GenesisAccount{ l2Genesis.Alloc[addr] = types.Account{
Balance: Ether(1e12), Balance: Ether(1e12),
} }
} }
......
...@@ -14,6 +14,7 @@ import ( ...@@ -14,6 +14,7 @@ import (
"github.com/ethereum-optimism/optimism/op-e2e/external" "github.com/ethereum-optimism/optimism/op-e2e/external"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/onsi/gomega/gexec" "github.com/onsi/gomega/gexec"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
...@@ -75,8 +76,8 @@ func (er *ExternalRunner) Run(t *testing.T) *ExternalEthClient { ...@@ -75,8 +76,8 @@ func (er *ExternalRunner) Run(t *testing.T) *ExternalEthClient {
if er.Genesis == nil { if er.Genesis == nil {
er.Genesis = &core.Genesis{ er.Genesis = &core.Genesis{
Alloc: core.GenesisAlloc{ Alloc: types.GenesisAlloc{
common.Address{1}: core.GenesisAccount{Balance: big.NewInt(1)}, common.Address{1}: types.Account{Balance: big.NewInt(1)},
}, },
Config: params.OptimismTestConfig, Config: params.OptimismTestConfig,
Difficulty: big.NewInt(0), Difficulty: big.NewInt(0),
......
...@@ -31,6 +31,7 @@ import ( ...@@ -31,6 +31,7 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
geth_eth "github.com/ethereum/go-ethereum/eth" geth_eth "github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
...@@ -464,14 +465,14 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste ...@@ -464,14 +465,14 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
for addr, amount := range cfg.Premine { for addr, amount := range cfg.Premine {
if existing, ok := l1Genesis.Alloc[addr]; ok { if existing, ok := l1Genesis.Alloc[addr]; ok {
l1Genesis.Alloc[addr] = core.GenesisAccount{ l1Genesis.Alloc[addr] = types.Account{
Code: existing.Code, Code: existing.Code,
Storage: existing.Storage, Storage: existing.Storage,
Balance: amount, Balance: amount,
Nonce: existing.Nonce, Nonce: existing.Nonce,
} }
} else { } else {
l1Genesis.Alloc[addr] = core.GenesisAccount{ l1Genesis.Alloc[addr] = types.Account{
Balance: amount, Balance: amount,
Nonce: 0, Nonce: 0,
} }
...@@ -493,14 +494,14 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste ...@@ -493,14 +494,14 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
sys.L2GenesisCfg = l2Genesis sys.L2GenesisCfg = l2Genesis
for addr, amount := range cfg.Premine { for addr, amount := range cfg.Premine {
if existing, ok := l2Genesis.Alloc[addr]; ok { if existing, ok := l2Genesis.Alloc[addr]; ok {
l2Genesis.Alloc[addr] = core.GenesisAccount{ l2Genesis.Alloc[addr] = types.Account{
Code: existing.Code, Code: existing.Code,
Storage: existing.Storage, Storage: existing.Storage,
Balance: amount, Balance: amount,
Nonce: existing.Nonce, Nonce: existing.Nonce,
} }
} else { } else {
l2Genesis.Alloc[addr] = core.GenesisAccount{ l2Genesis.Alloc[addr] = types.Account{
Balance: amount, Balance: amount,
Nonce: 0, Nonce: 0,
} }
......
...@@ -15,8 +15,8 @@ import ( ...@@ -15,8 +15,8 @@ import (
"github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/ethdb/memorydb" "github.com/ethereum/go-ethereum/ethdb/memorydb"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/triedb"
"github.com/ethereum/go-ethereum/trie/triedb/hashdb" "github.com/ethereum/go-ethereum/triedb/hashdb"
"github.com/holiman/uint256" "github.com/holiman/uint256"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
...@@ -112,7 +112,7 @@ func TestPut(t *testing.T) { ...@@ -112,7 +112,7 @@ func TestPut(t *testing.T) {
func TestSupportsStateDBOperations(t *testing.T) { func TestSupportsStateDBOperations(t *testing.T) {
l2Genesis := createGenesis() l2Genesis := createGenesis()
realDb := rawdb.NewDatabase(memorydb.New()) realDb := rawdb.NewDatabase(memorydb.New())
trieDB := trie.NewDatabase(realDb, &trie.Config{HashDB: hashdb.Defaults}) trieDB := triedb.NewDatabase(realDb, &triedb.Config{HashDB: hashdb.Defaults})
genesisBlock := l2Genesis.MustCommit(realDb, trieDB) genesisBlock := l2Genesis.MustCommit(realDb, trieDB)
loader := test.NewKvStateOracle(t, realDb) loader := test.NewKvStateOracle(t, realDb)
...@@ -124,7 +124,7 @@ func TestUpdateState(t *testing.T) { ...@@ -124,7 +124,7 @@ func TestUpdateState(t *testing.T) {
oracle := test.NewStubStateOracle(t) oracle := test.NewStubStateOracle(t)
db := rawdb.NewDatabase(NewOracleBackedDB(oracle)) db := rawdb.NewDatabase(NewOracleBackedDB(oracle))
trieDB := trie.NewDatabase(db, &trie.Config{HashDB: hashdb.Defaults}) trieDB := triedb.NewDatabase(db, &triedb.Config{HashDB: hashdb.Defaults})
genesisBlock := l2Genesis.MustCommit(db, trieDB) genesisBlock := l2Genesis.MustCommit(db, trieDB)
assertStateDataAvailable(t, db, l2Genesis, genesisBlock) assertStateDataAvailable(t, db, l2Genesis, genesisBlock)
...@@ -160,7 +160,7 @@ func createGenesis() *core.Genesis { ...@@ -160,7 +160,7 @@ func createGenesis() *core.Genesis {
Difficulty: common.Big0, Difficulty: common.Big0,
ParentHash: common.Hash{}, ParentHash: common.Hash{},
BaseFee: big.NewInt(7), BaseFee: big.NewInt(7),
Alloc: map[common.Address]core.GenesisAccount{ Alloc: map[common.Address]types.Account{
userAccount: { userAccount: {
Balance: big.NewInt(1_000_000_000_000_000_000), Balance: big.NewInt(1_000_000_000_000_000_000),
Nonce: 10, Nonce: 10,
......
...@@ -19,8 +19,8 @@ import ( ...@@ -19,8 +19,8 @@ import (
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/triedb"
"github.com/ethereum/go-ethereum/trie/triedb/hashdb" "github.com/ethereum/go-ethereum/triedb/hashdb"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
...@@ -294,14 +294,14 @@ func setupOracle(t *testing.T, blockCount int, headBlockNumber int, enableEcoton ...@@ -294,14 +294,14 @@ func setupOracle(t *testing.T, blockCount int, headBlockNumber int, enableEcoton
l2Genesis, err := genesis.NewL2Genesis(deployConfig, l1Genesis.ToBlock()) l2Genesis, err := genesis.NewL2Genesis(deployConfig, l1Genesis.ToBlock())
require.NoError(t, err) require.NoError(t, err)
l2Genesis.Alloc[fundedAddress] = core.GenesisAccount{ l2Genesis.Alloc[fundedAddress] = types.Account{
Balance: big.NewInt(1_000_000_000_000_000_000), Balance: big.NewInt(1_000_000_000_000_000_000),
Nonce: 0, Nonce: 0,
} }
chainCfg := l2Genesis.Config chainCfg := l2Genesis.Config
consensus := beacon.New(nil) consensus := beacon.New(nil)
db := rawdb.NewMemoryDatabase() db := rawdb.NewMemoryDatabase()
trieDB := trie.NewDatabase(db, &trie.Config{HashDB: hashdb.Defaults}) trieDB := triedb.NewDatabase(db, &triedb.Config{HashDB: hashdb.Defaults})
// Set minimal amount of stuff to avoid nil references later // Set minimal amount of stuff to avoid nil references later
genesisBlock := l2Genesis.MustCommit(db, trieDB) genesisBlock := l2Genesis.MustCommit(db, trieDB)
......
...@@ -9,7 +9,8 @@ import ( ...@@ -9,7 +9,8 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/trie"
"github.com/ethereum/go-ethereum/trie/triedb/hashdb" "github.com/ethereum/go-ethereum/triedb"
"github.com/ethereum/go-ethereum/triedb/hashdb"
) )
// ReadTrie takes a Merkle Patricia Trie (MPT) root of a "DerivableList", and a pre-image oracle getter, // ReadTrie takes a Merkle Patricia Trie (MPT) root of a "DerivableList", and a pre-image oracle getter,
...@@ -47,7 +48,7 @@ func ReadTrie(root common.Hash, getPreimage func(key common.Hash) []byte) []hexu ...@@ -47,7 +48,7 @@ func ReadTrie(root common.Hash, getPreimage func(key common.Hash) []byte) []hexu
// //
// For now we just use the state DB trie approach. // For now we just use the state DB trie approach.
tdb := trie.NewDatabase(odb, &trie.Config{HashDB: hashdb.Defaults}) tdb := triedb.NewDatabase(odb, &triedb.Config{HashDB: hashdb.Defaults})
tr, err := trie.New(trie.TrieID(root), tdb) tr, err := trie.New(trie.TrieID(root), tdb)
if err != nil { if err != nil {
panic(err) panic(err)
...@@ -115,11 +116,11 @@ func (n noResetHasher) Reset() {} ...@@ -115,11 +116,11 @@ func (n noResetHasher) Reset() {}
// if any values are less than 32 bytes and fit into branch-node slots that way. // if any values are less than 32 bytes and fit into branch-node slots that way.
func WriteTrie(values []hexutil.Bytes) (common.Hash, []hexutil.Bytes) { func WriteTrie(values []hexutil.Bytes) (common.Hash, []hexutil.Bytes) {
var out []hexutil.Bytes var out []hexutil.Bytes
st := noResetHasher{trie.NewStackTrie( st := noResetHasher{
trie.NewStackTrieOptions().WithWriter( trie.NewStackTrie(func(path []byte, hash common.Hash, blob []byte) {
func(path []byte, hash common.Hash, blob []byte) {
out = append(out, common.CopyBytes(blob)) // the stack hasher may mutate the blob bytes, so copy them. out = append(out, common.CopyBytes(blob)) // the stack hasher may mutate the blob bytes, so copy them.
}))} }),
}
root := types.DeriveSha(rawList(values), st) root := types.DeriveSha(rawList(values), st)
return root, out return root, out
} }
...@@ -12,7 +12,7 @@ import ( ...@@ -12,7 +12,7 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
...@@ -28,7 +28,7 @@ func simulatedBackend() (privateKey *ecdsa.PrivateKey, address common.Address, o ...@@ -28,7 +28,7 @@ func simulatedBackend() (privateKey *ecdsa.PrivateKey, address common.Address, o
if err != nil { if err != nil {
return nil, common.Address{}, nil, nil, err return nil, common.Address{}, nil, nil, err
} }
backend = backends.NewSimulatedBackend(core.GenesisAlloc{from: {Balance: big.NewInt(params.Ether)}}, 50_000_000) // nolint:staticcheck backend = backends.NewSimulatedBackend(types.GenesisAlloc{from: {Balance: big.NewInt(params.Ether)}}, 50_000_000) // nolint:staticcheck
return privateKey, from, opts, backend, nil return privateKey, from, opts, backend, nil
} }
......
package op_service
// This file pins dependencies that have broken releases.
//
// Pebble uses sentry-go
// sentry-go uses a deleted release of github.com/kataras/iris/v12
// And Go is then unable to resolve the sentry-dependency due to a missing indirect
//
// So we pin iris, to then explicitly define an actual present release.
//
// Also see https://github.com/ethereum/go-ethereum/issues/28036
// Once op-geth is updated with more recent upstream changes,
// the indirect dependencies are fixed, solving the iris dependency resolution issue.
import (
_ "github.com/kataras/iris/v12"
)
...@@ -8,7 +8,7 @@ require ( ...@@ -8,7 +8,7 @@ require (
cloud.google.com/go/kms v1.12.1 cloud.google.com/go/kms v1.12.1
github.com/BurntSushi/toml v1.3.2 github.com/BurntSushi/toml v1.3.2
github.com/ethereum-optimism/optimism v1.6.2-0.20240222202618-f707883038d5 github.com/ethereum-optimism/optimism v1.6.2-0.20240222202618-f707883038d5
github.com/ethereum/go-ethereum v1.13.11 github.com/ethereum/go-ethereum v1.13.15
github.com/gorilla/mux v1.8.0 github.com/gorilla/mux v1.8.0
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.19.0 github.com/prometheus/client_golang v1.19.0
...@@ -20,15 +20,9 @@ require ( ...@@ -20,15 +20,9 @@ require (
cloud.google.com/go/compute v1.20.1 // indirect cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.0 // indirect cloud.google.com/go/iam v1.1.0 // indirect
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
github.com/CloudyKit/jet/v6 v6.2.0 // indirect
github.com/DataDog/zstd v1.5.2 // indirect github.com/DataDog/zstd v1.5.2 // indirect
github.com/Joker/jade v1.1.3 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
...@@ -47,8 +41,6 @@ require ( ...@@ -47,8 +41,6 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240418160534-4156733e7232 // indirect github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240418160534-4156733e7232 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/flosch/pongo2/v4 v4.0.2 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect
...@@ -58,31 +50,17 @@ require ( ...@@ -58,31 +50,17 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47 // indirect
github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-cmp v0.6.0 // indirect
github.com/google/s2a-go v0.1.4 // indirect github.com/google/s2a-go v0.1.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gorilla/websocket v1.5.1 // indirect github.com/gorilla/websocket v1.5.1 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect github.com/holiman/uint256 v1.2.4 // indirect
github.com/iris-contrib/schema v0.0.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/kataras/blocks v0.0.8 // indirect
github.com/kataras/golog v0.1.11 // indirect
github.com/kataras/iris/v12 v12.2.10 // indirect
github.com/kataras/pio v0.0.13 // indirect
github.com/kataras/sitemap v0.0.6 // indirect
github.com/kataras/tunnel v0.0.4 // indirect
github.com/klauspost/compress v1.17.6 // indirect github.com/klauspost/compress v1.17.6 // indirect
github.com/kr/pretty v0.3.1 // indirect github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect github.com/kr/text v0.2.0 // indirect
github.com/mailgun/raymond/v2 v2.0.48 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/microcosm-cc/bluemonday v1.0.26 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect
...@@ -91,21 +69,13 @@ require ( ...@@ -91,21 +69,13 @@ require (
github.com/rivo/uniseg v0.4.3 // indirect github.com/rivo/uniseg v0.4.3 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/supranational/blst v0.3.11 // indirect github.com/supranational/blst v0.3.11 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
github.com/tdewolff/minify/v2 v2.20.14 // indirect
github.com/tdewolff/parse/v2 v2.7.8 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect github.com/tklauser/numcpus v0.6.1 // indirect
github.com/urfave/cli/v2 v2.27.1 // indirect github.com/urfave/cli/v2 v2.27.1 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yosssi/ace v0.0.5 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.opencensus.io v0.24.0 // indirect go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.21.0 // indirect golang.org/x/crypto v0.21.0 // indirect
...@@ -116,7 +86,6 @@ require ( ...@@ -116,7 +86,6 @@ require (
golang.org/x/sys v0.18.0 // indirect golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.17.0 // indirect golang.org/x/tools v0.17.0 // indirect
google.golang.org/api v0.132.0 // indirect google.golang.org/api v0.132.0 // indirect
google.golang.org/appengine v1.6.7 // indirect google.golang.org/appengine v1.6.7 // indirect
...@@ -125,11 +94,10 @@ require ( ...@@ -125,11 +94,10 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/grpc v1.56.3 // indirect google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.33.0 // indirect google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect rsc.io/tmplfunc v0.0.3 // indirect
) )
replace github.com/ethereum/go-ethereum v1.13.11 => github.com/ethereum-optimism/op-geth v1.101311.0-rc.1 replace github.com/ethereum/go-ethereum v1.13.15 => github.com/ethereum-optimism/op-geth v1.101315.0-rc.1
replace github.com/ethereum-optimism/optimism => ../. replace github.com/ethereum-optimism/optimism => ../.
This diff is collapsed.
...@@ -17,7 +17,8 @@ import ( ...@@ -17,7 +17,8 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/trie"
"github.com/ethereum/go-ethereum/trie/triedb/hashdb" "github.com/ethereum/go-ethereum/triedb"
"github.com/ethereum/go-ethereum/triedb/hashdb"
) )
// ABI types // ABI types
...@@ -274,7 +275,7 @@ func DiffTestUtils() { ...@@ -274,7 +275,7 @@ func DiffTestUtils() {
// Create a secure trie for state // Create a secure trie for state
state, err := trie.NewStateTrie( state, err := trie.NewStateTrie(
trie.TrieID(types.EmptyRootHash), trie.TrieID(types.EmptyRootHash),
trie.NewDatabase(rawdb.NewMemoryDatabase(), &trie.Config{HashDB: hashdb.Defaults}), triedb.NewDatabase(rawdb.NewMemoryDatabase(), &triedb.Config{HashDB: hashdb.Defaults}),
) )
checkErr(err, "Error creating secure trie") checkErr(err, "Error creating secure trie")
...@@ -285,7 +286,7 @@ func DiffTestUtils() { ...@@ -285,7 +286,7 @@ func DiffTestUtils() {
// Create a secure trie for the world state // Create a secure trie for the world state
world, err := trie.NewStateTrie( world, err := trie.NewStateTrie(
trie.TrieID(types.EmptyRootHash), trie.TrieID(types.EmptyRootHash),
trie.NewDatabase(rawdb.NewMemoryDatabase(), &trie.Config{HashDB: hashdb.Defaults}), triedb.NewDatabase(rawdb.NewMemoryDatabase(), &triedb.Config{HashDB: hashdb.Defaults}),
) )
checkErr(err, "Error creating secure trie") checkErr(err, "Error creating secure trie")
......
...@@ -13,6 +13,7 @@ import ( ...@@ -13,6 +13,7 @@ import (
"github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/trie"
"github.com/ethereum/go-ethereum/triedb"
) )
// Variant enum // Variant enum
...@@ -133,7 +134,7 @@ func FuzzTrie() { ...@@ -133,7 +134,7 @@ func FuzzTrie() {
func genTrieTestCase(selectEmptyKey bool) trieTestCase { func genTrieTestCase(selectEmptyKey bool) trieTestCase {
// Create an empty merkle trie // Create an empty merkle trie
memdb := rawdb.NewMemoryDatabase() memdb := rawdb.NewMemoryDatabase()
randTrie := trie.NewEmpty(trie.NewDatabase(memdb, nil)) randTrie := trie.NewEmpty(triedb.NewDatabase(memdb, nil))
// Get a random number of elements to put into the trie // Get a random number of elements to put into the trie
randN := randRange(2, 1024) randN := randRange(2, 1024)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment