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 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 diff --git a/arbnode/dataposter/data_poster.go b/arbnode/dataposter/data_poster.go index 1a202171ec..b5be06af56 100644 --- a/arbnode/dataposter/data_poster.go +++ b/arbnode/dataposter/data_poster.go @@ -823,7 +823,7 @@ var DefaultDataPosterConfig = DataPosterConfig{ AllocateMempoolBalance: true, UseDBStorage: true, UseNoOpStorage: false, - LegacyStorageEncoding: true, + LegacyStorageEncoding: false, Dangerous: DangerousConfig{ClearDBStorage: false}, ExternalSigner: ExternalSignerCfg{Method: "eth_signTransaction"}, } @@ -847,6 +847,7 @@ var TestDataPosterConfig = DataPosterConfig{ AllocateMempoolBalance: true, UseDBStorage: false, UseNoOpStorage: false, + LegacyStorageEncoding: false, ExternalSigner: ExternalSignerCfg{Method: "eth_signTransaction"}, } diff --git a/arbnode/delayed_sequencer.go b/arbnode/delayed_sequencer.go index 8162a1cfbe..5d439e32d8 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.ExecutionSequencer, coordinator *SeqCoordinator, config DelayedSequencerConfigFetcher) (*DelayedSequencer, error) { diff --git a/arbnode/transaction_streamer.go b/arbnode/transaction_streamer.go index bcc389dc01..2ee1526ee9 100644 --- a/arbnode/transaction_streamer.go +++ b/arbnode/transaction_streamer.go @@ -696,6 +696,7 @@ func (s *TransactionStreamer) addMessagesAndEndBatchImpl(messageStartPos arbutil var oldMsg *arbostypes.MessageWithMetadata var lastDelayedRead uint64 var hasNewConfirmedMessages bool + var cacheClearLen int messagesAfterPos := messageStartPos + arbutil.MessageIndex(len(messages)) broadcastStartPos := arbutil.MessageIndex(atomic.LoadUint64(&s.broadcasterQueuedMessagesPos)) @@ -724,10 +725,13 @@ func (s *TransactionStreamer) addMessagesAndEndBatchImpl(messageStartPos arbutil // Or no active broadcast reorg and broadcast messages start before or immediately after last L1 message if messagesAfterPos >= broadcastStartPos { broadcastSliceIndex := int(messagesAfterPos - broadcastStartPos) + messagesOldLen := len(messages) if broadcastSliceIndex < len(s.broadcasterQueuedMessages) { // Some cached feed messages can be used messages = append(messages, s.broadcasterQueuedMessages[broadcastSliceIndex:]...) } + // This calculation gives the exact length of cache which was appended to messages + cacheClearLen = broadcastSliceIndex + len(messages) - messagesOldLen } // L1 used or replaced broadcast cache items @@ -800,8 +804,14 @@ func (s *TransactionStreamer) addMessagesAndEndBatchImpl(messageStartPos arbutil } if clearQueueOnSuccess { - s.broadcasterQueuedMessages = s.broadcasterQueuedMessages[:0] - atomic.StoreUint64(&s.broadcasterQueuedMessagesPos, 0) + // Check if new messages were added at the end of cache, if they were, then dont remove those particular messages + if len(s.broadcasterQueuedMessages) > cacheClearLen { + s.broadcasterQueuedMessages = s.broadcasterQueuedMessages[cacheClearLen:] + atomic.StoreUint64(&s.broadcasterQueuedMessagesPos, uint64(broadcastStartPos)+uint64(cacheClearLen)) + } else { + s.broadcasterQueuedMessages = s.broadcasterQueuedMessages[:0] + atomic.StoreUint64(&s.broadcasterQueuedMessagesPos, 0) + } s.broadcasterQueuedMessagesActiveReorg = false } diff --git a/arbos/arbosState/initialize.go b/arbos/arbosState/initialize.go index 9f24d96765..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(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 88018fdfcf..e76781a6f3 100644 --- a/arbos/parse_l2.go +++ b/arbos/parse_l2.go @@ -166,8 +166,9 @@ 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 + // 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/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: diff --git a/cmd/datool/datool.go b/cmd/datool/datool.go index d20a5b52cd..d78d975fd5 100644 --- a/cmd/datool/datool.go +++ b/cmd/datool/datool.go @@ -102,7 +102,6 @@ func parseClientStoreConfig(args []string) (*ClientStoreConfig, error) { f.String("signing-wallet", "", "wallet containing ecdsa key to sign the message with") f.String("signing-wallet-password", genericconf.PASSWORD_NOT_SET, "password to unlock the wallet, if not specified the user is prompted for the password") f.Duration("das-retention-period", 24*time.Hour, "The period which DASes are requested to retain the stored batches.") - genericconf.ConfConfigAddOptions("conf", f) k, err := confighelpers.BeginCommonParse(f, args) if err != nil { @@ -204,8 +203,6 @@ func parseRESTClientGetByHashConfig(args []string) (*RESTClientGetByHashConfig, f.String("url", "http://localhost:9877", "URL of DAS server to connect to.") f.String("data-hash", "", "hash of the message to retrieve, if starts with '0x' it's treated as hex encoded, otherwise base64 encoded") - genericconf.ConfConfigAddOptions("conf", f) - k, err := confighelpers.BeginCommonParse(f, args) if err != nil { return nil, err @@ -267,7 +264,6 @@ func parseKeyGenConfig(args []string) (*KeyGenConfig, error) { f.String("dir", "", "the directory to generate the keys in") f.Bool("ecdsa", false, "generate an ECDSA keypair instead of BLS") f.Bool("wallet", false, "generate the ECDSA keypair in a wallet file") - genericconf.ConfConfigAddOptions("conf", f) k, err := confighelpers.BeginCommonParse(f, args) if err != nil { diff --git a/cmd/genericconf/config.go b/cmd/genericconf/config.go index c3282fe1af..6b44ace974 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/init.go b/cmd/nitro/init.go index f874b5d71e..1427ef161e 100644 --- a/cmd/nitro/init.go +++ b/cmd/nitro/init.go @@ -421,17 +421,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/cmd/nitro/nitro.go b/cmd/nitro/nitro.go index 72668c60e8..42ba54c642 100644 --- a/cmd/nitro/nitro.go +++ b/cmd/nitro/nitro.go @@ -166,6 +166,7 @@ func mainImpl() int { stackConf := node.DefaultConfig stackConf.DataDir = nodeConfig.Persistent.Chain stackConf.DBEngine = nodeConfig.Persistent.DBEngine + nodeConfig.Rpc.Apply(&stackConf) nodeConfig.HTTP.Apply(&stackConf) nodeConfig.WS.Apply(&stackConf) nodeConfig.Auth.Apply(&stackConf) @@ -779,7 +780,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 } diff --git a/execution/gethexec/blockchain.go b/execution/gethexec/blockchain.go index 9e1ee0c30a..a85224b635 100644 --- a/execution/gethexec/blockchain.go +++ b/execution/gethexec/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/execution/gethexec/sequencer.go b/execution/gethexec/sequencer.go index 782ab8753b..51e946eedf 100644 --- a/execution/gethexec/sequencer.go +++ b/execution/gethexec/sequencer.go @@ -386,8 +386,9 @@ 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 + // and we want to disallow BlobTxType since Arbitrum doesn't support EIP-4844 txs yet. return types.ErrTxTypeNotSupported } diff --git a/go-ethereum b/go-ethereum index 859182f2fa..be1fd29a26 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 859182f2fa2d33c03fba5e29e1e750d3f49525fe +Subproject commit be1fd29a26173eae9008c33280b2942a86a4b0fc diff --git a/go.mod b/go.mod index 5ab2eda5c7..49f37c0744 100644 --- a/go.mod +++ b/go.mod @@ -25,6 +25,7 @@ require ( github.com/gdamore/tcell/v2 v2.6.0 github.com/google/go-cmp v0.5.9 github.com/hashicorp/golang-lru/v2 v2.0.2 + github.com/holiman/uint256 v1.2.3 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-libipfs v0.6.2 github.com/ipfs/interface-go-ipfs-core v0.11.0 @@ -37,8 +38,10 @@ require ( 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/crypto v0.14.0 + golang.org/x/sys v0.13.0 golang.org/x/term v0.13.0 - golang.org/x/tools v0.7.0 + golang.org/x/tools v0.9.1 gopkg.in/natefinch/lumberjack.v2 v2.0.0 ) @@ -66,6 +69,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 @@ -76,10 +80,13 @@ require ( github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // 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.1.0 // 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 @@ -88,10 +95,11 @@ 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/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 @@ -120,6 +128,8 @@ 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/huin/goupnp v1.1.0 // 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 @@ -205,6 +215,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 @@ -237,7 +248,8 @@ require ( 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/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/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc // indirect @@ -265,8 +277,12 @@ require ( go.uber.org/multierr v1.11.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-20230321023759-10a507213a29 // indirect + golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect golang.org/x/mod v0.10.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/time v0.3.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect @@ -276,6 +292,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 ( @@ -303,8 +320,6 @@ 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/huin/goupnp v1.1.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.18 // indirect @@ -319,11 +334,5 @@ 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.14.0 - golang.org/x/net v0.17.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.13.0 - golang.org/x/text v0.13.0 // indirect - golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect ) diff --git a/go.sum b/go.sum index 424e3508c3..bb8d6f77f3 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= @@ -158,6 +158,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= @@ -202,8 +204,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= @@ -231,6 +236,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.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= @@ -251,6 +260,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= @@ -292,8 +303,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= @@ -323,6 +334,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= @@ -521,9 +534,11 @@ 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-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b h1:Qcx5LM0fSiks9uCyFZwDBUasd3lxd1RM0GYpL+Li5o4= github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= 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= @@ -612,10 +627,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= @@ -624,6 +641,7 @@ github.com/huin/goupnp v1.1.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFck 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= @@ -936,6 +954,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= @@ -1239,6 +1258,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= @@ -1567,6 +1589,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +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= @@ -1592,8 +1616,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= @@ -1774,8 +1798,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-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/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= @@ -1975,6 +1999,7 @@ 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= @@ -1999,6 +2024,7 @@ 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.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= @@ -2007,8 +2033,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb 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= @@ -2069,8 +2095,8 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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.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= @@ -2267,6 +2293,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/nitro-testnode b/nitro-testnode index bb3f094f43..aee6ceff9c 160000 --- a/nitro-testnode +++ b/nitro-testnode @@ -1 +1 @@ -Subproject commit bb3f094f4359780c2a9aba28e15bb845be9b35a3 +Subproject commit aee6ceff9c9d3fb2749da55a7d7842f23d1bfc8e 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 } diff --git a/staker/execution_reverted_test.go b/staker/execution_reverted_test.go new file mode 100644 index 0000000000..98a3bdfd61 --- /dev/null +++ b/staker/execution_reverted_test.go @@ -0,0 +1,26 @@ +package staker + +import ( + "io" + "testing" +) + +func TestExecutionRevertedRegexp(t *testing.T) { + executionRevertedErrors := []string{ + // go-ethereum and most other execution clients return "execution reverted" + "execution reverted", + // execution clients may decode the EVM revert data as a string and include it in the error + "execution reverted: FOO", + // besu returns "Execution reverted" + "Execution reverted", + } + for _, errString := range executionRevertedErrors { + if !executionRevertedRegexp.MatchString(errString) { + t.Fatalf("execution reverted regexp didn't match %q", errString) + } + } + // This regexp should not match random IO errors + if executionRevertedRegexp.MatchString(io.ErrUnexpectedEOF.Error()) { + t.Fatal("execution reverted regexp matched unexpected EOF") + } +} diff --git a/staker/rollup_watcher.go b/staker/rollup_watcher.go index 2fa3f888e8..59a23d891d 100644 --- a/staker/rollup_watcher.go +++ b/staker/rollup_watcher.go @@ -9,7 +9,7 @@ import ( "errors" "fmt" "math/big" - "strings" + "regexp" "sync/atomic" "github.com/ethereum/go-ethereum/common" @@ -72,6 +72,9 @@ func (r *RollupWatcher) getCallOpts(ctx context.Context) *bind.CallOpts { return &opts } +// A regexp matching "execution reverted" errors returned from the parent chain RPC. +var executionRevertedRegexp = regexp.MustCompile("(?i)execution reverted") + func (r *RollupWatcher) getNodeCreationBlock(ctx context.Context, nodeNum uint64) (*big.Int, error) { callOpts := r.getCallOpts(ctx) if !r.unSupportedL3Method.Load() { @@ -80,7 +83,7 @@ func (r *RollupWatcher) getNodeCreationBlock(ctx context.Context, nodeNum uint64 return createdAtBlock, nil } log.Trace("failed to call getNodeCreationBlockForLogLookup, falling back on node CreatedAtBlock field", "err", err) - if strings.Contains(err.Error(), "execution reverted") { + if executionRevertedRegexp.MatchString(err.Error()) { r.unSupportedL3Method.Store(true) } else { return nil, err diff --git a/staker/staker.go b/staker/staker.go index 4148d0a204..7918e80008 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, diff --git a/system_tests/arbtrace_test.go b/system_tests/arbtrace_test.go index 36e4cc9402..0cdd3bc3c7 100644 --- a/system_tests/arbtrace_test.go +++ b/system_tests/arbtrace_test.go @@ -148,7 +148,7 @@ func TestArbTraceForwarding(t *testing.T) { cleanup := builder.Build(t) defer cleanup() - l2rpc, _ := builder.L2.Stack.Attach() + l2rpc := builder.L2.Stack.Attach() txArgs := callTxArgs{} traceTypes := []string{"trace"} blockNum := rpc.BlockNumberOrHash{} diff --git a/system_tests/block_validator_test.go b/system_tests/block_validator_test.go index d0409f8679..33314d347a 100644 --- a/system_tests/block_validator_test.go +++ b/system_tests/block_validator_test.go @@ -158,7 +158,7 @@ func testBlockValidatorSimple(t *testing.T, dasModeString string, workloadLoops }) } - _, err := WaitForTx(ctx, testClientB.Client, delayedTx.Hash(), time.Second*5) + _, err := WaitForTx(ctx, testClientB.Client, delayedTx.Hash(), time.Second*30) Require(t, err) } diff --git a/system_tests/common_test.go b/system_tests/common_test.go index 6d41f8e101..327ce94e06 100644 --- a/system_tests/common_test.go +++ b/system_tests/common_test.go @@ -38,6 +38,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" @@ -478,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 } @@ -490,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) @@ -566,7 +570,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 @@ -574,9 +578,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) @@ -597,8 +608,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) @@ -712,8 +722,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) } @@ -882,10 +891,7 @@ func Create2ndNodeWithConfig( execConfig = gethexec.ConfigDefaultNonSequencerTest() } 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 d75dd27255..08367aa627 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) @@ -227,9 +227,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { currentRootHash2 := getStorageRootHash(t, builder.L2.ExecNode, contractAddress2) currentSlotValueMap2 := getStorageSlotValue(t, builder.L2.ExecNode, contractAddress2) - rpcClient, err := builder.L2.ConsensusNode.Stack.Attach() - Require(t, err) - + rpcClient := builder.L2.ConsensusNode.Stack.Attach() builder.L2Info.GenerateAccount("User2") testConditionalTxThatShouldSucceed(t, ctx, -1, builder.L2Info, rpcClient, nil) @@ -240,13 +238,18 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { block, err := builder.L1.Client.BlockByNumber(ctx, nil) Require(t, err) blockNumber := block.NumberU64() - blockTime := block.Time() + + currentL2BlockTime := func() uint64 { + l2Block, err := builder.L2.Client.BlockByNumber(ctx, nil) + Require(t, err) + return l2Block.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, currentL2BlockTime())) for i, options := range options1 { testConditionalTxThatShouldSucceed(t, ctx, i, builder.L2Info, rpcClient, options) } @@ -277,13 +280,12 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { block, err = builder.L1.Client.BlockByNumber(ctx, nil) Require(t, err) blockNumber = block.NumberU64() - blockTime = 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, currentL2BlockTime())) for i, options := range options2 { testConditionalTxThatShouldSucceed(t, ctx, i, builder.L2Info, rpcClient, options) } @@ -293,8 +295,7 @@ func TestSendRawTransactionConditionalBasic(t *testing.T) { block, err = builder.L1.Client.BlockByNumber(ctx, nil) Require(t, err) blockNumber = block.NumberU64() - blockTime = block.Time() - options3 := optionsDedupProduct(t, options2, getUnfulfillableBlockTimeLimits(t, blockNumber, blockTime)) + options3 := optionsDedupProduct(t, options2, getUnfulfillableBlockTimeLimits(t, blockNumber, currentL2BlockTime())) for i, options := range options3 { testConditionalTxThatShouldFail(t, ctx, i, builder.L2Info, rpcClient, options, -32003) } @@ -312,8 +313,7 @@ func TestSendRawTransactionConditionalMultiRoutine(t *testing.T) { cleanup := builder.Build(t) defer cleanup() - rpcClient, err := builder.L2.ConsensusNode.Stack.Attach() - Require(t, err) + rpcClient := builder.L2.ConsensusNode.Stack.Attach() auth := builder.L2Info.GetDefaultTransactOpts("Owner", ctx) contractAddress, simple := builder.L2.DeploySimple(t, auth) @@ -413,8 +413,7 @@ func TestSendRawTransactionConditionalPreCheck(t *testing.T) { cleanup := builder.Build(t) defer cleanup() - rpcClient, err := builder.L2.ConsensusNode.Stack.Attach() - Require(t, err) + rpcClient := builder.L2.ConsensusNode.Stack.Attach() builder.L2Info.GenerateAccount("User2") diff --git a/system_tests/das_test.go b/system_tests/das_test.go index c7dd177ab8..8c9621d57a 100644 --- a/system_tests/das_test.go +++ b/system_tests/das_test.go @@ -220,7 +220,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*30) Require(t, err) l2balance, err := client.BalanceAt(ctx, l2info.GetAddress("User2"), nil) diff --git a/system_tests/debugapi_test.go b/system_tests/debugapi_test.go index b8fbffcfee..4568e2809a 100644 --- a/system_tests/debugapi_test.go +++ b/system_tests/debugapi_test.go @@ -17,7 +17,7 @@ func TestDebugAPI(t *testing.T) { cleanup := builder.Build(t) defer cleanup() - l2rpc, _ := builder.L2.Stack.Attach() + l2rpc := builder.L2.Stack.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 7c57771f50..b5743bfb67 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" ) @@ -37,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 { @@ -49,15 +50,17 @@ func TestDelayInboxLong(t *testing.T) { } else { l1tx = builder.L1Info.PrepareTx("Faucet", "User", 30000, big.NewInt(1e12), nil) } - l1Txs = append(l1Txs, l1tx) + wrappedL1Txs = append(wrappedL1Txs, &txpool.Transaction{Tx: l1tx}) } - // adding multiple messages in the same AddLocal to get them in the same L1 block - errs := builder.L1.L1Backend.TxPool().AddLocals(l1Txs) + + // 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 { Require(t, err) } // Checking every tx is expensive, so we just check the last, assuming that the others succeeded too - _, err := builder.L1.EnsureTxSucceeded(l1Txs[len(l1Txs)-1]) + confirmLatestBlock(ctx, t, builder.L1Info, builder.L1.Client) + _, err := builder.L1.EnsureTxSucceeded(wrappedL1Txs[len(wrappedL1Txs)-1].Tx) Require(t, err) } diff --git a/system_tests/fees_test.go b/system_tests/fees_test.go index 3ac5b29b0a..3ff3bfc43f 100644 --- a/system_tests/fees_test.go +++ b/system_tests/fees_test.go @@ -136,6 +136,11 @@ func testSequencerPriceAdjustsFrom(t *testing.T, initialEstimate uint64) { cleanup := builder.Build(t) defer cleanup() + // 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. + builder.nodeConfig.BatchPoster.MaxDelay = -time.Hour + ownerAuth := builder.L2Info.GetDefaultTransactOpts("Owner", ctx) // make ownerAuth a chain owner diff --git a/system_tests/full_challenge_impl_test.go b/system_tests/full_challenge_impl_test.go index f22960c39d..98e776487a 100644 --- a/system_tests/full_challenge_impl_test.go +++ b/system_tests/full_challenge_impl_test.go @@ -182,7 +182,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), }) @@ -409,6 +412,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 diff --git a/system_tests/seqinbox_test.go b/system_tests/seqinbox_test.go index 69aeab0c83..c4dd17ef53 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 := builder.L1.L1Backend.BlockChain() - rpcC, err := builder.L1.Stack.Attach() - if err != nil { - t.Fatalf("Error connecting to l1 node: %v", err) - } + rpcC := builder.L1.Stack.Attach() gethClient := gethclient.New(rpcC) seqInbox, err := bridgegen.NewSequencerInbox(builder.L1Info.GetAddress("SequencerInbox"), builder.L1.Client) diff --git a/system_tests/staker_test.go b/system_tests/staker_test.go index 6b120e3ec0..6ac8dfddcb 100644 --- a/system_tests/staker_test.go +++ b/system_tests/staker_test.go @@ -67,6 +67,8 @@ func stakerTestImpl(t *testing.T, faultyStaker bool, honestStakerInactive bool) types.NewArbitrumSigner(types.NewLondonSigner(builder.chainConfig.ChainID)), big.NewInt(l2pricing.InitialBaseFeeWei*2), transferGas, ) + + builder.nodeConfig.BatchPoster.MaxDelay = -1000 * time.Hour cleanupA := builder.Build(t) defer cleanupA() @@ -76,6 +78,7 @@ func stakerTestImpl(t *testing.T, faultyStaker bool, honestStakerInactive bool) if faultyStaker { builder.L2Info.GenerateGenesisAccount("FaultyAddr", common.Big1) } + config := arbnode.ConfigDefaultL1Test() config.Sequencer = false config.DelayedSequencer.Enable = false diff --git a/system_tests/twonodeslong_test.go b/system_tests/twonodeslong_test.go index 09203e3bcd..25110330c2 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" ) @@ -84,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 { @@ -96,10 +97,11 @@ func testTwoNodesLong(t *testing.T, dasModeStr string) { } else { l1tx = builder.L1Info.PrepareTx("Faucet", "User", 30000, big.NewInt(1e12), nil) } - l1Txs = append(l1Txs, l1tx) + wrappedL1Txs = append(wrappedL1Txs, &txpool.Transaction{Tx: l1tx}) } - // adding multiple messages in the same AddLocal to get them in the same L1 block - errs := builder.L1.L1Backend.TxPool().AddLocals(l1Txs) + + // 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 { if err != nil { Fatal(t, err) @@ -112,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) } @@ -155,7 +157,8 @@ func testTwoNodesLong(t *testing.T, dasModeStr string) { _, err = builder.L2.EnsureTxSucceededWithTimeout(delayedTxs[len(delayedTxs)-1], time.Second*10) Require(t, err, "Failed waiting for Tx on main node") - _, err = testClientB.EnsureTxSucceededWithTimeout(delayedTxs[len(delayedTxs)-1], time.Second*10) + + _, err = testClientB.EnsureTxSucceededWithTimeout(delayedTxs[len(delayedTxs)-1], time.Second*30) Require(t, err, "Failed waiting for Tx on secondary node") delayedBalance, err := testClientB.Client.BalanceAt(ctx, builder.L2Info.GetAddress("DelayedReceiver"), nil) Require(t, err) 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) }