From 8b9c30df4cdfc12919c57381851ff3465aac2473 Mon Sep 17 00:00:00 2001 From: Ian Shim Date: Fri, 8 Mar 2024 19:21:13 -0800 Subject: [PATCH] integrate hot wallet in batcher --- common/fireblocks_config.go | 57 ++++++++++ disperser/batcher/batcher.go | 14 +-- disperser/batcher/txn_manager.go | 97 ++++++++++++---- disperser/batcher/txn_manager_test.go | 143 +++++++++++++++++------- disperser/cmd/batcher/config.go | 24 ++-- disperser/cmd/batcher/flags/flags.go | 1 + disperser/cmd/batcher/main.go | 50 ++++++++- go.mod | 43 +++---- go.sum | 85 +++++++------- indexer/test/mock/contract_simulator.go | 4 +- 10 files changed, 368 insertions(+), 150 deletions(-) create mode 100644 common/fireblocks_config.go diff --git a/common/fireblocks_config.go b/common/fireblocks_config.go new file mode 100644 index 0000000000..0f656d7add --- /dev/null +++ b/common/fireblocks_config.go @@ -0,0 +1,57 @@ +package common + +import ( + "github.com/urfave/cli" +) + +const ( + FireblocksAPIKeyFlagName = "fireblocks-api-key" + FireblocksAPISecretPathFlagName = "fireblocks-api-secret-path" + FireblocksBaseURLFlagName = "fireblocks-api-url" + FireblocksVaultAccountNameFlagName = "fireblocks-vault-account-name" +) + +type FireblocksConfig struct { + APIKey string + SecretKeyPath string + BaseURL string + VaultAccountName string +} + +func FireblocksCLIFlags(envPrefix string, flagPrefix string) []cli.Flag { + return []cli.Flag{ + cli.StringFlag{ + Name: PrefixFlag(flagPrefix, FireblocksAPIKeyFlagName), + Usage: "Fireblocks API Key. To configure Fireblocks MPC wallet, this field is required.", + Required: false, + EnvVar: PrefixEnvVar(envPrefix, "FIREBLOCKS_API_KEY"), + }, + cli.StringFlag{ + Name: PrefixFlag(flagPrefix, FireblocksAPISecretPathFlagName), + Usage: "Fireblocks API Secret Path. To configure Fireblocks MPC wallet, this field is required.", + Required: false, + EnvVar: PrefixEnvVar(envPrefix, "FIREBLOCKS_API_SECRET_PATH"), + }, + cli.StringFlag{ + Name: PrefixFlag(flagPrefix, FireblocksBaseURLFlagName), + Usage: "Fireblocks API URL. To configure Fireblocks MPC wallet, this field is required.", + Required: false, + EnvVar: PrefixEnvVar(envPrefix, "FIREBLOCKS_API_URL"), + }, + cli.StringFlag{ + Name: PrefixFlag(flagPrefix, FireblocksVaultAccountNameFlagName), + Usage: "Fireblocks Vault Account Name. To configure Fireblocks MPC wallet, this field is required.", + Required: false, + EnvVar: PrefixEnvVar(envPrefix, "FIREBLOCKS_VAULT_ACCOUNT_NAME"), + }, + } +} + +func ReadFireblocksCLIConfig(ctx *cli.Context, flagPrefix string) FireblocksConfig { + return FireblocksConfig{ + APIKey: ctx.GlobalString(PrefixFlag(flagPrefix, FireblocksAPIKeyFlagName)), + SecretKeyPath: ctx.GlobalString(PrefixFlag(flagPrefix, FireblocksAPISecretPathFlagName)), + BaseURL: ctx.GlobalString(PrefixFlag(flagPrefix, FireblocksBaseURLFlagName)), + VaultAccountName: ctx.GlobalString(PrefixFlag(flagPrefix, FireblocksVaultAccountNameFlagName)), + } +} diff --git a/disperser/batcher/batcher.go b/disperser/batcher/batcher.go index e963427221..cedd32abcf 100644 --- a/disperser/batcher/batcher.go +++ b/disperser/batcher/batcher.go @@ -76,11 +76,11 @@ type Batcher struct { Transactor core.Transactor TransactionManager TxnManager Metrics *Metrics + HeartbeatChan chan time.Time - ethClient common.EthClient - finalizer Finalizer - logger logging.Logger - HeartbeatChan chan time.Time + ethClient common.EthClient + finalizer Finalizer + logger logging.Logger } func NewBatcher( @@ -482,7 +482,7 @@ func serializeProof(proof *merkletree.Proof) []byte { return proofBytes } -func (b *Batcher) parseBatchIDFromReceipt(ctx context.Context, txReceipt *types.Receipt) (uint32, error) { +func (b *Batcher) parseBatchIDFromReceipt(txReceipt *types.Receipt) (uint32, error) { if len(txReceipt.Logs) == 0 { return 0, errors.New("failed to get transaction receipt with logs") } @@ -528,7 +528,7 @@ func (b *Batcher) getBatchID(ctx context.Context, txReceipt *types.Receipt) (uin err error ) - batchID, err = b.parseBatchIDFromReceipt(ctx, txReceipt) + batchID, err = b.parseBatchIDFromReceipt(txReceipt) if err == nil { return batchID, nil } @@ -544,7 +544,7 @@ func (b *Batcher) getBatchID(ctx context.Context, txReceipt *types.Receipt) (uin continue } - batchID, err = b.parseBatchIDFromReceipt(ctx, txReceipt) + batchID, err = b.parseBatchIDFromReceipt(txReceipt) if err == nil { return batchID, nil } diff --git a/disperser/batcher/txn_manager.go b/disperser/batcher/txn_manager.go index 7be929db50..5ff9e15bb1 100644 --- a/disperser/batcher/txn_manager.go +++ b/disperser/batcher/txn_manager.go @@ -9,7 +9,9 @@ import ( "time" "github.com/Layr-Labs/eigenda/common" + walletsdk "github.com/Layr-Labs/eigensdk-go/chainio/clients/wallet" "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/core/types" ) @@ -31,6 +33,11 @@ type TxnManager interface { ReceiptChan() chan *ReceiptOrErr } +type transaction struct { + *types.Transaction + TxID walletsdk.TxID +} + type TxnRequest struct { Tx *types.Transaction Tag string @@ -41,7 +48,7 @@ type TxnRequest struct { // txAttempts are the transactions that have been attempted to be mined for this request. // If a transaction hasn't been confirmed within the timeout and a replacement transaction is sent, // the original transaction hash will be kept in this slice - txAttempts []*types.Transaction + txAttempts []*transaction } // ReceiptOrErr is a wrapper for a transaction receipt or an error. @@ -56,9 +63,11 @@ type ReceiptOrErr struct { type txnManager struct { mu sync.Mutex - ethClient common.EthClient - requestChan chan *TxnRequest - logger logging.Logger + ethClient common.EthClient + wallet walletsdk.Wallet + numConfirmations int + requestChan chan *TxnRequest + logger logging.Logger receiptChan chan *ReceiptOrErr queueSize int @@ -68,9 +77,11 @@ type txnManager struct { var _ TxnManager = (*txnManager)(nil) -func NewTxnManager(ethClient common.EthClient, queueSize int, txnRefreshInterval time.Duration, logger logging.Logger, metrics *TxnManagerMetrics) TxnManager { +func NewTxnManager(ethClient common.EthClient, wallet walletsdk.Wallet, numConfirmations, queueSize int, txnRefreshInterval time.Duration, logger logging.Logger, metrics *TxnManagerMetrics) TxnManager { return &txnManager{ ethClient: ethClient, + wallet: wallet, + numConfirmations: numConfirmations, requestChan: make(chan *TxnRequest, queueSize), logger: logger, receiptChan: make(chan *ReceiptOrErr, queueSize), @@ -88,7 +99,7 @@ func NewTxnRequest(tx *types.Transaction, tag string, value *big.Int, metadata i Metadata: metadata, requestedAt: time.Now(), - txAttempts: make([]*types.Transaction, 0), + txAttempts: make([]*transaction, 0), } } @@ -129,7 +140,7 @@ func (t *txnManager) Start(ctx context.Context) { func (t *txnManager) ProcessTransaction(ctx context.Context, req *TxnRequest) error { t.mu.Lock() defer t.mu.Unlock() - t.logger.Debug("[TxnManager] new transaction", "tag", req.Tag, "nonce", req.Tx.Nonce(), "gasFeeCap", req.Tx.GasFeeCap(), "gasTipCap", req.Tx.GasTipCap()) + t.logger.Debug("new transaction", "component", "TxnManager", "method", "ProcessTransaction", "tag", req.Tag, "nonce", req.Tx.Nonce(), "gasFeeCap", req.Tx.GasFeeCap(), "gasTipCap", req.Tx.GasTipCap()) gasTipCap, gasFeeCap, err := t.ethClient.GetLatestGasCaps(ctx) if err != nil { return fmt.Errorf("failed to get latest gas caps: %w", err) @@ -139,14 +150,17 @@ func (t *txnManager) ProcessTransaction(ctx context.Context, req *TxnRequest) er if err != nil { return fmt.Errorf("failed to update gas price: %w", err) } - err = t.ethClient.SendTransaction(ctx, txn) + txID, err := t.wallet.SendTransaction(ctx, txn) if err != nil { return fmt.Errorf("failed to send txn (%s) %s: %w", req.Tag, req.Tx.Hash().Hex(), err) } else { - t.logger.Debug("[TxnManager] successfully sent txn", "tag", req.Tag, "txn", txn.Hash().Hex()) + t.logger.Debug("successfully sent txn", "component", "TxnManager", "method", "ProcessTransaction", "tag", req.Tag, "txID", txID, "txHash", txn.Hash().Hex()) } req.Tx = txn - req.txAttempts = append(req.txAttempts, txn) + req.txAttempts = append(req.txAttempts, &transaction{ + TxID: txID, + Transaction: txn, + }) t.requestChan <- req t.metrics.UpdateTxQueue(len(t.requestChan)) @@ -157,6 +171,43 @@ func (t *txnManager) ReceiptChan() chan *ReceiptOrErr { return t.receiptChan } +func (t *txnManager) ensureAnyTransactionEvaled(ctx context.Context, txs []*transaction) (*types.Receipt, error) { + queryTicker := time.NewTicker(3 * time.Second) + defer queryTicker.Stop() + var receipt *types.Receipt + var err error + for { + for _, tx := range txs { + receipt, err = t.wallet.GetTransactionReceipt(ctx, tx.TxID) + if err == nil { + chainTip, err := t.ethClient.BlockNumber(ctx) + if err == nil { + if receipt.BlockNumber.Uint64()+uint64(t.numConfirmations) > chainTip { + t.logger.Debug("transaction has been mined but don't have enough confirmations at current chain tip", "component", "TxnManager", "method", "ensureAnyTransactionEvaled", "txnBlockNumber", receipt.BlockNumber.Uint64(), "numConfirmations", t.numConfirmations, "chainTip", chainTip) + break + } else { + return receipt, nil + } + } else { + t.logger.Debug("failed to get chain tip while waiting for transaction to mine", "component", "TxnManager", "method", "ensureAnyTransactionEvaled", "err", err) + } + } + + if errors.Is(err, ethereum.NotFound) { + t.logger.Debug("Transaction not yet mined", "component", "TxnManager", "method", "ensureAnyTransactionEvaled", "txID", tx.TxID, "txHash", tx.Hash().Hex()) + } else if err != nil { + t.logger.Debug("Transaction receipt retrieval failed", "component", "TxnManager", "method", "ensureAnyTransactionEvaled", "err", err) + } + } + // Wait for the next round. + select { + case <-ctx.Done(): + return receipt, ctx.Err() + case <-queryTicker.C: + } + } +} + // monitorTransaction waits until the transaction is confirmed (or failed) and resends it with a higher gas price if it is not mined without a timeout. // It returns the receipt once the transaction has been confirmed. // It returns an error if the transaction fails to be sent for reasons other than timeouts. @@ -167,11 +218,10 @@ func (t *txnManager) monitorTransaction(ctx context.Context, req *TxnRequest) (* ctxWithTimeout, cancel := context.WithTimeout(ctx, t.txnRefreshInterval) defer cancel() - t.logger.Debug("[TxnManager] monitoring transaction", "txHash", req.Tx.Hash().Hex(), "tag", req.Tag, "nonce", req.Tx.Nonce()) - receipt, err := t.ethClient.EnsureAnyTransactionEvaled( + t.logger.Debug("monitoring transaction", "component", "TxnManager", "method", "monitorTransaction", "txHash", req.Tx.Hash().Hex(), "tag", req.Tag, "nonce", req.Tx.Nonce()) + receipt, err := t.ensureAnyTransactionEvaled( ctxWithTimeout, req.txAttempts, - req.Tag, ) if err == nil { t.metrics.UpdateSpeedUps(numSpeedUps) @@ -181,19 +231,19 @@ func (t *txnManager) monitorTransaction(ctx context.Context, req *TxnRequest) (* if errors.Is(err, context.DeadlineExceeded) { if receipt != nil { - t.logger.Warn("[TxnManager] transaction has been mined, but hasn't accumulated the required number of confirmations", "tag", req.Tag, "txHash", req.Tx.Hash().Hex(), "nonce", req.Tx.Nonce()) + t.logger.Warn("transaction has been mined, but hasn't accumulated the required number of confirmations", "component", "TxnManager", "method", "monitorTransaction", "tag", req.Tag, "txHash", req.Tx.Hash().Hex(), "nonce", req.Tx.Nonce()) continue } - t.logger.Warn("[TxnManager] transaction not mined within timeout, resending with higher gas price", "tag", req.Tag, "txHash", req.Tx.Hash().Hex(), "nonce", req.Tx.Nonce()) + t.logger.Warn("transaction not mined within timeout, resending with higher gas price", "component", "TxnManager", "method", "monitorTransaction", "tag", req.Tag, "txHash", req.Tx.Hash().Hex(), "nonce", req.Tx.Nonce()) newTx, err := t.speedUpTxn(ctx, req.Tx, req.Tag) if err != nil { - t.logger.Error("[TxnManager] failed to speed up transaction", "err", err) + t.logger.Error("failed to speed up transaction", "component", "TxnManager", "method", "monitorTransaction", "err", err) t.metrics.IncrementTxnCount("failure") return nil, err } - err = t.ethClient.SendTransaction(ctx, newTx) + txID, err := t.wallet.SendTransaction(ctx, newTx) if err != nil { - t.logger.Error("[TxnManager] failed to send txn", "tag", req.Tag, "txn", req.Tx.Hash().Hex(), "attempt", retryFromFailure, "maxRetry", maxSpeedUpRetry, "err", err) + t.logger.Error("failed to send txn", "component", "TxnManager", "method", "monitorTransaction", "tag", req.Tag, "txn", req.Tx.Hash().Hex(), "attempt", retryFromFailure, "maxRetry", maxSpeedUpRetry, "err", err) if retryFromFailure >= maxSpeedUpRetry { t.metrics.IncrementTxnCount("failure") return nil, err @@ -202,12 +252,15 @@ func (t *txnManager) monitorTransaction(ctx context.Context, req *TxnRequest) (* continue } - t.logger.Debug("[TxnManager] successfully sent txn", "tag", req.Tag, "txn", newTx.Hash().Hex()) + t.logger.Debug("successfully sent txn", "component", "TxnManager", "method", "monitorTransaction", "tag", req.Tag, "txID", txID, "txHash", newTx.Hash().Hex()) req.Tx = newTx - req.txAttempts = append(req.txAttempts, newTx) + req.txAttempts = append(req.txAttempts, &transaction{ + TxID: txID, + Transaction: newTx, + }) numSpeedUps++ } else { - t.logger.Error("[TxnManager] transaction failed", "tag", req.Tag, "txHash", req.Tx.Hash().Hex(), "err", err) + t.logger.Error("transaction failed", "component", "TxnManager", "method", "monitorTransaction", "tag", req.Tag, "txHash", req.Tx.Hash().Hex(), "err", err) t.metrics.IncrementTxnCount("failure") return nil, err } @@ -239,7 +292,7 @@ func (t *txnManager) speedUpTxn(ctx context.Context, tx *types.Transaction, tag newGasFeeCap = increasedGasFeeCap } - t.logger.Info("[TxnManager] increasing gas price", "tag", tag, "txHash", tx.Hash().Hex(), "nonce", tx.Nonce(), "prevGasTipCap", prevGasTipCap, "prevGasFeeCap", prevGasFeeCap, "newGasTipCap", newGasTipCap, "newGasFeeCap", newGasFeeCap) + t.logger.Info("increasing gas price", "component", "TxnManager", "method", "speedUpTxn", "tag", tag, "txHash", tx.Hash().Hex(), "nonce", tx.Nonce(), "prevGasTipCap", prevGasTipCap, "prevGasFeeCap", prevGasFeeCap, "newGasTipCap", newGasTipCap, "newGasFeeCap", newGasFeeCap) return t.ethClient.UpdateGas(ctx, tx, tx.Value(), newGasTipCap, newGasFeeCap) } diff --git a/disperser/batcher/txn_manager_test.go b/disperser/batcher/txn_manager_test.go index e2bd9f3668..65001a5e19 100644 --- a/disperser/batcher/txn_manager_test.go +++ b/disperser/batcher/txn_manager_test.go @@ -9,27 +9,35 @@ import ( "github.com/Layr-Labs/eigenda/common/mock" "github.com/Layr-Labs/eigenda/disperser/batcher" + sdkmock "github.com/Layr-Labs/eigensdk-go/chainio/clients/mocks" "github.com/Layr-Labs/eigensdk-go/logging" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" ) func TestProcessTransaction(t *testing.T) { ethClient := &mock.MockEthClient{} + ctrl := gomock.NewController(t) + w := sdkmock.NewMockWallet(ctrl) logger := logging.NewNoopLogger() metrics := batcher.NewMetrics("9100", logger) - txnManager := batcher.NewTxnManager(ethClient, 5, 48*time.Second, logger, metrics.TxnManagerMetrics) + txnManager := batcher.NewTxnManager(ethClient, w, 0, 5, 100*time.Millisecond, logger, metrics.TxnManagerMetrics) ctx, cancel := context.WithTimeout(context.Background(), time.Second*1) defer cancel() txnManager.Start(ctx) + txID := "1234" txn := types.NewTransaction(0, common.HexToAddress("0x1"), big.NewInt(1e18), 100000, big.NewInt(1e9), []byte{}) ethClient.On("GetLatestGasCaps").Return(big.NewInt(1e9), big.NewInt(1e9), nil) ethClient.On("UpdateGas").Return(txn, nil) - ethClient.On("SendTransaction").Return(nil) - ethClient.On("EnsureAnyTransactionEvaled").Return(&types.Receipt{ - BlockNumber: new(big.Int).SetUint64(1), - }, nil).Once() + ethClient.On("BlockNumber").Return(uint64(123), nil) + gomock.InOrder( + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return(txID, nil), + w.EXPECT().GetTransactionReceipt(gomock.Any(), gomock.Any()).Return(&types.Receipt{ + BlockNumber: new(big.Int).SetUint64(1), + }, nil), + ) err := txnManager.ProcessTransaction(ctx, &batcher.TxnRequest{ Tx: txn, @@ -40,14 +48,13 @@ func TestProcessTransaction(t *testing.T) { receiptOrErr := <-txnManager.ReceiptChan() assert.NoError(t, receiptOrErr.Err) assert.Equal(t, uint64(1), receiptOrErr.Receipt.BlockNumber.Uint64()) - ethClient.AssertNumberOfCalls(t, "GetLatestGasCaps", 1) - ethClient.AssertNumberOfCalls(t, "UpdateGas", 1) - ethClient.AssertNumberOfCalls(t, "SendTransaction", 1) - ethClient.AssertNumberOfCalls(t, "EnsureAnyTransactionEvaled", 1) - // now test the case where the transaction fails + // now test the case where the replacement transaction fails randomErr := errors.New("random error") - ethClient.On("EnsureAnyTransactionEvaled").Return(nil, randomErr) + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return(txID, nil) + w.EXPECT().GetTransactionReceipt(gomock.Any(), gomock.Any()).Return(nil, randomErr).AnyTimes() + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return("", randomErr).AnyTimes() + err = txnManager.ProcessTransaction(ctx, &batcher.TxnRequest{ Tx: txn, Tag: "test transaction", @@ -58,27 +65,30 @@ func TestProcessTransaction(t *testing.T) { receiptOrErr = <-txnManager.ReceiptChan() assert.Error(t, receiptOrErr.Err, randomErr) assert.Nil(t, receiptOrErr.Receipt) - ethClient.AssertNumberOfCalls(t, "GetLatestGasCaps", 2) - ethClient.AssertNumberOfCalls(t, "UpdateGas", 2) - ethClient.AssertNumberOfCalls(t, "SendTransaction", 2) - ethClient.AssertNumberOfCalls(t, "EnsureAnyTransactionEvaled", 2) } func TestReplaceGasFee(t *testing.T) { ethClient := &mock.MockEthClient{} + ctrl := gomock.NewController(t) + w := sdkmock.NewMockWallet(ctrl) logger := logging.NewNoopLogger() metrics := batcher.NewMetrics("9100", logger) - txnManager := batcher.NewTxnManager(ethClient, 5, 48*time.Second, logger, metrics.TxnManagerMetrics) + txnManager := batcher.NewTxnManager(ethClient, w, 0, 5, 100*time.Millisecond, logger, metrics.TxnManagerMetrics) ctx, cancel := context.WithTimeout(context.Background(), time.Second*1) defer cancel() txnManager.Start(ctx) txn := types.NewTransaction(0, common.HexToAddress("0x1"), big.NewInt(1e18), 100000, big.NewInt(1e9), []byte{}) ethClient.On("GetLatestGasCaps").Return(big.NewInt(1e9), big.NewInt(1e9), nil) ethClient.On("UpdateGas").Return(txn, nil) - ethClient.On("SendTransaction").Return(nil) + ethClient.On("BlockNumber").Return(uint64(123), nil) + // assume that the transaction is not mined within the timeout - ethClient.On("EnsureAnyTransactionEvaled").Return(nil, context.DeadlineExceeded).Once() - ethClient.On("EnsureAnyTransactionEvaled").Return(&types.Receipt{ + badTxID := "1234" + validTxID := "4321" + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return(badTxID, nil) + w.EXPECT().GetTransactionReceipt(gomock.Any(), badTxID).Return(nil, errors.New("blah")).AnyTimes() + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return(validTxID, nil) + w.EXPECT().GetTransactionReceipt(gomock.Any(), validTxID).Return(&types.Receipt{ BlockNumber: new(big.Int).SetUint64(1), }, nil) @@ -91,15 +101,15 @@ func TestReplaceGasFee(t *testing.T) { assert.NoError(t, err) ethClient.AssertNumberOfCalls(t, "GetLatestGasCaps", 2) ethClient.AssertNumberOfCalls(t, "UpdateGas", 2) - ethClient.AssertNumberOfCalls(t, "SendTransaction", 2) - ethClient.AssertNumberOfCalls(t, "EnsureAnyTransactionEvaled", 2) } -func TestTransactionFailure(t *testing.T) { +func TestTransactionReplacementFailure(t *testing.T) { ethClient := &mock.MockEthClient{} + ctrl := gomock.NewController(t) + w := sdkmock.NewMockWallet(ctrl) logger := logging.NewNoopLogger() metrics := batcher.NewMetrics("9100", logger) - txnManager := batcher.NewTxnManager(ethClient, 5, 48*time.Second, logger, metrics.TxnManagerMetrics) + txnManager := batcher.NewTxnManager(ethClient, w, 0, 5, 48*time.Second, logger, metrics.TxnManagerMetrics) ctx, cancel := context.WithTimeout(context.Background(), time.Second*1) defer cancel() txnManager.Start(ctx) @@ -109,12 +119,11 @@ func TestTransactionFailure(t *testing.T) { // now assume that the transaction fails on retry speedUpFailure := errors.New("speed up failure") ethClient.On("UpdateGas").Return(nil, speedUpFailure).Once() - ethClient.On("SendTransaction").Return(nil) + // assume that the transaction is not mined within the timeout - ethClient.On("EnsureAnyTransactionEvaled").Return(nil, context.DeadlineExceeded).Once() - ethClient.On("EnsureAnyTransactionEvaled").Return(&types.Receipt{ - BlockNumber: new(big.Int).SetUint64(1), - }, nil) + badTxID := "1234" + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return(badTxID, nil) + w.EXPECT().GetTransactionReceipt(gomock.Any(), badTxID).Return(nil, errors.New("blah")).AnyTimes() err := txnManager.ProcessTransaction(ctx, &batcher.TxnRequest{ Tx: txn, @@ -127,23 +136,27 @@ func TestTransactionFailure(t *testing.T) { assert.Error(t, res.Err, speedUpFailure) } -func TestSendTransactionRetry(t *testing.T) { +func TestSendTransactionReceiptRetry(t *testing.T) { ethClient := &mock.MockEthClient{} + ctrl := gomock.NewController(t) + w := sdkmock.NewMockWallet(ctrl) logger := logging.NewNoopLogger() metrics := batcher.NewMetrics("9100", logger) - txnManager := batcher.NewTxnManager(ethClient, 5, 48*time.Second, logger, metrics.TxnManagerMetrics) + txnManager := batcher.NewTxnManager(ethClient, w, 0, 5, 48*time.Second, logger, metrics.TxnManagerMetrics) ctx, cancel := context.WithTimeout(context.Background(), time.Second*1) defer cancel() txnManager.Start(ctx) txn := types.NewTransaction(0, common.HexToAddress("0x1"), big.NewInt(1e18), 100000, big.NewInt(1e9), []byte{}) ethClient.On("GetLatestGasCaps").Return(big.NewInt(1e9), big.NewInt(1e9), nil) ethClient.On("UpdateGas").Return(txn, nil) - ethClient.On("SendTransaction").Return(nil).Once() - // assume that it fails to send the replacement transaction once - ethClient.On("SendTransaction").Return(errors.New("send txn failure")).Once() + ethClient.On("BlockNumber").Return(uint64(123), nil) + txID := "1234" + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return(txID, nil) // assume that the transaction is not mined within the timeout - ethClient.On("EnsureAnyTransactionEvaled").Return(nil, context.DeadlineExceeded).Once() - ethClient.On("EnsureAnyTransactionEvaled").Return(&types.Receipt{ + w.EXPECT().GetTransactionReceipt(gomock.Any(), txID).Return(nil, errors.New("blah")) + // assume that it fails to send the replacement transaction once + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return("", errors.New("send txn failure")) + w.EXPECT().GetTransactionReceipt(gomock.Any(), txID).Return(&types.Receipt{ BlockNumber: new(big.Int).SetUint64(1), }, nil) @@ -159,27 +172,73 @@ func TestSendTransactionRetry(t *testing.T) { assert.Equal(t, uint64(1), res.Receipt.BlockNumber.Uint64()) ethClient.AssertNumberOfCalls(t, "GetLatestGasCaps", 2) ethClient.AssertNumberOfCalls(t, "UpdateGas", 2) - ethClient.AssertNumberOfCalls(t, "SendTransaction", 2) - ethClient.AssertNumberOfCalls(t, "EnsureAnyTransactionEvaled", 2) +} + +func TestSendTransactionRetrySuccess(t *testing.T) { + ethClient := &mock.MockEthClient{} + ctrl := gomock.NewController(t) + w := sdkmock.NewMockWallet(ctrl) + logger := logging.NewNoopLogger() + metrics := batcher.NewMetrics("9100", logger) + txnManager := batcher.NewTxnManager(ethClient, w, 0, 5, 48*time.Second, logger, metrics.TxnManagerMetrics) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*1) + defer cancel() + txnManager.Start(ctx) + txn := types.NewTransaction(0, common.HexToAddress("0x1"), big.NewInt(1e18), 100000, big.NewInt(1e9), []byte{}) + ethClient.On("GetLatestGasCaps").Return(big.NewInt(1e9), big.NewInt(1e9), nil) + ethClient.On("UpdateGas").Return(txn, nil) + ethClient.On("BlockNumber").Return(uint64(123), nil) + txID := "1234" + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return(txID, nil) + // assume that the transaction is not mined within the timeout + w.EXPECT().GetTransactionReceipt(gomock.Any(), txID).Return(nil, errors.New("blah")).AnyTimes() + + // assume that it fails to send the replacement transaction once + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return("", errors.New("send txn failure")) + newTxID := "4321" + // second try succeeds + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return(newTxID, nil) + w.EXPECT().GetTransactionReceipt(gomock.Any(), newTxID).Return(&types.Receipt{ + BlockNumber: new(big.Int).SetUint64(1), + }, nil) + + err := txnManager.ProcessTransaction(ctx, &batcher.TxnRequest{ + Tx: txn, + Tag: "test transaction", + Value: nil, + }) + <-ctx.Done() + assert.NoError(t, err) + res := <-txnManager.ReceiptChan() + assert.NoError(t, res.Err) + assert.Equal(t, uint64(1), res.Receipt.BlockNumber.Uint64()) + ethClient.AssertNumberOfCalls(t, "GetLatestGasCaps", 3) + ethClient.AssertNumberOfCalls(t, "UpdateGas", 3) } func TestSendTransactionRetryFailure(t *testing.T) { ethClient := &mock.MockEthClient{} + ctrl := gomock.NewController(t) + w := sdkmock.NewMockWallet(ctrl) logger := logging.NewNoopLogger() metrics := batcher.NewMetrics("9100", logger) - txnManager := batcher.NewTxnManager(ethClient, 5, 48*time.Second, logger, metrics.TxnManagerMetrics) + txnManager := batcher.NewTxnManager(ethClient, w, 0, 5, 48*time.Second, logger, metrics.TxnManagerMetrics) ctx, cancel := context.WithTimeout(context.Background(), time.Second*1) defer cancel() txnManager.Start(ctx) txn := types.NewTransaction(0, common.HexToAddress("0x1"), big.NewInt(1e18), 100000, big.NewInt(1e9), []byte{}) ethClient.On("GetLatestGasCaps").Return(big.NewInt(1e9), big.NewInt(1e9), nil) ethClient.On("UpdateGas").Return(txn, nil) - ethClient.On("SendTransaction").Return(nil).Once() + ethClient.On("BlockNumber").Return(uint64(123), nil) + txID := "1234" + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return(txID, nil) + // assume that it keeps failing to send the replacement transaction sendErr := errors.New("send txn failure") - ethClient.On("SendTransaction").Return(sendErr) + w.EXPECT().SendTransaction(gomock.Any(), gomock.Any()).Return("", sendErr).Times(4) + // assume that the transaction is not mined within the timeout - ethClient.On("EnsureAnyTransactionEvaled").Return(nil, context.DeadlineExceeded) + w.EXPECT().GetTransactionReceipt(gomock.Any(), txID).Return(nil, errors.New("blah")).AnyTimes() err := txnManager.ProcessTransaction(ctx, &batcher.TxnRequest{ Tx: txn, @@ -193,6 +252,4 @@ func TestSendTransactionRetryFailure(t *testing.T) { assert.Nil(t, res.Receipt) ethClient.AssertNumberOfCalls(t, "GetLatestGasCaps", 5) ethClient.AssertNumberOfCalls(t, "UpdateGas", 5) - ethClient.AssertNumberOfCalls(t, "SendTransaction", 5) - ethClient.AssertNumberOfCalls(t, "EnsureAnyTransactionEvaled", 4) } diff --git a/disperser/cmd/batcher/config.go b/disperser/cmd/batcher/config.go index 3c22fa8b61..ae149390fa 100644 --- a/disperser/cmd/batcher/config.go +++ b/disperser/cmd/batcher/config.go @@ -13,17 +13,18 @@ import ( ) type Config struct { - BatcherConfig batcher.Config - TimeoutConfig batcher.TimeoutConfig - BlobstoreConfig blobstore.Config - EthClientConfig geth.EthClientConfig - AwsClientConfig aws.ClientConfig - EncoderConfig kzg.KzgConfig - LoggerConfig common.LoggerConfig - MetricsConfig batcher.MetricsConfig - IndexerConfig indexer.Config - GraphUrl string - UseGraph bool + BatcherConfig batcher.Config + TimeoutConfig batcher.TimeoutConfig + BlobstoreConfig blobstore.Config + EthClientConfig geth.EthClientConfig + AwsClientConfig aws.ClientConfig + EncoderConfig kzg.KzgConfig + LoggerConfig common.LoggerConfig + MetricsConfig batcher.MetricsConfig + IndexerConfig indexer.Config + FireblocksConfig common.FireblocksConfig + GraphUrl string + UseGraph bool IndexerDataDir string @@ -74,6 +75,7 @@ func NewConfig(ctx *cli.Context) (Config, error) { EigenDAServiceManagerAddr: ctx.GlobalString(flags.EigenDAServiceManagerFlag.Name), IndexerDataDir: ctx.GlobalString(flags.IndexerDataDirFlag.Name), IndexerConfig: indexer.ReadIndexerConfig(ctx), + FireblocksConfig: common.ReadFireblocksCLIConfig(ctx, flags.FlagPrefix), } return config, nil } diff --git a/disperser/cmd/batcher/flags/flags.go b/disperser/cmd/batcher/flags/flags.go index b39c263256..f6d27fa5d0 100644 --- a/disperser/cmd/batcher/flags/flags.go +++ b/disperser/cmd/batcher/flags/flags.go @@ -218,4 +218,5 @@ func init() { Flags = append(Flags, common.LoggerCLIFlags(envVarPrefix, FlagPrefix)...) Flags = append(Flags, indexer.CLIFlags(envVarPrefix)...) Flags = append(Flags, aws.ClientFlags(envVarPrefix, FlagPrefix)...) + Flags = append(Flags, common.FireblocksCLIFlags(envVarPrefix, FlagPrefix)...) } diff --git a/disperser/cmd/batcher/main.go b/disperser/cmd/batcher/main.go index ba66da851f..3914acc286 100644 --- a/disperser/cmd/batcher/main.go +++ b/disperser/cmd/batcher/main.go @@ -24,6 +24,10 @@ import ( "github.com/Layr-Labs/eigenda/disperser/cmd/batcher/flags" "github.com/Layr-Labs/eigenda/disperser/common/blobstore" "github.com/Layr-Labs/eigenda/disperser/encoder" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/fireblocks" + walletsdk "github.com/Layr-Labs/eigensdk-go/chainio/clients/wallet" + "github.com/Layr-Labs/eigensdk-go/signerv2" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rpc" "github.com/urfave/cli" ) @@ -163,7 +167,51 @@ func RunBatcher(ctx *cli.Context) error { return err } finalizer := batcher.NewFinalizer(config.TimeoutConfig.ChainReadTimeout, config.BatcherConfig.FinalizerInterval, queue, client, rpcClient, config.BatcherConfig.MaxNumRetriesPerBlob, 1000, config.BatcherConfig.FinalizerPoolSize, logger, metrics.FinalizerMetrics) - txnManager := batcher.NewTxnManager(client, 20, config.TimeoutConfig.ChainWriteTimeout, logger, metrics.TxnManagerMetrics) + var wallet walletsdk.Wallet + if len(config.FireblocksConfig.APIKey) > 0 && + len(config.FireblocksConfig.SecretKeyPath) > 0 && + len(config.FireblocksConfig.BaseURL) > 0 && + len(config.FireblocksConfig.VaultAccountName) > 0 { + secretKey, err := os.ReadFile(config.FireblocksConfig.SecretKeyPath) + if err != nil { + return fmt.Errorf("Cannot read fireblocks secret from %s: %w", config.FireblocksConfig.SecretKeyPath, err) + } + fireblocksClient, err := fireblocks.NewClient( + config.FireblocksConfig.APIKey, + secretKey, + config.FireblocksConfig.BaseURL, + config.TimeoutConfig.ChainReadTimeout, + logger, + ) + if err != nil { + return err + } + wallet, err = walletsdk.NewFireblocksWallet(fireblocksClient, client, config.FireblocksConfig.VaultAccountName, logger) + if err != nil { + return err + } + } else if len(config.EthClientConfig.PrivateKeyString) > 0 { + privateKey, err := crypto.HexToECDSA(config.EthClientConfig.PrivateKeyString) + if err != nil { + return fmt.Errorf("failed to parse private key: %w", err) + } + chainID, err := client.ChainID(context.Background()) + if err != nil { + return fmt.Errorf("failed to get chain ID: %w", err) + } + signerV2, address, err := signerv2.SignerFromConfig(signerv2.Config{PrivateKey: privateKey}, chainID) + if err != nil { + return err + } + wallet, err = walletsdk.NewPrivateKeyWallet(client, signerV2, address, logger) + if err != nil { + return err + } + } else { + return errors.New("no wallet is configured. Either Fireblocks or PrivateKey wallet should be configured") + } + + txnManager := batcher.NewTxnManager(client, wallet, config.EthClientConfig.NumConfirmations, 20, config.TimeoutConfig.ChainWriteTimeout, logger, metrics.TxnManagerMetrics) batcher, err := batcher.NewBatcher(config.BatcherConfig, config.TimeoutConfig, queue, dispatcher, ics, asgn, encoderClient, agg, client, finalizer, tx, txnManager, logger, metrics, handleBatchLivenessChan) if err != nil { return err diff --git a/go.mod b/go.mod index 2c4b7dec30..359b2f892a 100644 --- a/go.mod +++ b/go.mod @@ -6,12 +6,12 @@ toolchain go1.21.1 require ( github.com/Layr-Labs/eigenda/api v0.0.0 - github.com/Layr-Labs/eigensdk-go v0.1.2-0.20240307000048-01719ce9868b + github.com/Layr-Labs/eigensdk-go v0.1.3-0.20240316185645-e035f359ddfa github.com/aws/aws-sdk-go-v2 v1.21.2 github.com/aws/aws-sdk-go-v2/credentials v1.13.43 github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.10.40 github.com/consensys/gnark-crypto v0.12.1 - github.com/ethereum/go-ethereum v1.13.12 + github.com/ethereum/go-ethereum v1.13.14 github.com/fxamacker/cbor/v2 v2.5.0 github.com/gin-contrib/logger v0.2.6 github.com/gin-gonic/gin v1.9.1 @@ -20,21 +20,23 @@ require ( github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.8 github.com/ory/dockertest/v3 v3.10.0 - github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/client_golang v1.19.0 github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/swaggo/swag v1.16.2 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/urfave/cli v1.22.14 github.com/urfave/cli/v2 v2.27.1 github.com/wealdtech/go-merkletree v1.0.1-0.20230205101955-ec7a95ea11ca go.uber.org/automaxprocs v1.5.2 - go.uber.org/goleak v1.2.0 + go.uber.org/goleak v1.3.0 + go.uber.org/mock v0.4.0 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa google.golang.org/grpc v1.59.0 ) require ( + dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/KyleBanks/depth v1.2.1 // indirect @@ -71,9 +73,9 @@ require ( github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect - github.com/docker/cli v20.10.17+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/cli v25.0.3+incompatible // indirect + github.com/docker/docker v25.0.3+incompatible // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fjl/memsize v0.0.2 // indirect @@ -93,14 +95,14 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect - github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect + github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect github.com/huin/goupnp v1.3.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -112,7 +114,6 @@ require ( github.com/leodido/go-urn v1.2.4 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/moby/term v0.5.0 // indirect @@ -120,7 +121,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runc v1.1.5 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/rivo/uniseg v0.2.0 // indirect @@ -138,10 +139,10 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect + go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.4.0 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/oauth2 v0.12.0 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -172,7 +173,7 @@ require ( github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.4.2 // indirect @@ -187,22 +188,22 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 + github.com/prometheus/common v0.48.0 github.com/prometheus/procfs v0.12.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/swaggo/files v1.0.1 github.com/swaggo/gin-swagger v1.6.0 github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - golang.org/x/crypto v0.17.0 - golang.org/x/net v0.18.0 // indirect + golang.org/x/crypto v0.18.0 + golang.org/x/net v0.20.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.15.0 // indirect - google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf v1.32.0 gopkg.in/yaml.v3 v3.0.1 rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 40816d6d99..07382a4930 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= @@ -12,8 +14,8 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= -github.com/Layr-Labs/eigensdk-go v0.1.2-0.20240307000048-01719ce9868b h1:FgwmbgsdVVIecbIDH2H0ewxpbJ7TY/JHwS5zNWyYA40= -github.com/Layr-Labs/eigensdk-go v0.1.2-0.20240307000048-01719ce9868b/go.mod h1:NVT6pQnOsMmFTQC2wnfWxqo2EqNeKhW0CkEcp5OdT4o= +github.com/Layr-Labs/eigensdk-go v0.1.3-0.20240316185645-e035f359ddfa h1:c19dWUGTbIhQxbVZko9CCikC3M151OeWNZOOcpjZxOs= +github.com/Layr-Labs/eigensdk-go v0.1.3-0.20240316185645-e035f359ddfa/go.mod h1:J+d9zxN4VyMtchmsPzGASFcCjpnh1eT4aE2ggiqOz/g= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= @@ -178,12 +180,12 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M= -github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/cli v25.0.3+incompatible h1:KLeNs7zws74oFuVhgZQ5ONGZiXUUdgsdy6/EsX/6284= +github.com/docker/cli v25.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+vdyJG5luQLfQ= +github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -196,8 +198,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.13.12 h1:iDr9UM2JWkngBHGovRJEQn4Kor7mT4gt9rUZqB5M29Y= -github.com/ethereum/go-ethereum v1.13.12/go.mod h1:hKL2Qcj1OvStXNSEDbucexqnEt1Wh4Cz329XsjAalZY= +github.com/ethereum/go-ethereum v1.13.14 h1:EwiY3FZP94derMCIam1iW4HFVrSgIcpsu0HwTQtm6CQ= +github.com/ethereum/go-ethereum v1.13.14/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= @@ -320,8 +322,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -348,8 +350,8 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -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/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= @@ -358,8 +360,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= 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/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= @@ -444,8 +444,6 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -493,8 +491,8 @@ github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -515,13 +513,13 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= @@ -565,8 +563,9 @@ github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobt github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -578,8 +577,9 @@ 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/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= @@ -643,14 +643,14 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.uber.org/automaxprocs v1.5.2 h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME= go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= -go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= -go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= @@ -663,23 +663,22 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/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.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -704,11 +703,11 @@ golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1 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.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -836,8 +835,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/indexer/test/mock/contract_simulator.go b/indexer/test/mock/contract_simulator.go index c3948b49b6..e359c50edc 100644 --- a/indexer/test/mock/contract_simulator.go +++ b/indexer/test/mock/contract_simulator.go @@ -14,7 +14,7 @@ import ( "github.com/Layr-Labs/eigenda/indexer/test/contracts" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient/simulated" ) @@ -140,7 +140,7 @@ func mustNewSimulatedBackend() (client SimulatedBackend, deployerAddr common.Add balance.SetString("10000000000000000000", 10) // 10 eth in wei deployerAddr = auth.From - genesisAlloc := map[common.Address]core.GenesisAccount{ + genesisAlloc := map[common.Address]types.Account{ deployerAddr: { Balance: balance, },