From 01dc7b8e7c151ba0ccd15ddf00b7e4d41eef0c09 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Wed, 27 Sep 2023 15:18:54 -0700 Subject: [PATCH 01/30] Updates for geth v1.12.1 statedb.Commit added a block number field in upstream geth in 88f3d6146, pass in zero to it in InitializeArbosInDatabase. Trie Clean Cache file was removed in upstream geth 59f7b289c, remove our uses of its fields and pruner arguments related to it. The unused error code from stack.Attach() was removed in upstream geth in acc2a2ac61 Tx pool code moved to subpool (legacypool) in upstream geth d40a255e97 period param was removed from core.DeveloperGenesisBlock upstream in ea782809f7 --- arbos/arbosState/initialize.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arbos/arbosState/initialize.go b/arbos/arbosState/initialize.go index 9f24d96765..a428cad7f2 100644 --- a/arbos/arbosState/initialize.go +++ b/arbos/arbosState/initialize.go @@ -58,7 +58,7 @@ func InitializeArbosInDatabase(db ethdb.Database, initData statetransfer.InitDat } commit := func() (common.Hash, error) { - root, err := statedb.Commit(true) + root, err := statedb.Commit(0, true) if err != nil { return common.Hash{}, err } From 4f1c974f7a53b9a339ca526e0cd695428cfa181e Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Mon, 14 Aug 2023 14:11:52 -0700 Subject: [PATCH 02/30] Plumb batch limit options to geth Upstream implemented limits on the number of requests in a batch and the maximum batch response size. We had already implemented the batch response size limit in our geth fork, but have rolled it back in favor of upstream. This commit adds a nitro option for the batch request limit and takes the existing size limit option and plumbs them through to geth's node.Config. The flags in Nitro are: --rpc.max-batch-response-size --rpc.batch-request-limit --- cmd/genericconf/config.go | 10 +++++++--- cmd/nitro/nitro.go | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cmd/genericconf/config.go b/cmd/genericconf/config.go index 8e75b61772..9c02fbb9a8 100644 --- a/cmd/genericconf/config.go +++ b/cmd/genericconf/config.go @@ -8,7 +8,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rpc" + "github.com/ethereum/go-ethereum/node" flag "github.com/spf13/pflag" ) @@ -107,16 +107,20 @@ func FileLoggingConfigAddOptions(prefix string, f *flag.FlagSet) { type RpcConfig struct { MaxBatchResponseSize int `koanf:"max-batch-response-size"` + BatchRequestLimit int `koanf:"batch-request-limit"` } var DefaultRpcConfig = RpcConfig{ MaxBatchResponseSize: 10_000_000, // 10MB + BatchRequestLimit: node.DefaultConfig.BatchRequestLimit, } -func (c *RpcConfig) Apply() { - rpc.MaxBatchResponseSize = c.MaxBatchResponseSize +func (c *RpcConfig) Apply(stackConf *node.Config) { + stackConf.BatchResponseMaxSize = c.MaxBatchResponseSize + stackConf.BatchRequestLimit = c.BatchRequestLimit } func RpcConfigAddOptions(prefix string, f *flag.FlagSet) { f.Int(prefix+".max-batch-response-size", DefaultRpcConfig.MaxBatchResponseSize, "the maximum response size for a JSON-RPC request measured in bytes (-1 means no limit)") + f.Int(prefix+".batch-request-limit", DefaultRpcConfig.BatchRequestLimit, "the maximum number of requests in a batch") } diff --git a/cmd/nitro/nitro.go b/cmd/nitro/nitro.go index 1a984b525e..d3ecc720cc 100644 --- a/cmd/nitro/nitro.go +++ b/cmd/nitro/nitro.go @@ -162,6 +162,7 @@ func mainImpl() int { stackConf := node.DefaultConfig stackConf.DataDir = nodeConfig.Persistent.Chain stackConf.DBEngine = "leveldb" + nodeConfig.Rpc.Apply(&stackConf) nodeConfig.HTTP.Apply(&stackConf) nodeConfig.WS.Apply(&stackConf) nodeConfig.Auth.Apply(&stackConf) @@ -757,7 +758,6 @@ func ParseNode(ctx context.Context, args []string) (*NodeConfig, *genericconf.Wa if err != nil { return nil, nil, nil, err } - nodeConfig.Rpc.Apply() return &nodeConfig, &l1Wallet, &l2DevWallet, nil } From 0073aa24c662c41efac6cc908e4f888e6964a4f1 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Mon, 2 Oct 2023 18:11:23 -0700 Subject: [PATCH 03/30] Updates for v1.12.1 merge Modifications for upstream geth changes: - stack.Attach returns one parameter. - TrieCache removed - txpool.AddLocals replaced by Add, needs wrapped txs --- arbnode/execution/blockchain.go | 2 - cmd/nitro/init.go | 5 +- go.mod | 43 +++++++------ go.sum | 88 +++++++++++++++++---------- system_tests/arbtrace_test.go | 2 +- system_tests/common_test.go | 13 ++-- system_tests/conditionaltx_test.go | 9 +-- system_tests/debugapi_test.go | 2 +- system_tests/delayedinboxlong_test.go | 9 ++- system_tests/retryable_test.go | 2 + system_tests/twonodeslong_test.go | 9 ++- 11 files changed, 109 insertions(+), 75 deletions(-) diff --git a/arbnode/execution/blockchain.go b/arbnode/execution/blockchain.go index 230902726b..57c0e30530 100644 --- a/arbnode/execution/blockchain.go +++ b/arbnode/execution/blockchain.go @@ -75,8 +75,6 @@ func DefaultCacheConfigFor(stack *node.Node, cachingConfig *CachingConfig) *core return &core.CacheConfig{ TrieCleanLimit: cachingConfig.TrieCleanCache, - TrieCleanJournal: stack.ResolvePath(baseConf.TrieCleanCacheJournal), - TrieCleanRejournal: baseConf.TrieCleanCacheRejournal, TrieCleanNoPrefetch: baseConf.NoPrefetch, TrieDirtyLimit: cachingConfig.TrieDirtyCache, TrieDirtyDisabled: cachingConfig.Archive, diff --git a/cmd/nitro/init.go b/cmd/nitro/init.go index bdba7c1210..96ef95df53 100644 --- a/cmd/nitro/init.go +++ b/cmd/nitro/init.go @@ -420,17 +420,16 @@ func findImportantRoots(ctx context.Context, chainDb ethdb.Database, stack *node } func pruneChainDb(ctx context.Context, chainDb ethdb.Database, stack *node.Node, nodeConfig *NodeConfig, cacheConfig *core.CacheConfig, l1Client arbutil.L1Interface, rollupAddrs chaininfo.RollupAddresses) error { - trieCachePath := cacheConfig.TrieCleanJournal config := &nodeConfig.Init if config.Prune == "" { - return pruner.RecoverPruning(stack.InstanceDir(), chainDb, trieCachePath) + return pruner.RecoverPruning(stack.InstanceDir(), chainDb) } root, err := findImportantRoots(ctx, chainDb, stack, nodeConfig, cacheConfig, l1Client, rollupAddrs) if err != nil { return fmt.Errorf("failed to find root to retain for pruning: %w", err) } - pruner, err := pruner.NewPruner(chainDb, pruner.Config{Datadir: stack.InstanceDir(), Cachedir: trieCachePath, BloomSize: config.PruneBloomSize}) + pruner, err := pruner.NewPruner(chainDb, pruner.Config{Datadir: stack.InstanceDir(), BloomSize: config.PruneBloomSize}) if err != nil { return err } diff --git a/go.mod b/go.mod index cc31c4a23d..ba5fe5063b 100644 --- a/go.mod +++ b/go.mod @@ -18,8 +18,10 @@ require ( github.com/cavaliergopher/grab/v3 v3.0.1 github.com/codeclysm/extract/v3 v3.0.2 github.com/dgraph-io/badger/v3 v3.2103.2 + github.com/enescakir/emoji v1.0.0 github.com/ethereum/go-ethereum v1.10.26 github.com/fatih/structtag v1.2.0 + github.com/gdamore/tcell/v2 v2.6.0 github.com/google/go-cmp v0.5.9 github.com/hashicorp/golang-lru/v2 v2.0.1 github.com/ipfs/go-cid v0.3.2 @@ -30,10 +32,11 @@ require ( github.com/libp2p/go-libp2p v0.26.4 github.com/multiformats/go-multiaddr v0.8.0 github.com/multiformats/go-multihash v0.2.1 + github.com/rivo/tview v0.0.0-20230814110005-ccc2c8119703 github.com/spf13/pflag v1.0.5 github.com/wealdtech/go-merkletree v1.0.0 - golang.org/x/term v0.6.0 - golang.org/x/tools v0.7.0 + golang.org/x/term v0.8.0 + golang.org/x/tools v0.9.1 gopkg.in/natefinch/lumberjack.v2 v2.0.0 ) @@ -61,6 +64,7 @@ require ( github.com/aws/smithy-go v1.11.2 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/bits-and-blooms/bitset v1.7.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect @@ -72,10 +76,13 @@ require ( github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 // indirect github.com/cockroachdb/redact v1.1.3 // indirect + github.com/consensys/bavard v0.1.13 // indirect + github.com/consensys/gnark-crypto v0.10.0 // indirect github.com/containerd/cgroups v1.0.4 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect + github.com/crate-crypto/go-kzg-4844 v0.3.0 // indirect github.com/cskr/pubsub v1.0.2 // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect @@ -84,18 +91,17 @@ require ( github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7 // indirect + github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/elastic/gosigar v0.14.2 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/enescakir/emoji v1.0.0 // indirect + github.com/ethereum/c-kzg-4844 v0.3.0 // indirect github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 // indirect github.com/flynn/noise v1.0.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gammazero/deque v0.2.1 // indirect github.com/gdamore/encoding v1.0.0 // indirect - github.com/gdamore/tcell/v2 v2.6.0 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -110,7 +116,7 @@ require ( github.com/golang/protobuf v1.5.2 // indirect github.com/google/flatbuffers v1.12.1 // indirect github.com/google/gopacket v1.1.19 // indirect - github.com/google/pprof v0.0.0-20221203041831-ce31453925ec // indirect + github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/graph-gophers/graphql-go v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect @@ -118,6 +124,7 @@ require ( github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/go-bitfield v1.1.0 // indirect github.com/ipfs/go-block-format v0.1.1 // indirect @@ -203,6 +210,7 @@ require ( github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect @@ -230,14 +238,14 @@ require ( github.com/quic-go/webtransport-go v0.5.2 // indirect github.com/raulk/go-watchdog v1.3.0 // indirect github.com/rhnvrm/simples3 v0.6.1 // indirect - github.com/rivo/tview v0.0.0-20230814110005-ccc2c8119703 // indirect github.com/rivo/uniseg v0.4.3 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/samber/lo v1.36.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/stretchr/testify v1.8.2 // indirect - github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa // indirect + github.com/supranational/blst v0.3.11-0.20230406105308-e9dfc5ee724b // indirect + github.com/urfave/cli/v2 v2.24.1 // indirect github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc // indirect github.com/whyrusleeping/cbor-gen v0.0.0-20230126041949-52956bd4c9aa // indirect github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect @@ -263,8 +271,8 @@ require ( go.uber.org/multierr v1.9.0 // indirect go.uber.org/zap v1.24.0 // indirect go4.org v0.0.0-20200411211856-f5505b9728dd // indirect - golang.org/x/exp v0.0.0-20230206171751-46f607a40771 // indirect - golang.org/x/mod v0.9.0 // indirect + golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect + golang.org/x/mod v0.10.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1 // indirect google.golang.org/grpc v1.46.0 // indirect @@ -272,6 +280,7 @@ require ( gopkg.in/square/go-jose.v2 v2.5.1 // indirect lukechampine.com/blake3 v1.1.7 // indirect nhooyr.io/websocket v1.8.7 // indirect + rsc.io/tmplfunc v0.0.3 // indirect ) require ( @@ -299,7 +308,7 @@ require ( github.com/hashicorp/go-bexpr v0.1.10 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c + github.com/holiman/uint256 v1.2.3 github.com/huin/goupnp v1.0.3 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -315,11 +324,11 @@ require ( github.com/tklauser/go-sysconf v0.3.5 // indirect github.com/tklauser/numcpus v0.2.2 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect - golang.org/x/crypto v0.6.0 - golang.org/x/net v0.8.0 // indirect - golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.7.0 - golang.org/x/text v0.8.0 // indirect - golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect + golang.org/x/crypto v0.9.0 + golang.org/x/net v0.10.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.9.0 + golang.org/x/text v0.9.0 // indirect + golang.org/x/time v0.3.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect ) diff --git a/go.sum b/go.sum index 4362d4b01d..69e13ca606 100644 --- a/go.sum +++ b/go.sum @@ -45,7 +45,7 @@ github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOv github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M= github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= +github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= @@ -157,6 +157,8 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= +github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= @@ -201,8 +203,11 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= 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= +github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -230,6 +235,10 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE github.com/codeclysm/extract/v3 v3.0.2 h1:sB4LcE3Php7LkhZwN0n2p8GCwZe92PEQutdbGURf5xc= github.com/codeclysm/extract/v3 v3.0.2/go.mod h1:NKsw+hqua9H+Rlwy/w/3Qgt9jDonYEgB6wJu+25eOKw= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= +github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= +github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/gnark-crypto v0.10.0 h1:zRh22SR7o4K35SoNqouS9J/TKHTyU2QWaj5ldehyXtA= +github.com/consensys/gnark-crypto v0.10.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= @@ -250,6 +259,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHH github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= +github.com/crate-crypto/go-kzg-4844 v0.3.0 h1:UBlWE0CgyFqqzTI+IFyCzA7A3Zw4iip6uzRv5NIXG0A= +github.com/crate-crypto/go-kzg-4844 v0.3.0/go.mod h1:SBP7ikXEgDnUPONgm33HtuDZEDtWa3L4QtN1ocJSEQ4= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= @@ -291,8 +302,8 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD 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/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7 h1:kgvzE5wLsLa7XKfV85VZl40QXaMCaeFtHpPwJ8fhotY= -github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= +github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 h1:+3HCtB74++ClLy8GgjUQYeC8R4ILzVcIe8+5edAJJnE= +github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -322,6 +333,8 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/ethereum/c-kzg-4844 v0.3.0 h1:3Y3hD6l5i0dEYsBL50C+Om644kve3pNqoAcvE26o9zI= +github.com/ethereum/c-kzg-4844 v0.3.0/go.mod h1:WI2Nd82DMZAAZI1wV2neKGost9EKjvbpQR9OqE5Qqa8= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 h1:BBso6MBKW8ncyZLv37o+KNyy0HrrHgfnOaGQC2qvN+A= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= @@ -517,9 +530,10 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20221203041831-ce31453925ec h1:fR20TYVVwhK4O7r7y+McjRYyaTH6/vjwJOajE+XhlzM= -github.com/google/pprof v0.0.0-20221203041831-ce31453925ec/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -608,10 +622,12 @@ github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoI github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw= +github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/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.2-0.20230321075855-87b91420868c h1:DZfsyhDK1hnSS5lH8l+JggqzEleHteTYfutAiVlSUM8= -github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= +github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= @@ -620,6 +636,7 @@ github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixH github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -932,6 +949,7 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= @@ -1181,7 +1199,6 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -1236,6 +1253,9 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1563,6 +1583,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/supranational/blst v0.3.11-0.20230406105308-e9dfc5ee724b h1:u49mjRnygnB34h8OKbnNJFVUtWSKIKb1KukdV8bILUM= +github.com/supranational/blst v0.3.11-0.20230406105308-e9dfc5ee724b/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= @@ -1588,8 +1610,8 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa h1:5SqCsI/2Qya2bCzK15ozrqo2sZxkh0FHynJZOTVoV6Q= -github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= +github.com/urfave/cli/v2 v2.24.1 h1:/QYYr7g0EhwXEML8jO+8OYt5trPnLHS0p3mrgExJ5NU= +github.com/urfave/cli/v2 v2.24.1/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= @@ -1754,8 +1776,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1766,8 +1788,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= -golang.org/x/exp v0.0.0-20230206171751-46f607a40771/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1792,8 +1814,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180406214816-61147c48b25b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1854,8 +1876,8 @@ golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1877,8 +1899,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1968,22 +1990,21 @@ golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1993,16 +2014,17 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2064,8 +2086,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2256,6 +2278,8 @@ pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= diff --git a/system_tests/arbtrace_test.go b/system_tests/arbtrace_test.go index 78907aa622..1db058fcdb 100644 --- a/system_tests/arbtrace_test.go +++ b/system_tests/arbtrace_test.go @@ -151,7 +151,7 @@ func TestArbTraceForwarding(t *testing.T) { defer requireClose(t, l1stack) defer requireClose(t, l2stack) - l2rpc, _ := l2stack.Attach() + l2rpc := l2stack.Attach() txArgs := callTxArgs{} traceTypes := []string{"trace"} blockNum := rpc.BlockNumberOrHash{} diff --git a/system_tests/common_test.go b/system_tests/common_test.go index 7bc1c11758..c4ee904fd8 100644 --- a/system_tests/common_test.go +++ b/system_tests/common_test.go @@ -404,7 +404,7 @@ func createTestL1BlockChainWithConfig(t *testing.T, l1info info, stackConfig *no nodeConf := ethconfig.Defaults nodeConf.NetworkId = chainConfig.ChainID.Uint64() - l1Genesis := core.DeveloperGenesisBlock(0, 15_000_000, l1info.GetAddress("Faucet")) + l1Genesis := core.DeveloperGenesisBlock(15_000_000, l1info.GetAddress("Faucet")) infoGenesis := l1info.GetGenesisAlloc() for acct, info := range infoGenesis { l1Genesis.Alloc[acct] = info @@ -435,8 +435,7 @@ func createTestL1BlockChainWithConfig(t *testing.T, l1info info, stackConfig *no Require(t, stack.Start()) Require(t, l1backend.StartMining()) - rpcClient, err := stack.Attach() - Require(t, err) + rpcClient := stack.Attach() l1Client := ethclient.NewClient(rpcClient) @@ -547,8 +546,7 @@ func createL2BlockChainWithStackConfig( } func ClientForStack(t *testing.T, backend *node.Node) *ethclient.Client { - rpcClient, err := backend.Attach() - Require(t, err) + rpcClient := backend.Attach() return ethclient.NewClient(rpcClient) } @@ -736,10 +734,7 @@ func Create2ndNodeWithConfig( stackConfig *node.Config, ) (*ethclient.Client, *arbnode.Node) { feedErrChan := make(chan error, 10) - l1rpcClient, err := l1stack.Attach() - if err != nil { - Fatal(t, err) - } + l1rpcClient := l1stack.Attach() l1client := ethclient.NewClient(l1rpcClient) if stackConfig == nil { diff --git a/system_tests/conditionaltx_test.go b/system_tests/conditionaltx_test.go index 14aa000313..760ec27354 100644 --- a/system_tests/conditionaltx_test.go +++ b/system_tests/conditionaltx_test.go @@ -228,8 +228,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { currentRootHash2 := getStorageRootHash(t, node, contractAddress2) currentSlotValueMap2 := getStorageSlotValue(t, node, contractAddress2) - rpcClient, err := node.Stack.Attach() - Require(t, err) + rpcClient := node.Stack.Attach() l2info.GenerateAccount("User2") @@ -310,8 +309,7 @@ func TestSendRawTransactionConditionalMultiRoutine(t *testing.T) { defer cancel() l2info, node, client := CreateTestL2(t, ctx) defer node.StopAndWait() - rpcClient, err := node.Stack.Attach() - Require(t, err) + rpcClient := node.Stack.Attach() auth := l2info.GetDefaultTransactOpts("Owner", ctx) contractAddress, simple := deploySimple(t, ctx, auth, client) @@ -412,8 +410,7 @@ func TestSendRawTransactionConditionalPreCheck(t *testing.T) { l2info, node, l2client, _, _, _, l1stack := createTestNodeOnL1WithConfig(t, ctx, true, nodeConfig, nil, nil) defer requireClose(t, l1stack) defer node.StopAndWait() - rpcClient, err := node.Stack.Attach() - Require(t, err) + rpcClient := node.Stack.Attach() l2info.GenerateAccount("User2") diff --git a/system_tests/debugapi_test.go b/system_tests/debugapi_test.go index 03e3dfd405..f24314eab1 100644 --- a/system_tests/debugapi_test.go +++ b/system_tests/debugapi_test.go @@ -18,7 +18,7 @@ func TestDebugAPI(t *testing.T) { defer requireClose(t, l1stack) defer requireClose(t, l2stack) - l2rpc, _ := l2stack.Attach() + l2rpc := l2stack.Attach() var dump state.Dump err := l2rpc.CallContext(ctx, &dump, "debug_dumpBlock", rpc.LatestBlockNumber) diff --git a/system_tests/delayedinboxlong_test.go b/system_tests/delayedinboxlong_test.go index b1c8ea361b..994fbdd686 100644 --- a/system_tests/delayedinboxlong_test.go +++ b/system_tests/delayedinboxlong_test.go @@ -14,6 +14,7 @@ import ( "testing" "time" + "github.com/ethereum/go-ethereum/core/txpool" "github.com/ethereum/go-ethereum/core/types" ) @@ -51,8 +52,12 @@ func TestDelayInboxLong(t *testing.T) { } l1Txs = append(l1Txs, l1tx) } - // adding multiple messages in the same AddLocal to get them in the same L1 block - errs := l1backend.TxPool().AddLocals(l1Txs) + wrappedL1Txs := make([]*txpool.Transaction, 0, messagesPerAddLocal) + for _, tx := range l1Txs { + wrappedL1Txs = append(wrappedL1Txs, &txpool.Transaction{Tx: tx}) + } + // adding multiple messages in the same Add with local=true to get them in the same L1 block + errs := l1backend.TxPool().Add(wrappedL1Txs, true, false) for _, err := range errs { Require(t, err) } diff --git a/system_tests/retryable_test.go b/system_tests/retryable_test.go index b1dd32d1dc..63876f1f46 100644 --- a/system_tests/retryable_test.go +++ b/system_tests/retryable_test.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "github.com/offchainlabs/nitro/arbnode" "github.com/offchainlabs/nitro/arbos" @@ -29,6 +30,7 @@ import ( "github.com/offchainlabs/nitro/solgen/go/precompilesgen" "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/util/colors" + "github.com/offchainlabs/nitro/util/testhelpers" ) func retryableSetup(t *testing.T) ( diff --git a/system_tests/twonodeslong_test.go b/system_tests/twonodeslong_test.go index 0cac9d6442..50af61360e 100644 --- a/system_tests/twonodeslong_test.go +++ b/system_tests/twonodeslong_test.go @@ -17,6 +17,7 @@ import ( "github.com/offchainlabs/nitro/arbos/l2pricing" "github.com/offchainlabs/nitro/arbutil" + "github.com/ethereum/go-ethereum/core/txpool" "github.com/ethereum/go-ethereum/core/types" ) @@ -94,8 +95,12 @@ func testTwoNodesLong(t *testing.T, dasModeStr string) { } l1Txs = append(l1Txs, l1tx) } - // adding multiple messages in the same AddLocal to get them in the same L1 block - errs := l1backend.TxPool().AddLocals(l1Txs) + wrappedL1Txs := make([]*txpool.Transaction, 0, l1TxsThisTime) + for _, tx := range l1Txs { + wrappedL1Txs = append(wrappedL1Txs, &txpool.Transaction{Tx: tx}) + } + // adding multiple messages in the same Add with local=true to get them in the same L1 block + errs := l1backend.TxPool().Add(wrappedL1Txs, true, false) for _, err := range errs { if err != nil { Fatal(t, err) From c6b5153886287c7a1b6dbd2d2fb80c25464fad89 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Tue, 3 Oct 2023 18:59:23 -0700 Subject: [PATCH 04/30] Use SimulatedBeacon for test L1s v1.12.1 geth changes the default ChainConfig returned with DeveloperGenesisBlock from AllCliqueProtocolChanges to AllDevChainProtocolChanges. Since the dev chain config is not set to clique mode and is set as post-TTD with TTD=0, there needs to be a non-ethhash based consensus engine running in order for blocks to be produced. See the upstream geth change here: https://github.com/ethereum/go-ethereum/pull/27327 This commit copies the initailization code for how geth is started up in dev mode with the simulated beacon node to our test L1 setup code. It also enables FullSync mode on the L1, since otherwise SimluatedBeacon.sealBlock would fail when calling the ConsensusAPI.ForkChoiceUpdatedV2 as it would still be syncing if it was in SnapSync mode. UseMergeFinality was also disabled on the TestDelayedSequencerConfig since the SimulatedBeacon seems to have different finalization behavior. --- arbnode/delayed_sequencer.go | 2 +- go-ethereum | 2 +- system_tests/common_test.go | 9 +++++++++ system_tests/retryable_test.go | 2 -- system_tests/wrap_transaction_test.go | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/arbnode/delayed_sequencer.go b/arbnode/delayed_sequencer.go index aa6d43785e..39cdebf2a3 100644 --- a/arbnode/delayed_sequencer.go +++ b/arbnode/delayed_sequencer.go @@ -60,7 +60,7 @@ var TestDelayedSequencerConfig = DelayedSequencerConfig{ Enable: true, FinalizeDistance: 20, RequireFullFinality: false, - UseMergeFinality: true, + UseMergeFinality: false, } func NewDelayedSequencer(l1Reader *headerreader.HeaderReader, reader *InboxReader, exec *execution.ExecutionEngine, coordinator *SeqCoordinator, config DelayedSequencerConfigFetcher) (*DelayedSequencer, error) { diff --git a/go-ethereum b/go-ethereum index 89f53b035d..90dbc8edbe 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 89f53b035d7a8b9b1ff8599958bf0c55efcdf718 +Subproject commit 90dbc8edbe96aeb0c5c372cc7289373ee66d3351 diff --git a/system_tests/common_test.go b/system_tests/common_test.go index c4ee904fd8..6cc032c9d9 100644 --- a/system_tests/common_test.go +++ b/system_tests/common_test.go @@ -37,6 +37,8 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth" + "github.com/ethereum/go-ethereum/eth/catalyst" + "github.com/ethereum/go-ethereum/eth/downloader" "github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/ethereum/go-ethereum/eth/filters" "github.com/ethereum/go-ethereum/ethclient" @@ -412,9 +414,16 @@ func createTestL1BlockChainWithConfig(t *testing.T, l1info info, stackConfig *no l1Genesis.BaseFee = big.NewInt(50 * params.GWei) nodeConf.Genesis = l1Genesis nodeConf.Miner.Etherbase = l1info.GetAddress("Faucet") + nodeConf.SyncMode = downloader.FullSync l1backend, err := eth.New(stack, &nodeConf) Require(t, err) + + simBeacon, err := catalyst.NewSimulatedBeacon(0, l1backend) + Require(t, err) + catalyst.RegisterSimulatedBeaconAPIs(stack, simBeacon) + stack.RegisterLifecycle(simBeacon) + tempKeyStore := keystore.NewPlaintextKeyStore(t.TempDir()) faucetAccount, err := tempKeyStore.ImportECDSA(l1info.Accounts["Faucet"].PrivateKey, "passphrase") Require(t, err) diff --git a/system_tests/retryable_test.go b/system_tests/retryable_test.go index 63876f1f46..b1dd32d1dc 100644 --- a/system_tests/retryable_test.go +++ b/system_tests/retryable_test.go @@ -15,7 +15,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "github.com/offchainlabs/nitro/arbnode" "github.com/offchainlabs/nitro/arbos" @@ -30,7 +29,6 @@ import ( "github.com/offchainlabs/nitro/solgen/go/precompilesgen" "github.com/offchainlabs/nitro/util/arbmath" "github.com/offchainlabs/nitro/util/colors" - "github.com/offchainlabs/nitro/util/testhelpers" ) func retryableSetup(t *testing.T) ( diff --git a/system_tests/wrap_transaction_test.go b/system_tests/wrap_transaction_test.go index 1eae2396b7..e4ce6a4bb8 100644 --- a/system_tests/wrap_transaction_test.go +++ b/system_tests/wrap_transaction_test.go @@ -79,7 +79,7 @@ func EnsureTxSucceeded(ctx context.Context, client arbutil.L1Interface, tx *type func EnsureTxSucceededWithTimeout(ctx context.Context, client arbutil.L1Interface, tx *types.Transaction, timeout time.Duration) (*types.Receipt, error) { txRes, err := WaitForTx(ctx, client, tx.Hash(), timeout) if err != nil { - return nil, fmt.Errorf("waitFoxTx got: %w", err) + return nil, fmt.Errorf("waitFoxTx (tx=%s) got: %w", tx.Hash().Hex(), err) } return txRes, arbutil.DetailTxError(ctx, client, tx, txRes) } From add21a96ffac4a91b7df7afd405c7e99e1ffbe0e Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Wed, 4 Oct 2023 12:12:45 -0700 Subject: [PATCH 05/30] Batch txs rather than on-demand L1 blocks for tests SimulatedBeacon creates a block per tx when running in on-demand mode, and then increments the block timestamps by one if they would've been for the same time, which can break assumptions in a lot of our tests, for example conditional tx tests that set time range restrictions on the txs. By setting SimulatedBeacon's delay to 1s, this allows it to batch multiple txs into a block and avoid this problem. --- system_tests/common_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_tests/common_test.go b/system_tests/common_test.go index 6cc032c9d9..c5f92515ab 100644 --- a/system_tests/common_test.go +++ b/system_tests/common_test.go @@ -419,7 +419,7 @@ func createTestL1BlockChainWithConfig(t *testing.T, l1info info, stackConfig *no l1backend, err := eth.New(stack, &nodeConf) Require(t, err) - simBeacon, err := catalyst.NewSimulatedBeacon(0, l1backend) + simBeacon, err := catalyst.NewSimulatedBeacon(1, l1backend) Require(t, err) catalyst.RegisterSimulatedBeaconAPIs(stack, simBeacon) stack.RegisterLifecycle(simBeacon) From f7a09711366efd223acfd7409600abfdd4f98076 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Wed, 11 Oct 2023 14:53:07 +0200 Subject: [PATCH 06/30] Fix some tests related to SimulatedBeacon change Longer timeout was required for tx to be picked up by secondary L2 in some tests: TestTwoNodesLong, TestTwoNodesLongLocalDAS, TestDASRekey Updated geth pin to use SimulatedBeacon with fix with backported upstream fix for reorgs, fixes these tests: TestMeaninglessBatchReorg, TestSequencerInboxReader --- go-ethereum | 2 +- system_tests/common_test.go | 2 +- system_tests/das_test.go | 2 +- system_tests/twonodeslong_test.go | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go-ethereum b/go-ethereum index 90dbc8edbe..ca2d9a7239 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 90dbc8edbe96aeb0c5c372cc7289373ee66d3351 +Subproject commit ca2d9a7239a932ad4f79c8bde5df4ab9cef430da diff --git a/system_tests/common_test.go b/system_tests/common_test.go index c5f92515ab..6cc032c9d9 100644 --- a/system_tests/common_test.go +++ b/system_tests/common_test.go @@ -419,7 +419,7 @@ func createTestL1BlockChainWithConfig(t *testing.T, l1info info, stackConfig *no l1backend, err := eth.New(stack, &nodeConf) Require(t, err) - simBeacon, err := catalyst.NewSimulatedBeacon(1, l1backend) + simBeacon, err := catalyst.NewSimulatedBeacon(0, l1backend) Require(t, err) catalyst.RegisterSimulatedBeaconAPIs(stack, simBeacon) stack.RegisterLifecycle(simBeacon) diff --git a/system_tests/das_test.go b/system_tests/das_test.go index 8889d2d53d..7e67a155ef 100644 --- a/system_tests/das_test.go +++ b/system_tests/das_test.go @@ -212,7 +212,7 @@ func checkBatchPosting(t *testing.T, ctx context.Context, l1client, l2clientA *e } for _, client := range l2ClientsToCheck { - _, err = WaitForTx(ctx, client, tx.Hash(), time.Second*5) + _, err = WaitForTx(ctx, client, tx.Hash(), time.Second*25) Require(t, err) l2balance, err := client.BalanceAt(ctx, l2info.GetAddress("User2"), nil) diff --git a/system_tests/twonodeslong_test.go b/system_tests/twonodeslong_test.go index 50af61360e..8585780b51 100644 --- a/system_tests/twonodeslong_test.go +++ b/system_tests/twonodeslong_test.go @@ -156,8 +156,9 @@ func testTwoNodesLong(t *testing.T, dasModeStr string) { _, err = EnsureTxSucceededWithTimeout(ctx, l2client, delayedTxs[len(delayedTxs)-1], time.Second*10) Require(t, err, "Failed waiting for Tx on main node") - _, err = EnsureTxSucceededWithTimeout(ctx, l2clientB, delayedTxs[len(delayedTxs)-1], time.Second*10) - Require(t, err, "Failed waiting for Tx on secondary node") + _, err = EnsureTxSucceededWithTimeout(ctx, l2clientB, delayedTxs[len(delayedTxs)-1], time.Second*30) + Require(t, err, fmt.Sprintf("Failed waiting for Tx on secondary node")) + delayedBalance, err := l2clientB.BalanceAt(ctx, l2info.GetAddress("DelayedReceiver"), nil) Require(t, err) directBalance, err := l2clientB.BalanceAt(ctx, l2info.GetAddress("DirectReceiver"), nil) From ab4bf63b6030c65cccc0fbb89bc28144a20408bc Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Wed, 11 Oct 2023 17:38:30 +0200 Subject: [PATCH 07/30] Lint fix --- system_tests/twonodeslong_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_tests/twonodeslong_test.go b/system_tests/twonodeslong_test.go index 8585780b51..12e6134899 100644 --- a/system_tests/twonodeslong_test.go +++ b/system_tests/twonodeslong_test.go @@ -157,7 +157,7 @@ func testTwoNodesLong(t *testing.T, dasModeStr string) { _, err = EnsureTxSucceededWithTimeout(ctx, l2client, delayedTxs[len(delayedTxs)-1], time.Second*10) Require(t, err, "Failed waiting for Tx on main node") _, err = EnsureTxSucceededWithTimeout(ctx, l2clientB, delayedTxs[len(delayedTxs)-1], time.Second*30) - Require(t, err, fmt.Sprintf("Failed waiting for Tx on secondary node")) + Require(t, err, "Failed waiting for Tx on secondary node") delayedBalance, err := l2clientB.BalanceAt(ctx, l2info.GetAddress("DelayedReceiver"), nil) Require(t, err) From 61afda47e78d76b74d1c0f2df2d397a459b77864 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Fri, 13 Oct 2023 13:19:37 +0200 Subject: [PATCH 08/30] Fix ChallengeManager tests How latest confirmed/finalized block is calculated is changed for SimulatedBeacon so this test needs more filler transactions to get the needed blocks to be finalized. --- system_tests/full_challenge_impl_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system_tests/full_challenge_impl_test.go b/system_tests/full_challenge_impl_test.go index b64a655c3e..a49cfa308a 100644 --- a/system_tests/full_challenge_impl_test.go +++ b/system_tests/full_challenge_impl_test.go @@ -181,7 +181,10 @@ func makeBatch(t *testing.T, l2Node *arbnode.Node, l2Info *BlockchainTestInfo, b } func confirmLatestBlock(ctx context.Context, t *testing.T, l1Info *BlockchainTestInfo, backend arbutil.L1Interface) { - for i := 0; i < 12; i++ { + // With SimulatedBeacon running in on-demand block production mode, the + // finalized block is considered to be be the nearest multiple of 32 less + // than or equal to the block number. + for i := 0; i < 32; i++ { SendWaitTestTransactions(t, ctx, backend, []*types.Transaction{ l1Info.PrepareTx("Faucet", "Faucet", 30000, big.NewInt(1e12), nil), }) @@ -403,6 +406,8 @@ func RunChallengeTest(t *testing.T, asserterIsCorrect bool, useStubs bool, chall Fatal(t, err) } + confirmLatestBlock(ctx, t, l1Info, l1Backend) + for i := 0; i < 100; i++ { var tx *types.Transaction var currentCorrect bool From 6462f7651f538300b4b43e056fec1020ebf6e4c2 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Mon, 16 Oct 2023 19:20:35 +0200 Subject: [PATCH 09/30] Fix TestSequencerPrice* tests for SimulatedBeacon --- system_tests/fees_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system_tests/fees_test.go b/system_tests/fees_test.go index bdd998357e..15ea15623e 100644 --- a/system_tests/fees_test.go +++ b/system_tests/fees_test.go @@ -135,6 +135,11 @@ func testSequencerPriceAdjustsFrom(t *testing.T, initialEstimate uint64) { conf := arbnode.ConfigDefaultL1Test() conf.DelayedSequencer.FinalizeDistance = 1 + // SimulatedBeacon running in OnDemand block production mode + // produces blocks in the future so we need this to avoid the batch poster + // not posting because the txs appear to be in the future. + conf.BatchPoster.MaxDelay = -time.Hour + l2info, node, l2client, l1info, _, l1client, l1stack := createTestNodeOnL1WithConfig(t, ctx, true, conf, chainConfig, nil) defer requireClose(t, l1stack) defer node.StopAndWait() From 2497ad4f019e3dd6d7d1f3d50db7005da48c3e26 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Tue, 17 Oct 2023 15:59:12 +0200 Subject: [PATCH 10/30] Fix TestBlockValidator for SimulatedBeacon --- system_tests/block_validator_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_tests/block_validator_test.go b/system_tests/block_validator_test.go index fa3d902b18..e282878273 100644 --- a/system_tests/block_validator_test.go +++ b/system_tests/block_validator_test.go @@ -154,7 +154,7 @@ func testBlockValidatorSimple(t *testing.T, dasModeString string, workloadLoops }) } - _, err := WaitForTx(ctx, l2clientB, delayedTx.Hash(), time.Second*5) + _, err := WaitForTx(ctx, l2clientB, delayedTx.Hash(), time.Second*25) Require(t, err) } From fd11626f41a97b270f4d6a7beae7dd4445b6e379 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Tue, 17 Oct 2023 16:43:00 +0200 Subject: [PATCH 11/30] Fix TestDelayInboxLong for SimulatedBeacon --- system_tests/delayedinboxlong_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/system_tests/delayedinboxlong_test.go b/system_tests/delayedinboxlong_test.go index 994fbdd686..45abe2fe5f 100644 --- a/system_tests/delayedinboxlong_test.go +++ b/system_tests/delayedinboxlong_test.go @@ -62,6 +62,7 @@ func TestDelayInboxLong(t *testing.T) { Require(t, err) } // Checking every tx is expensive, so we just check the last, assuming that the others succeeded too + confirmLatestBlock(ctx, t, l1info, l1client) _, err := EnsureTxSucceeded(ctx, l1client, l1Txs[len(l1Txs)-1]) Require(t, err) } From 127dda7363de655722381e0d9f5e8ec7bab68fe0 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Tue, 17 Oct 2023 17:29:35 +0200 Subject: [PATCH 12/30] Fix TestSendRawTransactionConditionalBasic --- system_tests/conditionaltx_test.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/system_tests/conditionaltx_test.go b/system_tests/conditionaltx_test.go index 760ec27354..5848391b58 100644 --- a/system_tests/conditionaltx_test.go +++ b/system_tests/conditionaltx_test.go @@ -240,7 +240,17 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { block, err := l1client.BlockByNumber(ctx, nil) Require(t, err) blockNumber := block.NumberU64() - blockTime := block.Time() + fixBlockTime := func(blockTime uint64) uint64 { + since := time.Now().Unix() - int64(blockTime) + if int64(since) < 0 { + // If using SimulatedBeacon then the block time will be ahead of + // the actual time since it generates a new block for each tx in + // on demand mode, and assigns them to sequentially increasing timestamps. + return uint64(time.Now().Unix()) + } + return blockTime + } + blockTime := fixBlockTime(block.Time()) optionsA := getOptions(contractAddress1, currentRootHash1, currentSlotValueMap1) optionsB := getOptions(contractAddress2, currentRootHash2, currentSlotValueMap2) @@ -277,7 +287,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { block, err = l1client.BlockByNumber(ctx, nil) Require(t, err) blockNumber = block.NumberU64() - blockTime = block.Time() + blockTime = fixBlockTime(block.Time()) optionsC := getOptions(contractAddress1, currentRootHash1, currentSlotValueMap1) optionsD := getOptions(contractAddress2, currentRootHash2, currentSlotValueMap2) @@ -293,7 +303,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { block, err = l1client.BlockByNumber(ctx, nil) Require(t, err) blockNumber = block.NumberU64() - blockTime = block.Time() + blockTime = fixBlockTime(block.Time()) options3 := optionsDedupProduct(t, options2, getUnfulfillableBlockTimeLimits(t, blockNumber, blockTime)) for i, options := range options3 { testConditionalTxThatShouldFail(t, ctx, i, l2info, rpcClient, options, -32003) From 7fa50bcdc586e7a69cdff02de344b24c78b7bee4 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Thu, 19 Oct 2023 19:15:01 +0200 Subject: [PATCH 13/30] Fix TestStakersCooperative for SimulatedBeacon Make batch poster and staker work with block times in the future produced by SimualtedBeacon. --- arbnode/batch_poster.go | 2 +- staker/staker.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arbnode/batch_poster.go b/arbnode/batch_poster.go index 4f50831e67..f9990460c9 100644 --- a/arbnode/batch_poster.go +++ b/arbnode/batch_poster.go @@ -198,7 +198,7 @@ var TestBatchPosterConfig = BatchPosterConfig{ MaxSize: 100000, PollInterval: time.Millisecond * 10, ErrorDelay: time.Millisecond * 10, - MaxDelay: 0, + MaxDelay: -time.Hour * 1000, WaitForMaxDelay: false, CompressionLevel: 2, DASRetentionPeriod: time.Hour * 24 * 15, diff --git a/staker/staker.go b/staker/staker.go index d52d1adc77..422b5c605f 100644 --- a/staker/staker.go +++ b/staker/staker.go @@ -163,7 +163,7 @@ var TestL1ValidatorConfig = L1ValidatorConfig{ Enable: true, Strategy: "Watchtower", StakerInterval: time.Millisecond * 10, - MakeAssertionInterval: 0, + MakeAssertionInterval: -time.Hour * 1000, PostingStrategy: L1PostingStrategy{}, DisableChallenge: false, ConfirmationBlocks: 0, From bf92b1bb542f78eff80147e22008a99f4779dd93 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Fri, 20 Oct 2023 15:32:10 +0200 Subject: [PATCH 14/30] Fix TestSendRawTransactionConditional tests Set the BatchPosterConfig.MaxDelay to negative only for the tests that need it for now. --- arbnode/batch_poster.go | 2 +- system_tests/conditionaltx_test.go | 2 +- system_tests/staker_test.go | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arbnode/batch_poster.go b/arbnode/batch_poster.go index f9990460c9..4f50831e67 100644 --- a/arbnode/batch_poster.go +++ b/arbnode/batch_poster.go @@ -198,7 +198,7 @@ var TestBatchPosterConfig = BatchPosterConfig{ MaxSize: 100000, PollInterval: time.Millisecond * 10, ErrorDelay: time.Millisecond * 10, - MaxDelay: -time.Hour * 1000, + MaxDelay: 0, WaitForMaxDelay: false, CompressionLevel: 2, DASRetentionPeriod: time.Hour * 24 * 15, diff --git a/system_tests/conditionaltx_test.go b/system_tests/conditionaltx_test.go index 5848391b58..04d962e7ff 100644 --- a/system_tests/conditionaltx_test.go +++ b/system_tests/conditionaltx_test.go @@ -242,7 +242,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { blockNumber := block.NumberU64() fixBlockTime := func(blockTime uint64) uint64 { since := time.Now().Unix() - int64(blockTime) - if int64(since) < 0 { + if since < 0 { // If using SimulatedBeacon then the block time will be ahead of // the actual time since it generates a new block for each tx in // on demand mode, and assigns them to sequentially increasing timestamps. diff --git a/system_tests/staker_test.go b/system_tests/staker_test.go index 36b112d03a..ff2e618da5 100644 --- a/system_tests/staker_test.go +++ b/system_tests/staker_test.go @@ -65,7 +65,9 @@ func stakerTestImpl(t *testing.T, faultyStaker bool, honestStakerInactive bool) types.NewArbitrumSigner(types.NewLondonSigner(l2chainConfig.ChainID)), big.NewInt(l2pricing.InitialBaseFeeWei*2), transferGas, ) - _, l2nodeA, l2clientA, _, l1info, _, l1client, l1stack := createTestNodeOnL1WithConfigImpl(t, ctx, true, nil, l2chainConfig, nil, l2info) + nodeConfig := arbnode.ConfigDefaultL1Test() + nodeConfig.BatchPoster.MaxDelay = -1000 * time.Hour + _, l2nodeA, l2clientA, _, l1info, _, l1client, l1stack := createTestNodeOnL1WithConfigImpl(t, ctx, true, nodeConfig, l2chainConfig, nil, l2info) defer requireClose(t, l1stack) defer l2nodeA.StopAndWait() From 598c7f9eb69012afc1c02c1652afc76a1737f460 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Fri, 20 Oct 2023 16:34:50 +0200 Subject: [PATCH 15/30] Fix build of tests broken by merge of master --- system_tests/seqinbox_test.go | 5 +---- system_tests/staker_test.go | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/system_tests/seqinbox_test.go b/system_tests/seqinbox_test.go index a456dc5fe9..d7e888ed9e 100644 --- a/system_tests/seqinbox_test.go +++ b/system_tests/seqinbox_test.go @@ -151,10 +151,7 @@ func testSequencerInboxReaderImpl(t *testing.T, validator bool) { l1BlockChain := l1backend.BlockChain() - rpcC, err := l1stack.Attach() - if err != nil { - t.Fatalf("Error connecting to l1 node: %v", err) - } + rpcC := l1stack.Attach() gethClient := gethclient.New(rpcC) seqInbox, err := bridgegen.NewSequencerInbox(l1Info.GetAddress("SequencerInbox"), l1Client) diff --git a/system_tests/staker_test.go b/system_tests/staker_test.go index 98aef4adbe..790aeea75b 100644 --- a/system_tests/staker_test.go +++ b/system_tests/staker_test.go @@ -68,7 +68,7 @@ func stakerTestImpl(t *testing.T, faultyStaker bool, honestStakerInactive bool) ) nodeConfig := arbnode.ConfigDefaultL1Test() nodeConfig.BatchPoster.MaxDelay = -1000 * time.Hour - _, l2nodeA, l2clientA, _, l1info, _, l1client, l1stack := createTestNodeOnL1WithConfigImpl(t, ctx, true, nil, nodeCOnfig, l2chainConfig, nil, l2info) + _, l2nodeA, l2clientA, _, l1info, _, l1client, l1stack := createTestNodeOnL1WithConfigImpl(t, ctx, true, nodeConfig, nil, l2chainConfig, nil, l2info) defer requireClose(t, l1stack) defer l2nodeA.StopAndWait() execNodeA := getExecNode(t, l2nodeA) @@ -76,9 +76,9 @@ func stakerTestImpl(t *testing.T, faultyStaker bool, honestStakerInactive bool) if faultyStaker { l2info.GenerateGenesisAccount("FaultyAddr", common.Big1) } - config := arbnode.ConfigDefaultL1Test() execConfig := gethexec.ConfigDefaultTest() execConfig.Sequencer.Enable = false + config := arbnode.ConfigDefaultL1Test() config.Sequencer = false config.DelayedSequencer.Enable = false config.BatchPoster.Enable = false From c94302f8faf3060acc24af671787d28774d6b5e1 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Fri, 20 Oct 2023 16:49:29 +0200 Subject: [PATCH 16/30] Disallow Nitro accepting Blob transactions --- arbos/parse_l2.go | 4 ++-- execution/gethexec/sequencer.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arbos/parse_l2.go b/arbos/parse_l2.go index 88018fdfcf..8f5c86f9ca 100644 --- a/arbos/parse_l2.go +++ b/arbos/parse_l2.go @@ -166,8 +166,8 @@ func parseL2Message(rd io.Reader, poster common.Address, timestamp uint64, reque if err := newTx.UnmarshalBinary(readBytes); err != nil { return nil, err } - if newTx.Type() >= types.ArbitrumDepositTxType { - // Should be unreachable due to UnmarshalBinary not accepting Arbitrum internal txs + if newTx.Type() >= types.ArbitrumDepositTxType || newTx.Type() == types.BlobTxType { + // Should be unreachable for Arbitrum types due to UnmarshalBinary not accepting Arbitrum internal txs return nil, types.ErrTxTypeNotSupported } return types.Transactions{newTx}, nil diff --git a/execution/gethexec/sequencer.go b/execution/gethexec/sequencer.go index 61792ed9b5..52cf714d85 100644 --- a/execution/gethexec/sequencer.go +++ b/execution/gethexec/sequencer.go @@ -385,8 +385,8 @@ func (s *Sequencer) PublishTransaction(parentCtx context.Context, tx *types.Tran return errors.New("transaction sender is not on the whitelist") } } - if tx.Type() >= types.ArbitrumDepositTxType { - // Should be unreachable due to UnmarshalBinary not accepting Arbitrum internal txs + if tx.Type() >= types.ArbitrumDepositTxType || tx.Type() == types.BlobTxType { + // Should be unreachable for Arbitrum types due to UnmarshalBinary not accepting Arbitrum internal txs return types.ErrTxTypeNotSupported } From c45e1dbe21ca44418b3e6129e9edcece752b320b Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Fri, 20 Oct 2023 17:47:46 +0200 Subject: [PATCH 17/30] Fix lint G114 annotation --- cmd/genericconf/pprof.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/genericconf/pprof.go b/cmd/genericconf/pprof.go index e55bfddd32..9fd3a6f2a4 100644 --- a/cmd/genericconf/pprof.go +++ b/cmd/genericconf/pprof.go @@ -17,8 +17,7 @@ func StartPprof(address string) { log.Info("Starting metrics server with pprof", "addr", fmt.Sprintf("http://%s/debug/metrics", address)) log.Info("Pprof endpoint", "addr", fmt.Sprintf("http://%s/debug/pprof", address)) go func() { - // #nosec G114 - if err := http.ListenAndServe(address, http.DefaultServeMux); err != nil { + if err := http.ListenAndServe(address, http.DefaultServeMux); /* #nosec G114 */ err != nil { log.Error("Failure in running pprof server", "err", err) } }() From ba6ca95ce1fe1ef9cd5b1bd79acfa6aba2442282 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Fri, 27 Oct 2023 16:54:46 +0200 Subject: [PATCH 18/30] Fix TestChallengeManagerFullAsserter tests Use newer version of geth with statedb use after Commit issue fixed. --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 2a53ab6818..627e5f3c04 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 2a53ab6818d2f3641c17f5adc11de99394184374 +Subproject commit 627e5f3c0464cec6b8cf42c4d6eaa5b095e45f88 From 5da8bfb6d60fb4a46957065e88b0156706e9fbc6 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Mon, 30 Oct 2023 17:26:16 -0700 Subject: [PATCH 19/30] Update geth pin for merge-v1.12.1 --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 627e5f3c04..93b7de9a24 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 627e5f3c0464cec6b8cf42c4d6eaa5b095e45f88 +Subproject commit 93b7de9a246a428aa338670536e4e9ce7c8901fe From 1356435881cde93fc94debe024ecc983425df2bf Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Wed, 1 Nov 2023 13:28:34 -0700 Subject: [PATCH 20/30] Update merge-v1.12.1 geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 93b7de9a24..4b278324b5 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 93b7de9a246a428aa338670536e4e9ce7c8901fe +Subproject commit 4b278324b5efe7d6f66cd5421a9d8de66a0a636a From bac419077a8778a4cf8f29ecaa24156b2ffaa79f Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Thu, 2 Nov 2023 13:00:43 -0700 Subject: [PATCH 21/30] Fix cond tx test, base bounds on l2 block time --- system_tests/conditionaltx_test.go | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/system_tests/conditionaltx_test.go b/system_tests/conditionaltx_test.go index 3bac22ed04..d2284eb5be 100644 --- a/system_tests/conditionaltx_test.go +++ b/system_tests/conditionaltx_test.go @@ -102,7 +102,7 @@ func getOptions(address common.Address, rootHash common.Hash, slotValueMap map[c } func getFulfillableBlockTimeLimits(t *testing.T, blockNumber uint64, timestamp uint64) []*arbitrum_types.ConditionalOptions { - future := math.HexOrDecimal64(timestamp + 30) + future := math.HexOrDecimal64(timestamp + 40) past := math.HexOrDecimal64(timestamp - 1) futureBlockNumber := math.HexOrDecimal64(blockNumber + 1000) currentBlockNumber := math.HexOrDecimal64(blockNumber) @@ -238,23 +238,18 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { block, err := builder.L1.Client.BlockByNumber(ctx, nil) Require(t, err) blockNumber := block.NumberU64() - fixBlockTime := func(blockTime uint64) uint64 { - since := time.Now().Unix() - int64(blockTime) - if since < 0 { - // If using SimulatedBeacon then the block time will be ahead of - // the actual time since it generates a new block for each tx in - // on demand mode, and assigns them to sequentially increasing timestamps. - return uint64(time.Now().Unix()) - } - return blockTime + + l2BlockTime := func() uint64 { + l2Block, err := builder.L2.Client.BlockByNumber(ctx, nil) + Require(t, err) + return l2Block.Time() } - blockTime := fixBlockTime(block.Time()) optionsA := getOptions(contractAddress1, currentRootHash1, currentSlotValueMap1) optionsB := getOptions(contractAddress2, currentRootHash2, currentSlotValueMap2) optionsAB := optionsProduct(optionsA, optionsB) options1 := dedupOptions(t, append(append(optionsAB, optionsA...), optionsB...)) - options1 = optionsDedupProduct(t, options1, getFulfillableBlockTimeLimits(t, blockNumber, blockTime)) + options1 = optionsDedupProduct(t, options1, getFulfillableBlockTimeLimits(t, blockNumber, l2BlockTime())) for i, options := range options1 { testConditionalTxThatShouldSucceed(t, ctx, i, builder.L2Info, rpcClient, options) } @@ -285,13 +280,12 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { block, err = builder.L1.Client.BlockByNumber(ctx, nil) Require(t, err) blockNumber = block.NumberU64() - blockTime = fixBlockTime(block.Time()) optionsC := getOptions(contractAddress1, currentRootHash1, currentSlotValueMap1) optionsD := getOptions(contractAddress2, currentRootHash2, currentSlotValueMap2) optionsCD := optionsProduct(optionsC, optionsD) options2 := dedupOptions(t, append(append(optionsCD, optionsC...), optionsD...)) - options2 = optionsDedupProduct(t, options2, getFulfillableBlockTimeLimits(t, blockNumber, blockTime)) + options2 = optionsDedupProduct(t, options2, getFulfillableBlockTimeLimits(t, blockNumber, l2BlockTime())) for i, options := range options2 { testConditionalTxThatShouldSucceed(t, ctx, i, builder.L2Info, rpcClient, options) } @@ -301,8 +295,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { block, err = builder.L1.Client.BlockByNumber(ctx, nil) Require(t, err) blockNumber = block.NumberU64() - blockTime = fixBlockTime(block.Time()) - options3 := optionsDedupProduct(t, options2, getUnfulfillableBlockTimeLimits(t, blockNumber, blockTime)) + options3 := optionsDedupProduct(t, options2, getUnfulfillableBlockTimeLimits(t, blockNumber, l2BlockTime())) for i, options := range options3 { testConditionalTxThatShouldFail(t, ctx, i, builder.L2Info, rpcClient, options, -32003) } From 02b096e82af7423354478f6c006f9b3759d604bc Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Thu, 2 Nov 2023 16:07:16 -0700 Subject: [PATCH 22/30] Update geth pin for merge-v1.12.1 --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 4b278324b5..890cbcac4e 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 4b278324b5efe7d6f66cd5421a9d8de66a0a636a +Subproject commit 890cbcac4ec591088761a3cf2cdec9bf29183cbb From 6562f23dad30a03d891ecf6edecdf97541363ee6 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Fri, 3 Nov 2023 09:54:35 -0700 Subject: [PATCH 23/30] Disable race condition test for pebbledb --- system_tests/batch_poster_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system_tests/batch_poster_test.go b/system_tests/batch_poster_test.go index 8561e3ffc7..34eefdd3ca 100644 --- a/system_tests/batch_poster_test.go +++ b/system_tests/batch_poster_test.go @@ -1,6 +1,10 @@ // Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/nitro/blob/master/LICENSE +// TODO There is a race condition in the currently used version of pebbledb, remove when upgraded. +//go:build !race +// +build !race + package arbtest import ( From e4f8ceb93979fd1f91729882fa938d2a18369e46 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Fri, 3 Nov 2023 11:00:28 -0700 Subject: [PATCH 24/30] Revert "Disable race condition test for pebbledb" This reverts commit 6562f23dad30a03d891ecf6edecdf97541363ee6. --- system_tests/batch_poster_test.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/system_tests/batch_poster_test.go b/system_tests/batch_poster_test.go index 34eefdd3ca..8561e3ffc7 100644 --- a/system_tests/batch_poster_test.go +++ b/system_tests/batch_poster_test.go @@ -1,10 +1,6 @@ // Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/nitro/blob/master/LICENSE -// TODO There is a race condition in the currently used version of pebbledb, remove when upgraded. -//go:build !race -// +build !race - package arbtest import ( From d93a6940770bbdf3acab147af2ca838dfae7ebd0 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Fri, 3 Nov 2023 11:05:44 -0700 Subject: [PATCH 25/30] Use leveldb for tests til race cond issues fixed --- system_tests/common_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system_tests/common_test.go b/system_tests/common_test.go index c0864886d8..327ce94e06 100644 --- a/system_tests/common_test.go +++ b/system_tests/common_test.go @@ -480,6 +480,7 @@ func createStackConfigForTest(dataDir string) *node.Config { stackConf.P2P.NoDial = true stackConf.P2P.ListenAddr = "" stackConf.P2P.NAT = nil + stackConf.DBEngine = "leveldb" // TODO Try pebble again in future once iterator race condition issues are fixed return &stackConf } @@ -492,6 +493,7 @@ func createTestValidationNode(t *testing.T, ctx context.Context, config *valnode stackConf.WSModules = []string{server_api.Namespace} stackConf.P2P.NoDiscovery = true stackConf.P2P.ListenAddr = "" + stackConf.DBEngine = "leveldb" // TODO Try pebble again in future once iterator race condition issues are fixed valnode.EnsureValidationExposedViaAuthRPC(&stackConf) From f41c60c3444a2d4bc9b96c51681671cabf3521d7 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Mon, 13 Nov 2023 12:28:22 -0800 Subject: [PATCH 26/30] Update against latest go-ethereum merge-v1.12.1 --- go-ethereum | 2 +- nodeInterface/NodeInterface.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go-ethereum b/go-ethereum index 890cbcac4e..be1fd29a26 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 890cbcac4ec591088761a3cf2cdec9bf29183cbb +Subproject commit be1fd29a26173eae9008c33280b2942a86a4b0fc diff --git a/nodeInterface/NodeInterface.go b/nodeInterface/NodeInterface.go index 6e2e5650c3..3b377bc5a0 100644 --- a/nodeInterface/NodeInterface.go +++ b/nodeInterface/NodeInterface.go @@ -499,7 +499,7 @@ func (n NodeInterface) GasEstimateComponents( block := rpc.BlockNumberOrHashWithHash(n.header.Hash(), false) args := n.messageArgs(evm, value, to, contractCreation, data) - totalRaw, err := arbitrum.EstimateGas(context, backend, args, block, gasCap) + totalRaw, err := arbitrum.EstimateGas(context, backend, args, block, nil, gasCap) if err != nil { return 0, 0, nil, nil, err } From 6635e255112a5188f88ab237c299a564c1bf4233 Mon Sep 17 00:00:00 2001 From: ganeshvanahalli Date: Tue, 14 Nov 2023 10:21:59 -0600 Subject: [PATCH 27/30] =?UTF-8?q?Make=20=E2=80=9Cerror=20posting=20batch?= =?UTF-8?q?=E2=80=9D=20error=20just=20a=20warning=20unless=20it=20happens?= =?UTF-8?q?=20continuously?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arbnode/batch_poster.go | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/arbnode/batch_poster.go b/arbnode/batch_poster.go index 77a839b70a..edfb5c35d2 100644 --- a/arbnode/batch_poster.go +++ b/arbnode/batch_poster.go @@ -30,7 +30,6 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/offchainlabs/nitro/arbnode/dataposter" - "github.com/offchainlabs/nitro/arbnode/dataposter/storage" "github.com/offchainlabs/nitro/arbnode/redislock" "github.com/offchainlabs/nitro/arbos/arbostypes" "github.com/offchainlabs/nitro/arbstate" @@ -1109,22 +1108,21 @@ func (b *BatchPoster) Start(ctxIn context.Context) { return b.config().PollInterval } posted, err := b.maybePostSequencerBatch(ctx) - ephemeralError := errors.Is(err, AccumulatorNotFoundErr) || errors.Is(err, storage.ErrStorageRace) - if !ephemeralError { + if err == nil { b.firstEphemeralError = time.Time{} } if err != nil { b.building = nil logLevel := log.Error - if ephemeralError { - // Likely the inbox tracker just isn't caught up. - // Let's see if this error disappears naturally. - if b.firstEphemeralError == (time.Time{}) { - b.firstEphemeralError = time.Now() - logLevel = log.Debug - } else if time.Since(b.firstEphemeralError) < time.Minute { - logLevel = log.Debug - } + // Likely the inbox tracker just isn't caught up. + // Let's see if this error disappears naturally. + if b.firstEphemeralError == (time.Time{}) { + b.firstEphemeralError = time.Now() + logLevel = log.Warn + } else if time.Since(b.firstEphemeralError) < time.Minute { + logLevel = log.Warn + } else if time.Since(b.firstEphemeralError) < time.Minute*5 && strings.Contains(err.Error(), "will exceed max mempool size") { + logLevel = log.Warn } logLevel("error posting batch", "err", err) return b.config().ErrorDelay From c4c67d4e6013ba771c54b61e36f3ee4fb7c0caa8 Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Tue, 14 Nov 2023 09:39:01 -0800 Subject: [PATCH 28/30] Fix geth merge PR comments --- arbos/arbosState/initialize.go | 2 +- arbos/parse_l2.go | 1 + execution/gethexec/sequencer.go | 1 + system_tests/conditionaltx_test.go | 8 ++++---- system_tests/delayedinboxlong_test.go | 13 +++++-------- system_tests/twonodeslong_test.go | 15 ++++++--------- 6 files changed, 18 insertions(+), 22 deletions(-) diff --git a/arbos/arbosState/initialize.go b/arbos/arbosState/initialize.go index a428cad7f2..56d8172ee8 100644 --- a/arbos/arbosState/initialize.go +++ b/arbos/arbosState/initialize.go @@ -58,7 +58,7 @@ func InitializeArbosInDatabase(db ethdb.Database, initData statetransfer.InitDat } commit := func() (common.Hash, error) { - root, err := statedb.Commit(0, true) + root, err := statedb.Commit(chainConfig.ArbitrumChainParams.GenesisBlockNum, true) if err != nil { return common.Hash{}, err } diff --git a/arbos/parse_l2.go b/arbos/parse_l2.go index 8f5c86f9ca..e76781a6f3 100644 --- a/arbos/parse_l2.go +++ b/arbos/parse_l2.go @@ -168,6 +168,7 @@ func parseL2Message(rd io.Reader, poster common.Address, timestamp uint64, reque } if newTx.Type() >= types.ArbitrumDepositTxType || newTx.Type() == types.BlobTxType { // Should be unreachable for Arbitrum types due to UnmarshalBinary not accepting Arbitrum internal txs + // and we want to disallow BlobTxType since Arbitrum doesn't support EIP-4844 txs yet. return nil, types.ErrTxTypeNotSupported } return types.Transactions{newTx}, nil diff --git a/execution/gethexec/sequencer.go b/execution/gethexec/sequencer.go index 52cf714d85..e1b55b6ce2 100644 --- a/execution/gethexec/sequencer.go +++ b/execution/gethexec/sequencer.go @@ -387,6 +387,7 @@ func (s *Sequencer) PublishTransaction(parentCtx context.Context, tx *types.Tran } if tx.Type() >= types.ArbitrumDepositTxType || tx.Type() == types.BlobTxType { // Should be unreachable for Arbitrum types due to UnmarshalBinary not accepting Arbitrum internal txs + // and we want to disallow BlobTxType since Arbitrum doesn't support EIP-4844 txs yet. return types.ErrTxTypeNotSupported } diff --git a/system_tests/conditionaltx_test.go b/system_tests/conditionaltx_test.go index d2284eb5be..08367aa627 100644 --- a/system_tests/conditionaltx_test.go +++ b/system_tests/conditionaltx_test.go @@ -239,7 +239,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { Require(t, err) blockNumber := block.NumberU64() - l2BlockTime := func() uint64 { + currentL2BlockTime := func() uint64 { l2Block, err := builder.L2.Client.BlockByNumber(ctx, nil) Require(t, err) return l2Block.Time() @@ -249,7 +249,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { optionsB := getOptions(contractAddress2, currentRootHash2, currentSlotValueMap2) optionsAB := optionsProduct(optionsA, optionsB) options1 := dedupOptions(t, append(append(optionsAB, optionsA...), optionsB...)) - options1 = optionsDedupProduct(t, options1, getFulfillableBlockTimeLimits(t, blockNumber, l2BlockTime())) + options1 = optionsDedupProduct(t, options1, getFulfillableBlockTimeLimits(t, blockNumber, currentL2BlockTime())) for i, options := range options1 { testConditionalTxThatShouldSucceed(t, ctx, i, builder.L2Info, rpcClient, options) } @@ -285,7 +285,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { optionsD := getOptions(contractAddress2, currentRootHash2, currentSlotValueMap2) optionsCD := optionsProduct(optionsC, optionsD) options2 := dedupOptions(t, append(append(optionsCD, optionsC...), optionsD...)) - options2 = optionsDedupProduct(t, options2, getFulfillableBlockTimeLimits(t, blockNumber, l2BlockTime())) + options2 = optionsDedupProduct(t, options2, getFulfillableBlockTimeLimits(t, blockNumber, currentL2BlockTime())) for i, options := range options2 { testConditionalTxThatShouldSucceed(t, ctx, i, builder.L2Info, rpcClient, options) } @@ -295,7 +295,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { block, err = builder.L1.Client.BlockByNumber(ctx, nil) Require(t, err) blockNumber = block.NumberU64() - options3 := optionsDedupProduct(t, options2, getUnfulfillableBlockTimeLimits(t, blockNumber, l2BlockTime())) + options3 := optionsDedupProduct(t, options2, getUnfulfillableBlockTimeLimits(t, blockNumber, currentL2BlockTime())) for i, options := range options3 { testConditionalTxThatShouldFail(t, ctx, i, builder.L2Info, rpcClient, options, -32003) } diff --git a/system_tests/delayedinboxlong_test.go b/system_tests/delayedinboxlong_test.go index 99994fdcf9..b5743bfb67 100644 --- a/system_tests/delayedinboxlong_test.go +++ b/system_tests/delayedinboxlong_test.go @@ -38,8 +38,8 @@ func TestDelayInboxLong(t *testing.T) { var lastDelayedMessage *types.Transaction for i := 0; i < addLocalLoops; i++ { - l1Txs := make([]*types.Transaction, 0, messagesPerAddLocal) - for len(l1Txs) < messagesPerAddLocal { + wrappedL1Txs := make([]*txpool.Transaction, 0, messagesPerAddLocal) + for len(wrappedL1Txs) < messagesPerAddLocal { randNum := rand.Int() % messagesPerDelayed var l1tx *types.Transaction if randNum == 0 { @@ -50,12 +50,9 @@ func TestDelayInboxLong(t *testing.T) { } else { l1tx = builder.L1Info.PrepareTx("Faucet", "User", 30000, big.NewInt(1e12), nil) } - l1Txs = append(l1Txs, l1tx) - } - wrappedL1Txs := make([]*txpool.Transaction, 0, messagesPerAddLocal) - for _, tx := range l1Txs { - wrappedL1Txs = append(wrappedL1Txs, &txpool.Transaction{Tx: tx}) + wrappedL1Txs = append(wrappedL1Txs, &txpool.Transaction{Tx: l1tx}) } + // adding multiple messages in the same Add with local=true to get them in the same L1 block errs := builder.L1.L1Backend.TxPool().Add(wrappedL1Txs, true, false) for _, err := range errs { @@ -63,7 +60,7 @@ func TestDelayInboxLong(t *testing.T) { } // Checking every tx is expensive, so we just check the last, assuming that the others succeeded too confirmLatestBlock(ctx, t, builder.L1Info, builder.L1.Client) - _, err := builder.L1.EnsureTxSucceeded(l1Txs[len(l1Txs)-1]) + _, err := builder.L1.EnsureTxSucceeded(wrappedL1Txs[len(wrappedL1Txs)-1].Tx) Require(t, err) } diff --git a/system_tests/twonodeslong_test.go b/system_tests/twonodeslong_test.go index 4e7c694bcc..25110330c2 100644 --- a/system_tests/twonodeslong_test.go +++ b/system_tests/twonodeslong_test.go @@ -85,8 +85,8 @@ func testTwoNodesLong(t *testing.T, dasModeStr string) { } for i := 0; i < largeLoops; i++ { l1TxsThisTime := rand.Int() % (avgTotalL1MessagesPerLoop * 2) - l1Txs := make([]*types.Transaction, 0, l1TxsThisTime) - for len(l1Txs) < l1TxsThisTime { + wrappedL1Txs := make([]*txpool.Transaction, 0, l1TxsThisTime) + for len(wrappedL1Txs) < l1TxsThisTime { randNum := rand.Int() % avgTotalL1MessagesPerLoop var l1tx *types.Transaction if randNum < avgDelayedMessagesPerLoop { @@ -97,12 +97,9 @@ func testTwoNodesLong(t *testing.T, dasModeStr string) { } else { l1tx = builder.L1Info.PrepareTx("Faucet", "User", 30000, big.NewInt(1e12), nil) } - l1Txs = append(l1Txs, l1tx) - } - wrappedL1Txs := make([]*txpool.Transaction, 0, l1TxsThisTime) - for _, tx := range l1Txs { - wrappedL1Txs = append(wrappedL1Txs, &txpool.Transaction{Tx: tx}) + wrappedL1Txs = append(wrappedL1Txs, &txpool.Transaction{Tx: l1tx}) } + // adding multiple messages in the same Add with local=true to get them in the same L1 block errs := builder.L1.L1Backend.TxPool().Add(wrappedL1Txs, true, false) for _, err := range errs { @@ -117,8 +114,8 @@ func testTwoNodesLong(t *testing.T, dasModeStr string) { } builder.L2.SendWaitTestTransactions(t, l2Txs) directTransfers += int64(l2TxsThisTime) - if len(l1Txs) > 0 { - _, err := builder.L1.EnsureTxSucceeded(l1Txs[len(l1Txs)-1]) + if len(wrappedL1Txs) > 0 { + _, err := builder.L1.EnsureTxSucceeded(wrappedL1Txs[len(wrappedL1Txs)-1].Tx) if err != nil { Fatal(t, err) } From 9ebb2764d1e3401e05bf7058d1908bcf030b40a5 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Wed, 15 Nov 2023 10:54:47 -0700 Subject: [PATCH 29/30] Add support for consensus v10.3 to Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index b05cb3d4d9..b966125b66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -163,6 +163,7 @@ COPY ./scripts/download-machine.sh . RUN ./download-machine.sh consensus-v10 0x6b94a7fc388fd8ef3def759297828dc311761e88d8179c7ee8d3887dc554f3c3 RUN ./download-machine.sh consensus-v10.1 0xda4e3ad5e7feacb817c21c8d0220da7650fe9051ece68a3f0b1c5d38bbb27b21 RUN ./download-machine.sh consensus-v10.2 0x0754e09320c381566cc0449904c377a52bd34a6b9404432e80afd573b67f7b17 +RUN ./download-machine.sh consensus-v10.3 0xf559b6d4fa869472dabce70fe1c15221bdda837533dfd891916836975b434dec FROM golang:1.20-bullseye as node-builder WORKDIR /workspace From 50f211da4f0ff89f011b950a1dfaadcefc75a937 Mon Sep 17 00:00:00 2001 From: ganeshvanahalli Date: Thu, 16 Nov 2023 14:26:22 -0600 Subject: [PATCH 30/30] Handle nil channel case inside router model --- broadcastclients/broadcastclients.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/broadcastclients/broadcastclients.go b/broadcastclients/broadcastclients.go index 551dcdb462..b2824221ea 100644 --- a/broadcastclients/broadcastclients.go +++ b/broadcastclients/broadcastclients.go @@ -166,7 +166,9 @@ func (bcs *BroadcastClients) Start(ctx context.Context) { continue } lastConfirmed = cs - bcs.primaryRouter.forwardConfirmationChan <- cs + if bcs.primaryRouter.forwardConfirmationChan != nil { + bcs.primaryRouter.forwardConfirmationChan <- cs + } // Secondary Feeds case msg := <-bcs.secondaryRouter.messageChan: @@ -187,7 +189,9 @@ func (bcs *BroadcastClients) Start(ctx context.Context) { continue } lastConfirmed = cs - bcs.secondaryRouter.forwardConfirmationChan <- cs + if bcs.secondaryRouter.forwardConfirmationChan != nil { + bcs.secondaryRouter.forwardConfirmationChan <- cs + } // Cycle buckets to get rid of old entries case <-recentFeedItemsCleanup.C: