From 2a634d1776d88d20a3224774e3dc7a752d1d6a2b Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sat, 2 Nov 2024 08:40:27 +0700 Subject: [PATCH 01/26] init --- app/app.go | 6 ++++++ go.mod | 2 -- go.sum | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/app.go b/app/app.go index 80ae5bbb..9ed213d8 100644 --- a/app/app.go +++ b/app/app.go @@ -262,6 +262,7 @@ func NewTerraApp( app.SetAnteHandler(anteHandler) app.SetPostHandler(postHandler) + app.SetPrepareProposal(app.PreBlocker) app.SetEndBlocker(app.EndBlocker) // must be before Loading version @@ -305,6 +306,11 @@ func (app *TerraApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) a return app.mm.BeginBlock(ctx, req) } +func (app *TerraApp) PreBlocker(ctx sdk.Context, req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { + + return abci.ResponsePrepareProposal{} +} + // EndBlocker application updates every end block func (app *TerraApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { return app.mm.EndBlock(ctx, req) diff --git a/go.mod b/go.mod index 49caa391..a49dfc44 100644 --- a/go.mod +++ b/go.mod @@ -227,9 +227,7 @@ replace ( replace ( github.com/CosmWasm/wasmd => github.com/classic-terra/wasmd v0.46.0-classic.2 // use cometbft - github.com/cometbft/cometbft => github.com/classic-terra/cometbft v0.37.4-terra1 github.com/cometbft/cometbft-db => github.com/cometbft/cometbft-db v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/classic-terra/cosmos-sdk v0.47.10-terra.1 github.com/cosmos/ibc-go/v7 => github.com/classic-terra/ibc-go/v7 v7.4.0-terra github.com/cosmos/ledger-cosmos-go => github.com/terra-money/ledger-terra-go v0.11.2 // replace goleveldb to optimized one diff --git a/go.sum b/go.sum index 833ba593..637c04e5 100644 --- a/go.sum +++ b/go.sum @@ -348,10 +348,6 @@ github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/classic-terra/cometbft v0.37.4-terra1 h1:eT5B2n5KKi5WVW+3ZNOVTmtfKKaZrXOLX9G80m9mhZo= -github.com/classic-terra/cometbft v0.37.4-terra1/go.mod h1:vFqj7Qe3uFFJvHZleTJPQDmJ/WscXHi4rKWqiCAaNZk= -github.com/classic-terra/cosmos-sdk v0.47.10-terra.1 h1:ek0vQ435fpeP3xGhszDO2yMIRy5XGMj9MCTlvpMUIkw= -github.com/classic-terra/cosmos-sdk v0.47.10-terra.1/go.mod h1:4mBvTB8zevoeTuQufWwTcNnthGG2afXO+9D42BKzlRo= github.com/classic-terra/goleveldb v0.0.0-20230914223247-2b28f6655121 h1:fjpWDB0hm225wYg9vunyDyTH8ftd5xEUgINJKidj+Tw= github.com/classic-terra/goleveldb v0.0.0-20230914223247-2b28f6655121/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/classic-terra/ibc-go/v7 v7.4.0-terra h1:hawaq62XKlxyc8xLyIcc6IujDDEbqDBU+2U15SF+hj8= @@ -384,6 +380,8 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= +github.com/cometbft/cometbft v0.37.4 h1:xyvvEqlyfK8MgNIIKVJaMsuIp03wxOcFmVkT26+Ikpg= +github.com/cometbft/cometbft v0.37.4/go.mod h1:Cmg5Hp4sNpapm7j+x0xRyt2g0juQfmB752ous+pA0G8= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -404,6 +402,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= +github.com/cosmos/cosmos-sdk v0.47.10 h1:Wxf5yEN3jZbG4fftxAMKB6rpd8ME0mxuCVihpz65dt0= +github.com/cosmos/cosmos-sdk v0.47.10/go.mod h1:UWpgWkhcsBIATS68uUC0del7IiBN4hPv/vqg8Zz23uw= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= From 9962526cdf3a7d6a18c1dd4f9141819edfe404d4 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sat, 2 Nov 2024 10:26:34 +0700 Subject: [PATCH 02/26] add PreBlocker --- app/app.go | 46 ++++++++- app/testing/app_test.go | 199 ++++++++++++++++++++++++++++++++++++ custom/auth/ante/fee.go | 2 +- custom/auth/ante/fee_tax.go | 2 +- 4 files changed, 246 insertions(+), 3 deletions(-) create mode 100644 app/testing/app_test.go diff --git a/app/app.go b/app/app.go index 9ed213d8..e2689b33 100644 --- a/app/app.go +++ b/app/app.go @@ -43,6 +43,7 @@ import ( "github.com/classic-terra/core/v3/app/keepers" terraappparams "github.com/classic-terra/core/v3/app/params" + anteauth "github.com/classic-terra/core/v3/custom/auth/ante" // upgrades "github.com/classic-terra/core/v3/app/upgrades" @@ -307,8 +308,46 @@ func (app *TerraApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) a } func (app *TerraApp) PreBlocker(ctx sdk.Context, req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { + // get current txs + currentTxs := req.Txs + + // Create slices for oracle and non-oracle txs + oracleTxs := make([][]byte, 0) + otherTxs := make([][]byte, 0) + + // Track seen txs to prevent duplicates + seenTxs := make(map[string]bool) + + // Separate oracle and non-oracle txs + for _, tx := range currentTxs { + // Skip if we've seen this tx before + txHash := string(tx) + if seenTxs[txHash] { + continue + } + seenTxs[txHash] = true + + // Decode the transaction + txDecoder := app.txConfig.TxDecoder() + decodedTx, err := txDecoder(tx) + if err != nil { + continue + } - return abci.ResponsePrepareProposal{} + // Check if it's an oracle tx + if anteauth.IsOracleTx(decodedTx.GetMsgs()) { + oracleTxs = append(oracleTxs, tx) + } else { + otherTxs = append(otherTxs, tx) + } + } + + // Combine txs with oracle txs first + orderedTxs := append(oracleTxs, otherTxs...) + + return abci.ResponsePrepareProposal{ + Txs: orderedTxs, + } } // EndBlocker application updates every end block @@ -331,6 +370,11 @@ func (app *TerraApp) LoadHeight(height int64) error { return app.LoadVersion(height) } +// GetTxConfig for testing +func (app *TerraApp) GetTxConfig() client.TxConfig { + return app.txConfig +} + // ModuleAccountAddrs returns all the app's module account addresses. func (app *TerraApp) ModuleAccountAddrs() map[string]bool { modAccAddrs := make(map[string]bool) diff --git a/app/testing/app_test.go b/app/testing/app_test.go new file mode 100644 index 00000000..2de03347 --- /dev/null +++ b/app/testing/app_test.go @@ -0,0 +1,199 @@ +package helpers + +import ( + "fmt" + anteauth "github.com/classic-terra/core/v3/custom/auth/ante" + "testing" + + oracletypes "github.com/classic-terra/core/v3/x/oracle/types" + abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/stretchr/testify/suite" +) + +type AppTestSuite struct { + KeeperTestHelper +} + +func TestAppTestSuite(t *testing.T) { + suite.Run(t, new(AppTestSuite)) +} + +func (s *AppTestSuite) SetupTest() { + s.Setup(s.T(), SimAppChainID) +} + +func (s *AppTestSuite) TestPreBlocker() { + // Create test transactions + oracleTx := s.createTestTx([]sdk.Msg{ + &oracletypes.MsgAggregateExchangeRatePrevote{}, // Oracle message + }) + + bankTx := s.createTestTx([]sdk.Msg{ + &banktypes.MsgSend{}, // Non-oracle message + }) + + // Test cases + testCases := []struct { + name string + txs [][]byte + expected [][]byte + }{ + { + name: "oracle tx should be first", + txs: [][]byte{bankTx, oracleTx}, + expected: [][]byte{oracleTx, bankTx}, + }, + { + name: "already ordered txs should remain ordered", + txs: [][]byte{oracleTx, bankTx}, + expected: [][]byte{oracleTx, bankTx}, + }, + { + name: "duplicate txs should be removed", + txs: [][]byte{bankTx, oracleTx, bankTx}, + expected: [][]byte{oracleTx, bankTx}, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + req := abci.RequestPrepareProposal{ + Txs: tc.txs, + } + + response := s.App.PreBlocker(s.Ctx, req) + s.Require().Equal(len(tc.expected), len(response.Txs), "number of transactions should match") + + for i := range tc.expected { + s.Require().Equal(tc.expected[i], response.Txs[i], "transaction at index %d should match", i) + } + }) + } +} + +func (s *AppTestSuite) TestOraclePriorityProcessing() { + testCases := []struct { + name string + setup func() [][]byte + numTxs int + numOracle int + }{ + { + name: "small batch of mixed transactions", + setup: func() [][]byte { + var txs [][]byte + // Create 5 oracle and 5 non-oracle txs in mixed order + for i := uint64(0); i < 10; i++ { + txs = append(txs, s.createNumberedTx(i, i%2 == 0)) + } + return txs + }, + numTxs: 10, + numOracle: 5, + }, + { + name: "large batch of mixed transactions", + setup: func() [][]byte { + var txs [][]byte + // Create 50 oracle and 50 non-oracle txs in mixed order + for i := uint64(0); i < 100; i++ { + txs = append(txs, s.createNumberedTx(i, i%2 == 0)) + } + return txs + }, + numTxs: 100, + numOracle: 50, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + txs := tc.setup() + + // Process transactions through PreBlocker + req := abci.RequestPrepareProposal{ + Txs: txs, + } + + response := s.App.PreBlocker(s.Ctx, req) + + // Verify the number of transactions + s.Require().Equal(tc.numTxs, len(response.Txs), + "expected %d transactions, got %d", tc.numTxs, len(response.Txs)) + // Verify oracle transactions are prioritized + s.verifyOraclePriority(response.Txs[:tc.numOracle]) + }) + } +} + +// Helper function to create test transactions with sequential numbers +func (s *AppTestSuite) createNumberedTx(i uint64, isOracle bool) []byte { + var msg sdk.Msg + if isOracle { + if i%3 == 0 { + msg = &oracletypes.MsgAggregateExchangeRatePrevote{ + Hash: fmt.Sprintf("hash_%d", i), + Feeder: fmt.Sprintf("feeder_%d", i), + Validator: fmt.Sprintf("validator_%d", i), + } + } else { + msg = &oracletypes.MsgAggregateExchangeRateVote{ + ExchangeRates: fmt.Sprintf("1000ukrw,1000uluna,1000usdr_%d", i), + Feeder: fmt.Sprintf("feeder_%d", i), + Validator: fmt.Sprintf("validator_%d", i), + } + } + } else { + msg = &banktypes.MsgSend{ + FromAddress: fmt.Sprintf("from_%d", i), + ToAddress: fmt.Sprintf("to_%d", i), + Amount: sdk.NewCoins(sdk.NewCoin("uluna", sdk.NewInt(int64(i)))), + } + } + return s.createTestTx([]sdk.Msg{msg}) +} + +// Helper function to verify oracle transactions come first +func (s *AppTestSuite) verifyOraclePriority(txs [][]byte) { + oracleFound := false + for _, tx := range txs { + // Decode tx to check if it's an oracle tx + decodedTx, err := s.App.GetTxConfig().TxDecoder()(tx) + s.Require().NoError(err) + msgs := decodedTx.GetMsgs() + isOracleTx := anteauth.IsOracleTx(msgs) + if isOracleTx { + oracleFound = true + } else if oracleFound { + // If we find a non-oracle tx after an oracle tx, fail the test + s.Require().Fail("Non-oracle transaction found after oracle transaction") + } + } +} + +// Helper method for the test suite +func (s *AppTestSuite) createTestTx(msgs []sdk.Msg) []byte { + builder := s.App.GetTxConfig().NewTxBuilder() + builder.SetMsgs(msgs...) + + // Add a dummy signature + sigV2 := signing.SignatureV2{ + PubKey: nil, + Data: &signing.SingleSignatureData{ + SignMode: signing.SignMode_SIGN_MODE_DIRECT, + Signature: []byte("dummy_signature"), + }, + Sequence: 0, + } + + err := builder.SetSignatures(sigV2) + s.Require().NoError(err) + + txBytes, err := s.App.GetTxConfig().TxEncoder()(builder.GetTx()) + s.Require().NoError(err) + + return txBytes +} diff --git a/custom/auth/ante/fee.go b/custom/auth/ante/fee.go index 389ca909..122e775a 100644 --- a/custom/auth/ante/fee.go +++ b/custom/auth/ante/fee.go @@ -199,7 +199,7 @@ func (fd FeeDecorator) checkTxFee(ctx sdk.Context, tx sdk.Tx, taxes sdk.Coins) ( feeCoins := feeTx.GetFee() gas := feeTx.GetGas() msgs := feeTx.GetMsgs() - isOracleTx := isOracleTx(msgs) + isOracleTx := IsOracleTx(msgs) // Ensure that the provided fees meet a minimum threshold for the validator, // if this is a CheckTx. This is only for local mempool purposes, and thus diff --git a/custom/auth/ante/fee_tax.go b/custom/auth/ante/fee_tax.go index be76869b..8b26dbd3 100644 --- a/custom/auth/ante/fee_tax.go +++ b/custom/auth/ante/fee_tax.go @@ -118,7 +118,7 @@ func computeTax(ctx sdk.Context, tk TreasuryKeeper, principal sdk.Coins, simulat return taxes } -func isOracleTx(msgs []sdk.Msg) bool { +func IsOracleTx(msgs []sdk.Msg) bool { for _, msg := range msgs { switch msg.(type) { case *oracleexported.MsgAggregateExchangeRatePrevote: From 7a918a8f9049364d42a4a0942c227432083c3511 Mon Sep 17 00:00:00 2001 From: Tuan Tran Date: Mon, 4 Nov 2024 22:08:15 +0700 Subject: [PATCH 03/26] add abci test --- app/app.go | 4 ++-- app/testing/abci_test.go | 49 ++++++++++++++++++++++++++++++++++++++++ app/testing/app_test.go | 36 +++++++++++++++++------------ 3 files changed, 72 insertions(+), 17 deletions(-) create mode 100644 app/testing/abci_test.go diff --git a/app/app.go b/app/app.go index e2689b33..e61e82d3 100644 --- a/app/app.go +++ b/app/app.go @@ -263,7 +263,7 @@ func NewTerraApp( app.SetAnteHandler(anteHandler) app.SetPostHandler(postHandler) - app.SetPrepareProposal(app.PreBlocker) + app.SetPrepareProposal(app.prepareProposal) app.SetEndBlocker(app.EndBlocker) // must be before Loading version @@ -307,7 +307,7 @@ func (app *TerraApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) a return app.mm.BeginBlock(ctx, req) } -func (app *TerraApp) PreBlocker(ctx sdk.Context, req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { +func (app *TerraApp) prepareProposal(ctx sdk.Context, req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { // get current txs currentTxs := req.Txs diff --git a/app/testing/abci_test.go b/app/testing/abci_test.go new file mode 100644 index 00000000..92de0aec --- /dev/null +++ b/app/testing/abci_test.go @@ -0,0 +1,49 @@ +package helpers + +import ( + abci "github.com/cometbft/cometbft/abci/types" + + "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/stretchr/testify/require" +) + +func (s *AppTestSuite) TestABCI_Proposal_HappyPath() { + pool := mempool.NewSenderNonceMempool() + var txs [][]byte + // Create 5 oracle and 5 non-oracle txs in mixed order + for i := uint64(0); i < 10; i++ { + txs = append(txs, s.createNumberedTx(i, i%2 == 0)) + } + + txDecoder := s.App.GetTxConfig().TxDecoder() + + reqCheckTx := abci.RequestCheckTx{ + Tx: txs[0], + Type: abci.CheckTxType_New, + } + s.App.CheckTx(reqCheckTx) + + for i := uint64(0); i < 10; i++ { + decodedTx, err := txDecoder(txs[i]) + require.NoError(s.T(), err) + err = pool.Insert(s.Ctx, decodedTx) + require.NoError(s.T(), err) + } + reqPrepareProposal := abci.RequestPrepareProposal{ + MaxTxBytes: 1000, + Height: 1, + Txs: txs[0:5], + } + resPrepareProposal := s.App.PrepareProposal(reqPrepareProposal) + require.Equal(s.T(), 5, len(resPrepareProposal.Txs)) + + // 3 oracleTx of first 5 tx should be placed in front + s.verifyOraclePriority(resPrepareProposal.Txs[0:5], 3) + + reqProcessProposal := abci.RequestProcessProposal{ + Txs: resPrepareProposal.Txs, + Height: reqPrepareProposal.Height, + } + resProcessProposal := s.App.ProcessProposal(reqProcessProposal) + require.Equal(s.T(), abci.ResponseProcessProposal_ACCEPT, resProcessProposal.Status) +} diff --git a/app/testing/app_test.go b/app/testing/app_test.go index 2de03347..ad6a7116 100644 --- a/app/testing/app_test.go +++ b/app/testing/app_test.go @@ -1,10 +1,13 @@ package helpers import ( + "encoding/hex" "fmt" - anteauth "github.com/classic-terra/core/v3/custom/auth/ante" "testing" + anteauth "github.com/classic-terra/core/v3/custom/auth/ante" + "github.com/cometbft/cometbft/libs/rand" + oracletypes "github.com/classic-terra/core/v3/x/oracle/types" abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -64,7 +67,7 @@ func (s *AppTestSuite) TestPreBlocker() { Txs: tc.txs, } - response := s.App.PreBlocker(s.Ctx, req) + response := s.App.PrepareProposal(req) s.Require().Equal(len(tc.expected), len(response.Txs), "number of transactions should match") for i := range tc.expected { @@ -113,18 +116,18 @@ func (s *AppTestSuite) TestOraclePriorityProcessing() { s.Run(tc.name, func() { txs := tc.setup() - // Process transactions through PreBlocker + // Process transactions through PrepareProposal req := abci.RequestPrepareProposal{ Txs: txs, } - response := s.App.PreBlocker(s.Ctx, req) + response := s.App.PrepareProposal(req) // Verify the number of transactions s.Require().Equal(tc.numTxs, len(response.Txs), "expected %d transactions, got %d", tc.numTxs, len(response.Txs)) // Verify oracle transactions are prioritized - s.verifyOraclePriority(response.Txs[:tc.numOracle]) + s.verifyOraclePriority(response.Txs, tc.numOracle) }) } } @@ -135,7 +138,7 @@ func (s *AppTestSuite) createNumberedTx(i uint64, isOracle bool) []byte { if isOracle { if i%3 == 0 { msg = &oracletypes.MsgAggregateExchangeRatePrevote{ - Hash: fmt.Sprintf("hash_%d", i), + Hash: hex.EncodeToString([]byte(rand.Str(20))), Feeder: fmt.Sprintf("feeder_%d", i), Validator: fmt.Sprintf("validator_%d", i), } @@ -157,20 +160,23 @@ func (s *AppTestSuite) createNumberedTx(i uint64, isOracle bool) []byte { } // Helper function to verify oracle transactions come first -func (s *AppTestSuite) verifyOraclePriority(txs [][]byte) { - oracleFound := false +func (s *AppTestSuite) verifyOraclePriority(txs [][]byte, numOracleTx int) { + i := 0 + + txDecoder := s.App.GetTxConfig().TxDecoder() for _, tx := range txs { + if i == numOracleTx { + break + } // Decode tx to check if it's an oracle tx - decodedTx, err := s.App.GetTxConfig().TxDecoder()(tx) + decodedTx, err := txDecoder(tx) s.Require().NoError(err) msgs := decodedTx.GetMsgs() isOracleTx := anteauth.IsOracleTx(msgs) - if isOracleTx { - oracleFound = true - } else if oracleFound { - // If we find a non-oracle tx after an oracle tx, fail the test - s.Require().Fail("Non-oracle transaction found after oracle transaction") + if !isOracleTx { + s.Require().FailNowf("Invalid transaction order", "expected oracle transaction at index %d, but found non-oracle transaction", i) } + i++ } } @@ -181,7 +187,7 @@ func (s *AppTestSuite) createTestTx(msgs []sdk.Msg) []byte { // Add a dummy signature sigV2 := signing.SignatureV2{ - PubKey: nil, + PubKey: NewPV().PrivKey.PubKey(), Data: &signing.SingleSignatureData{ SignMode: signing.SignMode_SIGN_MODE_DIRECT, Signature: []byte("dummy_signature"), From 079e813bf91ac3bebe75327cfcfc00426275948a Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sat, 9 Nov 2024 15:27:06 +0700 Subject: [PATCH 04/26] add custom mempool --- app/app.go | 71 ++++++----------- app/mempool/default.go | 36 +++++++++ app/mempool/mempool.go | 142 +++++++++++++++++++++++++++++++++ go.mod | 72 +++++++++-------- go.sum | 175 +++++++++++++++++++++++------------------ scripts/run-node.sh | 2 + 6 files changed, 341 insertions(+), 157 deletions(-) create mode 100644 app/mempool/default.go create mode 100644 app/mempool/mempool.go diff --git a/app/app.go b/app/app.go index e61e82d3..8bafc4e0 100644 --- a/app/app.go +++ b/app/app.go @@ -1,8 +1,13 @@ package app import ( + "cosmossdk.io/math" "encoding/json" "fmt" + "github.com/classic-terra/core/v3/app/mempool" + signer_extraction "github.com/skip-mev/block-sdk/adapters/signer_extraction_adapter" + "github.com/skip-mev/block-sdk/block" + blockbase "github.com/skip-mev/block-sdk/block/base" "io" stdlog "log" "net/http" @@ -43,8 +48,6 @@ import ( "github.com/classic-terra/core/v3/app/keepers" terraappparams "github.com/classic-terra/core/v3/app/params" - anteauth "github.com/classic-terra/core/v3/custom/auth/ante" - // upgrades "github.com/classic-terra/core/v3/app/upgrades" v2 "github.com/classic-terra/core/v3/app/upgrades/v2" @@ -149,7 +152,6 @@ func NewTerraApp( txConfig := encodingConfig.TxConfig invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) - bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) @@ -261,9 +263,27 @@ func NewTerraApp( panic(err) } + signerExtractor := signer_extraction.NewDefaultAdapter() + defaultLaneConfig := blockbase.LaneConfig{ + Logger: app.Logger(), + TxEncoder: app.txConfig.TxEncoder(), + TxDecoder: app.txConfig.TxDecoder(), + MaxBlockSpace: math.LegacyZeroDec(), + MaxTxs: 0, + SignerExtractor: signerExtractor, + } + + defaultLane := mempool.NewDefaultLane(defaultLaneConfig) + lanes := []block.Lane{defaultLane} + mempool, err := block.NewLanedMempool(app.Logger(), lanes) + if err != nil { + panic(err) + } + + app.SetMempool(mempool) + app.SetAnteHandler(anteHandler) app.SetPostHandler(postHandler) - app.SetPrepareProposal(app.prepareProposal) app.SetEndBlocker(app.EndBlocker) // must be before Loading version @@ -307,49 +327,6 @@ func (app *TerraApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) a return app.mm.BeginBlock(ctx, req) } -func (app *TerraApp) prepareProposal(ctx sdk.Context, req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { - // get current txs - currentTxs := req.Txs - - // Create slices for oracle and non-oracle txs - oracleTxs := make([][]byte, 0) - otherTxs := make([][]byte, 0) - - // Track seen txs to prevent duplicates - seenTxs := make(map[string]bool) - - // Separate oracle and non-oracle txs - for _, tx := range currentTxs { - // Skip if we've seen this tx before - txHash := string(tx) - if seenTxs[txHash] { - continue - } - seenTxs[txHash] = true - - // Decode the transaction - txDecoder := app.txConfig.TxDecoder() - decodedTx, err := txDecoder(tx) - if err != nil { - continue - } - - // Check if it's an oracle tx - if anteauth.IsOracleTx(decodedTx.GetMsgs()) { - oracleTxs = append(oracleTxs, tx) - } else { - otherTxs = append(otherTxs, tx) - } - } - - // Combine txs with oracle txs first - orderedTxs := append(oracleTxs, otherTxs...) - - return abci.ResponsePrepareProposal{ - Txs: orderedTxs, - } -} - // EndBlocker application updates every end block func (app *TerraApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { return app.mm.EndBlock(ctx, req) diff --git a/app/mempool/default.go b/app/mempool/default.go new file mode 100644 index 00000000..463865af --- /dev/null +++ b/app/mempool/default.go @@ -0,0 +1,36 @@ +package mempool + +import ( + "github.com/skip-mev/block-sdk/block" + blockbase "github.com/skip-mev/block-sdk/block/base" +) + +const ( + // DefaultName defines the name of the priority lane. + DefaultName = "default" +) + +// NewDefaultLane defines a default lane implementation. The default lane orders +// transactions by the transaction fees. The default lane accepts any transaction +// that should not be ignored (as defined by the IgnoreList in the LaneConfig). +// The default lane builds and verifies blocks in a similar fashion to how the +// CometBFT/Tendermint consensus engine builds and verifies blocks pre SDK version +// 0.47.0. +func NewDefaultLane(cfg blockbase.LaneConfig) block.Lane { + lane := &blockbase.BaseLane{} + proposalHandler := blockbase.NewDefaultProposalHandler(lane) + + _lane, err := blockbase.NewBaseLane( + cfg, + DefaultName, + blockbase.WithMempool(NewMempool(blockbase.NewDefaultTxPriority(), cfg.SignerExtractor, cfg.MaxTxs)), + blockbase.WithPrepareLaneHandler(proposalHandler.PrepareLaneHandler()), + blockbase.WithProcessLaneHandler(proposalHandler.ProcessLaneHandler()), + ) + if err != nil { + panic(err) + } + + *lane = *_lane + return lane +} diff --git a/app/mempool/mempool.go b/app/mempool/mempool.go new file mode 100644 index 00000000..6272e517 --- /dev/null +++ b/app/mempool/mempool.go @@ -0,0 +1,142 @@ +package mempool + +import ( + "context" + "errors" + "fmt" + + anteauth "github.com/classic-terra/core/v3/custom/auth/ante" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + signer_extraction "github.com/skip-mev/block-sdk/adapters/signer_extraction_adapter" + blockbase "github.com/skip-mev/block-sdk/block/base" +) + +type ( + txKey struct { + nonce uint64 + sender string + } + + // Mempool defines a mempool that orders transactions based on the + // txPriority. The mempool is a wrapper on top of the SDK's Priority Nonce mempool. + // It include's additional helper functions that allow users to determine if a + // transaction is already in the mempool and to compare the priority of two + // transactions. + Mempool[C comparable] struct { + // index defines an index of transactions. + index sdkmempool.Mempool + + // signerExtractor defines the signer extraction adapter that allows us to + // extract the signer from a transaction. + extractor signer_extraction.Adapter + + // txCache is a map of all transactions in the mempool. It is used + // to quickly check if a transaction is already in the mempool. + txCache map[txKey]struct{} + } +) + +// NewMempool returns a new Mempool. +func NewMempool[C comparable](txPriority blockbase.TxPriority[C], extractor signer_extraction.Adapter, maxTx int) *Mempool[C] { + return &Mempool[C]{ + index: blockbase.NewPriorityMempool( + blockbase.PriorityNonceMempoolConfig[C]{ + TxPriority: txPriority, + MaxTx: maxTx, + }, + extractor, + ), + extractor: extractor, + txCache: make(map[txKey]struct{}), + } +} + +// Priority returns the priority of the transaction. +func (cm *Mempool[C]) Priority(ctx sdk.Context, tx sdk.Tx) any { + msgs := tx.GetMsgs() + fmt.Println("hoank get Priority") + isOracleTx := anteauth.IsOracleTx(msgs) + if isOracleTx { + return 2 // Higher priority for oracle transactions + } + return 1 // Normal priority for other transactions +} + +// CountTx returns the number of transactions in the mempool. +func (cm *Mempool[C]) CountTx() int { + return cm.index.CountTx() +} + +// Select returns an iterator of all transactions in the mempool. NOTE: If you +// remove a transaction from the mempool while iterating over the transactions, +// the iterator will not be aware of the removal and will continue to iterate +// over the removed transaction. Be sure to reset the iterator if you remove a transaction. +func (cm *Mempool[C]) Select(ctx context.Context, txs [][]byte) sdkmempool.Iterator { + return cm.index.Select(ctx, txs) +} + +// Compare return 0 to ignore priority check in ProcessLaneHandler. +func (cm *Mempool[C]) Compare(ctx sdk.Context, this sdk.Tx, other sdk.Tx) (int, error) { + thisPriority := cm.Priority(ctx, this).(int) + otherPriority := cm.Priority(ctx, other).(int) + fmt.Println("hoank compare", thisPriority, otherPriority) + return otherPriority - thisPriority, nil +} + +// Contains returns true if the transaction is contained in the mempool. +func (cm *Mempool[C]) Contains(tx sdk.Tx) bool { + if key, err := cm.getTxKey(tx); err != nil { + return false + } else { + if _, ok := cm.txCache[key]; ok { + return true + } else { + return false + } + } +} + +// Insert inserts a transaction into the mempool. +func (cm *Mempool[C]) Insert(ctx context.Context, tx sdk.Tx) error { + if err := cm.index.Insert(ctx, tx); err != nil { + return fmt.Errorf("failed to insert tx into auction index: %w", err) + } + + if key, err := cm.getTxKey(tx); err != nil { + return err + } else { + cm.txCache[key] = struct{}{} + } + + return nil +} + +// Remove removes a transaction from the mempool. +func (cm *Mempool[C]) Remove(tx sdk.Tx) error { + if err := cm.index.Remove(tx); err != nil && !errors.Is(err, sdkmempool.ErrTxNotFound) { + return fmt.Errorf("failed to remove transaction from the mempool: %w", err) + } + + if key, err := cm.getTxKey(tx); err != nil { + return err + } else { + delete(cm.txCache, key) + } + + return nil +} + +func (cm *Mempool[C]) getTxKey(tx sdk.Tx) (txKey, error) { + signers, err := cm.extractor.GetSigners(tx) + if err != nil { + return txKey{}, err + } + if len(signers) == 0 { + return txKey{}, fmt.Errorf("attempted to remove a tx with no signatures") + } + sig := signers[0] + sender := sig.Signer.String() + nonce := sig.Sequence + return txKey{nonce, sender}, nil +} diff --git a/go.mod b/go.mod index a49dfc44..652bcc23 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,6 @@ -go 1.20 +go 1.21.8 + +toolchain go1.23.1 module github.com/classic-terra/core/v3 @@ -9,7 +11,7 @@ require ( github.com/CosmWasm/wasmd v0.46.0 github.com/CosmWasm/wasmvm v1.5.5 github.com/cometbft/cometbft v0.37.4 - github.com/cometbft/cometbft-db v0.8.0 + github.com/cometbft/cometbft-db v0.11.0 github.com/cosmos/cosmos-sdk v0.47.10 github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20240321032823-2733d24a1b99 @@ -22,8 +24,9 @@ require ( github.com/ory/dockertest/v3 v3.10.0 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 + github.com/skip-mev/block-sdk v1.4.8 github.com/spf13/cast v1.6.0 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 @@ -40,7 +43,7 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.0 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect - github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/containerd/continuity v0.3.0 // indirect @@ -61,12 +64,15 @@ require ( github.com/imdario/mergo v0.3.13 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/linxGnu/grocksdb v1.7.16 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.12 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect @@ -75,9 +81,10 @@ require ( go.opentelemetry.io/otel v1.22.0 // indirect go.opentelemetry.io/otel/metric v1.22.0 // indirect go.opentelemetry.io/otel/trace v1.22.0 // indirect - golang.org/x/mod v0.11.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/mod v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.7.0 // indirect + golang.org/x/tools v0.22.0 // indirect pgregory.net/rapid v1.1.0 // indirect ) @@ -92,7 +99,7 @@ require ( github.com/99designs/keyring v1.2.2 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect @@ -112,8 +119,8 @@ require ( github.com/cosmos/ledger-go v0.9.3 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect @@ -122,7 +129,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect @@ -139,7 +146,7 @@ require ( github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect @@ -155,8 +162,8 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.7 // indirect - github.com/lib/pq v1.10.7 // indirect + github.com/klauspost/compress v1.17.0 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect @@ -170,36 +177,35 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.11.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.32.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.16.0 - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/viper v1.18.2 + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.2 // indirect - go.etcd.io/bbolt v1.3.7 // indirect + go.etcd.io/bbolt v1.3.8 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.19.0 // indirect - golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/term v0.17.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect google.golang.org/api v0.162.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe // indirect diff --git a/go.sum b/go.sum index 637c04e5..467a6b96 100644 --- a/go.sum +++ b/go.sum @@ -4,7 +4,6 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -18,7 +17,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -173,7 +171,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= @@ -242,6 +239,7 @@ github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrd github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -266,8 +264,8 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= -github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= +github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= @@ -278,6 +276,7 @@ github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7 github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -299,6 +298,7 @@ github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJ github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= @@ -367,11 +367,12 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= -github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= @@ -427,7 +428,7 @@ github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzU github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -440,14 +441,16 @@ github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnG github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= @@ -503,6 +506,7 @@ 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/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -512,13 +516,15 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= @@ -533,11 +539,13 @@ github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -564,6 +572,7 @@ github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5Nq github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -662,6 +671,7 @@ github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIG github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -673,7 +683,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -708,7 +717,6 @@ github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMd github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -726,8 +734,8 @@ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= @@ -815,6 +823,7 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1C github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= +github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -849,8 +858,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= +github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= @@ -859,7 +868,6 @@ github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPR github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -877,14 +885,14 @@ github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2 github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= -github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= +github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -974,6 +982,7 @@ github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -984,11 +993,13 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1006,6 +1017,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= @@ -1016,8 +1028,8 @@ github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChl github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= @@ -1028,16 +1040,17 @@ github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -1053,8 +1066,8 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1063,16 +1076,16 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= +github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= @@ -1089,8 +1102,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= @@ -1101,6 +1114,10 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= @@ -1115,35 +1132,37 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/skip-mev/block-sdk v1.4.8 h1:cBvaXJlTTFyLySl5VPBKKUW4KCk+2Q4O7oV3sJczurk= +github.com/skip-mev/block-sdk v1.4.8/go.mod h1:8ehSzl4XYZgSn+XKOufrkeGVWEieIaHmeiWUtzrSnw0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1153,6 +1172,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 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.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1163,11 +1183,11 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/terra-money/ledger-terra-go v0.11.2 h1:BVXZl+OhJOri6vFNjjVaTabRLApw9MuG7mxWL4V718c= @@ -1223,8 +1243,8 @@ github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1246,18 +1266,25 @@ go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZV go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1279,14 +1306,12 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/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.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= @@ -1311,8 +1336,9 @@ golang.org/x/mod v0.4.1/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.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1356,7 +1382,6 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -1366,7 +1391,6 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1381,8 +1405,8 @@ golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1424,8 +1448,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1485,7 +1509,6 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1494,7 +1517,6 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1508,6 +1530,7 @@ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1528,23 +1551,22 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1558,8 +1580,8 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1587,6 +1609,7 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1620,7 +1643,6 @@ golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1629,8 +1651,8 @@ golang.org/x/tools v0.1.4/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.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -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.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= 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= @@ -1748,10 +1770,8 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1925,6 +1945,7 @@ gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/scripts/run-node.sh b/scripts/run-node.sh index 30243cac..42dbfa9b 100755 --- a/scripts/run-node.sh +++ b/scripts/run-node.sh @@ -69,6 +69,8 @@ update_test_genesis '.app_state["staking"]["params"]["bond_denom"]="'$DENOM'"' # enable rest server and swagger $SED_BINARY -i '0,/enable = false/s//enable = true/' $HOME_DIR/config/app.toml $SED_BINARY -i 's/swagger = false/swagger = true/' $HOME_DIR/config/app.toml +$SED_BINARY -i -e 's/enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' $HOME_DIR/config/app.toml + # Sign genesis transaction $BINARY gentx $KEY "1000000${DENOM}" --commission-rate=$COMMISSION_RATE --commission-max-rate=$COMMISSION_MAX_RATE --keyring-backend $KEYRING --chain-id $CHAIN_ID --home $HOME_DIR From c66a6f74238c90c9c4c846cf1935670c7d310175 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sat, 16 Nov 2024 10:29:31 +0700 Subject: [PATCH 05/26] add mempool_priority --- app/app.go | 44 ++-- app/mempool/default.go | 36 ---- app/mempool/mempool.go | 142 ------------- app/mempool_priority.go | 454 ++++++++++++++++++++++++++++++++++++++++ go.mod | 3 +- go.sum | 2 - 6 files changed, 470 insertions(+), 211 deletions(-) delete mode 100644 app/mempool/default.go delete mode 100644 app/mempool/mempool.go create mode 100644 app/mempool_priority.go diff --git a/app/app.go b/app/app.go index 8bafc4e0..6e9cda23 100644 --- a/app/app.go +++ b/app/app.go @@ -1,13 +1,8 @@ package app import ( - "cosmossdk.io/math" "encoding/json" "fmt" - "github.com/classic-terra/core/v3/app/mempool" - signer_extraction "github.com/skip-mev/block-sdk/adapters/signer_extraction_adapter" - "github.com/skip-mev/block-sdk/block" - blockbase "github.com/skip-mev/block-sdk/block/base" "io" stdlog "log" "net/http" @@ -48,6 +43,7 @@ import ( "github.com/classic-terra/core/v3/app/keepers" terraappparams "github.com/classic-terra/core/v3/app/params" + // upgrades "github.com/classic-terra/core/v3/app/upgrades" v2 "github.com/classic-terra/core/v3/app/upgrades/v2" @@ -152,6 +148,15 @@ func NewTerraApp( txConfig := encodingConfig.TxConfig invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) + baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) { + mempool := NewPriorityMempool() + handler := baseapp.NewDefaultProposalHandler(mempool, app) + app.SetMempool(mempool) + app.SetTxEncoder(txConfig.TxEncoder()) + app.SetPrepareProposal(handler.PrepareProposalHandler()) + app.SetProcessProposal(handler.ProcessProposalHandler()) + }) + bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) @@ -263,25 +268,6 @@ func NewTerraApp( panic(err) } - signerExtractor := signer_extraction.NewDefaultAdapter() - defaultLaneConfig := blockbase.LaneConfig{ - Logger: app.Logger(), - TxEncoder: app.txConfig.TxEncoder(), - TxDecoder: app.txConfig.TxDecoder(), - MaxBlockSpace: math.LegacyZeroDec(), - MaxTxs: 0, - SignerExtractor: signerExtractor, - } - - defaultLane := mempool.NewDefaultLane(defaultLaneConfig) - lanes := []block.Lane{defaultLane} - mempool, err := block.NewLanedMempool(app.Logger(), lanes) - if err != nil { - panic(err) - } - - app.SetMempool(mempool) - app.SetAnteHandler(anteHandler) app.SetPostHandler(postHandler) app.SetEndBlocker(app.EndBlocker) @@ -347,11 +333,6 @@ func (app *TerraApp) LoadHeight(height int64) error { return app.LoadVersion(height) } -// GetTxConfig for testing -func (app *TerraApp) GetTxConfig() client.TxConfig { - return app.txConfig -} - // ModuleAccountAddrs returns all the app's module account addresses. func (app *TerraApp) ModuleAccountAddrs() map[string]bool { modAccAddrs := make(map[string]bool) @@ -497,3 +478,8 @@ func (app *TerraApp) setupUpgradeHandlers() { ) } } + +// GetTxConfig for testing +func (app *TerraApp) GetTxConfig() client.TxConfig { + return app.txConfig +} diff --git a/app/mempool/default.go b/app/mempool/default.go deleted file mode 100644 index 463865af..00000000 --- a/app/mempool/default.go +++ /dev/null @@ -1,36 +0,0 @@ -package mempool - -import ( - "github.com/skip-mev/block-sdk/block" - blockbase "github.com/skip-mev/block-sdk/block/base" -) - -const ( - // DefaultName defines the name of the priority lane. - DefaultName = "default" -) - -// NewDefaultLane defines a default lane implementation. The default lane orders -// transactions by the transaction fees. The default lane accepts any transaction -// that should not be ignored (as defined by the IgnoreList in the LaneConfig). -// The default lane builds and verifies blocks in a similar fashion to how the -// CometBFT/Tendermint consensus engine builds and verifies blocks pre SDK version -// 0.47.0. -func NewDefaultLane(cfg blockbase.LaneConfig) block.Lane { - lane := &blockbase.BaseLane{} - proposalHandler := blockbase.NewDefaultProposalHandler(lane) - - _lane, err := blockbase.NewBaseLane( - cfg, - DefaultName, - blockbase.WithMempool(NewMempool(blockbase.NewDefaultTxPriority(), cfg.SignerExtractor, cfg.MaxTxs)), - blockbase.WithPrepareLaneHandler(proposalHandler.PrepareLaneHandler()), - blockbase.WithProcessLaneHandler(proposalHandler.ProcessLaneHandler()), - ) - if err != nil { - panic(err) - } - - *lane = *_lane - return lane -} diff --git a/app/mempool/mempool.go b/app/mempool/mempool.go deleted file mode 100644 index 6272e517..00000000 --- a/app/mempool/mempool.go +++ /dev/null @@ -1,142 +0,0 @@ -package mempool - -import ( - "context" - "errors" - "fmt" - - anteauth "github.com/classic-terra/core/v3/custom/auth/ante" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" - signer_extraction "github.com/skip-mev/block-sdk/adapters/signer_extraction_adapter" - blockbase "github.com/skip-mev/block-sdk/block/base" -) - -type ( - txKey struct { - nonce uint64 - sender string - } - - // Mempool defines a mempool that orders transactions based on the - // txPriority. The mempool is a wrapper on top of the SDK's Priority Nonce mempool. - // It include's additional helper functions that allow users to determine if a - // transaction is already in the mempool and to compare the priority of two - // transactions. - Mempool[C comparable] struct { - // index defines an index of transactions. - index sdkmempool.Mempool - - // signerExtractor defines the signer extraction adapter that allows us to - // extract the signer from a transaction. - extractor signer_extraction.Adapter - - // txCache is a map of all transactions in the mempool. It is used - // to quickly check if a transaction is already in the mempool. - txCache map[txKey]struct{} - } -) - -// NewMempool returns a new Mempool. -func NewMempool[C comparable](txPriority blockbase.TxPriority[C], extractor signer_extraction.Adapter, maxTx int) *Mempool[C] { - return &Mempool[C]{ - index: blockbase.NewPriorityMempool( - blockbase.PriorityNonceMempoolConfig[C]{ - TxPriority: txPriority, - MaxTx: maxTx, - }, - extractor, - ), - extractor: extractor, - txCache: make(map[txKey]struct{}), - } -} - -// Priority returns the priority of the transaction. -func (cm *Mempool[C]) Priority(ctx sdk.Context, tx sdk.Tx) any { - msgs := tx.GetMsgs() - fmt.Println("hoank get Priority") - isOracleTx := anteauth.IsOracleTx(msgs) - if isOracleTx { - return 2 // Higher priority for oracle transactions - } - return 1 // Normal priority for other transactions -} - -// CountTx returns the number of transactions in the mempool. -func (cm *Mempool[C]) CountTx() int { - return cm.index.CountTx() -} - -// Select returns an iterator of all transactions in the mempool. NOTE: If you -// remove a transaction from the mempool while iterating over the transactions, -// the iterator will not be aware of the removal and will continue to iterate -// over the removed transaction. Be sure to reset the iterator if you remove a transaction. -func (cm *Mempool[C]) Select(ctx context.Context, txs [][]byte) sdkmempool.Iterator { - return cm.index.Select(ctx, txs) -} - -// Compare return 0 to ignore priority check in ProcessLaneHandler. -func (cm *Mempool[C]) Compare(ctx sdk.Context, this sdk.Tx, other sdk.Tx) (int, error) { - thisPriority := cm.Priority(ctx, this).(int) - otherPriority := cm.Priority(ctx, other).(int) - fmt.Println("hoank compare", thisPriority, otherPriority) - return otherPriority - thisPriority, nil -} - -// Contains returns true if the transaction is contained in the mempool. -func (cm *Mempool[C]) Contains(tx sdk.Tx) bool { - if key, err := cm.getTxKey(tx); err != nil { - return false - } else { - if _, ok := cm.txCache[key]; ok { - return true - } else { - return false - } - } -} - -// Insert inserts a transaction into the mempool. -func (cm *Mempool[C]) Insert(ctx context.Context, tx sdk.Tx) error { - if err := cm.index.Insert(ctx, tx); err != nil { - return fmt.Errorf("failed to insert tx into auction index: %w", err) - } - - if key, err := cm.getTxKey(tx); err != nil { - return err - } else { - cm.txCache[key] = struct{}{} - } - - return nil -} - -// Remove removes a transaction from the mempool. -func (cm *Mempool[C]) Remove(tx sdk.Tx) error { - if err := cm.index.Remove(tx); err != nil && !errors.Is(err, sdkmempool.ErrTxNotFound) { - return fmt.Errorf("failed to remove transaction from the mempool: %w", err) - } - - if key, err := cm.getTxKey(tx); err != nil { - return err - } else { - delete(cm.txCache, key) - } - - return nil -} - -func (cm *Mempool[C]) getTxKey(tx sdk.Tx) (txKey, error) { - signers, err := cm.extractor.GetSigners(tx) - if err != nil { - return txKey{}, err - } - if len(signers) == 0 { - return txKey{}, fmt.Errorf("attempted to remove a tx with no signatures") - } - sig := signers[0] - sender := sig.Signer.String() - nonce := sig.Sequence - return txKey{nonce, sender}, nil -} diff --git a/app/mempool_priority.go b/app/mempool_priority.go new file mode 100644 index 00000000..5c43b67a --- /dev/null +++ b/app/mempool_priority.go @@ -0,0 +1,454 @@ +package app + +import ( + "context" + "fmt" + "math" + + "github.com/classic-terra/core/v3/custom/auth/ante" + + "github.com/huandu/skiplist" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/cosmos/cosmos-sdk/x/auth/signing" +) + +var ( + _ mempool.Mempool = (*PriorityOracleMempool)(nil) + _ mempool.Iterator = (*PriorityNonceIterator)(nil) +) + +// PriorityOracleMempool is a mempool implementation that stores txs +// in a partially ordered set by 3 dimensions: oracle tx type, priority, and sender-nonce +// (sequence number). Oracle transactions always have higher priority than non-Oracle transactions. +// +// Internally it uses one priority ordered skip list and one skip list per sender ordered +// by sender-nonce (sequence number). The priority ordering first considers whether a transaction +// is an Oracle transaction (Oracle txs come first), then considers the priority value, and finally +// the sender-nonce. +// +// When there are multiple txs from the same sender, they are ordered as follows: +// 1. Oracle transactions come before non-Oracle transactions +// 2. Within each type (Oracle/non-Oracle), they are ordered by priority +// 3. For equal priorities, they are ordered by sender-nonce +// +// This ensures that: +// - Oracle transactions are always processed before non-Oracle transactions +// - Within each type, higher priority transactions are processed first +// - For transactions with equal priority, they maintain proper nonce ordering +type PriorityOracleMempool struct { + priorityIndex *skiplist.SkipList + priorityCounts map[int64]int + senderIndices map[string]*skiplist.SkipList + scores map[txMeta]txMeta + onRead func(tx sdk.Tx) + txReplacement func(op, np int64, oTx, nTx sdk.Tx) bool + maxTx int +} + +type PriorityNonceIterator struct { + senderCursors map[string]*skiplist.Element + nextPriority int64 + sender string + priorityNode *skiplist.Element + mempool *PriorityOracleMempool +} + +// txMeta stores transaction metadata used in indices +type txMeta struct { + // nonce is the sender's sequence number + nonce uint64 + // priority is the transaction's priority + priority int64 + // sender is the transaction's sender + sender string + // weight is the transaction's weight, used as a tiebreaker for transactions with the same priority + weight int64 + // senderElement is a pointer to the transaction's element in the sender index + senderElement *skiplist.Element + // isOracleTx is a flag to check if the transaction is an oracle tx + isOracleTx bool +} + +// txMetaLess is a comparator for txKeys that first compares if tx is Oracle tx, +// then priority, then weight, then sender, then nonce, uniquely identifying a transaction. +// +// The comparison order is: +// 1. Oracle tx status (Oracle txs come before non-Oracle txs) +// 2. Priority value (higher priority comes first) +// 3. Weight (used as tiebreaker for same priority) +// 4. Sender address (for deterministic ordering) +// 5. Nonce (sequence number for ordering txs from same sender) +// +// Note, txMetaLess is used as the comparator in the priority index. +func txMetaLess(a, b any) int { + keyA := a.(txMeta) + keyB := b.(txMeta) + + // First compare if tx is Oracle tx + if keyA.isOracleTx != keyB.isOracleTx { + if keyA.isOracleTx { + return -1 // A is Oracle tx, should come first + } + return 1 // B is Oracle tx, should come first + } + + res := skiplist.Int64.Compare(keyA.priority, keyB.priority) + if res != 0 { + return res + } + + // Weight is used as a tiebreaker for transactions with the same priority. + // Weight is calculated in a single pass in .Select(...) and so will be 0 + // on .Insert(...). + res = skiplist.Int64.Compare(keyA.weight, keyB.weight) + if res != 0 { + return res + } + + // Because weight will be 0 on .Insert(...), we must also compare sender and + // nonce to resolve priority collisions. If we didn't then transactions with + // the same priority would overwrite each other in the priority index. + res = skiplist.String.Compare(keyA.sender, keyB.sender) + if res != 0 { + return res + } + + return skiplist.Uint64.Compare(keyA.nonce, keyB.nonce) +} + +type PriorityOracleMempoolOption func(*PriorityOracleMempool) + +// PriorityOracleWithOnRead sets a callback to be called when a tx is read from +// the mempool. +func PriorityOracleWithOnRead(onRead func(tx sdk.Tx)) PriorityOracleMempoolOption { + return func(mp *PriorityOracleMempool) { + mp.onRead = onRead + } +} + +// PriorityOracleWithTxReplacement sets a callback to be called when duplicated +// transaction nonce detected during mempool insert. An application can define a +// transaction replacement rule based on tx priority or certain transaction fields. +func PriorityOracleWithTxReplacement(txReplacementRule func(op, np int64, oTx, nTx sdk.Tx) bool) PriorityOracleMempoolOption { + return func(mp *PriorityOracleMempool) { + mp.txReplacement = txReplacementRule + } +} + +// PriorityOracleWithMaxTx sets the maximum number of transactions allowed in the +// mempool with the semantics: +// +// <0: disabled, `Insert` is a no-op +// 0: unlimited +// >0: maximum number of transactions allowed +func PriorityOracleWithMaxTx(maxTx int) PriorityOracleMempoolOption { + return func(mp *PriorityOracleMempool) { + mp.maxTx = maxTx + } +} + +// DefaultPriorityMempool returns a priorityNonceMempool with no options. +func DefaultPriorityMempool() mempool.Mempool { + return NewPriorityMempool() +} + +// NewPriorityMempool returns the SDK's default mempool implementation which +// returns txs in a partial order by 2 dimensions; priority, and sender-nonce. +func NewPriorityMempool(opts ...PriorityOracleMempoolOption) *PriorityOracleMempool { + mp := &PriorityOracleMempool{ + priorityIndex: skiplist.New(skiplist.LessThanFunc(txMetaLess)), + priorityCounts: make(map[int64]int), + senderIndices: make(map[string]*skiplist.SkipList), + scores: make(map[txMeta]txMeta), + } + + for _, opt := range opts { + opt(mp) + } + + return mp +} + +// NextSenderTx returns the next transaction for a given sender by nonce order, +// i.e. the next valid transaction for the sender. If no such transaction exists, +// nil will be returned. +func (mp *PriorityOracleMempool) NextSenderTx(sender string) sdk.Tx { + senderIndex, ok := mp.senderIndices[sender] + if !ok { + return nil + } + + cursor := senderIndex.Front() + return cursor.Value.(sdk.Tx) +} + +// Insert attempts to insert a Tx into the app-side mempool in O(log n) time, +// returning an error if unsuccessful. Sender and nonce are derived from the +// transaction's first signature. +// +// Transactions are unique by sender and nonce. Inserting a duplicate tx is an +// O(log n) no-op. +// +// Inserting a duplicate tx with a different priority overwrites the existing tx, +// changing the total order of the mempool. +func (mp *PriorityOracleMempool) Insert(ctx context.Context, tx sdk.Tx) error { + fmt.Printf("Insert the tx %v", tx.GetMsgs()) + if mp.maxTx > 0 && mp.CountTx() >= mp.maxTx { + return mempool.ErrMempoolTxMaxCapacity + } else if mp.maxTx < 0 { + return nil + } + + sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + if err != nil { + return err + } + if len(sigs) == 0 { + return fmt.Errorf("tx must have at least one signer") + } + + sdkContext := sdk.UnwrapSDKContext(ctx) + priority := sdkContext.Priority() + sig := sigs[0] + sender := sdk.AccAddress(sig.PubKey.Address()).String() + nonce := sig.Sequence + + // Check if tx is Oracle tx + isOracleTx := ante.IsOracleTx(tx.GetMsgs()) + fmt.Println("isOracleTx:", isOracleTx) + key := txMeta{nonce: nonce, priority: priority, sender: sender, isOracleTx: isOracleTx} + + senderIndex, ok := mp.senderIndices[sender] + if !ok { + senderIndex = skiplist.New(skiplist.LessThanFunc(func(a, b any) int { + return skiplist.Uint64.Compare(b.(txMeta).nonce, a.(txMeta).nonce) + })) + + // initialize sender index if not found + mp.senderIndices[sender] = senderIndex + } + + // Since mp.priorityIndex is scored by priority, then sender, then nonce, a + // changed priority will create a new key, so we must remove the old key and + // re-insert it to avoid having the same tx with different priorityIndex indexed + // twice in the mempool. + // + // This O(log n) remove operation is rare and only happens when a tx's priority + // changes. + sk := txMeta{nonce: nonce, sender: sender} + if oldScore, txExists := mp.scores[sk]; txExists { + if mp.txReplacement != nil && !mp.txReplacement(oldScore.priority, priority, senderIndex.Get(key).Value.(sdk.Tx), tx) { + return fmt.Errorf( + "tx doesn't fit the replacement rule, oldPriority: %v, newPriority: %v, oldTx: %v, newTx: %v", + oldScore.priority, + priority, + senderIndex.Get(key).Value.(sdk.Tx), + tx, + ) + } + + mp.priorityIndex.Remove(txMeta{ + nonce: nonce, + sender: sender, + priority: oldScore.priority, + weight: oldScore.weight, + }) + mp.priorityCounts[oldScore.priority]-- + } + + mp.priorityCounts[priority]++ + + // Since senderIndex is scored by nonce, a changed priority will overwrite the + // existing key. + key.senderElement = senderIndex.Set(key, tx) + + mp.scores[sk] = txMeta{priority: priority} + mp.priorityIndex.Set(key, tx) + + return nil +} + +func (i *PriorityNonceIterator) iteratePriority() mempool.Iterator { + // beginning of priority iteration + if i.priorityNode == nil { + i.priorityNode = i.mempool.priorityIndex.Front() + } else { + i.priorityNode = i.priorityNode.Next() + } + + // end of priority iteration + if i.priorityNode == nil { + return nil + } + + i.sender = i.priorityNode.Key().(txMeta).sender + + nextPriorityNode := i.priorityNode.Next() + if nextPriorityNode != nil { + i.nextPriority = nextPriorityNode.Key().(txMeta).priority + } else { + i.nextPriority = math.MinInt64 + } + + return i.Next() +} + +func (i *PriorityNonceIterator) Next() mempool.Iterator { + if i.priorityNode == nil { + return nil + } + + cursor, ok := i.senderCursors[i.sender] + if !ok { + // beginning of sender iteration + cursor = i.mempool.senderIndices[i.sender].Front() + } else { + // middle of sender iteration + cursor = cursor.Next() + } + + // end of sender iteration + if cursor == nil { + return i.iteratePriority() + } + + key := cursor.Key().(txMeta) + + // We've reached a transaction with a priority lower than the next highest + // priority in the pool. + if key.priority < i.nextPriority { + return i.iteratePriority() + } else if key.priority == i.nextPriority && i.priorityNode.Next() != nil { + // Weight is incorporated into the priority index key only (not sender index) + // so we must fetch it here from the scores map. + weight := i.mempool.scores[txMeta{nonce: key.nonce, sender: key.sender}].weight + if weight < i.priorityNode.Next().Key().(txMeta).weight { + return i.iteratePriority() + } + } + + i.senderCursors[i.sender] = cursor + return i +} + +func (i *PriorityNonceIterator) Tx() sdk.Tx { + return i.senderCursors[i.sender].Value.(sdk.Tx) +} + +// Select returns a set of transactions from the mempool, ordered by priority +// and sender-nonce in O(n) time. The passed in list of transactions are ignored. +// This is a readonly operation, the mempool is not modified. +// +// The maxBytes parameter defines the maximum number of bytes of transactions to +// return. +// +// NOTE: It is not safe to use this iterator while removing transactions from +// the underlying mempool. +func (mp *PriorityOracleMempool) Select(_ context.Context, _ [][]byte) mempool.Iterator { + if mp.priorityIndex.Len() == 0 { + return nil + } + + mp.reorderPriorityTies() + + iterator := &PriorityNonceIterator{ + mempool: mp, + senderCursors: make(map[string]*skiplist.Element), + } + + return iterator.iteratePriority() +} + +type reorderKey struct { + deleteKey txMeta + insertKey txMeta + tx sdk.Tx +} + +func (mp *PriorityOracleMempool) reorderPriorityTies() { + node := mp.priorityIndex.Front() + + var reordering []reorderKey + for node != nil { + key := node.Key().(txMeta) + if mp.priorityCounts[key.priority] > 1 { + newKey := key + newKey.weight = senderWeight(key.senderElement) + reordering = append(reordering, reorderKey{deleteKey: key, insertKey: newKey, tx: node.Value.(sdk.Tx)}) + } + + node = node.Next() + } + + for _, k := range reordering { + mp.priorityIndex.Remove(k.deleteKey) + delete(mp.scores, txMeta{nonce: k.deleteKey.nonce, sender: k.deleteKey.sender}) + mp.priorityIndex.Set(k.insertKey, k.tx) + mp.scores[txMeta{nonce: k.insertKey.nonce, sender: k.insertKey.sender}] = k.insertKey + } +} + +// senderWeight returns the weight of a given tx (t) at senderCursor. Weight is +// defined as the first (nonce-wise) same sender tx with a priority not equal to +// t. It is used to resolve priority collisions, that is when 2 or more txs from +// different senders have the same priority. +func senderWeight(senderCursor *skiplist.Element) int64 { + if senderCursor == nil { + return 0 + } + + weight := senderCursor.Key().(txMeta).priority + senderCursor = senderCursor.Next() + for senderCursor != nil { + p := senderCursor.Key().(txMeta).priority + if p != weight { + weight = p + } + + senderCursor = senderCursor.Next() + } + + return weight +} + +// CountTx returns the number of transactions in the mempool. +func (mp *PriorityOracleMempool) CountTx() int { + return mp.priorityIndex.Len() +} + +// Remove removes a transaction from the mempool in O(log n) time, returning an +// error if unsuccessful. +func (mp *PriorityOracleMempool) Remove(tx sdk.Tx) error { + sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + if err != nil { + return err + } + if len(sigs) == 0 { + return fmt.Errorf("attempted to remove a tx with no signatures") + } + + sig := sigs[0] + sender := sdk.AccAddress(sig.PubKey.Address()).String() + nonce := sig.Sequence + + scoreKey := txMeta{nonce: nonce, sender: sender} + score, ok := mp.scores[scoreKey] + if !ok { + return mempool.ErrTxNotFound + } + tk := txMeta{nonce: nonce, priority: score.priority, sender: sender, weight: score.weight} + + senderTxs, ok := mp.senderIndices[sender] + if !ok { + return fmt.Errorf("sender %s not found", sender) + } + + mp.priorityIndex.Remove(tk) + senderTxs.Remove(tk) + delete(mp.scores, scoreKey) + mp.priorityCounts[score.priority]-- + + return nil +} diff --git a/go.mod b/go.mod index 652bcc23..f591737c 100644 --- a/go.mod +++ b/go.mod @@ -21,10 +21,10 @@ require ( github.com/google/gofuzz v1.2.0 github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/huandu/skiplist v1.2.0 github.com/ory/dockertest/v3 v3.10.0 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 - github.com/skip-mev/block-sdk v1.4.8 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 @@ -60,7 +60,6 @@ require ( github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/huandu/skiplist v1.2.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect diff --git a/go.sum b/go.sum index 467a6b96..7c181f9e 100644 --- a/go.sum +++ b/go.sum @@ -1134,8 +1134,6 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skip-mev/block-sdk v1.4.8 h1:cBvaXJlTTFyLySl5VPBKKUW4KCk+2Q4O7oV3sJczurk= -github.com/skip-mev/block-sdk v1.4.8/go.mod h1:8ehSzl4XYZgSn+XKOufrkeGVWEieIaHmeiWUtzrSnw0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= From ae694409b661f93985a1f9a870cf2d87a9eabf14 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sat, 16 Nov 2024 12:30:54 +0700 Subject: [PATCH 06/26] add more test --- app/app.go | 3 +- app/mempool/helper_test.go | 249 ++++++++ app/{ => mempool}/mempool_priority.go | 45 +- app/mempool/mempool_priority_test.go | 875 ++++++++++++++++++++++++++ 4 files changed, 1169 insertions(+), 3 deletions(-) create mode 100644 app/mempool/helper_test.go rename app/{ => mempool}/mempool_priority.go (93%) create mode 100644 app/mempool/mempool_priority_test.go diff --git a/app/app.go b/app/app.go index 6e9cda23..1ae9793b 100644 --- a/app/app.go +++ b/app/app.go @@ -3,6 +3,7 @@ package app import ( "encoding/json" "fmt" + mempool2 "github.com/classic-terra/core/v3/app/mempool" "io" stdlog "log" "net/http" @@ -149,7 +150,7 @@ func NewTerraApp( invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) { - mempool := NewPriorityMempool() + mempool := mempool2.NewPriorityMempool() handler := baseapp.NewDefaultProposalHandler(mempool, app) app.SetMempool(mempool) app.SetTxEncoder(txConfig.TxEncoder()) diff --git a/app/mempool/helper_test.go b/app/mempool/helper_test.go new file mode 100644 index 00000000..d3b25ca7 --- /dev/null +++ b/app/mempool/helper_test.go @@ -0,0 +1,249 @@ +package mempool_test + +import ( + "fmt" + "math/rand" + "testing" + + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/mempool" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/cosmos/cosmos-sdk/x/distribution" + "github.com/cosmos/cosmos-sdk/x/gov" +) + +// testPubKey is a dummy implementation of PubKey used for testing. +type testPubKey struct { + address sdk.AccAddress +} + +func (t testPubKey) Reset() { panic("not implemented") } + +func (t testPubKey) String() string { panic("not implemented") } + +func (t testPubKey) ProtoMessage() { panic("not implemented") } + +func (t testPubKey) Address() cryptotypes.Address { return t.address.Bytes() } + +func (t testPubKey) Bytes() []byte { panic("not implemented") } + +func (t testPubKey) VerifySignature(msg []byte, sig []byte) bool { panic("not implemented") } + +func (t testPubKey) Equals(key cryptotypes.PubKey) bool { panic("not implemented") } + +func (t testPubKey) Type() string { panic("not implemented") } + +// testTx is a dummy implementation of Tx used for testing. +type testTx struct { + id int + priority int64 + nonce uint64 + address sdk.AccAddress + // useful for debugging + strAddress string + msgs []sdk.Msg // New field for messages +} + +// Add these interface implementations to testTx if not already present +func (tx testTx) GetMsgs() []sdk.Msg { + return tx.msgs +} + +func (tx testTx) GetSigners() []sdk.AccAddress { panic("not implemented") } + +func (tx testTx) GetPubKeys() ([]cryptotypes.PubKey, error) { panic("not implemented") } + +func (tx testTx) GetSignaturesV2() (res []txsigning.SignatureV2, err error) { + res = append(res, txsigning.SignatureV2{ + PubKey: testPubKey{address: tx.address}, + Data: nil, + Sequence: tx.nonce, + }) + + return res, nil +} + +var ( + _ sdk.Tx = (*testTx)(nil) + _ signing.SigVerifiableTx = (*testTx)(nil) + _ cryptotypes.PubKey = (*testPubKey)(nil) +) + +func (tx testTx) ValidateBasic() error { return nil } + +func (tx testTx) String() string { + return fmt.Sprintf("tx a: %s, p: %d, n: %d", tx.address, tx.priority, tx.nonce) +} + +type sigErrTx struct { + getSigs func() ([]txsigning.SignatureV2, error) +} + +func (_ sigErrTx) Size() int64 { return 0 } + +func (_ sigErrTx) GetMsgs() []sdk.Msg { return nil } + +func (_ sigErrTx) ValidateBasic() error { return nil } + +func (_ sigErrTx) GetSigners() []sdk.AccAddress { return nil } + +func (_ sigErrTx) GetPubKeys() ([]cryptotypes.PubKey, error) { return nil, nil } + +func (t sigErrTx) GetSignaturesV2() ([]txsigning.SignatureV2, error) { return t.getSigs() } + +type txSpec struct { + i int + p int + n int + a sdk.AccAddress +} + +func (tx txSpec) String() string { + return fmt.Sprintf("[tx i: %d, a: %s, p: %d, n: %d]", tx.i, tx.a, tx.p, tx.n) +} + +func fetchTxs(iterator mempool.Iterator, maxBytes int64) []sdk.Tx { + const txSize = 1 + var ( + txs []sdk.Tx + numBytes int64 + ) + for iterator != nil { + if numBytes += txSize; numBytes > maxBytes { + break + } + txs = append(txs, iterator.Tx()) + i := iterator.Next() + iterator = i + } + return txs +} + +func (s *MempoolTestSuite) TestDefaultMempool() { + t := s.T() + ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 10) + txCount := 1000 + var txs []testTx + + for i := 0; i < txCount; i++ { + acc := accounts[i%len(accounts)] + tx := testTx{ + nonce: 0, + address: acc.Address, + priority: rand.Int63(), + } + txs = append(txs, tx) + } + + // empty mempool behavior + require.Equal(t, 0, s.mempool.CountTx()) + itr := s.mempool.Select(ctx, nil) + require.Nil(t, itr) + + // same sender-nonce just overwrites a tx + for _, tx := range txs { + ctx = ctx.WithPriority(tx.priority) + err := s.mempool.Insert(ctx, tx) + require.NoError(t, err) + } + require.Equal(t, len(accounts), s.mempool.CountTx()) + + // distinct sender-nonce should not overwrite a tx + s.resetMempool() + for i, tx := range txs { + tx.nonce = uint64(i) + err := s.mempool.Insert(ctx, tx) + require.NoError(t, err) + } + require.Equal(t, txCount, s.mempool.CountTx()) + + itr = s.mempool.Select(ctx, nil) + sel := fetchTxs(itr, 13) + require.Equal(t, 13, len(sel)) + + // a tx which does not implement SigVerifiableTx should not be inserted + tx := &sigErrTx{getSigs: func() ([]txsigning.SignatureV2, error) { + return nil, fmt.Errorf("error") + }} + require.Error(t, s.mempool.Insert(ctx, tx)) + require.Error(t, s.mempool.Remove(tx)) + tx.getSigs = func() ([]txsigning.SignatureV2, error) { + return nil, nil + } + require.Error(t, s.mempool.Insert(ctx, tx)) + require.Error(t, s.mempool.Remove(tx)) + + // removing a tx not in the mempool should error + s.resetMempool() + require.NoError(t, s.mempool.Insert(ctx, txs[0])) + require.ErrorIs(t, s.mempool.Remove(txs[1]), mempool.ErrTxNotFound) + + // inserting a tx with a different priority should overwrite the old tx + newPriorityTx := testTx{ + address: txs[0].address, + priority: txs[0].priority + 1, + nonce: txs[0].nonce, + } + require.NoError(t, s.mempool.Insert(ctx, newPriorityTx)) + require.Equal(t, 1, s.mempool.CountTx()) +} + +type MempoolTestSuite struct { + suite.Suite + numTxs int + numAccounts int + iterations int + mempool mempool.Mempool +} + +func (s *MempoolTestSuite) resetMempool() { + s.iterations = 0 + s.mempool = mempool.NewSenderNonceMempool() +} + +func (s *MempoolTestSuite) SetupTest() { + s.numTxs = 1000 + s.numAccounts = 100 + s.resetMempool() +} + +func TestMempoolTestSuite(t *testing.T) { + suite.Run(t, new(MempoolTestSuite)) +} + +func (s *MempoolTestSuite) TestSampleTxs() { + ctxt := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) + t := s.T() + s.resetMempool() + mp := s.mempool + delegatorTx, err := unmarshalTx(msgWithdrawDelegatorReward) + + require.NoError(t, err) + require.NoError(t, mp.Insert(ctxt, delegatorTx)) + require.Equal(t, 1, mp.CountTx()) + + proposalTx, err := unmarshalTx(msgMultiSigMsgSubmitProposal) + require.NoError(t, err) + require.NoError(t, mp.Insert(ctxt, proposalTx)) + require.Equal(t, 2, mp.CountTx()) +} + +func unmarshalTx(txBytes []byte) (sdk.Tx, error) { + cfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}, gov.AppModuleBasic{}) + return cfg.TxConfig.TxJSONDecoder()(txBytes) +} + +var ( + msgWithdrawDelegatorReward = []byte("{\"body\":{\"messages\":[{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1lzhlnpahvznwfv4jmay2tgaha5kmz5qxerarrl\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9u2lcnj0\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper196ax4vc0lwpxndu9dyhvca7jhxp70rmcvrj90c\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1k2d9ed9vgfuk2m58a2d80q9u6qljkh4vfaqjfq\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1vygmh344ldv9qefss9ek7ggsnxparljlmj56q5\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1ej2es5fjztqjcd4pwa0zyvaevtjd2y5wxxp9gd\"}],\"memo\":\"\",\"timeout_height\":\"0\",\"extension_options\":[],\"non_critical_extension_options\":[]},\"auth_info\":{\"signer_infos\":[{\"public_key\":{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AmbXAy10a0SerEefTYQzqyGQdX5kiTEWJZ1PZKX1oswX\"},\"mode_info\":{\"single\":{\"mode\":\"SIGN_MODE_LEGACY_AMINO_JSON\"}},\"sequence\":\"119\"}],\"fee\":{\"amount\":[{\"denom\":\"uatom\",\"amount\":\"15968\"}],\"gas_limit\":\"638717\",\"payer\":\"\",\"granter\":\"\"}},\"signatures\":[\"ji+inUo4xGlN9piRQLdLCeJWa7irwnqzrMVPcmzJyG5y6NPc+ZuNaIc3uvk5NLDJytRB8AHX0GqNETR\\/Q8fz4Q==\"]}") + msgMultiSigMsgSubmitProposal = []byte("{\"body\":{\"messages\":[{\"@type\":\"\\/cosmos.gov.v1beta1.MsgSubmitProposal\",\"content\":{\"@type\":\"\\/cosmos.distribution.v1beta1.CommunityPoolSpendProposal\",\"title\":\"ATOM \\ud83e\\udd1d Osmosis: Allocate Community Pool to ATOM Liquidity Incentives\",\"description\":\"ATOMs should be the base money of Cosmos, just like ETH is the base money of the entire Ethereum DeFi ecosystem. ATOM is currently well positioned to play this role among Cosmos assets because it has the highest market cap, most liquidity, largest brand, and many integrations with fiat onramps. ATOM is the gateway to Cosmos.\\n\\nIn the Cosmos Hub Port City vision, ATOMs are pitched as equity in the Cosmos Hub. However, this alone is insufficient to establish ATOM as the base currency of the Cosmos ecosystem as a whole. Instead, the ATOM community must work to actively promote the use of ATOMs throughout the Cosmos ecosystem, rather than passively relying on the Hub's reputation to create ATOM's value.\\n\\nIn order to cement the role of ATOMs in Cosmos DeFi, the Cosmos Hub should leverage its community pool to help align incentives with other protocols within the Cosmos ecosystem. We propose beginning this initiative by using the community pool ATOMs to incentivize deep ATOM base pair liquidity pools on the Osmosis Network.\\n\\nOsmosis is the first IBC-enabled DeFi application. Within its 3 weeks of existence, it has already 100x\\u2019d the number of IBC transactions ever created, demonstrating the power of IBC and the ability of the Cosmos SDK to bootstrap DeFi protocols with $100M+ TVL in a short period of time. Since its announcement Osmosis has helped bring renewed attention and interest to Cosmos from the crypto community at large and kickstarted the era of Cosmos DeFi.\\n\\nOsmosis has already helped in establishing ATOM as the Schelling Point of the Cosmos ecosystem. The genesis distribution of OSMO was primarily based on an airdrop to ATOM holders specifically, acknowledging the importance of ATOM to all future projects within the Cosmos. Furthermore, the Osmosis LP rewards currently incentivize ATOMs to be one of the main base pairs of the platform.\\n\\nOsmosis has the ability to incentivize AMM liquidity, a feature not available on any other IBC-enabled DEX. Osmosis already uses its own native OSMO liquidity rewards to incentivize ATOMs to be one of the main base pairs, leading to ~2.2 million ATOMs already providing liquidity on the platform.\\n\\nIn addition to these native OSMO LP Rewards, the platform also includes a feature called \\u201cexternal incentives\\u201d that allows anyone to permissionlessly add additional incentives in any token to the LPs of any AMM pools they wish. You can read more about this mechanism here: https:\\/\\/medium.com\\/osmosis\\/osmosis-liquidity-mining-101-2fa58d0e9d4d#f413 . Pools containing Cosmos assets such as AKT and XPRT are already planned to receive incentives from their respective community pools and\\/or foundations.\\n\\nWe propose the Cosmos Hub dedicate 100,000 ATOMs from its Community Pool to be allocated towards liquidity incentives on Osmosis over the next 3 months. This community fund proposal will transfer 100,000 ATOMs to a multisig group who will then allocate the ATOMs to bonded liquidity gauges on Osmosis on a biweekly basis, according to direction given by Cosmos Hub governance. For simplicity, we propose setting the liquidity incentives to initially point to Osmosis Pool #1, the ATOM\\/OSMO pool, which is the pool with by far the highest TVL and Volume. Cosmos Hub governance can then use Text Proposals to further direct the multisig members to reallocate incentives to new pools.\\n\\nThe multisig will consist of a 2\\/3 key holder set consisting of the following individuals whom have all agreed to participate in this process shall this proposal pass:\\n\\n- Zaki Manian\\n- Federico Kunze\\n- Marko Baricevic\\n\\nThis is one small step for the Hub, but one giant leap for ATOM-aligned.\\n\",\"recipient\":\"cosmos157n0d38vwn5dvh64rc39q3lyqez0a689g45rkc\",\"amount\":[{\"denom\":\"uatom\",\"amount\":\"100000000000\"}]},\"initial_deposit\":[{\"denom\":\"uatom\",\"amount\":\"64000000\"}],\"proposer\":\"cosmos1ey69r37gfxvxg62sh4r0ktpuc46pzjrmz29g45\"}],\"memo\":\"\",\"timeout_height\":\"0\",\"extension_options\":[],\"non_critical_extension_options\":[]},\"auth_info\":{\"signer_infos\":[{\"public_key\":{\"@type\":\"\\/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":2,\"public_keys\":[{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AldOvgv8dU9ZZzuhGydQD5FYreLhfhoBgrDKi8ZSTbCQ\"},{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AxUMR\\/GKoycWplR+2otzaQZ9zhHRQWJFt3h1bPg1ltha\"},{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AlI9yVj2Aejow6bYl2nTRylfU+9LjQLEl3keq0sERx9+\"},{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"A0UvHPcvCCaIoFY9Ygh0Pxq9SZTAWtduOyinit\\/8uo+Q\"},{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"As7R9fDUnwsUVLDr1cxspp+cY9UfXfUf7i9\\/w+N0EzKA\"}]},\"mode_info\":{\"multi\":{\"bitarray\":{\"extra_bits_stored\":5,\"elems\":\"SA==\"},\"mode_infos\":[{\"single\":{\"mode\":\"SIGN_MODE_LEGACY_AMINO_JSON\"}},{\"single\":{\"mode\":\"SIGN_MODE_LEGACY_AMINO_JSON\"}}]}},\"sequence\":\"102\"}],\"fee\":{\"amount\":[],\"gas_limit\":\"10000000\",\"payer\":\"\",\"granter\":\"\"}},\"signatures\":[\"CkB\\/KKWTFntEWbg1A0vu7DCHffJ4x4db\\/EI8dIVzRFFW7iuZBzvq+jYBtrcTlVpEVfmCY3ggIMnWfbMbb1egIlYbCkAmDf6Eaj1NbyXY8JZZtYAX3Qj81ZuKZUBeLW1ZvH1XqAg9sl\\/sqpLMnsJzKfmqEXvhoMwu1YxcSzrY6CJfuYL6\"]}") +) diff --git a/app/mempool_priority.go b/app/mempool/mempool_priority.go similarity index 93% rename from app/mempool_priority.go rename to app/mempool/mempool_priority.go index 5c43b67a..fdaafe98 100644 --- a/app/mempool_priority.go +++ b/app/mempool/mempool_priority.go @@ -1,4 +1,4 @@ -package app +package mempool import ( "context" @@ -215,8 +215,18 @@ func (mp *PriorityOracleMempool) Insert(ctx context.Context, tx sdk.Tx) error { sender := sdk.AccAddress(sig.PubKey.Address()).String() nonce := sig.Sequence - // Check if tx is Oracle tx + // Boost priority for Oracle transactions to ensure they come first isOracleTx := ante.IsOracleTx(tx.GetMsgs()) + if isOracleTx { + if len(tx.GetMsgs()) == 1 { + // Pure oracle tx gets highest priority + priority = math.MaxInt64/2 + priority + } else { + // Mixed tx (contains oracle + other msgs) gets second highest priority + priority = math.MaxInt64/4 + priority + } + } + fmt.Println("isOracleTx:", isOracleTx) key := txMeta{nonce: nonce, priority: priority, sender: sender, isOracleTx: isOracleTx} @@ -452,3 +462,34 @@ func (mp *PriorityOracleMempool) Remove(tx sdk.Tx) error { return nil } + +func IsEmpty(mempool mempool.Mempool) error { + mp := mempool.(*PriorityOracleMempool) + if mp.priorityIndex.Len() != 0 { + return fmt.Errorf("priorityIndex not empty") + } + + var countKeys []int64 + for k := range mp.priorityCounts { + countKeys = append(countKeys, k) + } + + for _, k := range countKeys { + if mp.priorityCounts[k] != 0 { + return fmt.Errorf("priorityCounts not zero at %v, got %v", k, mp.priorityCounts[k]) + } + } + + var senderKeys []string + for k := range mp.senderIndices { + senderKeys = append(senderKeys, k) + } + + for _, k := range senderKeys { + if mp.senderIndices[k].Len() != 0 { + return fmt.Errorf("senderIndex not empty for sender %v", k) + } + } + + return nil +} diff --git a/app/mempool/mempool_priority_test.go b/app/mempool/mempool_priority_test.go new file mode 100644 index 00000000..aa43b37b --- /dev/null +++ b/app/mempool/mempool_priority_test.go @@ -0,0 +1,875 @@ +package mempool_test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/classic-terra/core/v3/app/mempool" + "github.com/classic-terra/core/v3/custom/auth/ante" + oracleexported "github.com/classic-terra/core/v3/x/oracle/exported" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + + "github.com/cometbft/cometbft/libs/log" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/signing" +) + +func TestOutOfOrder(t *testing.T) { + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) + sa := accounts[0].Address + sb := accounts[1].Address + + outOfOrders := [][]testTx{ + { + {priority: 20, nonce: 1, address: sa}, + {priority: 21, nonce: 4, address: sa}, + {priority: 15, nonce: 1, address: sb}, + {priority: 8, nonce: 3, address: sa}, + {priority: 6, nonce: 2, address: sa}, + }, + { + {priority: 15, nonce: 1, address: sb}, + {priority: 20, nonce: 1, address: sa}, + {priority: 21, nonce: 4, address: sa}, + {priority: 8, nonce: 3, address: sa}, + {priority: 6, nonce: 2, address: sa}, + }, + } + + for _, outOfOrder := range outOfOrders { + var mtxs []sdk.Tx + for _, mtx := range outOfOrder { + mtxs = append(mtxs, mtx) + } + err := validateOrder(mtxs) + require.Error(t, err) + } + + seed := time.Now().UnixNano() + t.Logf("running with seed: %d", seed) + randomTxs := genRandomTxs(seed, 1000, 10) + var rmtxs []sdk.Tx + for _, rtx := range randomTxs { + rmtxs = append(rmtxs, rtx) + } + + require.Error(t, validateOrder(rmtxs)) +} + +func (s *MempoolTestSuite) TestPriorityNonceTxOrder() { + t := s.T() + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 5) + sa := accounts[0].Address + sb := accounts[1].Address + sc := accounts[2].Address + + tests := []struct { + txs []txSpec + order []int + fail bool + }{ + { + txs: []txSpec{ + {p: 21, n: 4, a: sa}, + {p: 8, n: 3, a: sa}, + {p: 6, n: 2, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 20, n: 1, a: sa}, + }, + order: []int{4, 3, 2, 1, 0}, + }, + { + txs: []txSpec{ + {p: 3, n: 0, a: sa}, + {p: 5, n: 1, a: sa}, + {p: 9, n: 2, a: sa}, + {p: 6, n: 0, a: sb}, + {p: 5, n: 1, a: sb}, + {p: 8, n: 2, a: sb}, + }, + order: []int{3, 4, 5, 0, 1, 2}, + }, + { + txs: []txSpec{ + {p: 21, n: 4, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 20, n: 1, a: sa}, + }, + order: []int{2, 0, 1}, + }, + { + txs: []txSpec{ + {p: 50, n: 3, a: sa}, + {p: 30, n: 2, a: sa}, + {p: 10, n: 1, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 21, n: 2, a: sb}, + }, + order: []int{3, 4, 2, 1, 0}, + }, + { + txs: []txSpec{ + {p: 50, n: 3, a: sa}, + {p: 10, n: 2, a: sa}, + {p: 99, n: 1, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 8, n: 2, a: sb}, + }, + order: []int{2, 3, 1, 0, 4}, + }, + { + txs: []txSpec{ + {p: 30, a: sa, n: 2}, + {p: 20, a: sb, n: 1}, + {p: 15, a: sa, n: 1}, + {p: 10, a: sa, n: 0}, + {p: 8, a: sb, n: 0}, + {p: 6, a: sa, n: 3}, + {p: 4, a: sb, n: 3}, + }, + order: []int{3, 2, 0, 4, 1, 5, 6}, + }, + { + txs: []txSpec{ + {p: 30, n: 2, a: sa}, + {p: 20, a: sb, n: 1}, + {p: 15, a: sa, n: 1}, + {p: 10, a: sa, n: 0}, + {p: 8, a: sb, n: 0}, + {p: 6, a: sa, n: 3}, + {p: 4, a: sb, n: 3}, + {p: 2, a: sc, n: 0}, + {p: 7, a: sc, n: 3}, + }, + order: []int{3, 2, 0, 4, 1, 5, 6, 7, 8}, + }, + { + txs: []txSpec{ + {p: 6, n: 1, a: sa}, + {p: 10, n: 2, a: sa}, + {p: 5, n: 1, a: sb}, + {p: 99, n: 2, a: sb}, + }, + order: []int{0, 1, 2, 3}, + }, + { + // If all txs have the same priority they will be ordered lexically sender + // address, and nonce with the sender. + txs: []txSpec{ + {p: 10, n: 7, a: sc}, + {p: 10, n: 8, a: sc}, + {p: 10, n: 9, a: sc}, + {p: 10, n: 1, a: sa}, + {p: 10, n: 2, a: sa}, + {p: 10, n: 3, a: sa}, + {p: 10, n: 4, a: sb}, + {p: 10, n: 5, a: sb}, + {p: 10, n: 6, a: sb}, + }, + order: []int{3, 4, 5, 6, 7, 8, 0, 1, 2}, + }, + /* + The next 4 tests are different permutations of the same set: + + {p: 5, n: 1, a: sa}, + {p: 10, n: 2, a: sa}, + {p: 20, n: 2, a: sb}, + {p: 5, n: 1, a: sb}, + {p: 99, n: 2, a: sc}, + {p: 5, n: 1, a: sc}, + + which exercises the actions required to resolve priority ties. + */ + { + txs: []txSpec{ + {p: 5, n: 1, a: sa}, + {p: 10, n: 2, a: sa}, + {p: 5, n: 1, a: sb}, + {p: 99, n: 2, a: sb}, + }, + order: []int{2, 3, 0, 1}, + }, + { + txs: []txSpec{ + {p: 5, n: 1, a: sa}, + {p: 10, n: 2, a: sa}, + {p: 20, n: 2, a: sb}, + {p: 5, n: 1, a: sb}, + {p: 99, n: 2, a: sc}, + {p: 5, n: 1, a: sc}, + }, + order: []int{5, 4, 3, 2, 0, 1}, + }, + { + txs: []txSpec{ + {p: 5, n: 1, a: sa}, + {p: 10, n: 2, a: sa}, + {p: 5, n: 1, a: sb}, + {p: 20, n: 2, a: sb}, + {p: 5, n: 1, a: sc}, + {p: 99, n: 2, a: sc}, + }, + order: []int{4, 5, 2, 3, 0, 1}, + }, + { + txs: []txSpec{ + {p: 5, n: 1, a: sa}, + {p: 10, n: 2, a: sa}, + {p: 5, n: 1, a: sc}, + {p: 20, n: 2, a: sc}, + {p: 5, n: 1, a: sb}, + {p: 99, n: 2, a: sb}, + }, + order: []int{4, 5, 2, 3, 0, 1}, + }, + } + for i, tt := range tests { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + pool := mempool.NewPriorityMempool() + + // create test txs and insert into mempool + for i, ts := range tt.txs { + tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} + c := ctx.WithPriority(tx.priority) + err := pool.Insert(c, tx) + require.NoError(t, err) + } + + orderedTxs := fetchTxs(pool.Select(ctx, nil), 1000) + + var txOrder []int + for _, tx := range orderedTxs { + txOrder = append(txOrder, tx.(testTx).id) + } + + require.Equal(t, tt.order, txOrder) + require.NoError(t, validateOrder(orderedTxs)) + + for _, tx := range orderedTxs { + require.NoError(t, pool.Remove(tx)) + } + + require.NoError(t, mempool.IsEmpty(pool)) + }) + } +} + +func (s *MempoolTestSuite) TestIterator() { + t := s.T() + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) + sa := accounts[0].Address + sb := accounts[1].Address + + tests := []struct { + txs []txSpec + fail bool + }{ + { + txs: []txSpec{ + {p: 20, n: 1, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 6, n: 2, a: sa}, + {p: 21, n: 4, a: sa}, + {p: 8, n: 2, a: sb}, + }, + }, + { + txs: []txSpec{ + {p: 20, n: 1, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 6, n: 2, a: sa}, + {p: 21, n: 4, a: sa}, + {p: math.MinInt64, n: 2, a: sb}, + }, + }, + } + + for i, tt := range tests { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + pool := mempool.DefaultPriorityMempool() + + // create test txs and insert into mempool + for i, ts := range tt.txs { + tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} + c := ctx.WithPriority(tx.priority) + err := pool.Insert(c, tx) + require.NoError(t, err) + } + + // iterate through txs + iterator := pool.Select(ctx, nil) + for iterator != nil { + tx := iterator.Tx().(testTx) + require.Equal(t, tt.txs[tx.id].p, int(tx.priority)) + require.Equal(t, tt.txs[tx.id].n, int(tx.nonce)) + require.Equal(t, tt.txs[tx.id].a, tx.address) + iterator = iterator.Next() + } + }) + } +} + +func (s *MempoolTestSuite) TestPriorityTies() { + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 3) + sa := accounts[0].Address + sb := accounts[1].Address + sc := accounts[2].Address + + txSet := []txSpec{ + {p: 5, n: 1, a: sc}, + {p: 99, n: 2, a: sc}, + {p: 5, n: 1, a: sb}, + {p: 20, n: 2, a: sb}, + {p: 5, n: 1, a: sa}, + {p: 10, n: 2, a: sa}, + } + + for i := 0; i < 100; i++ { + s.mempool = mempool.NewPriorityMempool() + var shuffled []txSpec + for _, t := range txSet { + tx := txSpec{ + p: t.p, + n: t.n, + a: t.a, + } + shuffled = append(shuffled, tx) + } + rand.Shuffle(len(shuffled), func(i, j int) { shuffled[i], shuffled[j] = shuffled[j], shuffled[i] }) + + for id, ts := range shuffled { + tx := testTx{priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a, id: id} + c := ctx.WithPriority(tx.priority) + err := s.mempool.Insert(c, tx) + s.NoError(err) + } + selected := fetchTxs(s.mempool.Select(ctx, nil), 1000) + var orderedTxs []txSpec + for _, tx := range selected { + ttx := tx.(testTx) + ts := txSpec{p: int(ttx.priority), n: int(ttx.nonce), a: ttx.address} + orderedTxs = append(orderedTxs, ts) + } + s.Equal(txSet, orderedTxs) + } +} + +func (s *MempoolTestSuite) TestRandomTxOrderManyTimes() { + for i := 0; i < 3; i++ { + s.Run("TestRandomGeneratedTxs", func() { + s.TestRandomGeneratedTxs() + }) + s.Run("TestRandomWalkTxs", func() { + s.TestRandomWalkTxs() + }) + } +} + +// validateOrder checks that the txs are ordered by priority and nonce +// in O(n^2) time by checking each tx against all the other txs +func validateOrder(mtxs []sdk.Tx) error { + iterations := 0 + var itxs []txSpec + for i, mtx := range mtxs { + iterations++ + tx := mtx.(testTx) + itxs = append(itxs, txSpec{p: int(tx.priority), n: int(tx.nonce), a: tx.address, i: i}) + } + + // Given 2 transactions t1 and t2, where t2.p > t1.p but t2.i < t1.i + // Then if t2.sender have the same sender then t2.nonce > t1.nonce + // or + // If t1 and t2 have different senders then there must be some t3 with + // t3.sender == t2.sender and t3.n < t2.n and t3.p <= t1.p + + for _, a := range itxs { + for _, b := range itxs { + iterations++ + // when b is before a + + // when a is before b + if a.i < b.i { + // same sender + if a.a.Equals(b.a) { + // same sender + if a.n == b.n { + return fmt.Errorf("same sender tx have the same nonce\n%v\n%v", a, b) + } + if a.n > b.n { + return fmt.Errorf("same sender tx have wrong nonce order\n%v\n%v", a, b) + } + } else if a.p < b.p { // different sender + // find a tx with same sender as b and lower nonce + found := false + for _, c := range itxs { + iterations++ + if c.a.Equals(b.a) && c.n < b.n && c.p <= a.p { + found = true + break + } + } + if !found { + return fmt.Errorf("different sender tx have wrong order\n%v\n%v", b, a) + } + + } + } + } + } + // fmt.Printf("validation in iterations: %d\n", iterations) + return nil +} + +func (s *MempoolTestSuite) TestRandomGeneratedTxs() { + s.iterations = 0 + s.mempool = mempool.NewPriorityMempool(mempool.PriorityOracleWithOnRead(func(tx sdk.Tx) { + s.iterations++ + })) + t := s.T() + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + seed := time.Now().UnixNano() + + t.Logf("running with seed: %d", seed) + generated := genRandomTxs(seed, s.numTxs, s.numAccounts) + mp := s.mempool + + for _, otx := range generated { + tx := testTx{id: otx.id, priority: otx.priority, nonce: otx.nonce, address: otx.address} + c := ctx.WithPriority(tx.priority) + err := mp.Insert(c, tx) + require.NoError(t, err) + } + + selected := fetchTxs(mp.Select(ctx, nil), 100000) + for i, tx := range selected { + ttx := tx.(testTx) + sigs, _ := tx.(signing.SigVerifiableTx).GetSignaturesV2() + ttx.strAddress = sigs[0].PubKey.Address().String() + selected[i] = ttx + } + require.Equal(t, len(generated), len(selected)) + + start := time.Now() + require.NoError(t, validateOrder(selected)) + duration := time.Since(start) + + fmt.Printf("seed: %d completed in %d iterations; validation in %dms\n", + seed, s.iterations, duration.Milliseconds()) +} + +func (s *MempoolTestSuite) TestRandomWalkTxs() { + s.iterations = 0 + s.mempool = mempool.NewPriorityMempool() + + t := s.T() + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + + seed := time.Now().UnixNano() + // interesting failing seeds: + // seed := int64(1663971399133628000) + // seed := int64(1663989445512438000) + // + t.Logf("running with seed: %d", seed) + + ordered, shuffled := genOrderedTxs(seed, s.numTxs, s.numAccounts) + mp := s.mempool + + for _, otx := range shuffled { + tx := testTx{id: otx.id, priority: otx.priority, nonce: otx.nonce, address: otx.address} + c := ctx.WithPriority(tx.priority) + err := mp.Insert(c, tx) + require.NoError(t, err) + } + + require.Equal(t, s.numTxs, mp.CountTx()) + + selected := fetchTxs(mp.Select(ctx, nil), math.MaxInt) + require.Equal(t, len(ordered), len(selected)) + var orderedStr, selectedStr string + + for i := 0; i < s.numTxs; i++ { + otx := ordered[i] + stx := selected[i].(testTx) + orderedStr = fmt.Sprintf("%s\n%s, %d, %d; %d", + orderedStr, otx.address, otx.priority, otx.nonce, otx.id) + selectedStr = fmt.Sprintf("%s\n%s, %d, %d; %d", + selectedStr, stx.address, stx.priority, stx.nonce, stx.id) + } + + require.Equal(t, s.numTxs, len(selected)) + + errMsg := fmt.Sprintf("Expected order: %v\nGot order: %v\nSeed: %v", orderedStr, selectedStr, seed) + + start := time.Now() + require.NoError(t, validateOrder(selected), errMsg) + duration := time.Since(start) + + t.Logf("seed: %d completed in %d iterations; validation in %dms\n", + seed, s.iterations, duration.Milliseconds()) +} + +func genRandomTxs(seed int64, countTx int, countAccount int) (res []testTx) { + maxPriority := 100 + r := rand.New(rand.NewSource(seed)) + accounts := simtypes.RandomAccounts(r, countAccount) + accountNonces := make(map[string]uint64) + for _, account := range accounts { + accountNonces[account.Address.String()] = 0 + } + + for i := 0; i < countTx; i++ { + addr := accounts[r.Intn(countAccount)].Address + priority := int64(r.Intn(maxPriority + 1)) + nonce := accountNonces[addr.String()] + accountNonces[addr.String()] = nonce + 1 + res = append(res, testTx{ + priority: priority, + nonce: nonce, + address: addr, + id: i, + }) + } + + return res +} + +// since there are multiple valid ordered graph traversals for a given set of txs strict +// validation against the ordered txs generated from this function is not possible as written +func genOrderedTxs(seed int64, maxTx int, numAcc int) (ordered []testTx, shuffled []testTx) { + r := rand.New(rand.NewSource(seed)) + accountNonces := make(map[string]uint64) + prange := 10 + randomAccounts := simtypes.RandomAccounts(r, numAcc) + for _, account := range randomAccounts { + accountNonces[account.Address.String()] = 0 + } + + getRandAccount := func(notAddress string) simtypes.Account { + for { + res := randomAccounts[r.Intn(len(randomAccounts))] + if res.Address.String() != notAddress { + return res + } + } + } + + txCursor := int64(10000) + ptx := testTx{address: getRandAccount("").Address, nonce: 0, priority: txCursor} + samepChain := make(map[string]bool) + for i := 0; i < maxTx; { + var tx testTx + move := r.Intn(5) + switch move { + case 0: + // same sender, less p + nonce := ptx.nonce + 1 + tx = testTx{nonce: nonce, address: ptx.address, priority: txCursor - int64(r.Intn(prange)+1)} + txCursor = tx.priority + case 1: + // same sender, same p + nonce := ptx.nonce + 1 + tx = testTx{nonce: nonce, address: ptx.address, priority: ptx.priority} + case 2: + // same sender, greater p + nonce := ptx.nonce + 1 + tx = testTx{nonce: nonce, address: ptx.address, priority: ptx.priority + int64(r.Intn(prange)+1)} + case 3: + // different sender, less p + sender := getRandAccount(ptx.address.String()).Address + nonce := accountNonces[sender.String()] + 1 + tx = testTx{nonce: nonce, address: sender, priority: txCursor - int64(r.Intn(prange)+1)} + txCursor = tx.priority + case 4: + // different sender, same p + sender := getRandAccount(ptx.address.String()).Address + // disallow generating cycles of same p txs. this is an invalid processing order according to our + // algorithm decision. + if _, ok := samepChain[sender.String()]; ok { + continue + } + nonce := accountNonces[sender.String()] + 1 + tx = testTx{nonce: nonce, address: sender, priority: txCursor} + samepChain[sender.String()] = true + } + tx.id = i + accountNonces[tx.address.String()] = tx.nonce + ordered = append(ordered, tx) + ptx = tx + i++ + if move != 4 { + samepChain = make(map[string]bool) + } + } + + for _, item := range ordered { + tx := testTx{ + priority: item.priority, + nonce: item.nonce, + address: item.address, + id: item.id, + } + shuffled = append(shuffled, tx) + } + rand.Shuffle(len(shuffled), func(i, j int) { shuffled[i], shuffled[j] = shuffled[j], shuffled[i] }) + return ordered, shuffled +} + +func TestTxOrderN(t *testing.T) { + numTx := 10 + + seed := time.Now().UnixNano() + ordered, shuffled := genOrderedTxs(seed, numTx, 3) + require.Equal(t, numTx, len(ordered)) + require.Equal(t, numTx, len(shuffled)) + + fmt.Println("ordered") + for _, tx := range ordered { + fmt.Printf("%s, %d, %d\n", tx.address, tx.priority, tx.nonce) + } + + fmt.Println("shuffled") + for _, tx := range shuffled { + fmt.Printf("%s, %d, %d\n", tx.address, tx.priority, tx.nonce) + } +} + +func TestPriorityNonceMempool_NextSenderTx(t *testing.T) { + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + accA := accounts[0].Address + accB := accounts[1].Address + + mp := mempool.NewPriorityMempool() + + txs := []testTx{ + {priority: 20, nonce: 1, address: accA}, + {priority: 15, nonce: 2, address: accA}, + {priority: 66, nonce: 3, address: accA}, + {priority: 20, nonce: 4, address: accA}, + {priority: 88, nonce: 5, address: accA}, + } + + for i, tx := range txs { + c := ctx.WithPriority(tx.priority) + require.NoError(t, mp.Insert(c, tx)) + require.Equal(t, i+1, mp.CountTx()) + } + + tx := mp.NextSenderTx(accB.String()) + require.Nil(t, tx) + + tx = mp.NextSenderTx(accA.String()) + require.NotNil(t, tx) + require.Equal(t, txs[0], tx) +} + +func TestNextSenderTx_TxLimit(t *testing.T) { + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + sa := accounts[0].Address + sb := accounts[1].Address + + txs := []testTx{ + {priority: 20, nonce: 1, address: sa}, + {priority: 21, nonce: 1, address: sb}, + {priority: 15, nonce: 2, address: sa}, + {priority: 88, nonce: 2, address: sb}, + {priority: 66, nonce: 3, address: sa}, + {priority: 15, nonce: 3, address: sb}, + {priority: 20, nonce: 4, address: sa}, + {priority: 21, nonce: 4, address: sb}, + {priority: 88, nonce: 5, address: sa}, + {priority: 66, nonce: 5, address: sb}, + } + + // unlimited + mp := mempool.NewPriorityMempool(mempool.PriorityOracleWithMaxTx(0)) + for i, tx := range txs { + c := ctx.WithPriority(tx.priority) + require.NoError(t, mp.Insert(c, tx)) + require.Equal(t, i+1, mp.CountTx()) + } + mp = mempool.NewPriorityMempool() + for i, tx := range txs { + c := ctx.WithPriority(tx.priority) + require.NoError(t, mp.Insert(c, tx)) + require.Equal(t, i+1, mp.CountTx()) + } + + // limit: 3 + mp = mempool.NewPriorityMempool(mempool.PriorityOracleWithMaxTx(3)) + for i, tx := range txs { + c := ctx.WithPriority(tx.priority) + err := mp.Insert(c, tx) + if i < 3 { + require.NoError(t, err) + require.Equal(t, i+1, mp.CountTx()) + } else { + require.ErrorIs(t, err, sdkmempool.ErrMempoolTxMaxCapacity) + require.Equal(t, 3, mp.CountTx()) + } + } + + // disabled + mp = mempool.NewPriorityMempool(mempool.PriorityOracleWithMaxTx(-1)) + for _, tx := range txs { + c := ctx.WithPriority(tx.priority) + err := mp.Insert(c, tx) + require.NoError(t, err) + require.Equal(t, 0, mp.CountTx()) + } +} + +func TestNextSenderTx_TxReplacement(t *testing.T) { + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + sa := accounts[0].Address + + txs := []testTx{ + {priority: 20, nonce: 1, address: sa}, + {priority: 15, nonce: 1, address: sa}, // priority is less than the first Tx, failed tx replacement when the option enabled. + {priority: 23, nonce: 1, address: sa}, // priority is not 20% more than the first Tx, failed tx replacement when the option enabled. + {priority: 24, nonce: 1, address: sa}, // priority is 20% more than the first Tx, the first tx will be replaced. + } + + // test Priority with default mempool + mp := mempool.NewPriorityMempool() + for _, tx := range txs { + c := ctx.WithPriority(tx.priority) + require.NoError(t, mp.Insert(c, tx)) + require.Equal(t, 1, mp.CountTx()) + + iter := mp.Select(ctx, nil) + require.Equal(t, tx, iter.Tx()) + } + + // test Priority with TxReplacement + // we set a TestTxReplacement rule which the priority of the new Tx must be 20% more than the priority of the old Tx + // otherwise, the Insert will return error + feeBump := 20 + mp = mempool.NewPriorityMempool(mempool.PriorityOracleWithTxReplacement(func(op, np int64, oTx, nTx sdk.Tx) bool { + threshold := int64(100 + feeBump) + return np >= op*threshold/100 + })) + + c := ctx.WithPriority(txs[0].priority) + require.NoError(t, mp.Insert(c, txs[0])) + require.Equal(t, 1, mp.CountTx()) + + c = ctx.WithPriority(txs[1].priority) + require.Error(t, mp.Insert(c, txs[1])) + require.Equal(t, 1, mp.CountTx()) + + c = ctx.WithPriority(txs[2].priority) + require.Error(t, mp.Insert(c, txs[2])) + require.Equal(t, 1, mp.CountTx()) + + c = ctx.WithPriority(txs[3].priority) + require.NoError(t, mp.Insert(c, txs[3])) + require.Equal(t, 1, mp.CountTx()) + + iter := mp.Select(ctx, nil) + require.Equal(t, txs[3], iter.Tx()) +} + +func TestPriorityMempool_OracleTx(t *testing.T) { + // Setup test context and accounts + ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) + sa, sb := accounts[0].Address, accounts[1].Address + + // Define test transaction types + txs := map[string]testTx{ + "regular": { + priority: 20, + nonce: 1, + address: sa, + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + id: 1, + }, + "oracle": { + priority: 15, + nonce: 1, + address: sb, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + id: 2, + }, + "mixed": { + priority: 25, + nonce: 2, + address: sa, + msgs: []sdk.Msg{ + &oracleexported.MsgAggregateExchangeRateVote{}, + &banktypes.MsgSend{}, + }, + id: 3, + }, + } + + tests := []struct { + name string + inputTxs []string // References to txs map + wantOrder []string // Expected order of transaction types + }{ + { + name: "oracle tx should be processed first", + inputTxs: []string{"regular", "oracle"}, + wantOrder: []string{"oracle", "regular"}, + }, + { + name: "mixed tx order with oracle tx", + inputTxs: []string{"regular", "oracle", "mixed"}, + wantOrder: []string{"oracle", "regular", "mixed"}, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Create mempool with oracle priority option + mp := mempool.NewPriorityMempool() + + // Insert test transactions + for _, txKey := range tt.inputTxs { + tx := txs[txKey] + c := ctx.WithPriority(tx.priority) + err := mp.Insert(c, tx) + require.NoError(t, err, "failed to insert transaction %s", txKey) + } + + // Verify count matches expected number of transactions + require.Equal(t, len(tt.inputTxs), mp.CountTx(), + "mempool count doesn't match number of inserted transactions") + + // Get actual transaction order from mempool + var gotOrder []string + selected := fetchTxs(mp.Select(ctx, nil), int64(len(tt.inputTxs))) + + for _, tx := range selected { + testTx := tx.(testTx) + // Determine tx type based on messages + if ante.IsOracleTx(testTx.msgs) && len(testTx.msgs) == 1 { + gotOrder = append(gotOrder, "oracle") + } else if ante.IsOracleTx(testTx.msgs) { + gotOrder = append(gotOrder, "mixed") + } else { + gotOrder = append(gotOrder, "regular") + } + } + + // Verify transaction order matches expected order + require.Equal(t, tt.wantOrder, gotOrder, + "transaction order doesn't match expected order") + }) + } +} From b9f8a0959441ceddc95a6e5041267a547a5099ef Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sat, 16 Nov 2024 12:50:24 +0700 Subject: [PATCH 07/26] update test --- app/mempool/mempool_priority.go | 14 +++++++------- app/mempool/mempool_priority_test.go | 13 +++++++++---- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/app/mempool/mempool_priority.go b/app/mempool/mempool_priority.go index fdaafe98..1996f209 100644 --- a/app/mempool/mempool_priority.go +++ b/app/mempool/mempool_priority.go @@ -86,13 +86,13 @@ func txMetaLess(a, b any) int { keyA := a.(txMeta) keyB := b.(txMeta) - // First compare if tx is Oracle tx - if keyA.isOracleTx != keyB.isOracleTx { - if keyA.isOracleTx { - return -1 // A is Oracle tx, should come first - } - return 1 // B is Oracle tx, should come first - } + //// First compare if tx is Oracle tx + //if keyA.isOracleTx != keyB.isOracleTx { + // if keyA.isOracleTx { + // return -1 // A is Oracle tx, should come first + // } + // return 1 // B is Oracle tx, should come first + //} res := skiplist.Int64.Compare(keyA.priority, keyB.priority) if res != 0 { diff --git a/app/mempool/mempool_priority_test.go b/app/mempool/mempool_priority_test.go index aa43b37b..fa4dd26a 100644 --- a/app/mempool/mempool_priority_test.go +++ b/app/mempool/mempool_priority_test.go @@ -830,7 +830,7 @@ func TestPriorityMempool_OracleTx(t *testing.T) { { name: "mixed tx order with oracle tx", inputTxs: []string{"regular", "oracle", "mixed"}, - wantOrder: []string{"oracle", "regular", "mixed"}, + wantOrder: []string{"oracle", "regular", "regular"}, }, } @@ -851,17 +851,22 @@ func TestPriorityMempool_OracleTx(t *testing.T) { require.Equal(t, len(tt.inputTxs), mp.CountTx(), "mempool count doesn't match number of inserted transactions") + t.Logf("Mempool count: %d", mp.CountTx()) // Add logging + // Get actual transaction order from mempool var gotOrder []string selected := fetchTxs(mp.Select(ctx, nil), int64(len(tt.inputTxs))) + t.Logf("Selected tx count: %d", len(selected)) // Add logging + for _, tx := range selected { + t.Logf("Selected tx: %+v", tx) // Add logging + } + for _, tx := range selected { testTx := tx.(testTx) // Determine tx type based on messages - if ante.IsOracleTx(testTx.msgs) && len(testTx.msgs) == 1 { + if ante.IsOracleTx(testTx.msgs) { gotOrder = append(gotOrder, "oracle") - } else if ante.IsOracleTx(testTx.msgs) { - gotOrder = append(gotOrder, "mixed") } else { gotOrder = append(gotOrder, "regular") } From 9fe05ffcaee14976557404945dc308afec7e3e88 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Mon, 18 Nov 2024 22:26:00 +0700 Subject: [PATCH 08/26] update test --- app/mempool/mempool_priority.go | 12 ++--- scripts/run-node.sh | 5 +- scripts/spam-tx.sh | 93 +++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 8 deletions(-) create mode 100755 scripts/spam-tx.sh diff --git a/app/mempool/mempool_priority.go b/app/mempool/mempool_priority.go index 1996f209..dc92e578 100644 --- a/app/mempool/mempool_priority.go +++ b/app/mempool/mempool_priority.go @@ -194,7 +194,6 @@ func (mp *PriorityOracleMempool) NextSenderTx(sender string) sdk.Tx { // Inserting a duplicate tx with a different priority overwrites the existing tx, // changing the total order of the mempool. func (mp *PriorityOracleMempool) Insert(ctx context.Context, tx sdk.Tx) error { - fmt.Printf("Insert the tx %v", tx.GetMsgs()) if mp.maxTx > 0 && mp.CountTx() >= mp.maxTx { return mempool.ErrMempoolTxMaxCapacity } else if mp.maxTx < 0 { @@ -219,15 +218,12 @@ func (mp *PriorityOracleMempool) Insert(ctx context.Context, tx sdk.Tx) error { isOracleTx := ante.IsOracleTx(tx.GetMsgs()) if isOracleTx { if len(tx.GetMsgs()) == 1 { - // Pure oracle tx gets highest priority - priority = math.MaxInt64/2 + priority - } else { - // Mixed tx (contains oracle + other msgs) gets second highest priority - priority = math.MaxInt64/4 + priority + priority += 1000000 + priority } } - fmt.Println("isOracleTx:", isOracleTx) + fmt.Printf("Insert the tx %d %v\n", priority, isOracleTx) + key := txMeta{nonce: nonce, priority: priority, sender: sender, isOracleTx: isOracleTx} senderIndex, ok := mp.senderIndices[sender] @@ -357,6 +353,7 @@ func (i *PriorityNonceIterator) Tx() sdk.Tx { // NOTE: It is not safe to use this iterator while removing transactions from // the underlying mempool. func (mp *PriorityOracleMempool) Select(_ context.Context, _ [][]byte) mempool.Iterator { + fmt.Println("Mempool priority Select") if mp.priorityIndex.Len() == 0 { return nil } @@ -431,6 +428,7 @@ func (mp *PriorityOracleMempool) CountTx() int { // Remove removes a transaction from the mempool in O(log n) time, returning an // error if unsuccessful. func (mp *PriorityOracleMempool) Remove(tx sdk.Tx) error { + fmt.Printf("Remove tx %v\n", tx.GetMsgs()) sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() if err != nil { return err diff --git a/scripts/run-node.sh b/scripts/run-node.sh index 42dbfa9b..7605e151 100755 --- a/scripts/run-node.sh +++ b/scripts/run-node.sh @@ -70,6 +70,8 @@ update_test_genesis '.app_state["staking"]["params"]["bond_denom"]="'$DENOM'"' $SED_BINARY -i '0,/enable = false/s//enable = true/' $HOME_DIR/config/app.toml $SED_BINARY -i 's/swagger = false/swagger = true/' $HOME_DIR/config/app.toml $SED_BINARY -i -e 's/enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' $HOME_DIR/config/app.toml +$SED_BINARY -i -e 's/timeout_commit = "5s"/timeout_commit = "2s"/g' $HOME_DIR/config/config.toml + # Sign genesis transaction @@ -81,4 +83,5 @@ $BINARY collect-gentxs --home $HOME_DIR # Run this to ensure everything worked and that the genesis file is setup correctly $BINARY validate-genesis --home $HOME_DIR -$BINARY start --home $HOME_DIR \ No newline at end of file +$BINARY start --home $HOME_DIR + diff --git a/scripts/spam-tx.sh b/scripts/spam-tx.sh new file mode 100755 index 00000000..5d0460a9 --- /dev/null +++ b/scripts/spam-tx.sh @@ -0,0 +1,93 @@ +#!/bin/bash +set -ue + +# Configuration +BINARY="./build/terrad" +CHAIN_ID="localterra" +HOME_DIR="mytestnet" +KEYRING="test" +FROM_KEY="test0" +TO_ADDRESS="terra1yy0tteehf5xyg64mj48mxuygxeyj73a9skue4v" +GAS="500000" +GAS_PRICES="1000uluna" + +# Get validator address +VALIDATOR_ADDR=$($BINARY q staking validators -o json | jq -r '.validators[0].operator_address') + +# Get initial sequence number +SEQUENCE=$($BINARY q account $($BINARY keys show $FROM_KEY --keyring-backend $KEYRING --home $HOME_DIR -a) -o json | jq -r '.sequence') +# Get account number +ACCOUNT_NUMBER=$($BINARY q account $($BINARY keys show $FROM_KEY --keyring-backend $KEYRING --home $HOME_DIR -a) -o json | jq -r '.account_number') + +for i in $(seq $SEQUENCE 2 100) +do + echo "sequence number is $i" + + # Generate send tx + $BINARY tx bank send $FROM_KEY $TO_ADDRESS 100000uluna \ + --from=$FROM_KEY \ + --gas=$GAS \ + --gas-prices=$GAS_PRICES \ + --chain-id=$CHAIN_ID \ + --home $HOME_DIR \ + --keyring-backend $KEYRING \ + --sequence=$((i)) \ + --generate-only > send_tx.json + + # Sign send tx + $BINARY tx sign send_tx.json \ + --from=$FROM_KEY \ + --chain-id=$CHAIN_ID \ + --home=$HOME_DIR \ + --keyring-backend=$KEYRING \ + --sequence=$((i)) \ + --offline \ + --account-number=$ACCOUNT_NUMBER > signed_send_tx.json + + # Broadcast send tx + $BINARY tx broadcast signed_send_tx.json > send_result.log + cat send_result.log + + # Check for sequence mismatch + if [ $(grep -c "mismatch" send_result.log) -eq 1 ] + then + echo "sequence number mismatch" + break + fi + + # Generate oracle prevote tx + $BINARY tx oracle aggregate-prevote 10 10ukrw $VALIDATOR_ADDR \ + --from=$FROM_KEY \ + --gas=$GAS \ + --gas-prices=$GAS_PRICES \ + --chain-id=$CHAIN_ID \ + --home $HOME_DIR \ + --keyring-backend $KEYRING \ + --sequence=$((i+1)) \ + --generate-only > oracle_tx.json + + # Sign oracle tx + $BINARY tx sign oracle_tx.json \ + --from=$FROM_KEY \ + --chain-id=$CHAIN_ID \ + --home=$HOME_DIR \ + --keyring-backend=$KEYRING \ + --sequence=$((i+1)) \ + --offline \ + --account-number=$ACCOUNT_NUMBER > signed_oracle_tx.json + + # Broadcast oracle tx + $BINARY tx broadcast signed_oracle_tx.json > oracle_result.log + cat oracle_result.log + + # Check for sequence mismatch + if [ $(grep -c "mismatch" oracle_result.log) -eq 1 ] + then + echo "sequence number mismatch" + break + fi + + sleep 3 +done + +echo "Script finished due to sequence mismatch" \ No newline at end of file From a2b2dbbc9c3ccc230c5265ff66b0f810885b49c5 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Mon, 18 Nov 2024 22:28:02 +0700 Subject: [PATCH 09/26] update test --- .gitignore | 2 ++ custom/auth/ante/fee_tax.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 4956a705..cc75835f 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,5 @@ dependency-graph.png *.aux *.out *.synctex.gz +cmd +/cmd/ diff --git a/custom/auth/ante/fee_tax.go b/custom/auth/ante/fee_tax.go index 8b26dbd3..f7394419 100644 --- a/custom/auth/ante/fee_tax.go +++ b/custom/auth/ante/fee_tax.go @@ -119,6 +119,9 @@ func computeTax(ctx sdk.Context, tk TreasuryKeeper, principal sdk.Coins, simulat } func IsOracleTx(msgs []sdk.Msg) bool { + if len(msgs) == 0 { + return false + } for _, msg := range msgs { switch msg.(type) { case *oracleexported.MsgAggregateExchangeRatePrevote: From 7c9655cd9c774716b974f3e5999f3fee9846fc18 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Fri, 22 Nov 2024 08:21:18 +0700 Subject: [PATCH 10/26] add fifo mempool by sender nonce --- app/app.go | 2 +- app/mempool/mempool_fifo.go | 349 +++++++++++ app/mempool/mempool_fifo_test.go | 306 ++++++++++ app/mempool/mempool_priority.go | 493 --------------- app/mempool/mempool_priority_test.go | 880 --------------------------- 5 files changed, 656 insertions(+), 1374 deletions(-) create mode 100644 app/mempool/mempool_fifo.go create mode 100644 app/mempool/mempool_fifo_test.go delete mode 100644 app/mempool/mempool_priority.go delete mode 100644 app/mempool/mempool_priority_test.go diff --git a/app/app.go b/app/app.go index 1ae9793b..4f22c816 100644 --- a/app/app.go +++ b/app/app.go @@ -150,7 +150,7 @@ func NewTerraApp( invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) { - mempool := mempool2.NewPriorityMempool() + mempool := mempool2.NewFifoSenderNonceMempool() handler := baseapp.NewDefaultProposalHandler(mempool, app) app.SetMempool(mempool) app.SetTxEncoder(txConfig.TxEncoder()) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go new file mode 100644 index 00000000..5f18f31a --- /dev/null +++ b/app/mempool/mempool_fifo.go @@ -0,0 +1,349 @@ +package mempool + +import ( + "context" + crand "crypto/rand" + "encoding/binary" + "fmt" + "math/rand" + + "github.com/classic-terra/core/v3/custom/auth/ante" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/types/mempool" + + "github.com/huandu/skiplist" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/signing" +) + +var cdc *codec.LegacyAmino + +var ( + _ mempool.Mempool = (*FifoSenderNonceMempool)(nil) + _ mempool.Iterator = (*senderNonceMempoolIterator)(nil) +) + +var DefaultMaxTx = 0 + +// Initialize the codec somewhere in your application setup +func init() { + cdc = codec.NewLegacyAmino() +} + +// FifoSenderNonceMempool is a mempool that prioritizes transactions within a sender +// by nonce, the lowest first, but selects a random sender on each iteration. +// The mempool is iterated by: +// +// 1) Maintaining a separate list of nonce ordered txs per sender +// 2) For each select iteration, randomly choose a sender and pick the next nonce ordered tx from their list +// 3) Repeat 1,2 until the mempool is exhausted +// +// Note that PrepareProposal could choose to stop iteration before reaching the +// end if maxBytes is reached. +type FifoSenderNonceMempool struct { + senders map[string]*skiplist.SkipList + rnd *rand.Rand + maxTx int + existingTx map[txKey]bool + sendersOracle map[string]*skiplist.SkipList +} + +type SenderNonceOptions func(mp *FifoSenderNonceMempool) + +type txKey struct { + address string + nonce uint64 +} + +// NewFifoSenderNonceMempool creates a new mempool that prioritizes transactions by +// nonce, the lowest first, picking a random sender on each iteration. +func NewFifoSenderNonceMempool(opts ...SenderNonceOptions) *FifoSenderNonceMempool { + senderMap := make(map[string]*skiplist.SkipList) + senderOracleMap := make(map[string]*skiplist.SkipList) + existingTx := make(map[txKey]bool) + snp := &FifoSenderNonceMempool{ + senders: senderMap, + maxTx: DefaultMaxTx, + existingTx: existingTx, + sendersOracle: senderOracleMap, + } + + var seed int64 + err := binary.Read(crand.Reader, binary.BigEndian, &seed) + if err != nil { + panic(err) + } + + snp.setSeed(seed) + + for _, opt := range opts { + opt(snp) + } + + return snp +} + +// SenderNonceSeedOpt Option To add a Seed for random type when calling the +// constructor NewSenderNonceMempool. +// +// Example: +// +// random_seed := int64(1000) +// NewSenderNonceMempool(SenderNonceSeedTxOpt(random_seed)) +func SenderNonceSeedOpt(seed int64) SenderNonceOptions { + return func(snp *FifoSenderNonceMempool) { + snp.setSeed(seed) + } +} + +// SenderNonceMaxTxOpt Option To set limit of max tx when calling the constructor +// NewSenderNonceMempool. +// +// Example: +// +// NewSenderNonceMempool(SenderNonceMaxTxOpt(100)) +func SenderNonceMaxTxOpt(maxTx int) SenderNonceOptions { + return func(snp *FifoSenderNonceMempool) { + snp.maxTx = maxTx + } +} + +func (snm *FifoSenderNonceMempool) setSeed(seed int64) { + s1 := rand.NewSource(seed) + snm.rnd = rand.New(s1) //#nosec // math/rand is seeded from crypto/rand by default +} + +// NextSenderTx returns the next transaction for a given sender by nonce order, +// i.e. the next valid transaction for the sender. If no such transaction exists, +// nil will be returned. +func (mp *FifoSenderNonceMempool) NextSenderTx(sender string) sdk.Tx { + senderIndex, ok := mp.senders[sender] + if !ok { + return nil + } + + cursor := senderIndex.Front() + return cursor.Value.(sdk.Tx) +} + +// Insert adds a tx to the mempool. It returns an error if the tx does not have +// at least one signer. Note, priority is ignored. +func (snm *FifoSenderNonceMempool) Insert(_ context.Context, tx sdk.Tx) error { + if snm.maxTx > 0 && snm.CountTx() >= snm.maxTx { + return mempool.ErrMempoolTxMaxCapacity + } + if snm.maxTx < 0 { + return nil + } + + sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + if err != nil { + return err + } + if len(sigs) == 0 { + return fmt.Errorf("tx must have at least one signer") + } + + sig := sigs[0] + sender := sdk.AccAddress(sig.PubKey.Address()).String() + nonce := sig.Sequence + + isOracleTx := ante.IsOracleTx(tx.GetMsgs()) + senderTxs, found := snm.senders[sender] + if !found && !isOracleTx { + senderTxs = skiplist.New(skiplist.Uint64) + snm.senders[sender] = senderTxs + } + if !isOracleTx { + senderTxs.Set(nonce, tx) + } + + senderOracleTxs, found := snm.sendersOracle[sender] + if !found && isOracleTx { + senderOracleTxs = skiplist.New(skiplist.Uint64) + snm.sendersOracle[sender] = senderOracleTxs + } + if isOracleTx { + senderOracleTxs.Set(nonce, tx) + } + + key := txKey{nonce: nonce, address: sender} + snm.existingTx[key] = true + + return nil +} + +func (snm *FifoSenderNonceMempool) handleOracleTransactions() mempool.Iterator { + var senders []string + senderCursors := make(map[string]*skiplist.Element) + + orderedSenders := skiplist.New(skiplist.String) + + // #nosec + for s := range snm.sendersOracle { + orderedSenders.Set(s, s) + } + + s := orderedSenders.Front() + for s != nil { + sender := s.Value.(string) + senders = append(senders, sender) + senderCursors[sender] = snm.sendersOracle[sender].Front() + s = s.Next() + } + + iter := &senderNonceMempoolIterator{ + senders: senders, + rnd: snm.rnd, + senderCursors: senderCursors, + } + + return iter.Next() +} + +// Select returns an iterator ordering transactions the mempool with the lowest +// nonce of a random selected sender first. +// +// NOTE: It is not safe to use this iterator while removing transactions from +// the underlying mempool. +func (snm *FifoSenderNonceMempool) Select(_ context.Context, _ [][]byte) mempool.Iterator { + var oracleSenders, regularSenders []string + senderCursors := make(map[string]*skiplist.Element) + + // Handle oracle transactions first + orderedSendersOracle := skiplist.New(skiplist.String) + for s := range snm.sendersOracle { + orderedSendersOracle.Set(s, s) + } + + s1 := orderedSendersOracle.Front() + for s1 != nil { + sender := s1.Value.(string) + oracleSenders = append(oracleSenders, sender) + // Add oracle prefix to distinguish from regular transactions + senderCursors[sender] = snm.sendersOracle[sender].Front() + s1 = s1.Next() + } + + // Handle regular transactions + orderedSenders := skiplist.New(skiplist.String) + for s := range snm.senders { + orderedSenders.Set(s, s) + } + + s := orderedSenders.Front() + for s != nil { + sender := s.Value.(string) + regularSenders = append(regularSenders, sender) + senderCursors[sender] = snm.senders[sender].Front() + s = s.Next() + } + + // Combine senders with oracle transactions first + senders := append(oracleSenders, regularSenders...) + + iter := &senderNonceMempoolIterator{ + senders: senders, + rnd: snm.rnd, + senderCursors: senderCursors, + } + return iter.Next() +} + +// CountTx returns the total count of txs in the mempool. +func (snm *FifoSenderNonceMempool) CountTx() int { + return len(snm.existingTx) +} + +// Remove removes a tx from the mempool. It returns an error if the tx does not +// have at least one signer or the tx was not found in the pool. +func (snm *FifoSenderNonceMempool) Remove(tx sdk.Tx) error { + sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + if err != nil { + return err + } + if len(sigs) == 0 { + return fmt.Errorf("tx must have at least one signer") + } + + sig := sigs[0] + sender := sdk.AccAddress(sig.PubKey.Address()).String() + nonce := sig.Sequence + + senderTxs, found1 := snm.senders[sender] + senderOracleTxs, found2 := snm.sendersOracle[sender] + if !found1 && !found2 { + return mempool.ErrTxNotFound + } + + if ante.IsOracleTx(tx.GetMsgs()) { + res := senderOracleTxs.Remove(nonce) + if res == nil { + return mempool.ErrTxNotFound + } + + if senderOracleTxs.Len() == 0 { + delete(snm.senders, sender) + } + } else { + res := senderTxs.Remove(nonce) + if res == nil { + return mempool.ErrTxNotFound + } + + if senderTxs.Len() == 0 { + delete(snm.senders, sender) + } + } + + key := txKey{nonce: nonce, address: sender} + delete(snm.existingTx, key) + + return nil +} + +type senderNonceMempoolIterator struct { + rnd *rand.Rand + currentTx *skiplist.Element + senders []string + senderCursors map[string]*skiplist.Element +} + +// Next returns the next iterator state which will contain a tx with the next +// smallest nonce of a randomly selected sender. +func (i *senderNonceMempoolIterator) Next() mempool.Iterator { + for len(i.senders) > 0 { + senderIndex := i.rnd.Intn(len(i.senders)) + sender := i.senders[senderIndex] + // Check if it's from oracle list + senderCursor, found := i.senderCursors[sender] + if !found { + i.senders = removeAtIndex(i.senders, senderIndex) + continue + } + + if nextCursor := senderCursor.Next(); nextCursor != nil { + i.senderCursors[sender] = nextCursor + } else { + i.senders = removeAtIndex(i.senders, senderIndex) + } + + return &senderNonceMempoolIterator{ + senders: i.senders, + currentTx: senderCursor, + rnd: i.rnd, + senderCursors: i.senderCursors, + } + } + + return nil +} + +func (i *senderNonceMempoolIterator) Tx() sdk.Tx { + return i.currentTx.Value.(sdk.Tx) +} + +func removeAtIndex[T any](slice []T, index int) []T { + return append(slice[:index], slice[index+1:]...) +} diff --git a/app/mempool/mempool_fifo_test.go b/app/mempool/mempool_fifo_test.go new file mode 100644 index 00000000..d62fe4af --- /dev/null +++ b/app/mempool/mempool_fifo_test.go @@ -0,0 +1,306 @@ +package mempool_test + +import ( + "fmt" + "github.com/classic-terra/core/v3/custom/auth/ante" + oracleexported "github.com/classic-terra/core/v3/x/oracle/exported" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "math/rand" + "testing" + + appmempool "github.com/classic-terra/core/v3/app/mempool" + "github.com/cosmos/cosmos-sdk/types/mempool" + + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" +) + +func (s *MempoolTestSuite) TestTxOrder() { + t := s.T() + ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 5) + sa := accounts[0].Address + sb := accounts[1].Address + + tests := []struct { + txs []txSpec + order []int + fail bool + seed int64 + }{ + { + txs: []txSpec{ + {p: 21, n: 4, a: sa}, + {p: 8, n: 3, a: sa}, + {p: 6, n: 2, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 20, n: 1, a: sa}, + }, + order: []int{3, 4, 2, 1, 0}, + // Index order base on seed 0: 0 0 1 0 1 0 0 + seed: 0, + }, + { + txs: []txSpec{ + {p: 3, n: 0, a: sa}, + {p: 5, n: 1, a: sa}, + {p: 9, n: 2, a: sa}, + {p: 6, n: 0, a: sb}, + {p: 5, n: 1, a: sb}, + {p: 8, n: 2, a: sb}, + }, + order: []int{3, 4, 0, 5, 1, 2}, + // Index order base on seed 0: 0 0 1 0 1 0 0 + seed: 0, + }, + { + txs: []txSpec{ + {p: 21, n: 4, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 20, n: 1, a: sa}, + }, + order: []int{1, 2, 0}, + // Index order base on seed 0: 0 0 1 0 1 0 0 + seed: 0, + }, + { + txs: []txSpec{ + {p: 50, n: 3, a: sa}, + {p: 30, n: 2, a: sa}, + {p: 10, n: 1, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 21, n: 2, a: sb}, + }, + order: []int{3, 4, 2, 1, 0}, + // Index order base on seed 0: 0 0 1 0 1 0 0 + seed: 0, + }, + { + txs: []txSpec{ + {p: 50, n: 3, a: sa}, + {p: 10, n: 2, a: sa}, + {p: 99, n: 1, a: sa}, + {p: 15, n: 1, a: sb}, + {p: 8, n: 2, a: sb}, + }, + order: []int{3, 4, 2, 1, 0}, + // Index order base on seed 0: 0 0 1 0 1 0 0 + seed: 0, + }, + { + txs: []txSpec{ + {p: 30, a: sa, n: 2}, + {p: 20, a: sb, n: 1}, + {p: 15, a: sa, n: 1}, + {p: 10, a: sa, n: 0}, + {p: 8, a: sb, n: 0}, + {p: 6, a: sa, n: 3}, + {p: 4, a: sb, n: 3}, + }, + order: []int{4, 1, 3, 6, 2, 0, 5}, + // Index order base on seed 0: 0 0 1 0 1 0 1 1 0 + seed: 0, + }, + { + txs: []txSpec{ + {p: 6, n: 1, a: sa}, + {p: 10, n: 2, a: sa}, + {p: 5, n: 1, a: sb}, + {p: 99, n: 2, a: sb}, + }, + order: []int{2, 3, 0, 1}, + // Index order base on seed 0: 0 0 1 0 1 0 1 1 0 + seed: 0, + }, + } + for i, tt := range tests { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + pool := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceSeedOpt(tt.seed)) + // create test txs and insert into mempool + for i, ts := range tt.txs { + tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} + c := ctx.WithPriority(tx.priority) + err := pool.Insert(c, tx) + require.NoError(t, err) + } + + itr := pool.Select(ctx, nil) + orderedTxs := fetchTxs(itr, 1000) + var txOrder []int + for _, tx := range orderedTxs { + txOrder = append(txOrder, tx.(testTx).id) + } + for _, tx := range orderedTxs { + require.NoError(t, pool.Remove(tx)) + } + require.Equal(t, tt.order, txOrder) + require.Equal(t, 0, pool.CountTx()) + }) + } +} + +func (s *MempoolTestSuite) TestTxOrderWithOracle() { + t := s.T() + ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 5) + sa := accounts[0].Address + sb := accounts[1].Address + + tests := []struct { + txs []testTx + order []int + fail bool + seed int64 + }{ + { + txs: []testTx{ + { + id: 1, + priority: 1, + nonce: 1, + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + address: sa, + }, + { + id: 2, + priority: 1, + nonce: 1, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + address: sb, + }, + }, + order: []int{2, 1}, + seed: 0, + }, + } + for i, tt := range tests { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + pool := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceSeedOpt(tt.seed)) + // create test txs and insert into mempool + for i, ts := range tt.txs { + tx := testTx{id: i, priority: ts.priority, nonce: uint64(ts.nonce), address: ts.address, msgs: ts.msgs} + c := ctx.WithPriority(tx.priority) + err := pool.Insert(c, tx) + require.NoError(t, err) + } + + itr := pool.Select(ctx, nil) + orderedTxs := fetchTxs(itr, 1000) + var txOrder []int + for _, tx := range orderedTxs { + txOrder = append(txOrder, tx.(testTx).id) + } + for _, tx := range orderedTxs { + require.NoError(t, pool.Remove(tx)) + } + require.Equal(t, tt.order, txOrder) + require.Equal(t, 0, pool.CountTx()) + }) + } +} + +func (s *MempoolTestSuite) TestOracleTx() { + t := s.T() + ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) + mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(3)) + + tx := testTx{ + id: 0, + nonce: 0, + address: accounts[0].Address, + priority: rand.Int63(), + } + tx1 := testTx{ + id: 1, + nonce: 1, + address: accounts[0].Address, + priority: rand.Int63(), + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + } + tx2 := testTx{ + id: 2, + nonce: 1, + address: accounts[1].Address, + priority: rand.Int63(), + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + } + + // empty mempool behavior + require.Equal(t, 0, s.mempool.CountTx()) + itr := mp.Select(ctx, nil) + require.Nil(t, itr) + err := mp.Insert(ctx, tx1) + require.NoError(t, err) + err = mp.Insert(ctx, tx) + require.NoError(t, err) + err = mp.Insert(ctx, tx2) + require.NoError(t, err) + + itr = mp.Select(ctx, nil) + orderedTxs := fetchTxs(itr, 1000) + require.Equal(t, 3, len(orderedTxs)) + + require.True(t, ante.IsOracleTx(orderedTxs[0].GetMsgs())) + require.True(t, ante.IsOracleTx(orderedTxs[1].GetMsgs())) + require.False(t, ante.IsOracleTx(orderedTxs[2].GetMsgs())) +} + +func (s *MempoolTestSuite) TestMaxTx() { + t := s.T() + ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) + mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(1)) + + tx := testTx{ + nonce: 0, + address: accounts[0].Address, + priority: rand.Int63(), + } + tx2 := testTx{ + nonce: 1, + address: accounts[0].Address, + priority: rand.Int63(), + } + + // empty mempool behavior + require.Equal(t, 0, s.mempool.CountTx()) + itr := mp.Select(ctx, nil) + require.Nil(t, itr) + + ctx = ctx.WithPriority(tx.priority) + err := mp.Insert(ctx, tx) + require.NoError(t, err) + ctx = ctx.WithPriority(tx.priority) + err = mp.Insert(ctx, tx2) + require.Equal(t, mempool.ErrMempoolTxMaxCapacity, err) +} + +func (s *MempoolTestSuite) TestTxNotFoundOnSender() { + t := s.T() + ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) + mp := appmempool.NewFifoSenderNonceMempool() + + txSender := testTx{ + nonce: 0, + address: accounts[0].Address, + priority: rand.Int63(), + } + + tx := testTx{ + nonce: 1, + address: accounts[0].Address, + priority: rand.Int63(), + } + + ctx = ctx.WithPriority(tx.priority) + err := mp.Insert(ctx, txSender) + require.NoError(t, err) + err = mp.Remove(tx) + require.Equal(t, mempool.ErrTxNotFound, err) +} diff --git a/app/mempool/mempool_priority.go b/app/mempool/mempool_priority.go deleted file mode 100644 index dc92e578..00000000 --- a/app/mempool/mempool_priority.go +++ /dev/null @@ -1,493 +0,0 @@ -package mempool - -import ( - "context" - "fmt" - "math" - - "github.com/classic-terra/core/v3/custom/auth/ante" - - "github.com/huandu/skiplist" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/mempool" - "github.com/cosmos/cosmos-sdk/x/auth/signing" -) - -var ( - _ mempool.Mempool = (*PriorityOracleMempool)(nil) - _ mempool.Iterator = (*PriorityNonceIterator)(nil) -) - -// PriorityOracleMempool is a mempool implementation that stores txs -// in a partially ordered set by 3 dimensions: oracle tx type, priority, and sender-nonce -// (sequence number). Oracle transactions always have higher priority than non-Oracle transactions. -// -// Internally it uses one priority ordered skip list and one skip list per sender ordered -// by sender-nonce (sequence number). The priority ordering first considers whether a transaction -// is an Oracle transaction (Oracle txs come first), then considers the priority value, and finally -// the sender-nonce. -// -// When there are multiple txs from the same sender, they are ordered as follows: -// 1. Oracle transactions come before non-Oracle transactions -// 2. Within each type (Oracle/non-Oracle), they are ordered by priority -// 3. For equal priorities, they are ordered by sender-nonce -// -// This ensures that: -// - Oracle transactions are always processed before non-Oracle transactions -// - Within each type, higher priority transactions are processed first -// - For transactions with equal priority, they maintain proper nonce ordering -type PriorityOracleMempool struct { - priorityIndex *skiplist.SkipList - priorityCounts map[int64]int - senderIndices map[string]*skiplist.SkipList - scores map[txMeta]txMeta - onRead func(tx sdk.Tx) - txReplacement func(op, np int64, oTx, nTx sdk.Tx) bool - maxTx int -} - -type PriorityNonceIterator struct { - senderCursors map[string]*skiplist.Element - nextPriority int64 - sender string - priorityNode *skiplist.Element - mempool *PriorityOracleMempool -} - -// txMeta stores transaction metadata used in indices -type txMeta struct { - // nonce is the sender's sequence number - nonce uint64 - // priority is the transaction's priority - priority int64 - // sender is the transaction's sender - sender string - // weight is the transaction's weight, used as a tiebreaker for transactions with the same priority - weight int64 - // senderElement is a pointer to the transaction's element in the sender index - senderElement *skiplist.Element - // isOracleTx is a flag to check if the transaction is an oracle tx - isOracleTx bool -} - -// txMetaLess is a comparator for txKeys that first compares if tx is Oracle tx, -// then priority, then weight, then sender, then nonce, uniquely identifying a transaction. -// -// The comparison order is: -// 1. Oracle tx status (Oracle txs come before non-Oracle txs) -// 2. Priority value (higher priority comes first) -// 3. Weight (used as tiebreaker for same priority) -// 4. Sender address (for deterministic ordering) -// 5. Nonce (sequence number for ordering txs from same sender) -// -// Note, txMetaLess is used as the comparator in the priority index. -func txMetaLess(a, b any) int { - keyA := a.(txMeta) - keyB := b.(txMeta) - - //// First compare if tx is Oracle tx - //if keyA.isOracleTx != keyB.isOracleTx { - // if keyA.isOracleTx { - // return -1 // A is Oracle tx, should come first - // } - // return 1 // B is Oracle tx, should come first - //} - - res := skiplist.Int64.Compare(keyA.priority, keyB.priority) - if res != 0 { - return res - } - - // Weight is used as a tiebreaker for transactions with the same priority. - // Weight is calculated in a single pass in .Select(...) and so will be 0 - // on .Insert(...). - res = skiplist.Int64.Compare(keyA.weight, keyB.weight) - if res != 0 { - return res - } - - // Because weight will be 0 on .Insert(...), we must also compare sender and - // nonce to resolve priority collisions. If we didn't then transactions with - // the same priority would overwrite each other in the priority index. - res = skiplist.String.Compare(keyA.sender, keyB.sender) - if res != 0 { - return res - } - - return skiplist.Uint64.Compare(keyA.nonce, keyB.nonce) -} - -type PriorityOracleMempoolOption func(*PriorityOracleMempool) - -// PriorityOracleWithOnRead sets a callback to be called when a tx is read from -// the mempool. -func PriorityOracleWithOnRead(onRead func(tx sdk.Tx)) PriorityOracleMempoolOption { - return func(mp *PriorityOracleMempool) { - mp.onRead = onRead - } -} - -// PriorityOracleWithTxReplacement sets a callback to be called when duplicated -// transaction nonce detected during mempool insert. An application can define a -// transaction replacement rule based on tx priority or certain transaction fields. -func PriorityOracleWithTxReplacement(txReplacementRule func(op, np int64, oTx, nTx sdk.Tx) bool) PriorityOracleMempoolOption { - return func(mp *PriorityOracleMempool) { - mp.txReplacement = txReplacementRule - } -} - -// PriorityOracleWithMaxTx sets the maximum number of transactions allowed in the -// mempool with the semantics: -// -// <0: disabled, `Insert` is a no-op -// 0: unlimited -// >0: maximum number of transactions allowed -func PriorityOracleWithMaxTx(maxTx int) PriorityOracleMempoolOption { - return func(mp *PriorityOracleMempool) { - mp.maxTx = maxTx - } -} - -// DefaultPriorityMempool returns a priorityNonceMempool with no options. -func DefaultPriorityMempool() mempool.Mempool { - return NewPriorityMempool() -} - -// NewPriorityMempool returns the SDK's default mempool implementation which -// returns txs in a partial order by 2 dimensions; priority, and sender-nonce. -func NewPriorityMempool(opts ...PriorityOracleMempoolOption) *PriorityOracleMempool { - mp := &PriorityOracleMempool{ - priorityIndex: skiplist.New(skiplist.LessThanFunc(txMetaLess)), - priorityCounts: make(map[int64]int), - senderIndices: make(map[string]*skiplist.SkipList), - scores: make(map[txMeta]txMeta), - } - - for _, opt := range opts { - opt(mp) - } - - return mp -} - -// NextSenderTx returns the next transaction for a given sender by nonce order, -// i.e. the next valid transaction for the sender. If no such transaction exists, -// nil will be returned. -func (mp *PriorityOracleMempool) NextSenderTx(sender string) sdk.Tx { - senderIndex, ok := mp.senderIndices[sender] - if !ok { - return nil - } - - cursor := senderIndex.Front() - return cursor.Value.(sdk.Tx) -} - -// Insert attempts to insert a Tx into the app-side mempool in O(log n) time, -// returning an error if unsuccessful. Sender and nonce are derived from the -// transaction's first signature. -// -// Transactions are unique by sender and nonce. Inserting a duplicate tx is an -// O(log n) no-op. -// -// Inserting a duplicate tx with a different priority overwrites the existing tx, -// changing the total order of the mempool. -func (mp *PriorityOracleMempool) Insert(ctx context.Context, tx sdk.Tx) error { - if mp.maxTx > 0 && mp.CountTx() >= mp.maxTx { - return mempool.ErrMempoolTxMaxCapacity - } else if mp.maxTx < 0 { - return nil - } - - sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() - if err != nil { - return err - } - if len(sigs) == 0 { - return fmt.Errorf("tx must have at least one signer") - } - - sdkContext := sdk.UnwrapSDKContext(ctx) - priority := sdkContext.Priority() - sig := sigs[0] - sender := sdk.AccAddress(sig.PubKey.Address()).String() - nonce := sig.Sequence - - // Boost priority for Oracle transactions to ensure they come first - isOracleTx := ante.IsOracleTx(tx.GetMsgs()) - if isOracleTx { - if len(tx.GetMsgs()) == 1 { - priority += 1000000 + priority - } - } - - fmt.Printf("Insert the tx %d %v\n", priority, isOracleTx) - - key := txMeta{nonce: nonce, priority: priority, sender: sender, isOracleTx: isOracleTx} - - senderIndex, ok := mp.senderIndices[sender] - if !ok { - senderIndex = skiplist.New(skiplist.LessThanFunc(func(a, b any) int { - return skiplist.Uint64.Compare(b.(txMeta).nonce, a.(txMeta).nonce) - })) - - // initialize sender index if not found - mp.senderIndices[sender] = senderIndex - } - - // Since mp.priorityIndex is scored by priority, then sender, then nonce, a - // changed priority will create a new key, so we must remove the old key and - // re-insert it to avoid having the same tx with different priorityIndex indexed - // twice in the mempool. - // - // This O(log n) remove operation is rare and only happens when a tx's priority - // changes. - sk := txMeta{nonce: nonce, sender: sender} - if oldScore, txExists := mp.scores[sk]; txExists { - if mp.txReplacement != nil && !mp.txReplacement(oldScore.priority, priority, senderIndex.Get(key).Value.(sdk.Tx), tx) { - return fmt.Errorf( - "tx doesn't fit the replacement rule, oldPriority: %v, newPriority: %v, oldTx: %v, newTx: %v", - oldScore.priority, - priority, - senderIndex.Get(key).Value.(sdk.Tx), - tx, - ) - } - - mp.priorityIndex.Remove(txMeta{ - nonce: nonce, - sender: sender, - priority: oldScore.priority, - weight: oldScore.weight, - }) - mp.priorityCounts[oldScore.priority]-- - } - - mp.priorityCounts[priority]++ - - // Since senderIndex is scored by nonce, a changed priority will overwrite the - // existing key. - key.senderElement = senderIndex.Set(key, tx) - - mp.scores[sk] = txMeta{priority: priority} - mp.priorityIndex.Set(key, tx) - - return nil -} - -func (i *PriorityNonceIterator) iteratePriority() mempool.Iterator { - // beginning of priority iteration - if i.priorityNode == nil { - i.priorityNode = i.mempool.priorityIndex.Front() - } else { - i.priorityNode = i.priorityNode.Next() - } - - // end of priority iteration - if i.priorityNode == nil { - return nil - } - - i.sender = i.priorityNode.Key().(txMeta).sender - - nextPriorityNode := i.priorityNode.Next() - if nextPriorityNode != nil { - i.nextPriority = nextPriorityNode.Key().(txMeta).priority - } else { - i.nextPriority = math.MinInt64 - } - - return i.Next() -} - -func (i *PriorityNonceIterator) Next() mempool.Iterator { - if i.priorityNode == nil { - return nil - } - - cursor, ok := i.senderCursors[i.sender] - if !ok { - // beginning of sender iteration - cursor = i.mempool.senderIndices[i.sender].Front() - } else { - // middle of sender iteration - cursor = cursor.Next() - } - - // end of sender iteration - if cursor == nil { - return i.iteratePriority() - } - - key := cursor.Key().(txMeta) - - // We've reached a transaction with a priority lower than the next highest - // priority in the pool. - if key.priority < i.nextPriority { - return i.iteratePriority() - } else if key.priority == i.nextPriority && i.priorityNode.Next() != nil { - // Weight is incorporated into the priority index key only (not sender index) - // so we must fetch it here from the scores map. - weight := i.mempool.scores[txMeta{nonce: key.nonce, sender: key.sender}].weight - if weight < i.priorityNode.Next().Key().(txMeta).weight { - return i.iteratePriority() - } - } - - i.senderCursors[i.sender] = cursor - return i -} - -func (i *PriorityNonceIterator) Tx() sdk.Tx { - return i.senderCursors[i.sender].Value.(sdk.Tx) -} - -// Select returns a set of transactions from the mempool, ordered by priority -// and sender-nonce in O(n) time. The passed in list of transactions are ignored. -// This is a readonly operation, the mempool is not modified. -// -// The maxBytes parameter defines the maximum number of bytes of transactions to -// return. -// -// NOTE: It is not safe to use this iterator while removing transactions from -// the underlying mempool. -func (mp *PriorityOracleMempool) Select(_ context.Context, _ [][]byte) mempool.Iterator { - fmt.Println("Mempool priority Select") - if mp.priorityIndex.Len() == 0 { - return nil - } - - mp.reorderPriorityTies() - - iterator := &PriorityNonceIterator{ - mempool: mp, - senderCursors: make(map[string]*skiplist.Element), - } - - return iterator.iteratePriority() -} - -type reorderKey struct { - deleteKey txMeta - insertKey txMeta - tx sdk.Tx -} - -func (mp *PriorityOracleMempool) reorderPriorityTies() { - node := mp.priorityIndex.Front() - - var reordering []reorderKey - for node != nil { - key := node.Key().(txMeta) - if mp.priorityCounts[key.priority] > 1 { - newKey := key - newKey.weight = senderWeight(key.senderElement) - reordering = append(reordering, reorderKey{deleteKey: key, insertKey: newKey, tx: node.Value.(sdk.Tx)}) - } - - node = node.Next() - } - - for _, k := range reordering { - mp.priorityIndex.Remove(k.deleteKey) - delete(mp.scores, txMeta{nonce: k.deleteKey.nonce, sender: k.deleteKey.sender}) - mp.priorityIndex.Set(k.insertKey, k.tx) - mp.scores[txMeta{nonce: k.insertKey.nonce, sender: k.insertKey.sender}] = k.insertKey - } -} - -// senderWeight returns the weight of a given tx (t) at senderCursor. Weight is -// defined as the first (nonce-wise) same sender tx with a priority not equal to -// t. It is used to resolve priority collisions, that is when 2 or more txs from -// different senders have the same priority. -func senderWeight(senderCursor *skiplist.Element) int64 { - if senderCursor == nil { - return 0 - } - - weight := senderCursor.Key().(txMeta).priority - senderCursor = senderCursor.Next() - for senderCursor != nil { - p := senderCursor.Key().(txMeta).priority - if p != weight { - weight = p - } - - senderCursor = senderCursor.Next() - } - - return weight -} - -// CountTx returns the number of transactions in the mempool. -func (mp *PriorityOracleMempool) CountTx() int { - return mp.priorityIndex.Len() -} - -// Remove removes a transaction from the mempool in O(log n) time, returning an -// error if unsuccessful. -func (mp *PriorityOracleMempool) Remove(tx sdk.Tx) error { - fmt.Printf("Remove tx %v\n", tx.GetMsgs()) - sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() - if err != nil { - return err - } - if len(sigs) == 0 { - return fmt.Errorf("attempted to remove a tx with no signatures") - } - - sig := sigs[0] - sender := sdk.AccAddress(sig.PubKey.Address()).String() - nonce := sig.Sequence - - scoreKey := txMeta{nonce: nonce, sender: sender} - score, ok := mp.scores[scoreKey] - if !ok { - return mempool.ErrTxNotFound - } - tk := txMeta{nonce: nonce, priority: score.priority, sender: sender, weight: score.weight} - - senderTxs, ok := mp.senderIndices[sender] - if !ok { - return fmt.Errorf("sender %s not found", sender) - } - - mp.priorityIndex.Remove(tk) - senderTxs.Remove(tk) - delete(mp.scores, scoreKey) - mp.priorityCounts[score.priority]-- - - return nil -} - -func IsEmpty(mempool mempool.Mempool) error { - mp := mempool.(*PriorityOracleMempool) - if mp.priorityIndex.Len() != 0 { - return fmt.Errorf("priorityIndex not empty") - } - - var countKeys []int64 - for k := range mp.priorityCounts { - countKeys = append(countKeys, k) - } - - for _, k := range countKeys { - if mp.priorityCounts[k] != 0 { - return fmt.Errorf("priorityCounts not zero at %v, got %v", k, mp.priorityCounts[k]) - } - } - - var senderKeys []string - for k := range mp.senderIndices { - senderKeys = append(senderKeys, k) - } - - for _, k := range senderKeys { - if mp.senderIndices[k].Len() != 0 { - return fmt.Errorf("senderIndex not empty for sender %v", k) - } - } - - return nil -} diff --git a/app/mempool/mempool_priority_test.go b/app/mempool/mempool_priority_test.go deleted file mode 100644 index fa4dd26a..00000000 --- a/app/mempool/mempool_priority_test.go +++ /dev/null @@ -1,880 +0,0 @@ -package mempool_test - -import ( - "fmt" - "math" - "math/rand" - "testing" - "time" - - "github.com/classic-terra/core/v3/app/mempool" - "github.com/classic-terra/core/v3/custom/auth/ante" - oracleexported "github.com/classic-terra/core/v3/x/oracle/exported" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - "github.com/cometbft/cometbft/libs/log" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/auth/signing" -) - -func TestOutOfOrder(t *testing.T) { - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) - sa := accounts[0].Address - sb := accounts[1].Address - - outOfOrders := [][]testTx{ - { - {priority: 20, nonce: 1, address: sa}, - {priority: 21, nonce: 4, address: sa}, - {priority: 15, nonce: 1, address: sb}, - {priority: 8, nonce: 3, address: sa}, - {priority: 6, nonce: 2, address: sa}, - }, - { - {priority: 15, nonce: 1, address: sb}, - {priority: 20, nonce: 1, address: sa}, - {priority: 21, nonce: 4, address: sa}, - {priority: 8, nonce: 3, address: sa}, - {priority: 6, nonce: 2, address: sa}, - }, - } - - for _, outOfOrder := range outOfOrders { - var mtxs []sdk.Tx - for _, mtx := range outOfOrder { - mtxs = append(mtxs, mtx) - } - err := validateOrder(mtxs) - require.Error(t, err) - } - - seed := time.Now().UnixNano() - t.Logf("running with seed: %d", seed) - randomTxs := genRandomTxs(seed, 1000, 10) - var rmtxs []sdk.Tx - for _, rtx := range randomTxs { - rmtxs = append(rmtxs, rtx) - } - - require.Error(t, validateOrder(rmtxs)) -} - -func (s *MempoolTestSuite) TestPriorityNonceTxOrder() { - t := s.T() - ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 5) - sa := accounts[0].Address - sb := accounts[1].Address - sc := accounts[2].Address - - tests := []struct { - txs []txSpec - order []int - fail bool - }{ - { - txs: []txSpec{ - {p: 21, n: 4, a: sa}, - {p: 8, n: 3, a: sa}, - {p: 6, n: 2, a: sa}, - {p: 15, n: 1, a: sb}, - {p: 20, n: 1, a: sa}, - }, - order: []int{4, 3, 2, 1, 0}, - }, - { - txs: []txSpec{ - {p: 3, n: 0, a: sa}, - {p: 5, n: 1, a: sa}, - {p: 9, n: 2, a: sa}, - {p: 6, n: 0, a: sb}, - {p: 5, n: 1, a: sb}, - {p: 8, n: 2, a: sb}, - }, - order: []int{3, 4, 5, 0, 1, 2}, - }, - { - txs: []txSpec{ - {p: 21, n: 4, a: sa}, - {p: 15, n: 1, a: sb}, - {p: 20, n: 1, a: sa}, - }, - order: []int{2, 0, 1}, - }, - { - txs: []txSpec{ - {p: 50, n: 3, a: sa}, - {p: 30, n: 2, a: sa}, - {p: 10, n: 1, a: sa}, - {p: 15, n: 1, a: sb}, - {p: 21, n: 2, a: sb}, - }, - order: []int{3, 4, 2, 1, 0}, - }, - { - txs: []txSpec{ - {p: 50, n: 3, a: sa}, - {p: 10, n: 2, a: sa}, - {p: 99, n: 1, a: sa}, - {p: 15, n: 1, a: sb}, - {p: 8, n: 2, a: sb}, - }, - order: []int{2, 3, 1, 0, 4}, - }, - { - txs: []txSpec{ - {p: 30, a: sa, n: 2}, - {p: 20, a: sb, n: 1}, - {p: 15, a: sa, n: 1}, - {p: 10, a: sa, n: 0}, - {p: 8, a: sb, n: 0}, - {p: 6, a: sa, n: 3}, - {p: 4, a: sb, n: 3}, - }, - order: []int{3, 2, 0, 4, 1, 5, 6}, - }, - { - txs: []txSpec{ - {p: 30, n: 2, a: sa}, - {p: 20, a: sb, n: 1}, - {p: 15, a: sa, n: 1}, - {p: 10, a: sa, n: 0}, - {p: 8, a: sb, n: 0}, - {p: 6, a: sa, n: 3}, - {p: 4, a: sb, n: 3}, - {p: 2, a: sc, n: 0}, - {p: 7, a: sc, n: 3}, - }, - order: []int{3, 2, 0, 4, 1, 5, 6, 7, 8}, - }, - { - txs: []txSpec{ - {p: 6, n: 1, a: sa}, - {p: 10, n: 2, a: sa}, - {p: 5, n: 1, a: sb}, - {p: 99, n: 2, a: sb}, - }, - order: []int{0, 1, 2, 3}, - }, - { - // If all txs have the same priority they will be ordered lexically sender - // address, and nonce with the sender. - txs: []txSpec{ - {p: 10, n: 7, a: sc}, - {p: 10, n: 8, a: sc}, - {p: 10, n: 9, a: sc}, - {p: 10, n: 1, a: sa}, - {p: 10, n: 2, a: sa}, - {p: 10, n: 3, a: sa}, - {p: 10, n: 4, a: sb}, - {p: 10, n: 5, a: sb}, - {p: 10, n: 6, a: sb}, - }, - order: []int{3, 4, 5, 6, 7, 8, 0, 1, 2}, - }, - /* - The next 4 tests are different permutations of the same set: - - {p: 5, n: 1, a: sa}, - {p: 10, n: 2, a: sa}, - {p: 20, n: 2, a: sb}, - {p: 5, n: 1, a: sb}, - {p: 99, n: 2, a: sc}, - {p: 5, n: 1, a: sc}, - - which exercises the actions required to resolve priority ties. - */ - { - txs: []txSpec{ - {p: 5, n: 1, a: sa}, - {p: 10, n: 2, a: sa}, - {p: 5, n: 1, a: sb}, - {p: 99, n: 2, a: sb}, - }, - order: []int{2, 3, 0, 1}, - }, - { - txs: []txSpec{ - {p: 5, n: 1, a: sa}, - {p: 10, n: 2, a: sa}, - {p: 20, n: 2, a: sb}, - {p: 5, n: 1, a: sb}, - {p: 99, n: 2, a: sc}, - {p: 5, n: 1, a: sc}, - }, - order: []int{5, 4, 3, 2, 0, 1}, - }, - { - txs: []txSpec{ - {p: 5, n: 1, a: sa}, - {p: 10, n: 2, a: sa}, - {p: 5, n: 1, a: sb}, - {p: 20, n: 2, a: sb}, - {p: 5, n: 1, a: sc}, - {p: 99, n: 2, a: sc}, - }, - order: []int{4, 5, 2, 3, 0, 1}, - }, - { - txs: []txSpec{ - {p: 5, n: 1, a: sa}, - {p: 10, n: 2, a: sa}, - {p: 5, n: 1, a: sc}, - {p: 20, n: 2, a: sc}, - {p: 5, n: 1, a: sb}, - {p: 99, n: 2, a: sb}, - }, - order: []int{4, 5, 2, 3, 0, 1}, - }, - } - for i, tt := range tests { - t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { - pool := mempool.NewPriorityMempool() - - // create test txs and insert into mempool - for i, ts := range tt.txs { - tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} - c := ctx.WithPriority(tx.priority) - err := pool.Insert(c, tx) - require.NoError(t, err) - } - - orderedTxs := fetchTxs(pool.Select(ctx, nil), 1000) - - var txOrder []int - for _, tx := range orderedTxs { - txOrder = append(txOrder, tx.(testTx).id) - } - - require.Equal(t, tt.order, txOrder) - require.NoError(t, validateOrder(orderedTxs)) - - for _, tx := range orderedTxs { - require.NoError(t, pool.Remove(tx)) - } - - require.NoError(t, mempool.IsEmpty(pool)) - }) - } -} - -func (s *MempoolTestSuite) TestIterator() { - t := s.T() - ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) - sa := accounts[0].Address - sb := accounts[1].Address - - tests := []struct { - txs []txSpec - fail bool - }{ - { - txs: []txSpec{ - {p: 20, n: 1, a: sa}, - {p: 15, n: 1, a: sb}, - {p: 6, n: 2, a: sa}, - {p: 21, n: 4, a: sa}, - {p: 8, n: 2, a: sb}, - }, - }, - { - txs: []txSpec{ - {p: 20, n: 1, a: sa}, - {p: 15, n: 1, a: sb}, - {p: 6, n: 2, a: sa}, - {p: 21, n: 4, a: sa}, - {p: math.MinInt64, n: 2, a: sb}, - }, - }, - } - - for i, tt := range tests { - t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { - pool := mempool.DefaultPriorityMempool() - - // create test txs and insert into mempool - for i, ts := range tt.txs { - tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} - c := ctx.WithPriority(tx.priority) - err := pool.Insert(c, tx) - require.NoError(t, err) - } - - // iterate through txs - iterator := pool.Select(ctx, nil) - for iterator != nil { - tx := iterator.Tx().(testTx) - require.Equal(t, tt.txs[tx.id].p, int(tx.priority)) - require.Equal(t, tt.txs[tx.id].n, int(tx.nonce)) - require.Equal(t, tt.txs[tx.id].a, tx.address) - iterator = iterator.Next() - } - }) - } -} - -func (s *MempoolTestSuite) TestPriorityTies() { - ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 3) - sa := accounts[0].Address - sb := accounts[1].Address - sc := accounts[2].Address - - txSet := []txSpec{ - {p: 5, n: 1, a: sc}, - {p: 99, n: 2, a: sc}, - {p: 5, n: 1, a: sb}, - {p: 20, n: 2, a: sb}, - {p: 5, n: 1, a: sa}, - {p: 10, n: 2, a: sa}, - } - - for i := 0; i < 100; i++ { - s.mempool = mempool.NewPriorityMempool() - var shuffled []txSpec - for _, t := range txSet { - tx := txSpec{ - p: t.p, - n: t.n, - a: t.a, - } - shuffled = append(shuffled, tx) - } - rand.Shuffle(len(shuffled), func(i, j int) { shuffled[i], shuffled[j] = shuffled[j], shuffled[i] }) - - for id, ts := range shuffled { - tx := testTx{priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a, id: id} - c := ctx.WithPriority(tx.priority) - err := s.mempool.Insert(c, tx) - s.NoError(err) - } - selected := fetchTxs(s.mempool.Select(ctx, nil), 1000) - var orderedTxs []txSpec - for _, tx := range selected { - ttx := tx.(testTx) - ts := txSpec{p: int(ttx.priority), n: int(ttx.nonce), a: ttx.address} - orderedTxs = append(orderedTxs, ts) - } - s.Equal(txSet, orderedTxs) - } -} - -func (s *MempoolTestSuite) TestRandomTxOrderManyTimes() { - for i := 0; i < 3; i++ { - s.Run("TestRandomGeneratedTxs", func() { - s.TestRandomGeneratedTxs() - }) - s.Run("TestRandomWalkTxs", func() { - s.TestRandomWalkTxs() - }) - } -} - -// validateOrder checks that the txs are ordered by priority and nonce -// in O(n^2) time by checking each tx against all the other txs -func validateOrder(mtxs []sdk.Tx) error { - iterations := 0 - var itxs []txSpec - for i, mtx := range mtxs { - iterations++ - tx := mtx.(testTx) - itxs = append(itxs, txSpec{p: int(tx.priority), n: int(tx.nonce), a: tx.address, i: i}) - } - - // Given 2 transactions t1 and t2, where t2.p > t1.p but t2.i < t1.i - // Then if t2.sender have the same sender then t2.nonce > t1.nonce - // or - // If t1 and t2 have different senders then there must be some t3 with - // t3.sender == t2.sender and t3.n < t2.n and t3.p <= t1.p - - for _, a := range itxs { - for _, b := range itxs { - iterations++ - // when b is before a - - // when a is before b - if a.i < b.i { - // same sender - if a.a.Equals(b.a) { - // same sender - if a.n == b.n { - return fmt.Errorf("same sender tx have the same nonce\n%v\n%v", a, b) - } - if a.n > b.n { - return fmt.Errorf("same sender tx have wrong nonce order\n%v\n%v", a, b) - } - } else if a.p < b.p { // different sender - // find a tx with same sender as b and lower nonce - found := false - for _, c := range itxs { - iterations++ - if c.a.Equals(b.a) && c.n < b.n && c.p <= a.p { - found = true - break - } - } - if !found { - return fmt.Errorf("different sender tx have wrong order\n%v\n%v", b, a) - } - - } - } - } - } - // fmt.Printf("validation in iterations: %d\n", iterations) - return nil -} - -func (s *MempoolTestSuite) TestRandomGeneratedTxs() { - s.iterations = 0 - s.mempool = mempool.NewPriorityMempool(mempool.PriorityOracleWithOnRead(func(tx sdk.Tx) { - s.iterations++ - })) - t := s.T() - ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) - seed := time.Now().UnixNano() - - t.Logf("running with seed: %d", seed) - generated := genRandomTxs(seed, s.numTxs, s.numAccounts) - mp := s.mempool - - for _, otx := range generated { - tx := testTx{id: otx.id, priority: otx.priority, nonce: otx.nonce, address: otx.address} - c := ctx.WithPriority(tx.priority) - err := mp.Insert(c, tx) - require.NoError(t, err) - } - - selected := fetchTxs(mp.Select(ctx, nil), 100000) - for i, tx := range selected { - ttx := tx.(testTx) - sigs, _ := tx.(signing.SigVerifiableTx).GetSignaturesV2() - ttx.strAddress = sigs[0].PubKey.Address().String() - selected[i] = ttx - } - require.Equal(t, len(generated), len(selected)) - - start := time.Now() - require.NoError(t, validateOrder(selected)) - duration := time.Since(start) - - fmt.Printf("seed: %d completed in %d iterations; validation in %dms\n", - seed, s.iterations, duration.Milliseconds()) -} - -func (s *MempoolTestSuite) TestRandomWalkTxs() { - s.iterations = 0 - s.mempool = mempool.NewPriorityMempool() - - t := s.T() - ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) - - seed := time.Now().UnixNano() - // interesting failing seeds: - // seed := int64(1663971399133628000) - // seed := int64(1663989445512438000) - // - t.Logf("running with seed: %d", seed) - - ordered, shuffled := genOrderedTxs(seed, s.numTxs, s.numAccounts) - mp := s.mempool - - for _, otx := range shuffled { - tx := testTx{id: otx.id, priority: otx.priority, nonce: otx.nonce, address: otx.address} - c := ctx.WithPriority(tx.priority) - err := mp.Insert(c, tx) - require.NoError(t, err) - } - - require.Equal(t, s.numTxs, mp.CountTx()) - - selected := fetchTxs(mp.Select(ctx, nil), math.MaxInt) - require.Equal(t, len(ordered), len(selected)) - var orderedStr, selectedStr string - - for i := 0; i < s.numTxs; i++ { - otx := ordered[i] - stx := selected[i].(testTx) - orderedStr = fmt.Sprintf("%s\n%s, %d, %d; %d", - orderedStr, otx.address, otx.priority, otx.nonce, otx.id) - selectedStr = fmt.Sprintf("%s\n%s, %d, %d; %d", - selectedStr, stx.address, stx.priority, stx.nonce, stx.id) - } - - require.Equal(t, s.numTxs, len(selected)) - - errMsg := fmt.Sprintf("Expected order: %v\nGot order: %v\nSeed: %v", orderedStr, selectedStr, seed) - - start := time.Now() - require.NoError(t, validateOrder(selected), errMsg) - duration := time.Since(start) - - t.Logf("seed: %d completed in %d iterations; validation in %dms\n", - seed, s.iterations, duration.Milliseconds()) -} - -func genRandomTxs(seed int64, countTx int, countAccount int) (res []testTx) { - maxPriority := 100 - r := rand.New(rand.NewSource(seed)) - accounts := simtypes.RandomAccounts(r, countAccount) - accountNonces := make(map[string]uint64) - for _, account := range accounts { - accountNonces[account.Address.String()] = 0 - } - - for i := 0; i < countTx; i++ { - addr := accounts[r.Intn(countAccount)].Address - priority := int64(r.Intn(maxPriority + 1)) - nonce := accountNonces[addr.String()] - accountNonces[addr.String()] = nonce + 1 - res = append(res, testTx{ - priority: priority, - nonce: nonce, - address: addr, - id: i, - }) - } - - return res -} - -// since there are multiple valid ordered graph traversals for a given set of txs strict -// validation against the ordered txs generated from this function is not possible as written -func genOrderedTxs(seed int64, maxTx int, numAcc int) (ordered []testTx, shuffled []testTx) { - r := rand.New(rand.NewSource(seed)) - accountNonces := make(map[string]uint64) - prange := 10 - randomAccounts := simtypes.RandomAccounts(r, numAcc) - for _, account := range randomAccounts { - accountNonces[account.Address.String()] = 0 - } - - getRandAccount := func(notAddress string) simtypes.Account { - for { - res := randomAccounts[r.Intn(len(randomAccounts))] - if res.Address.String() != notAddress { - return res - } - } - } - - txCursor := int64(10000) - ptx := testTx{address: getRandAccount("").Address, nonce: 0, priority: txCursor} - samepChain := make(map[string]bool) - for i := 0; i < maxTx; { - var tx testTx - move := r.Intn(5) - switch move { - case 0: - // same sender, less p - nonce := ptx.nonce + 1 - tx = testTx{nonce: nonce, address: ptx.address, priority: txCursor - int64(r.Intn(prange)+1)} - txCursor = tx.priority - case 1: - // same sender, same p - nonce := ptx.nonce + 1 - tx = testTx{nonce: nonce, address: ptx.address, priority: ptx.priority} - case 2: - // same sender, greater p - nonce := ptx.nonce + 1 - tx = testTx{nonce: nonce, address: ptx.address, priority: ptx.priority + int64(r.Intn(prange)+1)} - case 3: - // different sender, less p - sender := getRandAccount(ptx.address.String()).Address - nonce := accountNonces[sender.String()] + 1 - tx = testTx{nonce: nonce, address: sender, priority: txCursor - int64(r.Intn(prange)+1)} - txCursor = tx.priority - case 4: - // different sender, same p - sender := getRandAccount(ptx.address.String()).Address - // disallow generating cycles of same p txs. this is an invalid processing order according to our - // algorithm decision. - if _, ok := samepChain[sender.String()]; ok { - continue - } - nonce := accountNonces[sender.String()] + 1 - tx = testTx{nonce: nonce, address: sender, priority: txCursor} - samepChain[sender.String()] = true - } - tx.id = i - accountNonces[tx.address.String()] = tx.nonce - ordered = append(ordered, tx) - ptx = tx - i++ - if move != 4 { - samepChain = make(map[string]bool) - } - } - - for _, item := range ordered { - tx := testTx{ - priority: item.priority, - nonce: item.nonce, - address: item.address, - id: item.id, - } - shuffled = append(shuffled, tx) - } - rand.Shuffle(len(shuffled), func(i, j int) { shuffled[i], shuffled[j] = shuffled[j], shuffled[i] }) - return ordered, shuffled -} - -func TestTxOrderN(t *testing.T) { - numTx := 10 - - seed := time.Now().UnixNano() - ordered, shuffled := genOrderedTxs(seed, numTx, 3) - require.Equal(t, numTx, len(ordered)) - require.Equal(t, numTx, len(shuffled)) - - fmt.Println("ordered") - for _, tx := range ordered { - fmt.Printf("%s, %d, %d\n", tx.address, tx.priority, tx.nonce) - } - - fmt.Println("shuffled") - for _, tx := range shuffled { - fmt.Printf("%s, %d, %d\n", tx.address, tx.priority, tx.nonce) - } -} - -func TestPriorityNonceMempool_NextSenderTx(t *testing.T) { - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) - ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) - accA := accounts[0].Address - accB := accounts[1].Address - - mp := mempool.NewPriorityMempool() - - txs := []testTx{ - {priority: 20, nonce: 1, address: accA}, - {priority: 15, nonce: 2, address: accA}, - {priority: 66, nonce: 3, address: accA}, - {priority: 20, nonce: 4, address: accA}, - {priority: 88, nonce: 5, address: accA}, - } - - for i, tx := range txs { - c := ctx.WithPriority(tx.priority) - require.NoError(t, mp.Insert(c, tx)) - require.Equal(t, i+1, mp.CountTx()) - } - - tx := mp.NextSenderTx(accB.String()) - require.Nil(t, tx) - - tx = mp.NextSenderTx(accA.String()) - require.NotNil(t, tx) - require.Equal(t, txs[0], tx) -} - -func TestNextSenderTx_TxLimit(t *testing.T) { - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) - ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) - sa := accounts[0].Address - sb := accounts[1].Address - - txs := []testTx{ - {priority: 20, nonce: 1, address: sa}, - {priority: 21, nonce: 1, address: sb}, - {priority: 15, nonce: 2, address: sa}, - {priority: 88, nonce: 2, address: sb}, - {priority: 66, nonce: 3, address: sa}, - {priority: 15, nonce: 3, address: sb}, - {priority: 20, nonce: 4, address: sa}, - {priority: 21, nonce: 4, address: sb}, - {priority: 88, nonce: 5, address: sa}, - {priority: 66, nonce: 5, address: sb}, - } - - // unlimited - mp := mempool.NewPriorityMempool(mempool.PriorityOracleWithMaxTx(0)) - for i, tx := range txs { - c := ctx.WithPriority(tx.priority) - require.NoError(t, mp.Insert(c, tx)) - require.Equal(t, i+1, mp.CountTx()) - } - mp = mempool.NewPriorityMempool() - for i, tx := range txs { - c := ctx.WithPriority(tx.priority) - require.NoError(t, mp.Insert(c, tx)) - require.Equal(t, i+1, mp.CountTx()) - } - - // limit: 3 - mp = mempool.NewPriorityMempool(mempool.PriorityOracleWithMaxTx(3)) - for i, tx := range txs { - c := ctx.WithPriority(tx.priority) - err := mp.Insert(c, tx) - if i < 3 { - require.NoError(t, err) - require.Equal(t, i+1, mp.CountTx()) - } else { - require.ErrorIs(t, err, sdkmempool.ErrMempoolTxMaxCapacity) - require.Equal(t, 3, mp.CountTx()) - } - } - - // disabled - mp = mempool.NewPriorityMempool(mempool.PriorityOracleWithMaxTx(-1)) - for _, tx := range txs { - c := ctx.WithPriority(tx.priority) - err := mp.Insert(c, tx) - require.NoError(t, err) - require.Equal(t, 0, mp.CountTx()) - } -} - -func TestNextSenderTx_TxReplacement(t *testing.T) { - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) - ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) - sa := accounts[0].Address - - txs := []testTx{ - {priority: 20, nonce: 1, address: sa}, - {priority: 15, nonce: 1, address: sa}, // priority is less than the first Tx, failed tx replacement when the option enabled. - {priority: 23, nonce: 1, address: sa}, // priority is not 20% more than the first Tx, failed tx replacement when the option enabled. - {priority: 24, nonce: 1, address: sa}, // priority is 20% more than the first Tx, the first tx will be replaced. - } - - // test Priority with default mempool - mp := mempool.NewPriorityMempool() - for _, tx := range txs { - c := ctx.WithPriority(tx.priority) - require.NoError(t, mp.Insert(c, tx)) - require.Equal(t, 1, mp.CountTx()) - - iter := mp.Select(ctx, nil) - require.Equal(t, tx, iter.Tx()) - } - - // test Priority with TxReplacement - // we set a TestTxReplacement rule which the priority of the new Tx must be 20% more than the priority of the old Tx - // otherwise, the Insert will return error - feeBump := 20 - mp = mempool.NewPriorityMempool(mempool.PriorityOracleWithTxReplacement(func(op, np int64, oTx, nTx sdk.Tx) bool { - threshold := int64(100 + feeBump) - return np >= op*threshold/100 - })) - - c := ctx.WithPriority(txs[0].priority) - require.NoError(t, mp.Insert(c, txs[0])) - require.Equal(t, 1, mp.CountTx()) - - c = ctx.WithPriority(txs[1].priority) - require.Error(t, mp.Insert(c, txs[1])) - require.Equal(t, 1, mp.CountTx()) - - c = ctx.WithPriority(txs[2].priority) - require.Error(t, mp.Insert(c, txs[2])) - require.Equal(t, 1, mp.CountTx()) - - c = ctx.WithPriority(txs[3].priority) - require.NoError(t, mp.Insert(c, txs[3])) - require.Equal(t, 1, mp.CountTx()) - - iter := mp.Select(ctx, nil) - require.Equal(t, txs[3], iter.Tx()) -} - -func TestPriorityMempool_OracleTx(t *testing.T) { - // Setup test context and accounts - ctx := sdk.NewContext(nil, cmtproto.Header{}, false, log.NewNopLogger()) - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) - sa, sb := accounts[0].Address, accounts[1].Address - - // Define test transaction types - txs := map[string]testTx{ - "regular": { - priority: 20, - nonce: 1, - address: sa, - msgs: []sdk.Msg{&banktypes.MsgSend{}}, - id: 1, - }, - "oracle": { - priority: 15, - nonce: 1, - address: sb, - msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, - id: 2, - }, - "mixed": { - priority: 25, - nonce: 2, - address: sa, - msgs: []sdk.Msg{ - &oracleexported.MsgAggregateExchangeRateVote{}, - &banktypes.MsgSend{}, - }, - id: 3, - }, - } - - tests := []struct { - name string - inputTxs []string // References to txs map - wantOrder []string // Expected order of transaction types - }{ - { - name: "oracle tx should be processed first", - inputTxs: []string{"regular", "oracle"}, - wantOrder: []string{"oracle", "regular"}, - }, - { - name: "mixed tx order with oracle tx", - inputTxs: []string{"regular", "oracle", "mixed"}, - wantOrder: []string{"oracle", "regular", "regular"}, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - // Create mempool with oracle priority option - mp := mempool.NewPriorityMempool() - - // Insert test transactions - for _, txKey := range tt.inputTxs { - tx := txs[txKey] - c := ctx.WithPriority(tx.priority) - err := mp.Insert(c, tx) - require.NoError(t, err, "failed to insert transaction %s", txKey) - } - - // Verify count matches expected number of transactions - require.Equal(t, len(tt.inputTxs), mp.CountTx(), - "mempool count doesn't match number of inserted transactions") - - t.Logf("Mempool count: %d", mp.CountTx()) // Add logging - - // Get actual transaction order from mempool - var gotOrder []string - selected := fetchTxs(mp.Select(ctx, nil), int64(len(tt.inputTxs))) - - t.Logf("Selected tx count: %d", len(selected)) // Add logging - for _, tx := range selected { - t.Logf("Selected tx: %+v", tx) // Add logging - } - - for _, tx := range selected { - testTx := tx.(testTx) - // Determine tx type based on messages - if ante.IsOracleTx(testTx.msgs) { - gotOrder = append(gotOrder, "oracle") - } else { - gotOrder = append(gotOrder, "regular") - } - } - - // Verify transaction order matches expected order - require.Equal(t, tt.wantOrder, gotOrder, - "transaction order doesn't match expected order") - }) - } -} From 348b0b146e36f16bef20080ce353628058c42b59 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Fri, 22 Nov 2024 16:06:16 +0700 Subject: [PATCH 11/26] update mempool --- app/mempool/mempool_fifo.go | 128 ++++++++++++------------------- app/mempool/mempool_fifo_test.go | 54 +++++++------ 2 files changed, 76 insertions(+), 106 deletions(-) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go index 5f18f31a..93d096bd 100644 --- a/app/mempool/mempool_fifo.go +++ b/app/mempool/mempool_fifo.go @@ -2,8 +2,6 @@ package mempool import ( "context" - crand "crypto/rand" - "encoding/binary" "fmt" "math/rand" @@ -43,7 +41,6 @@ func init() { // end if maxBytes is reached. type FifoSenderNonceMempool struct { senders map[string]*skiplist.SkipList - rnd *rand.Rand maxTx int existingTx map[txKey]bool sendersOracle map[string]*skiplist.SkipList @@ -69,14 +66,6 @@ func NewFifoSenderNonceMempool(opts ...SenderNonceOptions) *FifoSenderNonceMempo sendersOracle: senderOracleMap, } - var seed int64 - err := binary.Read(crand.Reader, binary.BigEndian, &seed) - if err != nil { - panic(err) - } - - snp.setSeed(seed) - for _, opt := range opts { opt(snp) } @@ -84,19 +73,6 @@ func NewFifoSenderNonceMempool(opts ...SenderNonceOptions) *FifoSenderNonceMempo return snp } -// SenderNonceSeedOpt Option To add a Seed for random type when calling the -// constructor NewSenderNonceMempool. -// -// Example: -// -// random_seed := int64(1000) -// NewSenderNonceMempool(SenderNonceSeedTxOpt(random_seed)) -func SenderNonceSeedOpt(seed int64) SenderNonceOptions { - return func(snp *FifoSenderNonceMempool) { - snp.setSeed(seed) - } -} - // SenderNonceMaxTxOpt Option To set limit of max tx when calling the constructor // NewSenderNonceMempool. // @@ -109,11 +85,6 @@ func SenderNonceMaxTxOpt(maxTx int) SenderNonceOptions { } } -func (snm *FifoSenderNonceMempool) setSeed(seed int64) { - s1 := rand.NewSource(seed) - snm.rnd = rand.New(s1) //#nosec // math/rand is seeded from crypto/rand by default -} - // NextSenderTx returns the next transaction for a given sender by nonce order, // i.e. the next valid transaction for the sender. If no such transaction exists, // nil will be returned. @@ -174,34 +145,6 @@ func (snm *FifoSenderNonceMempool) Insert(_ context.Context, tx sdk.Tx) error { return nil } -func (snm *FifoSenderNonceMempool) handleOracleTransactions() mempool.Iterator { - var senders []string - senderCursors := make(map[string]*skiplist.Element) - - orderedSenders := skiplist.New(skiplist.String) - - // #nosec - for s := range snm.sendersOracle { - orderedSenders.Set(s, s) - } - - s := orderedSenders.Front() - for s != nil { - sender := s.Value.(string) - senders = append(senders, sender) - senderCursors[sender] = snm.sendersOracle[sender].Front() - s = s.Next() - } - - iter := &senderNonceMempoolIterator{ - senders: senders, - rnd: snm.rnd, - senderCursors: senderCursors, - } - - return iter.Next() -} - // Select returns an iterator ordering transactions the mempool with the lowest // nonce of a random selected sender first. // @@ -220,9 +163,10 @@ func (snm *FifoSenderNonceMempool) Select(_ context.Context, _ [][]byte) mempool s1 := orderedSendersOracle.Front() for s1 != nil { sender := s1.Value.(string) - oracleSenders = append(oracleSenders, sender) // Add oracle prefix to distinguish from regular transactions - senderCursors[sender] = snm.sendersOracle[sender].Front() + oracleSenders = append(oracleSenders, sender) + oracleKey := "oracle:" + sender + senderCursors[oracleKey] = snm.sendersOracle[sender].Front() s1 = s1.Next() } @@ -236,7 +180,8 @@ func (snm *FifoSenderNonceMempool) Select(_ context.Context, _ [][]byte) mempool for s != nil { sender := s.Value.(string) regularSenders = append(regularSenders, sender) - senderCursors[sender] = snm.senders[sender].Front() + regularKey := "regular:" + sender + senderCursors[regularKey] = snm.senders[sender].Front() s = s.Next() } @@ -245,7 +190,6 @@ func (snm *FifoSenderNonceMempool) Select(_ context.Context, _ [][]byte) mempool iter := &senderNonceMempoolIterator{ senders: senders, - rnd: snm.rnd, senderCursors: senderCursors, } return iter.Next() @@ -314,26 +258,54 @@ type senderNonceMempoolIterator struct { // smallest nonce of a randomly selected sender. func (i *senderNonceMempoolIterator) Next() mempool.Iterator { for len(i.senders) > 0 { - senderIndex := i.rnd.Intn(len(i.senders)) + senderIndex := 0 sender := i.senders[senderIndex] - // Check if it's from oracle list - senderCursor, found := i.senderCursors[sender] - if !found { - i.senders = removeAtIndex(i.senders, senderIndex) - continue + isOracle := false + checkKey := "oracle:" + sender + _, ok := i.senderCursors[checkKey] + if ok { + isOracle = true } - - if nextCursor := senderCursor.Next(); nextCursor != nil { - i.senderCursors[sender] = nextCursor + if isOracle { + checkKey = "oracle:" + sender + senderCursor, found := i.senderCursors[checkKey] + if !found { + i.senders = removeAtIndex(i.senders, senderIndex) + continue + } + + if nextCursor := senderCursor.Next(); nextCursor != nil { + i.senderCursors[checkKey] = nextCursor + } else { + i.senders = removeAtIndex(i.senders, senderIndex) + delete(i.senderCursors, checkKey) + } + + return &senderNonceMempoolIterator{ + senders: i.senders, + currentTx: senderCursor, + senderCursors: i.senderCursors, + } } else { - i.senders = removeAtIndex(i.senders, senderIndex) - } - - return &senderNonceMempoolIterator{ - senders: i.senders, - currentTx: senderCursor, - rnd: i.rnd, - senderCursors: i.senderCursors, + checkKey = "regular:" + sender + senderCursor, found := i.senderCursors[checkKey] + if !found { + i.senders = removeAtIndex(i.senders, senderIndex) + continue + } + + if nextCursor := senderCursor.Next(); nextCursor != nil { + i.senderCursors[checkKey] = nextCursor + } else { + i.senders = removeAtIndex(i.senders, senderIndex) + delete(i.senderCursors, checkKey) + } + + return &senderNonceMempoolIterator{ + senders: i.senders, + currentTx: senderCursor, + senderCursors: i.senderCursors, + } } } diff --git a/app/mempool/mempool_fifo_test.go b/app/mempool/mempool_fifo_test.go index d62fe4af..e44841de 100644 --- a/app/mempool/mempool_fifo_test.go +++ b/app/mempool/mempool_fifo_test.go @@ -41,8 +41,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 20, n: 1, a: sa}, }, order: []int{3, 4, 2, 1, 0}, - // Index order base on seed 0: 0 0 1 0 1 0 0 - seed: 0, + seed: 0, }, { txs: []txSpec{ @@ -53,9 +52,8 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 5, n: 1, a: sb}, {p: 8, n: 2, a: sb}, }, - order: []int{3, 4, 0, 5, 1, 2}, - // Index order base on seed 0: 0 0 1 0 1 0 0 - seed: 0, + order: []int{3, 4, 5, 0, 1, 2}, + seed: 0, }, { txs: []txSpec{ @@ -64,8 +62,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 20, n: 1, a: sa}, }, order: []int{1, 2, 0}, - // Index order base on seed 0: 0 0 1 0 1 0 0 - seed: 0, + seed: 0, }, { txs: []txSpec{ @@ -76,8 +73,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 21, n: 2, a: sb}, }, order: []int{3, 4, 2, 1, 0}, - // Index order base on seed 0: 0 0 1 0 1 0 0 - seed: 0, + seed: 0, }, { txs: []txSpec{ @@ -88,8 +84,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 8, n: 2, a: sb}, }, order: []int{3, 4, 2, 1, 0}, - // Index order base on seed 0: 0 0 1 0 1 0 0 - seed: 0, + seed: 0, }, { txs: []txSpec{ @@ -101,9 +96,8 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 6, a: sa, n: 3}, {p: 4, a: sb, n: 3}, }, - order: []int{4, 1, 3, 6, 2, 0, 5}, - // Index order base on seed 0: 0 0 1 0 1 0 1 1 0 - seed: 0, + order: []int{4, 1, 6, 3, 2, 0, 5}, + seed: 0, }, { txs: []txSpec{ @@ -113,13 +107,12 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 99, n: 2, a: sb}, }, order: []int{2, 3, 0, 1}, - // Index order base on seed 0: 0 0 1 0 1 0 1 1 0 - seed: 0, + seed: 0, }, } for i, tt := range tests { t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { - pool := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceSeedOpt(tt.seed)) + pool := appmempool.NewFifoSenderNonceMempool() // create test txs and insert into mempool for i, ts := range tt.txs { tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} @@ -154,7 +147,6 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { txs []testTx order []int fail bool - seed int64 }{ { txs: []testTx{ @@ -173,13 +165,12 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { address: sb, }, }, - order: []int{2, 1}, - seed: 0, + order: []int{1, 0}, }, } for i, tt := range tests { t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { - pool := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceSeedOpt(tt.seed)) + pool := appmempool.NewFifoSenderNonceMempool() // create test txs and insert into mempool for i, ts := range tt.txs { tx := testTx{id: i, priority: ts.priority, nonce: uint64(ts.nonce), address: ts.address, msgs: ts.msgs} @@ -206,12 +197,12 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { func (s *MempoolTestSuite) TestOracleTx() { t := s.T() ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 2) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 3) mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(3)) tx := testTx{ id: 0, - nonce: 0, + nonce: 2, address: accounts[0].Address, priority: rand.Int63(), } @@ -220,29 +211,36 @@ func (s *MempoolTestSuite) TestOracleTx() { nonce: 1, address: accounts[0].Address, priority: rand.Int63(), - msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{ + Salt: "1", + }}, } tx2 := testTx{ id: 2, nonce: 1, - address: accounts[1].Address, + address: accounts[2].Address, priority: rand.Int63(), - msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{ + Salt: "2", + }}, } // empty mempool behavior require.Equal(t, 0, s.mempool.CountTx()) itr := mp.Select(ctx, nil) require.Nil(t, itr) - err := mp.Insert(ctx, tx1) + err := mp.Insert(ctx, tx) require.NoError(t, err) - err = mp.Insert(ctx, tx) + err = mp.Insert(ctx, tx1) require.NoError(t, err) err = mp.Insert(ctx, tx2) require.NoError(t, err) itr = mp.Select(ctx, nil) orderedTxs := fetchTxs(itr, 1000) + for _, tmpTx := range orderedTxs { + fmt.Println(tmpTx.GetMsgs()) + } require.Equal(t, 3, len(orderedTxs)) require.True(t, ante.IsOracleTx(orderedTxs[0].GetMsgs())) From e4c99bd2ee9c84602bcbe033629c219e8dd3fc9f Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Fri, 22 Nov 2024 16:23:22 +0700 Subject: [PATCH 12/26] update test --- app/mempool/mempool_fifo.go | 4 +- app/mempool/mempool_fifo_test.go | 112 ++++++++++++++++++++++++++----- 2 files changed, 99 insertions(+), 17 deletions(-) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go index 93d096bd..1fd00aaf 100644 --- a/app/mempool/mempool_fifo.go +++ b/app/mempool/mempool_fifo.go @@ -221,7 +221,7 @@ func (snm *FifoSenderNonceMempool) Remove(tx sdk.Tx) error { return mempool.ErrTxNotFound } - if ante.IsOracleTx(tx.GetMsgs()) { + if ante.IsOracleTx(tx.GetMsgs()) && found2 { res := senderOracleTxs.Remove(nonce) if res == nil { return mempool.ErrTxNotFound @@ -230,7 +230,7 @@ func (snm *FifoSenderNonceMempool) Remove(tx sdk.Tx) error { if senderOracleTxs.Len() == 0 { delete(snm.senders, sender) } - } else { + } else if found1 { res := senderTxs.Remove(nonce) if res == nil { return mempool.ErrTxNotFound diff --git a/app/mempool/mempool_fifo_test.go b/app/mempool/mempool_fifo_test.go index e44841de..4f9c0e54 100644 --- a/app/mempool/mempool_fifo_test.go +++ b/app/mempool/mempool_fifo_test.go @@ -2,11 +2,12 @@ package mempool_test import ( "fmt" + "math/rand" + "testing" + "github.com/classic-terra/core/v3/custom/auth/ante" oracleexported "github.com/classic-terra/core/v3/x/oracle/exported" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "math/rand" - "testing" appmempool "github.com/classic-terra/core/v3/app/mempool" "github.com/cosmos/cosmos-sdk/types/mempool" @@ -151,31 +152,112 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { { txs: []testTx{ { - id: 1, - priority: 1, - nonce: 1, - msgs: []sdk.Msg{&banktypes.MsgSend{}}, - address: sa, + id: 1, + nonce: 1, + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + address: sa, }, { - id: 2, - priority: 1, - nonce: 1, - msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, - address: sb, + id: 2, + nonce: 1, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + address: sb, }, }, order: []int{1, 0}, }, + { + // Test multiple oracle txs vs regular txs + txs: []testTx{ + { + id: 0, + nonce: 1, + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + address: sa, + }, + { + id: 1, + nonce: 1, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + address: sb, + }, + { + id: 2, + nonce: 2, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + address: sa, + }, + { + id: 3, + nonce: 2, + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + address: sb, + }, + }, + order: []int{1, 2, 3, 0}, + }, + { + // Test oracle tx priority with different nonces + txs: []testTx{ + { + id: 0, + nonce: 5, + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + address: sa, + }, + { + id: 1, + nonce: 10, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + address: sa, + }, + { + id: 2, + nonce: 1, + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + address: sa, + }, + }, + order: []int{1, 2, 0}, + }, + { + // Test multiple oracle txs from different senders + txs: []testTx{ + { + id: 0, + nonce: 2, + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + address: sb, + }, + { + id: 1, + nonce: 2, + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + address: sa, + }, + { + id: 2, + nonce: 1, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + address: sa, + }, + { + id: 3, + nonce: 1, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + address: sb, + }, + }, + order: []int{3, 2, 0, 1}, // All oracle txs first, then regular txs + }, } for i, tt := range tests { t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { pool := appmempool.NewFifoSenderNonceMempool() // create test txs and insert into mempool for i, ts := range tt.txs { - tx := testTx{id: i, priority: ts.priority, nonce: uint64(ts.nonce), address: ts.address, msgs: ts.msgs} - c := ctx.WithPriority(tx.priority) - err := pool.Insert(c, tx) + tx := testTx{id: i, nonce: uint64(ts.nonce), address: ts.address, msgs: ts.msgs} + err := pool.Insert(ctx, tx) require.NoError(t, err) } From 17edbff3b63fc926e28c7c9ac30e64a2fc6779cb Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Fri, 22 Nov 2024 16:26:17 +0700 Subject: [PATCH 13/26] bet --- app/testing/abci_test.go | 49 ---------- app/testing/app_test.go | 205 --------------------------------------- 2 files changed, 254 deletions(-) delete mode 100644 app/testing/abci_test.go delete mode 100644 app/testing/app_test.go diff --git a/app/testing/abci_test.go b/app/testing/abci_test.go deleted file mode 100644 index 92de0aec..00000000 --- a/app/testing/abci_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package helpers - -import ( - abci "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/cosmos-sdk/types/mempool" - "github.com/stretchr/testify/require" -) - -func (s *AppTestSuite) TestABCI_Proposal_HappyPath() { - pool := mempool.NewSenderNonceMempool() - var txs [][]byte - // Create 5 oracle and 5 non-oracle txs in mixed order - for i := uint64(0); i < 10; i++ { - txs = append(txs, s.createNumberedTx(i, i%2 == 0)) - } - - txDecoder := s.App.GetTxConfig().TxDecoder() - - reqCheckTx := abci.RequestCheckTx{ - Tx: txs[0], - Type: abci.CheckTxType_New, - } - s.App.CheckTx(reqCheckTx) - - for i := uint64(0); i < 10; i++ { - decodedTx, err := txDecoder(txs[i]) - require.NoError(s.T(), err) - err = pool.Insert(s.Ctx, decodedTx) - require.NoError(s.T(), err) - } - reqPrepareProposal := abci.RequestPrepareProposal{ - MaxTxBytes: 1000, - Height: 1, - Txs: txs[0:5], - } - resPrepareProposal := s.App.PrepareProposal(reqPrepareProposal) - require.Equal(s.T(), 5, len(resPrepareProposal.Txs)) - - // 3 oracleTx of first 5 tx should be placed in front - s.verifyOraclePriority(resPrepareProposal.Txs[0:5], 3) - - reqProcessProposal := abci.RequestProcessProposal{ - Txs: resPrepareProposal.Txs, - Height: reqPrepareProposal.Height, - } - resProcessProposal := s.App.ProcessProposal(reqProcessProposal) - require.Equal(s.T(), abci.ResponseProcessProposal_ACCEPT, resProcessProposal.Status) -} diff --git a/app/testing/app_test.go b/app/testing/app_test.go deleted file mode 100644 index ad6a7116..00000000 --- a/app/testing/app_test.go +++ /dev/null @@ -1,205 +0,0 @@ -package helpers - -import ( - "encoding/hex" - "fmt" - "testing" - - anteauth "github.com/classic-terra/core/v3/custom/auth/ante" - "github.com/cometbft/cometbft/libs/rand" - - oracletypes "github.com/classic-terra/core/v3/x/oracle/types" - abci "github.com/cometbft/cometbft/abci/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/stretchr/testify/suite" -) - -type AppTestSuite struct { - KeeperTestHelper -} - -func TestAppTestSuite(t *testing.T) { - suite.Run(t, new(AppTestSuite)) -} - -func (s *AppTestSuite) SetupTest() { - s.Setup(s.T(), SimAppChainID) -} - -func (s *AppTestSuite) TestPreBlocker() { - // Create test transactions - oracleTx := s.createTestTx([]sdk.Msg{ - &oracletypes.MsgAggregateExchangeRatePrevote{}, // Oracle message - }) - - bankTx := s.createTestTx([]sdk.Msg{ - &banktypes.MsgSend{}, // Non-oracle message - }) - - // Test cases - testCases := []struct { - name string - txs [][]byte - expected [][]byte - }{ - { - name: "oracle tx should be first", - txs: [][]byte{bankTx, oracleTx}, - expected: [][]byte{oracleTx, bankTx}, - }, - { - name: "already ordered txs should remain ordered", - txs: [][]byte{oracleTx, bankTx}, - expected: [][]byte{oracleTx, bankTx}, - }, - { - name: "duplicate txs should be removed", - txs: [][]byte{bankTx, oracleTx, bankTx}, - expected: [][]byte{oracleTx, bankTx}, - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - req := abci.RequestPrepareProposal{ - Txs: tc.txs, - } - - response := s.App.PrepareProposal(req) - s.Require().Equal(len(tc.expected), len(response.Txs), "number of transactions should match") - - for i := range tc.expected { - s.Require().Equal(tc.expected[i], response.Txs[i], "transaction at index %d should match", i) - } - }) - } -} - -func (s *AppTestSuite) TestOraclePriorityProcessing() { - testCases := []struct { - name string - setup func() [][]byte - numTxs int - numOracle int - }{ - { - name: "small batch of mixed transactions", - setup: func() [][]byte { - var txs [][]byte - // Create 5 oracle and 5 non-oracle txs in mixed order - for i := uint64(0); i < 10; i++ { - txs = append(txs, s.createNumberedTx(i, i%2 == 0)) - } - return txs - }, - numTxs: 10, - numOracle: 5, - }, - { - name: "large batch of mixed transactions", - setup: func() [][]byte { - var txs [][]byte - // Create 50 oracle and 50 non-oracle txs in mixed order - for i := uint64(0); i < 100; i++ { - txs = append(txs, s.createNumberedTx(i, i%2 == 0)) - } - return txs - }, - numTxs: 100, - numOracle: 50, - }, - } - - for _, tc := range testCases { - s.Run(tc.name, func() { - txs := tc.setup() - - // Process transactions through PrepareProposal - req := abci.RequestPrepareProposal{ - Txs: txs, - } - - response := s.App.PrepareProposal(req) - - // Verify the number of transactions - s.Require().Equal(tc.numTxs, len(response.Txs), - "expected %d transactions, got %d", tc.numTxs, len(response.Txs)) - // Verify oracle transactions are prioritized - s.verifyOraclePriority(response.Txs, tc.numOracle) - }) - } -} - -// Helper function to create test transactions with sequential numbers -func (s *AppTestSuite) createNumberedTx(i uint64, isOracle bool) []byte { - var msg sdk.Msg - if isOracle { - if i%3 == 0 { - msg = &oracletypes.MsgAggregateExchangeRatePrevote{ - Hash: hex.EncodeToString([]byte(rand.Str(20))), - Feeder: fmt.Sprintf("feeder_%d", i), - Validator: fmt.Sprintf("validator_%d", i), - } - } else { - msg = &oracletypes.MsgAggregateExchangeRateVote{ - ExchangeRates: fmt.Sprintf("1000ukrw,1000uluna,1000usdr_%d", i), - Feeder: fmt.Sprintf("feeder_%d", i), - Validator: fmt.Sprintf("validator_%d", i), - } - } - } else { - msg = &banktypes.MsgSend{ - FromAddress: fmt.Sprintf("from_%d", i), - ToAddress: fmt.Sprintf("to_%d", i), - Amount: sdk.NewCoins(sdk.NewCoin("uluna", sdk.NewInt(int64(i)))), - } - } - return s.createTestTx([]sdk.Msg{msg}) -} - -// Helper function to verify oracle transactions come first -func (s *AppTestSuite) verifyOraclePriority(txs [][]byte, numOracleTx int) { - i := 0 - - txDecoder := s.App.GetTxConfig().TxDecoder() - for _, tx := range txs { - if i == numOracleTx { - break - } - // Decode tx to check if it's an oracle tx - decodedTx, err := txDecoder(tx) - s.Require().NoError(err) - msgs := decodedTx.GetMsgs() - isOracleTx := anteauth.IsOracleTx(msgs) - if !isOracleTx { - s.Require().FailNowf("Invalid transaction order", "expected oracle transaction at index %d, but found non-oracle transaction", i) - } - i++ - } -} - -// Helper method for the test suite -func (s *AppTestSuite) createTestTx(msgs []sdk.Msg) []byte { - builder := s.App.GetTxConfig().NewTxBuilder() - builder.SetMsgs(msgs...) - - // Add a dummy signature - sigV2 := signing.SignatureV2{ - PubKey: NewPV().PrivKey.PubKey(), - Data: &signing.SingleSignatureData{ - SignMode: signing.SignMode_SIGN_MODE_DIRECT, - Signature: []byte("dummy_signature"), - }, - Sequence: 0, - } - - err := builder.SetSignatures(sigV2) - s.Require().NoError(err) - - txBytes, err := s.App.GetTxConfig().TxEncoder()(builder.GetTx()) - s.Require().NoError(err) - - return txBytes -} From 3b915987a5f0e996ad6269f66e91fde050214f98 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Fri, 22 Nov 2024 16:31:02 +0700 Subject: [PATCH 14/26] bet --- app/mempool/mempool_fifo.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go index 1fd00aaf..4815653a 100644 --- a/app/mempool/mempool_fifo.go +++ b/app/mempool/mempool_fifo.go @@ -3,7 +3,6 @@ package mempool import ( "context" "fmt" - "math/rand" "github.com/classic-terra/core/v3/custom/auth/ante" "github.com/cosmos/cosmos-sdk/codec" @@ -29,13 +28,15 @@ func init() { cdc = codec.NewLegacyAmino() } -// FifoSenderNonceMempool is a mempool that prioritizes transactions within a sender -// by nonce, the lowest first, but selects a random sender on each iteration. +// FifoSenderNonceMempool is a mempool that prioritizes oracle transactions first, +// followed by regular transactions. Within each type, transactions are ordered by sender +// and nonce. // The mempool is iterated by: // -// 1) Maintaining a separate list of nonce ordered txs per sender -// 2) For each select iteration, randomly choose a sender and pick the next nonce ordered tx from their list -// 3) Repeat 1,2 until the mempool is exhausted +// 1) Maintaining separate lists of nonce-ordered txs per sender for both oracle and regular transactions +// 2) Processing all oracle transactions first, in order of sender address and nonce +// 3) After oracle transactions are exhausted, processing regular transactions in order of sender address and nonce +// 4) Repeat until the mempool is exhausted // // Note that PrepareProposal could choose to stop iteration before reaching the // end if maxBytes is reached. @@ -53,8 +54,6 @@ type txKey struct { nonce uint64 } -// NewFifoSenderNonceMempool creates a new mempool that prioritizes transactions by -// nonce, the lowest first, picking a random sender on each iteration. func NewFifoSenderNonceMempool(opts ...SenderNonceOptions) *FifoSenderNonceMempool { senderMap := make(map[string]*skiplist.SkipList) senderOracleMap := make(map[string]*skiplist.SkipList) @@ -248,7 +247,6 @@ func (snm *FifoSenderNonceMempool) Remove(tx sdk.Tx) error { } type senderNonceMempoolIterator struct { - rnd *rand.Rand currentTx *skiplist.Element senders []string senderCursors map[string]*skiplist.Element From a0e8ff5061c4c4c9df5b15a2fd54fd35202e9ab2 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Fri, 22 Nov 2024 16:31:28 +0700 Subject: [PATCH 15/26] bet --- app/mempool/mempool_fifo.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go index 4815653a..4853cfb3 100644 --- a/app/mempool/mempool_fifo.go +++ b/app/mempool/mempool_fifo.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/classic-terra/core/v3/custom/auth/ante" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/mempool" "github.com/huandu/skiplist" @@ -14,8 +13,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/signing" ) -var cdc *codec.LegacyAmino - var ( _ mempool.Mempool = (*FifoSenderNonceMempool)(nil) _ mempool.Iterator = (*senderNonceMempoolIterator)(nil) @@ -23,11 +20,6 @@ var ( var DefaultMaxTx = 0 -// Initialize the codec somewhere in your application setup -func init() { - cdc = codec.NewLegacyAmino() -} - // FifoSenderNonceMempool is a mempool that prioritizes oracle transactions first, // followed by regular transactions. Within each type, transactions are ordered by sender // and nonce. From 9698f6c20ed3cebd220e80d8d3c97445fe41c741 Mon Sep 17 00:00:00 2001 From: Tuan Tran Date: Sat, 23 Nov 2024 09:31:40 +0700 Subject: [PATCH 16/26] test(interchaintest): add basic test case and helper for testing tx order (#26) * bet * bet * Fix test oracle * update ict * revert unnecessary change * update test * Refactor test --------- Co-authored-by: tnv1 --- Makefile | 3 + tests/e2e/configurer/chain/commands.go | 17 ++ tests/interchaintest/go.mod | 69 ++++---- tests/interchaintest/go.sum | 173 +++++++++--------- tests/interchaintest/helpers/oracle.go | 41 +++++ tests/interchaintest/oracle_test.go | 235 +++++++++++++++++++++++++ tests/interchaintest/setup.go | 2 + 7 files changed, 417 insertions(+), 123 deletions(-) create mode 100644 tests/interchaintest/helpers/oracle.go create mode 100644 tests/interchaintest/oracle_test.go diff --git a/Makefile b/Makefile index 68d359ac..f22de8ab 100755 --- a/Makefile +++ b/Makefile @@ -272,6 +272,9 @@ ictest-ibc-pfm: ictest-build ictest-ibc-pfm-terra: ictest-build @cd tests/interchaintest && go test -race -v -run TestTerraPFM . +ictest-oracle: ictest-build + @cd tests/interchaintest && go test -race -v -run TestOracle . + ictest-build: @DOCKER_BUILDKIT=1 docker build -t core:local -f ictest.Dockerfile . diff --git a/tests/e2e/configurer/chain/commands.go b/tests/e2e/configurer/chain/commands.go index c1e96bac..01768110 100644 --- a/tests/e2e/configurer/chain/commands.go +++ b/tests/e2e/configurer/chain/commands.go @@ -315,3 +315,20 @@ func (n *NodeConfig) Status() (resultStatus, error) { //nolint } return result, nil } + +func (n *NodeConfig) SubmitOracleAggregatePrevote(salt string, amount string) { + n.LogActionF("submitting oracle aggregate prevote") + cmd := []string{"terrad", "tx", "oracle", "aggregate-prevote", salt, amount, fmt.Sprintf("--from=%s", "val")} + _, _, err := n.containerManager.ExecTxCmd(n.t, n.chainID, n.Name, cmd) + require.NoError(n.t, err) + n.LogActionF("successfully submitted oracle aggregate prevote") +} + +// should be submitted after prevote, and using the same salt +func (n *NodeConfig) SubmitOracleAggregateVote(salt string, amount string) { + n.LogActionF("submitting oracle aggregate vote") + cmd := []string{"terrad", "tx", "oracle", "aggregate-vote", salt, amount, fmt.Sprintf("--from=%s", "val")} + _, _, err := n.containerManager.ExecTxCmd(n.t, n.chainID, n.Name, cmd) + require.NoError(n.t, err) + n.LogActionF("successfully submitted oracle aggregate vote") +} diff --git a/tests/interchaintest/go.mod b/tests/interchaintest/go.mod index de104d51..486e7a1a 100644 --- a/tests/interchaintest/go.mod +++ b/tests/interchaintest/go.mod @@ -4,6 +4,7 @@ go 1.20 require ( cosmossdk.io/math v1.3.0 + github.com/classic-terra/core/v3 v3.0.0-00010101000000-000000000000 github.com/cosmos/cosmos-sdk v0.47.10 github.com/cosmos/ibc-go/v7 v7.4.0 github.com/icza/dyno v0.0.0-20220812133438-f0b6f8a18845 @@ -13,11 +14,11 @@ require ( ) require ( - cloud.google.com/go v0.111.0 // indirect - cloud.google.com/go/compute v1.23.3 // indirect + cloud.google.com/go v0.112.0 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.5 // indirect - cloud.google.com/go/storage v1.30.1 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.36.0 // indirect cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.6.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect @@ -62,7 +63,7 @@ require ( github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/interchain-security/v3 v3.1.1-0.20231102122221-81650a84f989 // indirect github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect - github.com/cosmos/ledger-go v0.9.2 // indirect + github.com/cosmos/ledger-go v0.9.3 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect @@ -77,39 +78,39 @@ require ( github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect + github.com/docker/docker v24.0.9+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/ethereum/go-ethereum v1.10.20 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/getsentry/sentry-go v0.23.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect - github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect @@ -117,7 +118,7 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-getter v1.7.4 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect @@ -180,8 +181,8 @@ require ( github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.16.0 // indirect @@ -197,29 +198,33 @@ require ( github.com/zondax/hid v0.9.2 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect + go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/metric v1.22.0 // indirect + go.opentelemetry.io/otel/trace v1.22.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.13.0 // indirect - google.golang.org/api v0.149.0 // indirect + google.golang.org/api v0.162.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect - google.golang.org/grpc v1.60.1 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.1.7 // indirect lukechampine.com/uint128 v1.2.0 // indirect @@ -259,4 +264,6 @@ replace ( // replace interchaintest and go-substrate-rpc-client to avoid github.com/ChainSafe/go-schnorrkel/1 github.com/ComposableFi/go-substrate-rpc-client/v4 => github.com/Genuine-labs/go-substrate-rpc-client/v4 v4.0.0-terra47.1 github.com/strangelove-ventures/interchaintest/v7 => github.com/Genuine-labs/interchaintest/v7 v7.0.0-terra.1 + golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb + ) diff --git a/tests/interchaintest/go.sum b/tests/interchaintest/go.sum index 9290144d..a2d47601 100644 --- a/tests/interchaintest/go.sum +++ b/tests/interchaintest/go.sum @@ -32,8 +32,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM= -cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,8 +70,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -111,8 +111,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= -cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -174,8 +174,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= +cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -199,9 +199,9 @@ cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/simapp v0.0.0-20230602123434-616841b9704d h1:G24nV8KQ5tcSLJEYPUEpKxuX4usvpQg5r7LhCLYPs1o= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= @@ -212,9 +212,9 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= +github.com/CosmWasm/wasmvm v1.5.5 h1:XlZI3xO5iUhiBqMiyzsrWEfUtk5gcBMNYIdHnsTB+NI= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25YnZWly5Gq1ekg6jcmWaGj/vG/MhF4aisoc= github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw= @@ -321,6 +321,7 @@ github.com/classic-terra/goleveldb v0.0.0-20230914223247-2b28f6655121 h1:fjpWDB0 github.com/classic-terra/goleveldb v0.0.0-20230914223247-2b28f6655121/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/classic-terra/ibc-go/v7 v7.0.0-20240419072319-aa9d74dc39ae h1:dPxkxNcORnKN/ZWqzH4zxfi42FK2bes02LgIj5P/f4k= github.com/classic-terra/ibc-go/v7 v7.0.0-20240419072319-aa9d74dc39ae/go.mod h1:L/KaEhzV5TGUCTfGysVgMBQtl5Dm7hHitfpk+GIeoAo= +github.com/classic-terra/wasmd v0.45.0-classic h1:6yZZuYybnzg5nOo6bHHO7/In/XJJDuPwfIewmW3PYuY= 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= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= @@ -334,6 +335,7 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= @@ -370,19 +372,21 @@ github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoK github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20240321032823-2733d24a1b99 h1:AC05pevT3jIVTxJ0mABlN3hxyHESPpELhVQjwQVT6Pw= github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1 h1:BvSKnPFKxL+TTSLxGKwJN4x0ndCZj0yfXhSvmsQztSA= github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1/go.mod h1:A+CxAQdn2j6ihDTbClpEEBdHthWgAUAcHbRAQPY8sl4= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/interchain-security/v3 v3.1.1-0.20231102122221-81650a84f989 h1:Yk/2X33hHuS0mqjr4rE0ShiwPE/YflXgdyXPIYdwl+Q= github.com/cosmos/interchain-security/v3 v3.1.1-0.20231102122221-81650a84f989/go.mod h1:5B29fgUbUDTpBTqCnEzA2g3gI5rQG0YE/ir4isb2MEw= -github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +github.com/cosmos/ledger-go v0.9.3 h1:WGyZK4ikuLIkbxJm3lEr1tdQYDdTdveTwoVla7hqfhQ= +github.com/cosmos/ledger-go v0.9.3/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -419,8 +423,8 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -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/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= +github.com/docker/docker v24.0.9+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/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -446,16 +450,17 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= 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/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/ethereum/go-ethereum v1.10.20 h1:75IW830ClSS40yrQC1ZCMZCt5I+zU16oqId2SiQwdQ4= github.com/ethereum/go-ethereum v1.10.20/go.mod h1:LWUN82TCHGpxB3En5HVmLLzPD7YSrEUFmFfN1nKkVN0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -468,9 +473,6 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -485,8 +487,8 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -517,8 +519,8 @@ github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2 github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -553,8 +555,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -613,8 +615,8 @@ github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= @@ -639,8 +641,8 @@ github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= @@ -667,8 +669,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= -github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= +github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -879,7 +881,7 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= -github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -999,12 +1001,12 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1091,13 +1093,17 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= +go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1133,23 +1139,11 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -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-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -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-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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1162,18 +1156,16 @@ golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPI golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/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.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/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.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1238,8 +1230,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1265,8 +1257,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= -golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= 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-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1281,8 +1273,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1294,7 +1286,6 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1306,7 +1297,6 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1384,13 +1374,13 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1408,13 +1398,13 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1423,9 +1413,7 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1441,7 +1429,6 @@ golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1470,6 +1457,7 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/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.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1530,8 +1518,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.162.0 h1:Vhs54HkaEpkMBdgGdOT2P6F0csGG/vxDS0hWHJzmmps= +google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1651,12 +1639,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 h1:nz5NESFLZbJGPFxDT/HCn+V1mZ8JGNoY4nUpmW/Y2eg= -google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917/go.mod h1:pZqR+glSb11aJ+JQcczCvgf47+duRuzNSKqE8YAQnV0= -google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 h1:s1w3X6gQxwrLEpxnLd/qXTVLgQE2yXwaOaoa6IlY/+o= -google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0/go.mod h1:CAny0tYF+0/9rmDB9fahA9YLzX3+AEVl1qXbv5hhj6c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 h1:gphdwh0npgs8elJ4T6J+DQJHPVF7RsuJHCfwztUb4J4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= +google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo= +google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A= +google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1698,8 +1686,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= -google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1716,8 +1704,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ 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.28.1/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= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= @@ -1746,6 +1734,7 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/tests/interchaintest/helpers/oracle.go b/tests/interchaintest/helpers/oracle.go new file mode 100644 index 00000000..d952b0ad --- /dev/null +++ b/tests/interchaintest/helpers/oracle.go @@ -0,0 +1,41 @@ +package helpers + +import ( + "context" + + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" +) +const validatorKeyName = "validator" +func ExecOracleMsgAggragatePrevote(ctx context.Context, validator *cosmos.ChainNode, salt string, exchangeRate string) (error) { + args := []string{ + "oracle", "aggregate-prevote", + salt, + exchangeRate, + + } + + command := validator.TxCommand(validatorKeyName, args...) + + _, _, err := validator.Exec(ctx, command, nil) + if err != nil { + return err + } + return nil +} + +func ExecOracleMsgAggregateVote(ctx context.Context, validator *cosmos.ChainNode, salt string, exchangeRate string) error { + args := []string{ + "oracle", "aggregate-vote", + salt, + exchangeRate, + + } + + command := validator.TxCommand(validatorKeyName, args...) + + _, _, err := validator.Exec(ctx, command, nil) + if err != nil { + return err + } + return nil +} \ No newline at end of file diff --git a/tests/interchaintest/oracle_test.go b/tests/interchaintest/oracle_test.go new file mode 100644 index 00000000..8ae4f1c6 --- /dev/null +++ b/tests/interchaintest/oracle_test.go @@ -0,0 +1,235 @@ +package interchaintest + +import ( + "context" + "fmt" + "sync" + "testing" + + "github.com/classic-terra/core/v3/test/interchaintest/helpers" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/testreporter" + "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" +) + +func TestOracle(t *testing.T) { + if testing.Short() { + t.Skip() + } + + t.Parallel() + + numVals := 3 + numFullNodes := 3 + + config, err := createConfig() + require.NoError(t, err) + + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ + { + Name: "terra", + ChainConfig: config, + NumValidators: &numVals, + NumFullNodes: &numFullNodes, + }, + }) + + chains, err := cf.Chains(t.Name()) + require.NoError(t, err) + + terra := chains[0].(*cosmos.CosmosChain) + + ic := interchaintest.NewInterchain().AddChain(terra) + + rep := testreporter.NewNopReporter() + eRep := rep.RelayerExecReporter(t) + + ctx := context.Background() + client, network := interchaintest.DockerSetup(t) + + err = ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ + TestName: t.Name(), + Client: client, + NetworkID: network, + SkipPathCreation: true, + }) + require.NoError(t, err) + + t.Cleanup(func() { + _ = ic.Close() + }) + + require.NoError(t, testutil.WaitForBlocks(ctx, 1, terra)) + + // Fund for 8 users + users := interchaintest.GetAndFundTestUsers(t, ctx, "default", genesisWalletAmount, terra, terra, terra, terra, terra, terra, terra, terra, terra) + + require.NoError(t, testutil.WaitForBlocks(ctx, 5, terra)) + + height1, err := terra.Height(ctx) + require.NoError(t, err) + + // Create error channels for operations + oracleErrCh := make(chan error, len(terra.Validators)) + var wg sync.WaitGroup + + wg.Add(len(terra.Validators)) + for _, val := range terra.Validators { + val := val + go func(validator *cosmos.ChainNode) { + defer wg.Done() + for i := 0; i < 2; i++ { + if err := helpers.ExecOracleMsgAggragatePrevote(ctx, validator, "salt", "1.123uusd"); err != nil { + oracleErrCh <- err + return + } + if err := testutil.WaitForBlocks(ctx, 1, terra); err != nil { + oracleErrCh <- err + return + } + if err := helpers.ExecOracleMsgAggregateVote(ctx, validator, "salt", "1.123uusd"); err != nil { + oracleErrCh <- err + return + } + if err := testutil.WaitForBlocks(ctx, 5, terra); err != nil { + oracleErrCh <- err + return + } + } + }(val) + } + + wg.Add(len(users)) + for i := range users { + i := i + go func() { + defer wg.Done() + err := terra.SendFunds(ctx, users[i].KeyName(), ibc.WalletAmount{ + Address: users[0].FormattedAddress(), + Denom: terra.Config().Denom, + Amount: sdk.OneInt(), + }) + require.NoError(t, err) + require.NoError(t, testutil.WaitForBlocks(ctx, 1, terra)) + }() + } + + // Wait for all goroutines to complete + wg.Wait() + close(oracleErrCh) + + // Check for any errors that occurred in oracle operations + for err := range oracleErrCh { + require.NoError(t, err) + } + + height2, err := terra.Height(ctx) + require.NoError(t, err) + + for h := height1; h <= height2; h++ { + txs, err := terra.Validators[2].FindTxs(ctx, h) + convertedTxs := make([]Tx, len(txs)) + for i, tx := range txs { + convertedEvents := make([]Event, len(tx.Events)) + + for j, event := range tx.Events { + convertedEvents[j] = Event{ + Type: event.Type, + Attributes: make([]EventAttribute, len(event.Attributes)), + } + + for k, attr := range event.Attributes { + convertedEvents[j].Attributes[k] = EventAttribute{ + Key: attr.Key, + Value: attr.Value, + } + } + } + + convertedTxs[i] = Tx{ + Data: tx.Data, + Events: convertedEvents, + } + } + for i, tx := range convertedTxs { + fmt.Println("Tx: ", i) + for _, event := range tx.Events { + fmt.Println(event.Attributes) + } + } + + if !isOraclePrioritized(convertedTxs) { + fmt.Println("Oracle transactions are not prioritized") + } + require.NoError(t, err) + } + + // Verify final validator state + stdout, _, err := terra.Validators[0].ExecQuery(ctx, "staking", "validators") + require.NoError(t, err) + require.NotEmpty(t, stdout) + + terraValidators, _, err := helpers.UnmarshalValidators(*config.EncodingConfig, stdout) + require.NoError(t, err) + require.Equal(t, len(terraValidators), 3) +} + +type Tx struct { + // For Tendermint transactions, this should be encoded as JSON. + // Otherwise, this should be a human-readable format if possible. + Data []byte + + // Events associated with the transaction, if applicable. + Events []Event +} + +// Event is an alternative representation of tendermint/abci/types.Event, +// so that the blockdb package does not depend directly on tendermint. +type Event struct { + Type string + Attributes []EventAttribute + + // Notably, not including the Index field from the tendermint event. + // The ABCI docs state: + // + // "The index flag notifies the Tendermint indexer to index the attribute. The value of the index flag is non-deterministic and may vary across different nodes in the network." +} + +type EventAttribute struct { + Key, Value string +} + +func isOraclePrioritized(tx []Tx) bool { + if len(tx) == 0 { + return true + } + lastOracleIdx := -1 + firstNonOracleIdx := -1 + for i, t := range tx { + if isOracleTx(t) { + lastOracleIdx = i + if firstNonOracleIdx != -1 { + break + } + } else if firstNonOracleIdx == -1 { + firstNonOracleIdx = i + } + } + return lastOracleIdx == -1 || lastOracleIdx < firstNonOracleIdx + +} +func isOracleTx(tx Tx) bool { + for _, event := range tx.Events { + for _, attr := range event.Attributes { + if attr.Key == "oracle" { + return true + } + } + } + return false +} diff --git a/tests/interchaintest/setup.go b/tests/interchaintest/setup.go index 336c0b38..f931db16 100644 --- a/tests/interchaintest/setup.go +++ b/tests/interchaintest/setup.go @@ -7,6 +7,7 @@ import ( "cosmossdk.io/math" "github.com/icza/dyno" + oracle "github.com/classic-terra/core/v3/x/oracle/types" "github.com/cosmos/cosmos-sdk/types/module/testutil" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" @@ -62,6 +63,7 @@ func coreEncoding() *testutil.TestEncodingConfig { // register custom types govv1.RegisterInterfaces(cfg.InterfaceRegistry) + oracle.RegisterInterfaces(cfg.InterfaceRegistry) return &cfg } From 0c23b003a66f6a89d6839a60b2f9471551836106 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sat, 23 Nov 2024 11:16:55 +0700 Subject: [PATCH 17/26] update the mempool --- app/app.go | 3 + app/mempool/mempool_fifo.go | 156 ++++++++++++----------- app/mempool/mempool_fifo_test.go | 207 ++++++++++++++++++++++++++++++- 3 files changed, 295 insertions(+), 71 deletions(-) diff --git a/app/app.go b/app/app.go index 4f22c816..5fd09ebc 100644 --- a/app/app.go +++ b/app/app.go @@ -151,6 +151,9 @@ func NewTerraApp( invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) { mempool := mempool2.NewFifoSenderNonceMempool() + if maxTxs := cast.ToInt(appOpts.Get(server.FlagMempoolMaxTxs)); maxTxs >= 0 { + mempool = mempool2.NewFifoSenderNonceMempool(mempool2.SenderNonceMaxTxOpt(maxTxs)) + } handler := baseapp.NewDefaultProposalHandler(mempool, app) app.SetMempool(mempool) app.SetTxEncoder(txConfig.TxEncoder()) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go index 4853cfb3..190090e4 100644 --- a/app/mempool/mempool_fifo.go +++ b/app/mempool/mempool_fifo.go @@ -2,15 +2,17 @@ package mempool import ( "context" + crand "crypto/rand" // #nosec // crypto/rand is used for seed generation + "encoding/binary" "fmt" + "math/rand" + "sync" "github.com/classic-terra/core/v3/custom/auth/ante" - "github.com/cosmos/cosmos-sdk/types/mempool" - - "github.com/huandu/skiplist" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/mempool" "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/huandu/skiplist" ) var ( @@ -18,7 +20,9 @@ var ( _ mempool.Iterator = (*senderNonceMempoolIterator)(nil) ) -var DefaultMaxTx = 0 +var DefaultMaxTx = 5000 +var prefixSenderOracle = "oracle:" +var prefixSenderRegular = "regular:" // FifoSenderNonceMempool is a mempool that prioritizes oracle transactions first, // followed by regular transactions. Within each type, transactions are ordered by sender @@ -33,20 +37,22 @@ var DefaultMaxTx = 0 // Note that PrepareProposal could choose to stop iteration before reaching the // end if maxBytes is reached. type FifoSenderNonceMempool struct { + mtx sync.Mutex senders map[string]*skiplist.SkipList maxTx int existingTx map[txKey]bool + rnd *rand.Rand sendersOracle map[string]*skiplist.SkipList } -type SenderNonceOptions func(mp *FifoSenderNonceMempool) +type FifoSenderNonceOptions func(mp *FifoSenderNonceMempool) type txKey struct { address string nonce uint64 } -func NewFifoSenderNonceMempool(opts ...SenderNonceOptions) *FifoSenderNonceMempool { +func NewFifoSenderNonceMempool(opts ...FifoSenderNonceOptions) *FifoSenderNonceMempool { senderMap := make(map[string]*skiplist.SkipList) senderOracleMap := make(map[string]*skiplist.SkipList) existingTx := make(map[txKey]bool) @@ -57,6 +63,14 @@ func NewFifoSenderNonceMempool(opts ...SenderNonceOptions) *FifoSenderNonceMempo sendersOracle: senderOracleMap, } + var seed int64 + err := binary.Read(crand.Reader, binary.BigEndian, &seed) + if err != nil { + panic(err) + } + + snp.setSeed(seed) + for _, opt := range opts { opt(snp) } @@ -64,18 +78,36 @@ func NewFifoSenderNonceMempool(opts ...SenderNonceOptions) *FifoSenderNonceMempo return snp } +// SenderNonceSeedOpt Option To add a Seed for random type when calling the +// constructor NewSenderNonceMempool. +// +// Example: +// +// random_seed := int64(1000) +// NewSenderNonceMempool(SenderNonceSeedTxOpt(random_seed)) +func SenderNonceSeedOpt(seed int64) FifoSenderNonceOptions { + return func(snp *FifoSenderNonceMempool) { + snp.setSeed(seed) + } +} + // SenderNonceMaxTxOpt Option To set limit of max tx when calling the constructor // NewSenderNonceMempool. // // Example: // // NewSenderNonceMempool(SenderNonceMaxTxOpt(100)) -func SenderNonceMaxTxOpt(maxTx int) SenderNonceOptions { +func SenderNonceMaxTxOpt(maxTx int) FifoSenderNonceOptions { return func(snp *FifoSenderNonceMempool) { snp.maxTx = maxTx } } +func (snm *FifoSenderNonceMempool) setSeed(seed int64) { + s1 := rand.NewSource(seed) + snm.rnd = rand.New(s1) //#nosec // math/rand is seeded from crypto/rand by default +} + // NextSenderTx returns the next transaction for a given sender by nonce order, // i.e. the next valid transaction for the sender. If no such transaction exists, // nil will be returned. @@ -92,7 +124,9 @@ func (mp *FifoSenderNonceMempool) NextSenderTx(sender string) sdk.Tx { // Insert adds a tx to the mempool. It returns an error if the tx does not have // at least one signer. Note, priority is ignored. func (snm *FifoSenderNonceMempool) Insert(_ context.Context, tx sdk.Tx) error { - if snm.maxTx > 0 && snm.CountTx() >= snm.maxTx { + snm.mtx.Lock() + defer snm.mtx.Unlock() + if snm.maxTx > 0 && len(snm.existingTx) >= snm.maxTx { return mempool.ErrMempoolTxMaxCapacity } if snm.maxTx < 0 { @@ -112,24 +146,22 @@ func (snm *FifoSenderNonceMempool) Insert(_ context.Context, tx sdk.Tx) error { nonce := sig.Sequence isOracleTx := ante.IsOracleTx(tx.GetMsgs()) - senderTxs, found := snm.senders[sender] - if !found && !isOracleTx { - senderTxs = skiplist.New(skiplist.Uint64) - snm.senders[sender] = senderTxs - } - if !isOracleTx { - senderTxs.Set(nonce, tx) + // Select the appropriate transaction map based on type + txMap := snm.senders + if isOracleTx { + txMap = snm.sendersOracle } - senderOracleTxs, found := snm.sendersOracle[sender] - if !found && isOracleTx { - senderOracleTxs = skiplist.New(skiplist.Uint64) - snm.sendersOracle[sender] = senderOracleTxs - } - if isOracleTx { - senderOracleTxs.Set(nonce, tx) + // Get or create the skiplist for this sender + senderTxs, found := txMap[sender] + if !found { + senderTxs = skiplist.New(skiplist.Uint64) + txMap[sender] = senderTxs } + // Add the transaction + senderTxs.Set(nonce, tx) + key := txKey{nonce: nonce, address: sender} snm.existingTx[key] = true @@ -142,6 +174,8 @@ func (snm *FifoSenderNonceMempool) Insert(_ context.Context, tx sdk.Tx) error { // NOTE: It is not safe to use this iterator while removing transactions from // the underlying mempool. func (snm *FifoSenderNonceMempool) Select(_ context.Context, _ [][]byte) mempool.Iterator { + snm.mtx.Lock() + defer snm.mtx.Unlock() var oracleSenders, regularSenders []string senderCursors := make(map[string]*skiplist.Element) @@ -156,7 +190,7 @@ func (snm *FifoSenderNonceMempool) Select(_ context.Context, _ [][]byte) mempool sender := s1.Value.(string) // Add oracle prefix to distinguish from regular transactions oracleSenders = append(oracleSenders, sender) - oracleKey := "oracle:" + sender + oracleKey := prefixSenderOracle + sender senderCursors[oracleKey] = snm.sendersOracle[sender].Front() s1 = s1.Next() } @@ -171,7 +205,7 @@ func (snm *FifoSenderNonceMempool) Select(_ context.Context, _ [][]byte) mempool for s != nil { sender := s.Value.(string) regularSenders = append(regularSenders, sender) - regularKey := "regular:" + sender + regularKey := prefixSenderRegular + sender senderCursors[regularKey] = snm.senders[sender].Front() s = s.Next() } @@ -188,12 +222,16 @@ func (snm *FifoSenderNonceMempool) Select(_ context.Context, _ [][]byte) mempool // CountTx returns the total count of txs in the mempool. func (snm *FifoSenderNonceMempool) CountTx() int { + snm.mtx.Lock() + defer snm.mtx.Unlock() return len(snm.existingTx) } // Remove removes a tx from the mempool. It returns an error if the tx does not // have at least one signer or the tx was not found in the pool. func (snm *FifoSenderNonceMempool) Remove(tx sdk.Tx) error { + snm.mtx.Lock() + defer snm.mtx.Unlock() sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() if err != nil { return err @@ -239,6 +277,7 @@ func (snm *FifoSenderNonceMempool) Remove(tx sdk.Tx) error { } type senderNonceMempoolIterator struct { + rnd *rand.Rand currentTx *skiplist.Element senders []string senderCursors map[string]*skiplist.Element @@ -250,52 +289,31 @@ func (i *senderNonceMempoolIterator) Next() mempool.Iterator { for len(i.senders) > 0 { senderIndex := 0 sender := i.senders[senderIndex] - isOracle := false - checkKey := "oracle:" + sender - _, ok := i.senderCursors[checkKey] - if ok { - isOracle = true + // Determine if this is an oracle transaction and get the appropriate key + checkKey := prefixSenderRegular + sender + if _, ok := i.senderCursors[prefixSenderOracle+sender]; ok { + checkKey = prefixSenderOracle + sender + } + + // Get and process the cursor + senderCursor, found := i.senderCursors[checkKey] + if !found { + i.senders = removeAtIndex(i.senders, senderIndex) + continue } - if isOracle { - checkKey = "oracle:" + sender - senderCursor, found := i.senderCursors[checkKey] - if !found { - i.senders = removeAtIndex(i.senders, senderIndex) - continue - } - - if nextCursor := senderCursor.Next(); nextCursor != nil { - i.senderCursors[checkKey] = nextCursor - } else { - i.senders = removeAtIndex(i.senders, senderIndex) - delete(i.senderCursors, checkKey) - } - - return &senderNonceMempoolIterator{ - senders: i.senders, - currentTx: senderCursor, - senderCursors: i.senderCursors, - } + + // Handle cursor advancement + if nextCursor := senderCursor.Next(); nextCursor != nil { + i.senderCursors[checkKey] = nextCursor } else { - checkKey = "regular:" + sender - senderCursor, found := i.senderCursors[checkKey] - if !found { - i.senders = removeAtIndex(i.senders, senderIndex) - continue - } - - if nextCursor := senderCursor.Next(); nextCursor != nil { - i.senderCursors[checkKey] = nextCursor - } else { - i.senders = removeAtIndex(i.senders, senderIndex) - delete(i.senderCursors, checkKey) - } - - return &senderNonceMempoolIterator{ - senders: i.senders, - currentTx: senderCursor, - senderCursors: i.senderCursors, - } + i.senders = removeAtIndex(i.senders, senderIndex) + delete(i.senderCursors, checkKey) + } + + return &senderNonceMempoolIterator{ + senders: i.senders, + currentTx: senderCursor, + senderCursors: i.senderCursors, } } diff --git a/app/mempool/mempool_fifo_test.go b/app/mempool/mempool_fifo_test.go index 4f9c0e54..9f5fe458 100644 --- a/app/mempool/mempool_fifo_test.go +++ b/app/mempool/mempool_fifo_test.go @@ -5,6 +5,8 @@ import ( "math/rand" "testing" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/classic-terra/core/v3/custom/auth/ante" oracleexported "github.com/classic-terra/core/v3/x/oracle/exported" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -256,7 +258,7 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { pool := appmempool.NewFifoSenderNonceMempool() // create test txs and insert into mempool for i, ts := range tt.txs { - tx := testTx{id: i, nonce: uint64(ts.nonce), address: ts.address, msgs: ts.msgs} + tx := testTx{id: i, nonce: ts.nonce, address: ts.address, msgs: ts.msgs} err := pool.Insert(ctx, tx) require.NoError(t, err) } @@ -365,7 +367,6 @@ func (s *MempoolTestSuite) TestTxNotFoundOnSender() { ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) mp := appmempool.NewFifoSenderNonceMempool() - txSender := testTx{ nonce: 0, address: accounts[0].Address, @@ -384,3 +385,205 @@ func (s *MempoolTestSuite) TestTxNotFoundOnSender() { err = mp.Remove(tx) require.Equal(t, mempool.ErrTxNotFound, err) } + +func (s *MempoolTestSuite) TestBatchTx_WhenEnoughMemPool() { + t := s.T() + ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 10) + mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(150)) + + // Create 150 transactions (50 each of oracle, send, and staking) + var allTxs []testTx + + // Create 50 oracle transactions (25 votes and 25 prevotes) + for i := 0; i < 50; i++ { + var msg sdk.Msg + if i%2 == 0 { + msg = &oracleexported.MsgAggregateExchangeRateVote{ + Salt: fmt.Sprintf("salt_vote_%d", i), + } + } else { + msg = &oracleexported.MsgAggregateExchangeRatePrevote{ + Hash: fmt.Sprintf("hash_prevote_%d", i), + } + } + + tx := testTx{ + id: i, + nonce: uint64(i), + address: accounts[rand.Intn(len(accounts))].Address, + priority: rand.Int63(), + msgs: []sdk.Msg{msg}, + } + allTxs = append(allTxs, tx) + } + + // Create 50 send transactions + for i := 50; i < 100; i++ { + tx := testTx{ + id: i, + nonce: uint64(i), + address: accounts[rand.Intn(len(accounts))].Address, + priority: rand.Int63(), + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + } + allTxs = append(allTxs, tx) + } + + // Create 50 staking transactions + for i := 100; i < 150; i++ { + tx := testTx{ + id: i, + nonce: uint64(i), + address: accounts[rand.Intn(len(accounts))].Address, + priority: rand.Int63(), + msgs: []sdk.Msg{&stakingtypes.MsgDelegate{}}, + } + allTxs = append(allTxs, tx) + } + + // Shuffle the transactions + rand.Shuffle(len(allTxs), func(i, j int) { + allTxs[i], allTxs[j] = allTxs[j], allTxs[i] + }) + + // Insert transactions into mempool + for _, tx := range allTxs { + err := mp.Insert(ctx, tx) + require.NoError(t, err) + } + + // Verify mempool size + require.Equal(t, 150, mp.CountTx()) + + // Get ordered transactions + itr := mp.Select(ctx, nil) + orderedTxs := fetchTxs(itr, 1000) + require.Equal(t, 150, len(orderedTxs)) + + // Count oracle transactions in first batch + oracleCount := 0 + for _, tx := range orderedTxs[:50] { + if ante.IsOracleTx(tx.GetMsgs()) { + oracleCount++ + } + } + + // Verify oracle transactions are prioritized + require.True(t, oracleCount == 50, "Expected majority of first 50 transactions to be oracle transactions") + + // Cleanup + for _, tx := range orderedTxs { + require.NoError(t, mp.Remove(tx)) + } + require.Equal(t, 0, mp.CountTx()) +} + +func (s *MempoolTestSuite) TestBatchTx_WhenNotEnoughMemPool() { + t := s.T() + ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 10) + maxMempoolSize := 100 + mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(maxMempoolSize)) + + // Create 150 transactions (50 each of oracle, send, and staking) + var allTxs []testTx + + // Create 50 oracle transactions (25 votes and 25 prevotes) + for i := 0; i < 50; i++ { + var msg sdk.Msg + if i%2 == 0 { + msg = &oracleexported.MsgAggregateExchangeRateVote{ + Salt: fmt.Sprintf("salt_vote_%d", i), + } + } else { + msg = &oracleexported.MsgAggregateExchangeRatePrevote{ + Hash: fmt.Sprintf("hash_prevote_%d", i), + } + } + + tx := testTx{ + id: i, + nonce: uint64(i), + address: accounts[rand.Intn(len(accounts))].Address, + priority: rand.Int63(), + msgs: []sdk.Msg{msg}, + } + allTxs = append(allTxs, tx) + } + + // Create 50 send transactions + for i := 50; i < 100; i++ { + tx := testTx{ + id: i, + nonce: uint64(i), + address: accounts[rand.Intn(len(accounts))].Address, + priority: rand.Int63(), + msgs: []sdk.Msg{&banktypes.MsgSend{}}, + } + allTxs = append(allTxs, tx) + } + + // Create 50 staking transactions + for i := 100; i < 150; i++ { + tx := testTx{ + id: i, + nonce: uint64(i), + address: accounts[rand.Intn(len(accounts))].Address, + priority: rand.Int63(), + msgs: []sdk.Msg{&stakingtypes.MsgDelegate{}}, + } + allTxs = append(allTxs, tx) + } + + // Shuffle the transactions + rand.Shuffle(len(allTxs), func(i, j int) { + allTxs[i], allTxs[j] = allTxs[j], allTxs[i] + }) + + // Insert transactions into mempool + i := 0 + for _, tx := range allTxs { + err := mp.Insert(ctx, tx) + if i < maxMempoolSize { + require.NoError(t, err) + } else { + require.Equal(t, mempool.ErrMempoolTxMaxCapacity, err) + } + i += 1 + } + + // Verify mempool size + require.Equal(t, 100, mp.CountTx()) + + // Get ordered transactions + itr := mp.Select(ctx, nil) + orderedTxs := fetchTxs(itr, 1000) + require.Equal(t, 100, len(orderedTxs)) + + // Verify oracle transactions come first, followed by regular transactions + var lastOracleIndex = -1 + var firstRegularIndex = -1 + + for i, tx := range orderedTxs { + if ante.IsOracleTx(tx.GetMsgs()) { + lastOracleIndex = i + // If we've already seen a regular transaction, this is an error + require.Equal(t, -1, firstRegularIndex, + "Found oracle tx after regular tx at index %d", i) + } else { + if firstRegularIndex == -1 { + firstRegularIndex = i + } + } + } + + // Verify oracle transactions are prioritized + require.True(t, lastOracleIndex < firstRegularIndex, "Expected majority oracle transactions come first") + + // Cleanup + for _, tx := range orderedTxs { + require.NoError(t, mp.Remove(tx)) + } + require.Equal(t, 0, mp.CountTx()) +} From 8f9aacc6738a4c58cb7323346853857014bc6f4f Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sat, 23 Nov 2024 12:11:05 +0700 Subject: [PATCH 18/26] update the mempool --- app/mempool/mempool_fifo.go | 156 ++++++++++++++++++------------- app/mempool/mempool_fifo_test.go | 106 ++++++++++++++++++--- 2 files changed, 182 insertions(+), 80 deletions(-) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go index 190090e4..9289d994 100644 --- a/app/mempool/mempool_fifo.go +++ b/app/mempool/mempool_fifo.go @@ -21,21 +21,22 @@ var ( ) var DefaultMaxTx = 5000 -var prefixSenderOracle = "oracle:" -var prefixSenderRegular = "regular:" -// FifoSenderNonceMempool is a mempool that prioritizes oracle transactions first, -// followed by regular transactions. Within each type, transactions are ordered by sender -// and nonce. -// The mempool is iterated by: +// FifoSenderNonceMempool is a mempool implementation that maintains two separate transaction pools: +// one for oracle transactions and another for regular transactions. Oracle transactions are given +// priority during iteration. // -// 1) Maintaining separate lists of nonce-ordered txs per sender for both oracle and regular transactions -// 2) Processing all oracle transactions first, in order of sender address and nonce -// 3) After oracle transactions are exhausted, processing regular transactions in order of sender address and nonce -// 4) Repeat until the mempool is exhausted +// Key characteristics: +// 1. Maintains two separate maps of sender-to-transactions (oracle and regular) +// 2. Each sender's transactions are stored in a skiplist ordered by nonce +// 3. During iteration: +// - Oracle transactions are processed first, with random sender selection +// - Regular transactions follow, also with random sender selection +// - For each sender, transactions are processed in nonce order +// 4. Transaction capacity is limited by maxTx (if > 0) // -// Note that PrepareProposal could choose to stop iteration before reaching the -// end if maxBytes is reached. +// Note: PrepareProposal may terminate iteration early if block size limits are reached. + type FifoSenderNonceMempool struct { mtx sync.Mutex senders map[string]*skiplist.SkipList @@ -168,56 +169,52 @@ func (snm *FifoSenderNonceMempool) Insert(_ context.Context, tx sdk.Tx) error { return nil } -// Select returns an iterator ordering transactions the mempool with the lowest -// nonce of a random selected sender first. +// Select returns an iterator for processing mempool transactions in the following order: +// 1. Oracle transactions are processed first: +// - Senders are ordered lexicographically but selected randomly +// - Each sender's transactions are processed in nonce order +// +// 2. Regular transactions are processed second: +// - Senders are ordered lexicographically but selected randomly +// - Each sender's transactions are processed in nonce order // // NOTE: It is not safe to use this iterator while removing transactions from // the underlying mempool. func (snm *FifoSenderNonceMempool) Select(_ context.Context, _ [][]byte) mempool.Iterator { snm.mtx.Lock() defer snm.mtx.Unlock() - var oracleSenders, regularSenders []string - senderCursors := make(map[string]*skiplist.Element) - // Handle oracle transactions first - orderedSendersOracle := skiplist.New(skiplist.String) - for s := range snm.sendersOracle { - orderedSendersOracle.Set(s, s) - } + oracleSenders, senderOracleCursors := snm.getSenderList(snm.sendersOracle) - s1 := orderedSendersOracle.Front() - for s1 != nil { - sender := s1.Value.(string) - // Add oracle prefix to distinguish from regular transactions - oracleSenders = append(oracleSenders, sender) - oracleKey := prefixSenderOracle + sender - senderCursors[oracleKey] = snm.sendersOracle[sender].Front() - s1 = s1.Next() + // Handle regular transactions + regularSenders, senderCursors := snm.getSenderList(snm.senders) + + iter := &senderNonceMempoolIterator{ + senders: regularSenders, + sendersOracle: oracleSenders, + senderCursors: senderCursors, + rnd: snm.rnd, + senderOracleCursors: senderOracleCursors, } + return iter.Next() +} + +func (snm *FifoSenderNonceMempool) getSenderList(senderMap map[string]*skiplist.SkipList) ([]string, map[string]*skiplist.Element) { + senders := make([]string, 0, len(senderMap)) + cursors := make(map[string]*skiplist.Element) - // Handle regular transactions orderedSenders := skiplist.New(skiplist.String) - for s := range snm.senders { + for s := range senderMap { orderedSenders.Set(s, s) } - s := orderedSenders.Front() - for s != nil { + for s := orderedSenders.Front(); s != nil; s = s.Next() { sender := s.Value.(string) - regularSenders = append(regularSenders, sender) - regularKey := prefixSenderRegular + sender - senderCursors[regularKey] = snm.senders[sender].Front() - s = s.Next() + senders = append(senders, sender) + cursors[sender] = senderMap[sender].Front() } - // Combine senders with oracle transactions first - senders := append(oracleSenders, regularSenders...) - - iter := &senderNonceMempoolIterator{ - senders: senders, - senderCursors: senderCursors, - } - return iter.Next() + return senders, cursors } // CountTx returns the total count of txs in the mempool. @@ -257,7 +254,7 @@ func (snm *FifoSenderNonceMempool) Remove(tx sdk.Tx) error { } if senderOracleTxs.Len() == 0 { - delete(snm.senders, sender) + delete(snm.sendersOracle, sender) } } else if found1 { res := senderTxs.Remove(nonce) @@ -277,43 +274,70 @@ func (snm *FifoSenderNonceMempool) Remove(tx sdk.Tx) error { } type senderNonceMempoolIterator struct { - rnd *rand.Rand - currentTx *skiplist.Element - senders []string - senderCursors map[string]*skiplist.Element + rnd *rand.Rand + currentTx *skiplist.Element + senders []string + sendersOracle []string + senderCursors map[string]*skiplist.Element + senderOracleCursors map[string]*skiplist.Element } // Next returns the next iterator state which will contain a tx with the next // smallest nonce of a randomly selected sender. func (i *senderNonceMempoolIterator) Next() mempool.Iterator { - for len(i.senders) > 0 { - senderIndex := 0 - sender := i.senders[senderIndex] - // Determine if this is an oracle transaction and get the appropriate key - checkKey := prefixSenderRegular + sender - if _, ok := i.senderCursors[prefixSenderOracle+sender]; ok { - checkKey = prefixSenderOracle + sender + // process oracle sender first + for len(i.sendersOracle) > 0 { + senderIndex := i.rnd.Intn(len(i.sendersOracle)) + sender := i.sendersOracle[senderIndex] + cursor, found := i.senderOracleCursors[sender] + if !found { + i.sendersOracle = removeAtIndex(i.sendersOracle, senderIndex) + continue + } + + // Handle cursor advancement + if nextCursor := cursor.Next(); nextCursor != nil { + i.senderOracleCursors[sender] = nextCursor + } else { + i.sendersOracle = removeAtIndex(i.sendersOracle, senderIndex) + delete(i.senderOracleCursors, sender) + } + + return &senderNonceMempoolIterator{ + sendersOracle: i.sendersOracle, + senders: i.senders, + currentTx: cursor, + rnd: i.rnd, + senderCursors: i.senderCursors, + senderOracleCursors: i.senderOracleCursors, } + } - // Get and process the cursor - senderCursor, found := i.senderCursors[checkKey] + // process regular transactions + for len(i.senders) > 0 { + senderIndex := i.rnd.Intn(len(i.senders)) + sender := i.senders[senderIndex] + cursor, found := i.senderCursors[sender] if !found { - i.senders = removeAtIndex(i.senders, senderIndex) + i.sendersOracle = removeAtIndex(i.senders, senderIndex) continue } // Handle cursor advancement - if nextCursor := senderCursor.Next(); nextCursor != nil { - i.senderCursors[checkKey] = nextCursor + if nextCursor := cursor.Next(); nextCursor != nil { + i.senderCursors[sender] = nextCursor } else { i.senders = removeAtIndex(i.senders, senderIndex) - delete(i.senderCursors, checkKey) + delete(i.senderCursors, sender) } return &senderNonceMempoolIterator{ - senders: i.senders, - currentTx: senderCursor, - senderCursors: i.senderCursors, + sendersOracle: i.sendersOracle, + senders: i.senders, + currentTx: cursor, + rnd: i.rnd, + senderCursors: i.senderCursors, + senderOracleCursors: i.senderOracleCursors, } } diff --git a/app/mempool/mempool_fifo_test.go b/app/mempool/mempool_fifo_test.go index 9f5fe458..6cff2d25 100644 --- a/app/mempool/mempool_fifo_test.go +++ b/app/mempool/mempool_fifo_test.go @@ -1,6 +1,7 @@ package mempool_test import ( + "errors" "fmt" "math/rand" "testing" @@ -55,7 +56,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 5, n: 1, a: sb}, {p: 8, n: 2, a: sb}, }, - order: []int{3, 4, 5, 0, 1, 2}, + order: []int{3, 4, 0, 5, 1, 2}, seed: 0, }, { @@ -99,7 +100,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 6, a: sa, n: 3}, {p: 4, a: sb, n: 3}, }, - order: []int{4, 1, 6, 3, 2, 0, 5}, + order: []int{4, 1, 3, 6, 2, 0, 5}, seed: 0, }, { @@ -115,7 +116,9 @@ func (s *MempoolTestSuite) TestTxOrder() { } for i, tt := range tests { t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { - pool := appmempool.NewFifoSenderNonceMempool() + pool := appmempool.NewFifoSenderNonceMempool( + appmempool.SenderNonceSeedOpt(tt.seed), + ) // create test txs and insert into mempool for i, ts := range tt.txs { tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} @@ -147,9 +150,9 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { sb := accounts[1].Address tests := []struct { - txs []testTx - order []int - fail bool + txs []testTx + numberTxOracle int + fail bool }{ { txs: []testTx{ @@ -166,7 +169,7 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { address: sb, }, }, - order: []int{1, 0}, + numberTxOracle: 1, }, { // Test multiple oracle txs vs regular txs @@ -196,7 +199,7 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { address: sb, }, }, - order: []int{1, 2, 3, 0}, + numberTxOracle: 2, }, { // Test oracle tx priority with different nonces @@ -220,7 +223,7 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { address: sa, }, }, - order: []int{1, 2, 0}, + numberTxOracle: 1, }, { // Test multiple oracle txs from different senders @@ -246,11 +249,11 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { { id: 3, nonce: 1, - msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRateVote{}}, + msgs: []sdk.Msg{&oracleexported.MsgAggregateExchangeRatePrevote{}}, address: sb, }, }, - order: []int{3, 2, 0, 1}, // All oracle txs first, then regular txs + numberTxOracle: 2, }, } for i, tt := range tests { @@ -265,14 +268,18 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { itr := pool.Select(ctx, nil) orderedTxs := fetchTxs(itr, 1000) - var txOrder []int + numberTxOracle := 0 for _, tx := range orderedTxs { - txOrder = append(txOrder, tx.(testTx).id) + if ante.IsOracleTx(tx.GetMsgs()) { + numberTxOracle += +1 + } else { + break + } } for _, tx := range orderedTxs { require.NoError(t, pool.Remove(tx)) } - require.Equal(t, tt.order, txOrder) + require.Equal(t, tt.numberTxOracle, numberTxOracle) require.Equal(t, 0, pool.CountTx()) }) } @@ -587,3 +594,74 @@ func (s *MempoolTestSuite) TestBatchTx_WhenNotEnoughMemPool() { } require.Equal(t, 0, mp.CountTx()) } + +func BenchmarkMempool(b *testing.B) { + ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 10) + maxMempoolSize := 1000 + + benchmarks := []struct { + name string + size int + }{ + {"Small-100", 100}, + {"Medium-500", 500}, + {"Large-1000", 1000}, + } + + for _, bm := range benchmarks { + b.Run(bm.name, func(b *testing.B) { + // Reset timer for setup + b.StopTimer() + + var allTxs []testTx + // Create mixed transaction types (oracle, send, staking) + for i := 0; i < bm.size; i++ { + var msg sdk.Msg + switch i % 3 { + case 0: + msg = &oracleexported.MsgAggregateExchangeRateVote{ + Salt: fmt.Sprintf("salt_vote_%d", i), + } + case 1: + msg = &banktypes.MsgSend{} + case 2: + msg = &stakingtypes.MsgDelegate{} + } + + tx := testTx{ + id: i, + nonce: uint64(i), + address: accounts[rand.Intn(len(accounts))].Address, + priority: rand.Int63(), + msgs: []sdk.Msg{msg}, + } + allTxs = append(allTxs, tx) + } + + b.StartTimer() + for i := 0; i < b.N; i++ { + mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(maxMempoolSize)) + + // Benchmark insertion + for _, tx := range allTxs { + err := mp.Insert(ctx, tx) + if err != nil && !errors.Is(err, mempool.ErrMempoolTxMaxCapacity) { + b.Fatal(err) + } + } + + // Benchmark selection + itr := mp.Select(ctx, nil) + orderedTxs := fetchTxs(itr, int64(bm.size)) + + // Benchmark removal + for _, tx := range orderedTxs { + if err := mp.Remove(tx); err != nil { + b.Fatal(err) + } + } + } + }) + } +} From bd6a56fd28cf0beba5afab5e1b1545855eb0efaf Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sun, 24 Nov 2024 10:24:16 +0700 Subject: [PATCH 19/26] update mempool --- app/app.go | 4 +- app/mempool/mempool_fifo.go | 399 ++++++++++--------------------- app/mempool/mempool_fifo_test.go | 36 +-- 3 files changed, 150 insertions(+), 289 deletions(-) diff --git a/app/app.go b/app/app.go index 5fd09ebc..eed1cc58 100644 --- a/app/app.go +++ b/app/app.go @@ -150,9 +150,9 @@ func NewTerraApp( invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) { - mempool := mempool2.NewFifoSenderNonceMempool() + mempool := mempool2.NewFifoMempool() if maxTxs := cast.ToInt(appOpts.Get(server.FlagMempoolMaxTxs)); maxTxs >= 0 { - mempool = mempool2.NewFifoSenderNonceMempool(mempool2.SenderNonceMaxTxOpt(maxTxs)) + mempool = mempool2.NewFifoMempool(mempool2.FifoMaxTxOpt(maxTxs)) } handler := baseapp.NewDefaultProposalHandler(mempool, app) app.SetMempool(mempool) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go index 9289d994..16930fcd 100644 --- a/app/mempool/mempool_fifo.go +++ b/app/mempool/mempool_fifo.go @@ -1,28 +1,27 @@ package mempool import ( - "context" - crand "crypto/rand" // #nosec // crypto/rand is used for seed generation - "encoding/binary" + "context" // #nosec // crypto/rand is used for seed generation "fmt" - "math/rand" "sync" + "github.com/cometbft/cometbft/libs/clist" + cmtsync "github.com/cometbft/cometbft/libs/sync" + "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/classic-terra/core/v3/custom/auth/ante" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" - "github.com/cosmos/cosmos-sdk/x/auth/signing" - "github.com/huandu/skiplist" ) var ( - _ mempool.Mempool = (*FifoSenderNonceMempool)(nil) - _ mempool.Iterator = (*senderNonceMempoolIterator)(nil) + _ mempool.Mempool = (*FifoMempool)(nil) + _ mempool.Iterator = (*fifoIterator)(nil) ) var DefaultMaxTx = 5000 -// FifoSenderNonceMempool is a mempool implementation that maintains two separate transaction pools: +// FifoMempool is a mempool implementation that maintains two separate transaction pools: // one for oracle transactions and another for regular transactions. Oracle transactions are given // priority during iteration. // @@ -30,324 +29,184 @@ var DefaultMaxTx = 5000 // 1. Maintains two separate maps of sender-to-transactions (oracle and regular) // 2. Each sender's transactions are stored in a skiplist ordered by nonce // 3. During iteration: -// - Oracle transactions are processed first, with random sender selection -// - Regular transactions follow, also with random sender selection -// - For each sender, transactions are processed in nonce order +// - Oracle transactions are processed first, with random sender selection +// - Regular transactions follow, also with random sender selection +// - For each sender, transactions are processed in nonce order +// // 4. Transaction capacity is limited by maxTx (if > 0) // // Note: PrepareProposal may terminate iteration early if block size limits are reached. - -type FifoSenderNonceMempool struct { - mtx sync.Mutex - senders map[string]*skiplist.SkipList - maxTx int - existingTx map[txKey]bool - rnd *rand.Rand - sendersOracle map[string]*skiplist.SkipList +type FifoMempool struct { + updateMtx cmtsync.RWMutex + txs *clist.CList // Regular transactions FIFO queue + txsOracle *clist.CList // Oracle transactions FIFO queue + txsMap sync.Map // For quick lookup of existing transactions + txsMapOracle sync.Map // For quick lookup of existing transactions + maxTx int } -type FifoSenderNonceOptions func(mp *FifoSenderNonceMempool) - -type txKey struct { - address string - nonce uint64 -} - -func NewFifoSenderNonceMempool(opts ...FifoSenderNonceOptions) *FifoSenderNonceMempool { - senderMap := make(map[string]*skiplist.SkipList) - senderOracleMap := make(map[string]*skiplist.SkipList) - existingTx := make(map[txKey]bool) - snp := &FifoSenderNonceMempool{ - senders: senderMap, - maxTx: DefaultMaxTx, - existingTx: existingTx, - sendersOracle: senderOracleMap, - } +type FifoMempoolOptions func(mp *FifoMempool) - var seed int64 - err := binary.Read(crand.Reader, binary.BigEndian, &seed) - if err != nil { - panic(err) +func NewFifoMempool(opts ...FifoMempoolOptions) *FifoMempool { + mp := &FifoMempool{ + txs: clist.New(), + txsOracle: clist.New(), + maxTx: DefaultMaxTx, } - snp.setSeed(seed) - for _, opt := range opts { - opt(snp) + opt(mp) } - return snp + return mp } -// SenderNonceSeedOpt Option To add a Seed for random type when calling the -// constructor NewSenderNonceMempool. -// -// Example: -// -// random_seed := int64(1000) -// NewSenderNonceMempool(SenderNonceSeedTxOpt(random_seed)) -func SenderNonceSeedOpt(seed int64) FifoSenderNonceOptions { - return func(snp *FifoSenderNonceMempool) { - snp.setSeed(seed) +func FifoMaxTxOpt(maxTx int) FifoMempoolOptions { + return func(mp *FifoMempool) { + mp.maxTx = maxTx } } -// SenderNonceMaxTxOpt Option To set limit of max tx when calling the constructor -// NewSenderNonceMempool. -// -// Example: -// -// NewSenderNonceMempool(SenderNonceMaxTxOpt(100)) -func SenderNonceMaxTxOpt(maxTx int) FifoSenderNonceOptions { - return func(snp *FifoSenderNonceMempool) { - snp.maxTx = maxTx - } -} - -func (snm *FifoSenderNonceMempool) setSeed(seed int64) { - s1 := rand.NewSource(seed) - snm.rnd = rand.New(s1) //#nosec // math/rand is seeded from crypto/rand by default -} - -// NextSenderTx returns the next transaction for a given sender by nonce order, -// i.e. the next valid transaction for the sender. If no such transaction exists, -// nil will be returned. -func (mp *FifoSenderNonceMempool) NextSenderTx(sender string) sdk.Tx { - senderIndex, ok := mp.senders[sender] - if !ok { - return nil - } - - cursor := senderIndex.Front() - return cursor.Value.(sdk.Tx) -} - -// Insert adds a tx to the mempool. It returns an error if the tx does not have -// at least one signer. Note, priority is ignored. -func (snm *FifoSenderNonceMempool) Insert(_ context.Context, tx sdk.Tx) error { - snm.mtx.Lock() - defer snm.mtx.Unlock() - if snm.maxTx > 0 && len(snm.existingTx) >= snm.maxTx { +func (mp *FifoMempool) Insert(_ context.Context, tx sdk.Tx) error { + mp.updateMtx.RLock() + defer mp.updateMtx.RUnlock() + totalTxs := mp.txs.Len() + mp.txsOracle.Len() + if mp.maxTx > 0 && totalTxs >= mp.maxTx { return mempool.ErrMempoolTxMaxCapacity } - if snm.maxTx < 0 { + if mp.maxTx < 0 { return nil } - sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + txKey, err := getTxKey(tx) if err != nil { return err } - if len(sigs) == 0 { - return fmt.Errorf("tx must have at least one signer") + // Add to appropriate queue based on transaction type + if ante.IsOracleTx(tx.GetMsgs()) { + e := mp.txsOracle.PushBack(tx) + mp.txsMapOracle.Store(txKey, e) + } else { + e := mp.txs.PushBack(tx) + mp.txsMap.Store(txKey, e) } - sig := sigs[0] - sender := sdk.AccAddress(sig.PubKey.Address()).String() - nonce := sig.Sequence - - isOracleTx := ante.IsOracleTx(tx.GetMsgs()) - // Select the appropriate transaction map based on type - txMap := snm.senders - if isOracleTx { - txMap = snm.sendersOracle - } - - // Get or create the skiplist for this sender - senderTxs, found := txMap[sender] - if !found { - senderTxs = skiplist.New(skiplist.Uint64) - txMap[sender] = senderTxs - } - - // Add the transaction - senderTxs.Set(nonce, tx) - - key := txKey{nonce: nonce, address: sender} - snm.existingTx[key] = true - return nil } -// Select returns an iterator for processing mempool transactions in the following order: -// 1. Oracle transactions are processed first: -// - Senders are ordered lexicographically but selected randomly -// - Each sender's transactions are processed in nonce order -// -// 2. Regular transactions are processed second: -// - Senders are ordered lexicographically but selected randomly -// - Each sender's transactions are processed in nonce order -// -// NOTE: It is not safe to use this iterator while removing transactions from -// the underlying mempool. -func (snm *FifoSenderNonceMempool) Select(_ context.Context, _ [][]byte) mempool.Iterator { - snm.mtx.Lock() - defer snm.mtx.Unlock() - // Handle oracle transactions first - oracleSenders, senderOracleCursors := snm.getSenderList(snm.sendersOracle) - - // Handle regular transactions - regularSenders, senderCursors := snm.getSenderList(snm.senders) - - iter := &senderNonceMempoolIterator{ - senders: regularSenders, - sendersOracle: oracleSenders, - senderCursors: senderCursors, - rnd: snm.rnd, - senderOracleCursors: senderOracleCursors, +func (mp *FifoMempool) Select(_ context.Context, _ [][]byte) mempool.Iterator { + mp.updateMtx.RLock() + defer mp.updateMtx.RUnlock() + // Pre-allocate slice with exact capacity needed + totalTxs := mp.txsOracle.Len() + mp.txs.Len() + listTxKey := make([]customTxKey, 0, totalTxs) + var newMapTxs sync.Map + var newMapTxsOracle sync.Map + for e := mp.txsOracle.Front(); e != nil; e = e.Next() { + tx := e.Value.(sdk.Tx) + txKey, _ := getTxKey(tx) + listTxKey = append(listTxKey, txKey) + newMapTxsOracle.Store(txKey, e) + } + for e := mp.txs.Front(); e != nil; e = e.Next() { + tx := e.Value.(sdk.Tx) + txKey, _ := getTxKey(tx) + listTxKey = append(listTxKey, txKey) + newMapTxs.Store(txKey, e) + } + + iter := &fifoIterator{ + listTxKey: listTxKey, + mapTxs: &newMapTxs, + mapTxsOracle: &newMapTxsOracle, } return iter.Next() } -func (snm *FifoSenderNonceMempool) getSenderList(senderMap map[string]*skiplist.SkipList) ([]string, map[string]*skiplist.Element) { - senders := make([]string, 0, len(senderMap)) - cursors := make(map[string]*skiplist.Element) +type fifoIterator struct { + currentTx *clist.CElement + listTxKey []customTxKey + mapTxs *sync.Map + mapTxsOracle *sync.Map +} + +func (it *fifoIterator) Next() mempool.Iterator { + // Return nil if we've processed all transactions + if len(it.listTxKey) == 0 { + return nil + } + + // Get the next transaction key and remove it from the list + txKey := it.listTxKey[0] + it.listTxKey = it.listTxKey[1:] - orderedSenders := skiplist.New(skiplist.String) - for s := range senderMap { - orderedSenders.Set(s, s) + // Check oracle transactions first + if elem, exists := it.mapTxsOracle.LoadAndDelete(txKey); exists { + it.currentTx = elem.(*clist.CElement) + return it } - for s := orderedSenders.Front(); s != nil; s = s.Next() { - sender := s.Value.(string) - senders = append(senders, sender) - cursors[sender] = senderMap[sender].Front() + // Then check regular transactions + if elem, exists := it.mapTxs.LoadAndDelete(txKey); exists { + it.currentTx = elem.(*clist.CElement) + return it } - return senders, cursors + // If transaction was already removed, continue to next one + return it.Next() } -// CountTx returns the total count of txs in the mempool. -func (snm *FifoSenderNonceMempool) CountTx() int { - snm.mtx.Lock() - defer snm.mtx.Unlock() - return len(snm.existingTx) +func (it *fifoIterator) Tx() sdk.Tx { + return it.currentTx.Value.(sdk.Tx) } -// Remove removes a tx from the mempool. It returns an error if the tx does not -// have at least one signer or the tx was not found in the pool. -func (snm *FifoSenderNonceMempool) Remove(tx sdk.Tx) error { - snm.mtx.Lock() - defer snm.mtx.Unlock() - sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() +func (mp *FifoMempool) Remove(tx sdk.Tx) error { + mp.updateMtx.RLock() + defer mp.updateMtx.RUnlock() + txKey, err := getTxKey(tx) if err != nil { return err } - if len(sigs) == 0 { - return fmt.Errorf("tx must have at least one signer") - } - sig := sigs[0] - sender := sdk.AccAddress(sig.PubKey.Address()).String() - nonce := sig.Sequence - - senderTxs, found1 := snm.senders[sender] - senderOracleTxs, found2 := snm.sendersOracle[sender] - if !found1 && !found2 { - return mempool.ErrTxNotFound - } - - if ante.IsOracleTx(tx.GetMsgs()) && found2 { - res := senderOracleTxs.Remove(nonce) - if res == nil { - return mempool.ErrTxNotFound - } - - if senderOracleTxs.Len() == 0 { - delete(snm.sendersOracle, sender) + isOracle := ante.IsOracleTx(tx.GetMsgs()) + if isOracle { + if elem, ok := mp.txsMapOracle.LoadAndDelete(txKey); ok { + mp.txsOracle.Remove(elem.(*clist.CElement)) + return nil } - } else if found1 { - res := senderTxs.Remove(nonce) - if res == nil { - return mempool.ErrTxNotFound - } - - if senderTxs.Len() == 0 { - delete(snm.senders, sender) + } else { + if elem, ok := mp.txsMap.LoadAndDelete(txKey); ok { + mp.txs.Remove(elem.(*clist.CElement)) + return nil } } - key := txKey{nonce: nonce, address: sender} - delete(snm.existingTx, key) - - return nil + return mempool.ErrTxNotFound } -type senderNonceMempoolIterator struct { - rnd *rand.Rand - currentTx *skiplist.Element - senders []string - sendersOracle []string - senderCursors map[string]*skiplist.Element - senderOracleCursors map[string]*skiplist.Element +func (mp *FifoMempool) CountTx() int { + mp.updateMtx.RLock() + defer mp.updateMtx.RUnlock() + return mp.txs.Len() + mp.txsOracle.Len() } -// Next returns the next iterator state which will contain a tx with the next -// smallest nonce of a randomly selected sender. -func (i *senderNonceMempoolIterator) Next() mempool.Iterator { - // process oracle sender first - for len(i.sendersOracle) > 0 { - senderIndex := i.rnd.Intn(len(i.sendersOracle)) - sender := i.sendersOracle[senderIndex] - cursor, found := i.senderOracleCursors[sender] - if !found { - i.sendersOracle = removeAtIndex(i.sendersOracle, senderIndex) - continue - } - - // Handle cursor advancement - if nextCursor := cursor.Next(); nextCursor != nil { - i.senderOracleCursors[sender] = nextCursor - } else { - i.sendersOracle = removeAtIndex(i.sendersOracle, senderIndex) - delete(i.senderOracleCursors, sender) - } - - return &senderNonceMempoolIterator{ - sendersOracle: i.sendersOracle, - senders: i.senders, - currentTx: cursor, - rnd: i.rnd, - senderCursors: i.senderCursors, - senderOracleCursors: i.senderOracleCursors, - } +func getTxKey(tx sdk.Tx) (customTxKey, error) { + sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + if err != nil { + return customTxKey{}, err } - - // process regular transactions - for len(i.senders) > 0 { - senderIndex := i.rnd.Intn(len(i.senders)) - sender := i.senders[senderIndex] - cursor, found := i.senderCursors[sender] - if !found { - i.sendersOracle = removeAtIndex(i.senders, senderIndex) - continue - } - - // Handle cursor advancement - if nextCursor := cursor.Next(); nextCursor != nil { - i.senderCursors[sender] = nextCursor - } else { - i.senders = removeAtIndex(i.senders, senderIndex) - delete(i.senderCursors, sender) - } - - return &senderNonceMempoolIterator{ - sendersOracle: i.sendersOracle, - senders: i.senders, - currentTx: cursor, - rnd: i.rnd, - senderCursors: i.senderCursors, - senderOracleCursors: i.senderOracleCursors, - } + if len(sigs) == 0 { + return customTxKey{}, fmt.Errorf("tx must have at least one signer") } - return nil -} - -func (i *senderNonceMempoolIterator) Tx() sdk.Tx { - return i.currentTx.Value.(sdk.Tx) + sig := sigs[0] + sender := sdk.AccAddress(sig.PubKey.Address()).String() + nonce := sig.Sequence + key := customTxKey{nonce: nonce, address: sender} + return key, nil } -func removeAtIndex[T any](slice []T, index int) []T { - return append(slice[:index], slice[index+1:]...) +type customTxKey struct { + address string + nonce uint64 } diff --git a/app/mempool/mempool_fifo_test.go b/app/mempool/mempool_fifo_test.go index 6cff2d25..8d62f07f 100644 --- a/app/mempool/mempool_fifo_test.go +++ b/app/mempool/mempool_fifo_test.go @@ -44,7 +44,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 15, n: 1, a: sb}, {p: 20, n: 1, a: sa}, }, - order: []int{3, 4, 2, 1, 0}, + order: []int{0, 1, 2, 3, 4}, seed: 0, }, { @@ -56,7 +56,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 5, n: 1, a: sb}, {p: 8, n: 2, a: sb}, }, - order: []int{3, 4, 0, 5, 1, 2}, + order: []int{0, 1, 2, 3, 4, 5}, seed: 0, }, { @@ -65,7 +65,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 15, n: 1, a: sb}, {p: 20, n: 1, a: sa}, }, - order: []int{1, 2, 0}, + order: []int{0, 1, 2}, seed: 0, }, { @@ -76,7 +76,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 15, n: 1, a: sb}, {p: 21, n: 2, a: sb}, }, - order: []int{3, 4, 2, 1, 0}, + order: []int{0, 1, 2, 3, 4}, seed: 0, }, { @@ -87,7 +87,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 15, n: 1, a: sb}, {p: 8, n: 2, a: sb}, }, - order: []int{3, 4, 2, 1, 0}, + order: []int{0, 1, 2, 3, 4}, seed: 0, }, { @@ -100,7 +100,7 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 6, a: sa, n: 3}, {p: 4, a: sb, n: 3}, }, - order: []int{4, 1, 3, 6, 2, 0, 5}, + order: []int{0, 1, 2, 3, 4, 5, 6}, seed: 0, }, { @@ -110,15 +110,13 @@ func (s *MempoolTestSuite) TestTxOrder() { {p: 5, n: 1, a: sb}, {p: 99, n: 2, a: sb}, }, - order: []int{2, 3, 0, 1}, + order: []int{0, 1, 2, 3}, seed: 0, }, } for i, tt := range tests { t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { - pool := appmempool.NewFifoSenderNonceMempool( - appmempool.SenderNonceSeedOpt(tt.seed), - ) + pool := appmempool.NewFifoMempool() // create test txs and insert into mempool for i, ts := range tt.txs { tx := testTx{id: i, priority: int64(ts.p), nonce: uint64(ts.n), address: ts.a} @@ -258,7 +256,7 @@ func (s *MempoolTestSuite) TestTxOrderWithOracle() { } for i, tt := range tests { t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { - pool := appmempool.NewFifoSenderNonceMempool() + pool := appmempool.NewFifoMempool() // create test txs and insert into mempool for i, ts := range tt.txs { tx := testTx{id: i, nonce: ts.nonce, address: ts.address, msgs: ts.msgs} @@ -289,7 +287,7 @@ func (s *MempoolTestSuite) TestOracleTx() { t := s.T() ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 3) - mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(3)) + mp := appmempool.NewFifoMempool(appmempool.FifoMaxTxOpt(3)) tx := testTx{ id: 0, @@ -331,19 +329,23 @@ func (s *MempoolTestSuite) TestOracleTx() { orderedTxs := fetchTxs(itr, 1000) for _, tmpTx := range orderedTxs { fmt.Println(tmpTx.GetMsgs()) + err = mp.Remove(tmpTx) + require.NoError(t, err) } require.Equal(t, 3, len(orderedTxs)) require.True(t, ante.IsOracleTx(orderedTxs[0].GetMsgs())) require.True(t, ante.IsOracleTx(orderedTxs[1].GetMsgs())) require.False(t, ante.IsOracleTx(orderedTxs[2].GetMsgs())) + + require.Equal(t, 0, mp.CountTx()) } func (s *MempoolTestSuite) TestMaxTx() { t := s.T() ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) - mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(1)) + mp := appmempool.NewFifoMempool(appmempool.FifoMaxTxOpt(1)) tx := testTx{ nonce: 0, @@ -373,7 +375,7 @@ func (s *MempoolTestSuite) TestTxNotFoundOnSender() { t := s.T() ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 1) - mp := appmempool.NewFifoSenderNonceMempool() + mp := appmempool.NewFifoMempool() txSender := testTx{ nonce: 0, address: accounts[0].Address, @@ -397,7 +399,7 @@ func (s *MempoolTestSuite) TestBatchTx_WhenEnoughMemPool() { t := s.T() ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 10) - mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(150)) + mp := appmempool.NewFifoMempool(appmempool.FifoMaxTxOpt(150)) // Create 150 transactions (50 each of oracle, send, and staking) var allTxs []testTx @@ -491,7 +493,7 @@ func (s *MempoolTestSuite) TestBatchTx_WhenNotEnoughMemPool() { ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 10) maxMempoolSize := 100 - mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(maxMempoolSize)) + mp := appmempool.NewFifoMempool(appmempool.FifoMaxTxOpt(maxMempoolSize)) // Create 150 transactions (50 each of oracle, send, and staking) var allTxs []testTx @@ -641,7 +643,7 @@ func BenchmarkMempool(b *testing.B) { b.StartTimer() for i := 0; i < b.N; i++ { - mp := appmempool.NewFifoSenderNonceMempool(appmempool.SenderNonceMaxTxOpt(maxMempoolSize)) + mp := appmempool.NewFifoMempool(appmempool.FifoMaxTxOpt(maxMempoolSize)) // Benchmark insertion for _, tx := range allTxs { From 54ead04b61d15f6f9f2da87ec09894d615bc7ee0 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sun, 24 Nov 2024 10:40:10 +0700 Subject: [PATCH 20/26] update mempool --- app/mempool/mempool_fifo.go | 9 ++++---- app/mempool/mempool_fifo_test.go | 36 +++++++++++++++----------------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go index 16930fcd..793aa6e4 100644 --- a/app/mempool/mempool_fifo.go +++ b/app/mempool/mempool_fifo.go @@ -26,12 +26,11 @@ var DefaultMaxTx = 5000 // priority during iteration. // // Key characteristics: -// 1. Maintains two separate maps of sender-to-transactions (oracle and regular) -// 2. Each sender's transactions are stored in a skiplist ordered by nonce +// 1. Maintains two separate FIFO queues (CList) for transactions (oracle and regular) +// 2. Uses sync.Map for quick transaction lookup // 3. During iteration: -// - Oracle transactions are processed first, with random sender selection -// - Regular transactions follow, also with random sender selection -// - For each sender, transactions are processed in nonce order +// - Oracle transactions are processed first in FIFO order +// - Regular transactions follow in FIFO order // // 4. Transaction capacity is limited by maxTx (if > 0) // diff --git a/app/mempool/mempool_fifo_test.go b/app/mempool/mempool_fifo_test.go index 8d62f07f..5baac0ee 100644 --- a/app/mempool/mempool_fifo_test.go +++ b/app/mempool/mempool_fifo_test.go @@ -599,16 +599,15 @@ func (s *MempoolTestSuite) TestBatchTx_WhenNotEnoughMemPool() { func BenchmarkMempool(b *testing.B) { ctx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) - accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 10) - maxMempoolSize := 1000 + accounts := simtypes.RandomAccounts(rand.New(rand.NewSource(0)), 100) benchmarks := []struct { name string size int }{ {"Small-100", 100}, - {"Medium-500", 500}, - {"Large-1000", 1000}, + {"Medium-1000", 1000}, + {"Large-10000", 10000}, } for _, bm := range benchmarks { @@ -632,18 +631,17 @@ func BenchmarkMempool(b *testing.B) { } tx := testTx{ - id: i, - nonce: uint64(i), - address: accounts[rand.Intn(len(accounts))].Address, - priority: rand.Int63(), - msgs: []sdk.Msg{msg}, + id: i, + nonce: uint64(i), + address: accounts[rand.Intn(len(accounts))].Address, + msgs: []sdk.Msg{msg}, } allTxs = append(allTxs, tx) } b.StartTimer() for i := 0; i < b.N; i++ { - mp := appmempool.NewFifoMempool(appmempool.FifoMaxTxOpt(maxMempoolSize)) + mp := appmempool.NewFifoMempool(appmempool.FifoMaxTxOpt(b.N)) // Benchmark insertion for _, tx := range allTxs { @@ -654,15 +652,15 @@ func BenchmarkMempool(b *testing.B) { } // Benchmark selection - itr := mp.Select(ctx, nil) - orderedTxs := fetchTxs(itr, int64(bm.size)) - - // Benchmark removal - for _, tx := range orderedTxs { - if err := mp.Remove(tx); err != nil { - b.Fatal(err) - } - } + _ = mp.Select(ctx, nil) + // orderedTxs := fetchTxs(itr, int64(bm.size)) + + //// Benchmark removal + //for _, tx := range orderedTxs { + // if err := mp.Remove(tx); err != nil { + // b.Fatal(err) + // } + //} } }) } From f3fdb950a56e37efba31ffb785e68ef7aa07dc7f Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sun, 24 Nov 2024 18:11:00 +0700 Subject: [PATCH 21/26] bet --- app/app.go | 13 ++++++------- app/mempool/mempool_fifo.go | 2 +- go.mod | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/app.go b/app/app.go index eed1cc58..f8382280 100644 --- a/app/app.go +++ b/app/app.go @@ -3,17 +3,16 @@ package app import ( "encoding/json" "fmt" - mempool2 "github.com/classic-terra/core/v3/app/mempool" + "github.com/gorilla/mux" + "github.com/rakyll/statik/fs" + "github.com/spf13/cast" "io" stdlog "log" "net/http" "os" "path/filepath" - "github.com/gorilla/mux" - "github.com/rakyll/statik/fs" - "github.com/spf13/cast" - + appmempool "github.com/classic-terra/core/v3/app/mempool" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" @@ -150,9 +149,9 @@ func NewTerraApp( invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) { - mempool := mempool2.NewFifoMempool() + mempool := appmempool.NewFifoMempool() if maxTxs := cast.ToInt(appOpts.Get(server.FlagMempoolMaxTxs)); maxTxs >= 0 { - mempool = mempool2.NewFifoMempool(mempool2.FifoMaxTxOpt(maxTxs)) + mempool = appmempool.NewFifoMempool(appmempool.FifoMaxTxOpt(maxTxs)) } handler := baseapp.NewDefaultProposalHandler(mempool, app) app.SetMempool(mempool) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go index 793aa6e4..d9f5d8aa 100644 --- a/app/mempool/mempool_fifo.go +++ b/app/mempool/mempool_fifo.go @@ -70,7 +70,7 @@ func (mp *FifoMempool) Insert(_ context.Context, tx sdk.Tx) error { mp.updateMtx.RLock() defer mp.updateMtx.RUnlock() totalTxs := mp.txs.Len() + mp.txsOracle.Len() - if mp.maxTx > 0 && totalTxs >= mp.maxTx { + if mp.maxTx >= 0 && totalTxs > mp.maxTx { return mempool.ErrMempoolTxMaxCapacity } if mp.maxTx < 0 { diff --git a/go.mod b/go.mod index f591737c..1d22978b 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,6 @@ require ( github.com/google/gofuzz v1.2.0 github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/huandu/skiplist v1.2.0 github.com/ory/dockertest/v3 v3.10.0 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 @@ -60,6 +59,7 @@ require ( github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/huandu/skiplist v1.2.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect From c02272d48a75cda7d158d1a8d337bed520b0bb44 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sun, 24 Nov 2024 18:13:04 +0700 Subject: [PATCH 22/26] bet --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 1d22978b..5751e32d 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/CosmWasm/wasmd v0.46.0 github.com/CosmWasm/wasmvm v1.5.5 github.com/cometbft/cometbft v0.37.4 - github.com/cometbft/cometbft-db v0.11.0 + github.com/cometbft/cometbft-db v0.8.0 github.com/cosmos/cosmos-sdk v0.47.10 github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20240321032823-2733d24a1b99 From 7289b313b9cd47af0940708f39604cfb93bc4164 Mon Sep 17 00:00:00 2001 From: Kien Trinh <51135161+kien6034@users.noreply.github.com> Date: Sun, 24 Nov 2024 18:42:14 +0700 Subject: [PATCH 23/26] feat: unfork cosmos sdk (#17) * feat: unfork cachesize setting * feat: handleBlockHeightMiddleware * feat: add hook for validator power limit * perf: change hooks ordering * revert toolchain * bump to sdk 47.14 * comments for option --- app/app.go | 22 +++++++--- app/keepers/keepers.go | 4 +- cmd/terrad/config.go | 12 ++++++ custom/staking/hook.go | 92 ++++++++++++++++++++++++++++++++++++++++++ go.mod | 24 +++++------ go.sum | 55 +++++++++---------------- server/middleware.go | 50 +++++++++++++++++++++++ 7 files changed, 201 insertions(+), 58 deletions(-) create mode 100644 custom/staking/hook.go create mode 100644 server/middleware.go diff --git a/app/app.go b/app/app.go index f8382280..1f5e5152 100644 --- a/app/app.go +++ b/app/app.go @@ -3,15 +3,16 @@ package app import ( "encoding/json" "fmt" - "github.com/gorilla/mux" - "github.com/rakyll/statik/fs" - "github.com/spf13/cast" "io" stdlog "log" "net/http" "os" "path/filepath" + "github.com/gorilla/mux" + "github.com/rakyll/statik/fs" + "github.com/spf13/cast" + appmempool "github.com/classic-terra/core/v3/app/mempool" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" @@ -33,7 +34,6 @@ import ( servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth/ante" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -43,6 +43,7 @@ import ( "github.com/classic-terra/core/v3/app/keepers" terraappparams "github.com/classic-terra/core/v3/app/params" + customserver "github.com/classic-terra/core/v3/server" // upgrades "github.com/classic-terra/core/v3/app/upgrades" @@ -148,6 +149,14 @@ func NewTerraApp( txConfig := encodingConfig.TxConfig invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) + iavlCacheSize := cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize)) + iavlDisableFastNode := cast.ToBool(appOpts.Get(server.FlagDisableIAVLFastNode)) + + // option for cosmos sdk + baseAppOptions = append(baseAppOptions, baseapp.SetIAVLCacheSize(iavlCacheSize)) + baseAppOptions = append(baseAppOptions, baseapp.SetIAVLDisableFastNode(iavlDisableFastNode)) + + // option for mempool baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) { mempool := appmempool.NewFifoMempool() if maxTxs := cast.ToInt(appOpts.Get(server.FlagMempoolMaxTxs)); maxTxs >= 0 { @@ -161,8 +170,6 @@ func NewTerraApp( }) bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...) - bApp.SetCommitMultiStoreTracer(traceStore) - bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) app := &TerraApp{ @@ -408,6 +415,9 @@ func (app *TerraApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIC if apiConfig.Swagger { RegisterSwaggerAPI(apiSvr.Router) } + + // Apply custom middleware + apiSvr.Router.Use(customserver.BlockHeightMiddleware) } // RegisterTxService implements the Application.RegisterTxService method. diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 6a9470f9..e75611b5 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -57,9 +57,9 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + customstaking "github.com/classic-terra/core/v3/custom/staking" customwasmkeeper "github.com/classic-terra/core/v3/custom/wasm/keeper" terrawasm "github.com/classic-terra/core/v3/wasmbinding" - dyncommkeeper "github.com/classic-terra/core/v3/x/dyncomm/keeper" dyncommtypes "github.com/classic-terra/core/v3/x/dyncomm/types" marketkeeper "github.com/classic-terra/core/v3/x/market/keeper" @@ -273,7 +273,7 @@ func NewAppKeepers( // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks appKeepers.StakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks(appKeepers.DistrKeeper.Hooks(), appKeepers.SlashingKeeper.Hooks()), + stakingtypes.NewMultiStakingHooks(customstaking.NewTerraStakingHooks(*appKeepers.StakingKeeper), appKeepers.DistrKeeper.Hooks(), appKeepers.SlashingKeeper.Hooks()), ) // Create IBC Keeper diff --git a/cmd/terrad/config.go b/cmd/terrad/config.go index 3b0870c3..5001fd35 100644 --- a/cmd/terrad/config.go +++ b/cmd/terrad/config.go @@ -7,6 +7,14 @@ import ( serverconfig "github.com/cosmos/cosmos-sdk/server/config" ) +const ( + // DefaultIAVLCacheSize defines the number of iavl cache item, which is supposed to be 100MB size. + // Each cache item consumes 128 bytes, 64 bytes for the left sibling, and 64 bytes for the right sibling. + // The number of cache item is calculated as 100 MB = 10,000,000 / 128 = 781_250 + DefaultIAVLCacheSize = 781_250 + IavlDisablefastNodeDefault = true +) + // TerraAppConfig terra specify app config type TerraAppConfig struct { serverconfig.Config @@ -52,6 +60,10 @@ func initAppConfig() (string, interface{}) { // server config. srvCfg := serverconfig.DefaultConfig() + // Override default config + srvCfg.IAVLCacheSize = DefaultIAVLCacheSize + srvCfg.IAVLDisableFastNode = IavlDisablefastNodeDefault + // The SDK's default minimum gas price is set to "" (empty value) inside // app.toml. If left empty by validators, the node will halt on startup. // However, the chain developer can set a default app.toml value for their diff --git a/custom/staking/hook.go b/custom/staking/hook.go new file mode 100644 index 00000000..1dea5823 --- /dev/null +++ b/custom/staking/hook.go @@ -0,0 +1,92 @@ +package staking + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +const ( + ColumbusChainID = "columbus-5" +) + +var _ stakingtypes.StakingHooks = &TerraStakingHooks{} + +// TerraStakingHooks implements staking hooks to enforce validator power limit +type TerraStakingHooks struct { + sk stakingkeeper.Keeper +} + +func NewTerraStakingHooks(sk stakingkeeper.Keeper) *TerraStakingHooks { + return &TerraStakingHooks{sk: sk} +} + +// Implement required staking hooks interface methods +func (h TerraStakingHooks) BeforeDelegationCreated(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { + return nil +} + +func (h TerraStakingHooks) BeforeDelegationSharesModified(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { + return nil +} + +// Other required hook methods with empty implementations +func (h TerraStakingHooks) AfterDelegationModified(ctx sdk.Context, _ sdk.AccAddress, valAddr sdk.ValAddress) error { + if ctx.ChainID() != ColumbusChainID { + return nil + } + + validator, found := h.sk.GetValidator(ctx, valAddr) + if !found { + return nil + } + + // Get validator's current power (after delegation modified) + validatorPower := sdk.TokensToConsensusPower(validator.Tokens, h.sk.PowerReduction(ctx)) + + // Get the total power of the validator set + totalPower := h.sk.GetLastTotalPower(ctx) + + // Get validator delegation percent + validatorDelegationPercent := sdk.NewDec(validatorPower).QuoInt64(totalPower.Int64()) + + if validatorDelegationPercent.GT(sdk.NewDecWithPrec(20, 2)) { + panic("validator power is over the allowed limit") + } + + return nil +} + +func (h TerraStakingHooks) BeforeValidatorSlashed(_ sdk.Context, _ sdk.ValAddress, _ sdk.Dec) error { + return nil +} + +func (h TerraStakingHooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error { + return nil +} + +func (h TerraStakingHooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { + return nil +} + +func (h TerraStakingHooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { + return nil +} + +func (h TerraStakingHooks) AfterValidatorRemoved(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { + return nil +} + +func (h TerraStakingHooks) AfterUnbondingInitiated(_ sdk.Context, _ uint64) error { + return nil +} + +// Add this method to TerraStakingHooks +func (h TerraStakingHooks) AfterValidatorCreated(_ sdk.Context, _ sdk.ValAddress) error { + return nil +} + +// Add the missing method +func (h TerraStakingHooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { + return nil +} diff --git a/go.mod b/go.mod index 5751e32d..ce733002 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,4 @@ -go 1.21.8 - -toolchain go1.23.1 +go 1.20 module github.com/classic-terra/core/v3 @@ -10,10 +8,10 @@ require ( cosmossdk.io/simapp v0.0.0-20230602123434-616841b9704d github.com/CosmWasm/wasmd v0.46.0 github.com/CosmWasm/wasmvm v1.5.5 - github.com/cometbft/cometbft v0.37.4 - github.com/cometbft/cometbft-db v0.8.0 - github.com/cosmos/cosmos-sdk v0.47.10 - github.com/cosmos/gogoproto v1.4.10 + github.com/cometbft/cometbft v0.37.5 + github.com/cometbft/cometbft-db v0.11.0 + github.com/cosmos/cosmos-sdk v0.47.14 + github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20240321032823-2733d24a1b99 github.com/cosmos/ibc-go/v7 v7.4.0 github.com/gogo/protobuf v1.3.3 @@ -37,10 +35,10 @@ require ( cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.6.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect - cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/log v1.4.1 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -111,7 +109,7 @@ require ( github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.4 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.20.1 // indirect github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect @@ -150,7 +148,7 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.4 // indirect + github.com/hashicorp/go-getter v1.7.5 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect @@ -185,7 +183,7 @@ require ( github.com/prometheus/procfs v0.11.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/viper v1.18.2 @@ -202,7 +200,7 @@ require ( golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect + golang.org/x/sys v0.22.0 // indirect golang.org/x/term v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect google.golang.org/api v0.162.0 // indirect diff --git a/go.sum b/go.sum index 7c181f9e..580b77a9 100644 --- a/go.sum +++ b/go.sum @@ -196,8 +196,8 @@ cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98ok cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= -cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/simapp v0.0.0-20230602123434-616841b9704d h1:G24nV8KQ5tcSLJEYPUEpKxuX4usvpQg5r7LhCLYPs1o= @@ -225,8 +225,8 @@ github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +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= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= @@ -239,7 +239,6 @@ github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrd github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= -github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -298,7 +297,6 @@ github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJ github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= -github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= @@ -367,7 +365,6 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -381,8 +378,8 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= -github.com/cometbft/cometbft v0.37.4 h1:xyvvEqlyfK8MgNIIKVJaMsuIp03wxOcFmVkT26+Ikpg= -github.com/cometbft/cometbft v0.37.4/go.mod h1:Cmg5Hp4sNpapm7j+x0xRyt2g0juQfmB752ous+pA0G8= +github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0= +github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -401,18 +398,18 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= -github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= -github.com/cosmos/cosmos-sdk v0.47.10 h1:Wxf5yEN3jZbG4fftxAMKB6rpd8ME0mxuCVihpz65dt0= -github.com/cosmos/cosmos-sdk v0.47.10/go.mod h1:UWpgWkhcsBIATS68uUC0del7IiBN4hPv/vqg8Zz23uw= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.47.14 h1:vD9JyIdlbVaXMOE/BLamViQvylfUq0E0FpqdPVv/fWw= +github.com/cosmos/cosmos-sdk v0.47.14/go.mod h1:GrDj/zd9Tiuy8ZpG9PbUbhghCVU7lwyH0GS7CpxHpyM= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20240321032823-2733d24a1b99 h1:AC05pevT3jIVTxJ0mABlN3hxyHESPpELhVQjwQVT6Pw= @@ -447,7 +444,6 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= -github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= @@ -506,7 +502,6 @@ 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/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -516,11 +511,9 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -539,7 +532,6 @@ github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -572,7 +564,6 @@ github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5Nq github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -671,7 +662,6 @@ github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIG github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -755,8 +745,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= -github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= +github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -823,7 +813,6 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1C github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= -github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -982,7 +971,6 @@ github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -993,13 +981,11 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= -github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1017,7 +1003,6 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= -github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= @@ -1040,7 +1025,6 @@ github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1108,8 +1092,8 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= -github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1170,7 +1154,6 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 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.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1264,7 +1247,6 @@ go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZV go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= -go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -1555,8 +1537,8 @@ golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1943,7 +1925,6 @@ gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/server/middleware.go b/server/middleware.go new file mode 100644 index 00000000..088a859e --- /dev/null +++ b/server/middleware.go @@ -0,0 +1,50 @@ +package server + +import ( + "net/http" + "strconv" + + "github.com/cosmos/cosmos-sdk/codec/legacy" + grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" +) + +// BlockHeightMiddleware parses height query parameter and sets GRPCBlockHeightHeader +func BlockHeightMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + heightStr := r.FormValue("height") + if heightStr != "" { + height, err := strconv.ParseInt(heightStr, 10, 64) + if err != nil { + writeErrorResponse(w, http.StatusBadRequest, "syntax error") + return + } + + if height < 0 { + writeErrorResponse(w, http.StatusBadRequest, "height must be equal or greater than zero") + return + } + + if height > 0 { + r.Header.Set(grpctypes.GRPCBlockHeightHeader, heightStr) + } + } + + next.ServeHTTP(w, r) + }) +} + +// writeErrorResponse prepares and writes an HTTP error +func writeErrorResponse(w http.ResponseWriter, status int, err string) { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(status) + _, _ = w.Write(legacy.Cdc.MustMarshalJSON(newErrorResponse(0, err))) +} + +type errorResponse struct { + Code int `json:"code,omitempty"` + Error string `json:"error"` +} + +func newErrorResponse(code int, err string) errorResponse { + return errorResponse{Code: code, Error: err} +} From 16a79b215813605f02d1dde06ffc4562a5433a5a Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Sun, 24 Nov 2024 18:52:29 +0700 Subject: [PATCH 24/26] upgrade cometbft to v0.37.13 --- go.mod | 96 ++++++++++++------------- go.sum | 220 ++++++++++++++++++++++++++++++--------------------------- 2 files changed, 162 insertions(+), 154 deletions(-) diff --git a/go.mod b/go.mod index ce733002..b9f84dcb 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,6 @@ -go 1.20 +go 1.22.7 + +toolchain go1.23.1 module github.com/classic-terra/core/v3 @@ -8,7 +10,7 @@ require ( cosmossdk.io/simapp v0.0.0-20230602123434-616841b9704d github.com/CosmWasm/wasmd v0.46.0 github.com/CosmWasm/wasmvm v1.5.5 - github.com/cometbft/cometbft v0.37.5 + github.com/cometbft/cometbft v0.37.13 github.com/cometbft/cometbft-db v0.11.0 github.com/cosmos/cosmos-sdk v0.47.14 github.com/cosmos/gogoproto v1.7.0 @@ -26,8 +28,8 @@ require ( github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 - google.golang.org/grpc v1.62.1 + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 + google.golang.org/grpc v1.67.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -57,12 +59,14 @@ require ( github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.9.3 // indirect github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.12 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -73,11 +77,11 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect - go.opentelemetry.io/otel v1.22.0 // indirect - go.opentelemetry.io/otel/metric v1.22.0 // indirect - go.opentelemetry.io/otel/trace v1.22.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.10.0 // indirect golang.org/x/mod v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect @@ -86,15 +90,14 @@ require ( ) require ( - cloud.google.com/go v0.112.0 // indirect - cloud.google.com/go/compute v1.24.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect cloud.google.com/go/iam v1.1.6 // indirect - cloud.google.com/go/storage v1.36.0 // indirect + cloud.google.com/go/storage v1.38.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect - github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect + github.com/ChainSafe/go-schnorrkel v1.1.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -103,7 +106,7 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect @@ -114,7 +117,7 @@ require ( github.com/cosmos/iavl v0.20.1 // indirect github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect github.com/cosmos/ledger-go v0.9.3 // indirect - github.com/creachadair/taskgroup v0.4.2 // indirect + github.com/creachadair/taskgroup v0.10.0 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect @@ -127,22 +130,22 @@ require ( github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/gorilla/handlers v1.5.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect @@ -159,55 +162,52 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/lib/pq v1.10.9 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect - github.com/minio/highwayhash v1.0.2 // indirect + github.com/minio/highwayhash v1.0.3 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.0 // indirect + github.com/prometheus/client_golang v1.20.4 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rs/cors v1.8.3 // indirect + github.com/rs/cors v1.11.1 // indirect github.com/rs/zerolog v1.33.0 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/sasha-s/go-deadlock v0.3.5 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/viper v1.18.2 + github.com/spf13/viper v1.19.0 github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.2 // indirect - go.etcd.io/bbolt v1.3.8 // indirect + go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.27.0 // indirect golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/api v0.162.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect - google.golang.org/protobuf v1.33.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect + google.golang.org/api v0.171.0 // indirect + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect diff --git a/go.sum b/go.sum index 580b77a9..1046ea33 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= -cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -71,10 +71,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= -cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -174,8 +172,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= -cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -217,8 +215,8 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ 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= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= -github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= +github.com/ChainSafe/go-schnorrkel v1.1.0 h1:rZ6EU+CZFCjB4sHUE1jIu8VDoB/wRKZxoe1tkcO71Wk= +github.com/ChainSafe/go-schnorrkel v1.1.0/go.mod h1:ABkENxiP+cvjFiByMIZ9LYbRoNNLeBLiakC1XeTFxfE= github.com/CosmWasm/wasmvm v1.5.5 h1:XlZI3xO5iUhiBqMiyzsrWEfUtk5gcBMNYIdHnsTB+NI= github.com/CosmWasm/wasmvm v1.5.5/go.mod h1:Q0bSEtlktzh7W2hhEaifrFp1Erx11ckQZmjq8FLCyys= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -238,7 +236,8 @@ github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNu github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= -github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.6 h1:k1/zc2jNfeiZBA5aFTRy37jlBIuCkXCm0XmvpzCKI9I= +github.com/adlio/schema v1.3.6/go.mod h1:qkxwLgPBd1FgLRHYVCmQT/rrBr3JH38J9LjmVzWNudg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -296,7 +295,8 @@ github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/i github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= @@ -329,8 +329,8 @@ github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= @@ -364,7 +364,6 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -378,8 +377,8 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= -github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0= -github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= +github.com/cometbft/cometbft v0.37.13 h1:Gem5CvlwZA0pA9KscUi0L6cMlUK8kGL1tV2NIly04uo= +github.com/cometbft/cometbft v0.37.13/go.mod h1:PHxduPKAWdfFUAqi6a2nrA+WBfjEqQ6Vg27fIBntRYE= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -402,7 +401,6 @@ github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+R github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/cosmos-sdk v0.47.14 h1:vD9JyIdlbVaXMOE/BLamViQvylfUq0E0FpqdPVv/fWw= github.com/cosmos/cosmos-sdk v0.47.14/go.mod h1:GrDj/zd9Tiuy8ZpG9PbUbhghCVU7lwyH0GS7CpxHpyM= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -426,8 +424,8 @@ github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFg github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= -github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= +github.com/creachadair/taskgroup v0.10.0 h1:xCz5Kk9PU3UL2VNF7XJ2MnIxIw48hUwYVLwtTzMzqtE= +github.com/creachadair/taskgroup v0.10.0/go.mod h1:9oDDPt/5QPS4iylvPMC81GRlj+1je8AFDbjUh4zaQWo= 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/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= @@ -444,6 +442,7 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= @@ -501,7 +500,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= 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/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -511,9 +509,11 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -532,11 +532,12 @@ github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= @@ -564,6 +565,7 @@ github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5Nq github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -586,8 +588,8 @@ github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -631,8 +633,8 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -662,6 +664,7 @@ github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIG github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -704,8 +707,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -719,8 +722,8 @@ github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWS github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= @@ -732,7 +735,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= @@ -769,6 +771,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +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 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -813,6 +817,7 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1C github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= +github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -847,8 +852,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= @@ -867,6 +872,7 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= @@ -876,12 +882,10 @@ github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ic github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9ik= +github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -917,14 +921,12 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= -github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= +github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -954,6 +956,8 @@ github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3P github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -971,6 +975,7 @@ github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -979,13 +984,14 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1003,6 +1009,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= @@ -1013,18 +1020,18 @@ github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChl github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1042,16 +1049,16 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1060,16 +1067,16 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= +github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= -github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= @@ -1089,8 +1096,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= @@ -1103,8 +1110,8 @@ github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgY github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= -github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= +github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= @@ -1143,8 +1150,8 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= -github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1154,6 +1161,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 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.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1224,8 +1232,8 @@ github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 h1:qxen9oVGzDdIRP6ejyAJc760RwW4SnVDiTYTzwnXuxo= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1238,17 +1246,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= -go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= -go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= -go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= -go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= -go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= -go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= -go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1278,7 +1287,6 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1290,8 +1298,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= @@ -1385,8 +1393,8 @@ golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1412,8 +1420,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= 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-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1428,8 +1436,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1439,7 +1447,6 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1537,16 +1544,17 @@ golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1560,8 +1568,8 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1640,8 +1648,9 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= @@ -1697,8 +1706,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.162.0 h1:Vhs54HkaEpkMBdgGdOT2P6F0csGG/vxDS0hWHJzmmps= -google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= +google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1707,8 +1716,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1818,12 +1825,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo= -google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A= -google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1865,8 +1872,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1883,8 +1890,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ 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.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= @@ -1925,6 +1932,7 @@ gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 760062b5c7dcca345a0aeb1e4e17b803a8aac1b9 Mon Sep 17 00:00:00 2001 From: Khanh Hoa Date: Mon, 25 Nov 2024 07:59:27 +0700 Subject: [PATCH 25/26] bet --- app/mempool/mempool_fifo.go | 25 ++++--- tests/interchaintest/go.mod | 130 ++++++++++++++++++------------------ tests/interchaintest/go.sum | 62 +++++++++++++++++ 3 files changed, 140 insertions(+), 77 deletions(-) diff --git a/app/mempool/mempool_fifo.go b/app/mempool/mempool_fifo.go index d9f5d8aa..fb67708f 100644 --- a/app/mempool/mempool_fifo.go +++ b/app/mempool/mempool_fifo.go @@ -1,17 +1,16 @@ package mempool import ( - "context" // #nosec // crypto/rand is used for seed generation + "context" "fmt" "sync" + "github.com/classic-terra/core/v3/custom/auth/ante" "github.com/cometbft/cometbft/libs/clist" cmtsync "github.com/cometbft/cometbft/libs/sync" - "github.com/cosmos/cosmos-sdk/x/auth/signing" - - "github.com/classic-terra/core/v3/custom/auth/ante" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) var ( @@ -36,7 +35,7 @@ var DefaultMaxTx = 5000 // // Note: PrepareProposal may terminate iteration early if block size limits are reached. type FifoMempool struct { - updateMtx cmtsync.RWMutex + mtx cmtsync.RWMutex txs *clist.CList // Regular transactions FIFO queue txsOracle *clist.CList // Oracle transactions FIFO queue txsMap sync.Map // For quick lookup of existing transactions @@ -67,8 +66,8 @@ func FifoMaxTxOpt(maxTx int) FifoMempoolOptions { } func (mp *FifoMempool) Insert(_ context.Context, tx sdk.Tx) error { - mp.updateMtx.RLock() - defer mp.updateMtx.RUnlock() + mp.mtx.RLock() + defer mp.mtx.RUnlock() totalTxs := mp.txs.Len() + mp.txsOracle.Len() if mp.maxTx >= 0 && totalTxs > mp.maxTx { return mempool.ErrMempoolTxMaxCapacity @@ -94,8 +93,8 @@ func (mp *FifoMempool) Insert(_ context.Context, tx sdk.Tx) error { } func (mp *FifoMempool) Select(_ context.Context, _ [][]byte) mempool.Iterator { - mp.updateMtx.RLock() - defer mp.updateMtx.RUnlock() + mp.mtx.RLock() + defer mp.mtx.RUnlock() // Pre-allocate slice with exact capacity needed totalTxs := mp.txsOracle.Len() + mp.txs.Len() listTxKey := make([]customTxKey, 0, totalTxs) @@ -160,8 +159,8 @@ func (it *fifoIterator) Tx() sdk.Tx { } func (mp *FifoMempool) Remove(tx sdk.Tx) error { - mp.updateMtx.RLock() - defer mp.updateMtx.RUnlock() + mp.mtx.RLock() + defer mp.mtx.RUnlock() txKey, err := getTxKey(tx) if err != nil { return err @@ -184,8 +183,8 @@ func (mp *FifoMempool) Remove(tx sdk.Tx) error { } func (mp *FifoMempool) CountTx() int { - mp.updateMtx.RLock() - defer mp.updateMtx.RUnlock() + mp.mtx.RLock() + defer mp.mtx.RUnlock() return mp.txs.Len() + mp.txsOracle.Len() } diff --git a/tests/interchaintest/go.mod b/tests/interchaintest/go.mod index 486e7a1a..ee0d88ef 100644 --- a/tests/interchaintest/go.mod +++ b/tests/interchaintest/go.mod @@ -1,11 +1,13 @@ module github.com/classic-terra/core/v3/test/interchaintest -go 1.20 +go 1.22.7 + +toolchain go1.23.1 require ( cosmossdk.io/math v1.3.0 github.com/classic-terra/core/v3 v3.0.0-00010101000000-000000000000 - github.com/cosmos/cosmos-sdk v0.47.10 + github.com/cosmos/cosmos-sdk v0.47.14 github.com/cosmos/ibc-go/v7 v7.4.0 github.com/icza/dyno v0.0.0-20220812133438-f0b6f8a18845 github.com/strangelove-ventures/interchaintest/v7 v7.0.0 @@ -14,50 +16,50 @@ require ( ) require ( - cloud.google.com/go v0.112.0 // indirect + cloud.google.com/go v0.112.1 // indirect cloud.google.com/go/compute v1.24.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect cloud.google.com/go/iam v1.1.6 // indirect - cloud.google.com/go/storage v1.36.0 // indirect + cloud.google.com/go/storage v1.38.0 // indirect cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.6.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.1 // indirect - cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/log v1.4.1 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/BurntSushi/toml v1.3.2 // indirect - github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect + github.com/ChainSafe/go-schnorrkel v1.1.0 // indirect github.com/ComposableFi/go-substrate-rpc-client/v4 v4.0.0-00010101000000-000000000000 // indirect github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect - github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StirlingMarketingGroup/go-namecase v1.0.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/avast/retry-go/v4 v4.5.0 // indirect - github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect - github.com/cometbft/cometbft v0.37.4 // indirect - github.com/cometbft/cometbft-db v0.8.0 // indirect + github.com/cometbft/cometbft v0.37.13 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.10 // indirect + github.com/cosmos/gogoproto v1.7.0 // indirect github.com/cosmos/iavl v0.20.1 // indirect github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect @@ -65,9 +67,9 @@ require ( github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect github.com/cosmos/ledger-go v0.9.3 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/creachadair/taskgroup v0.4.2 // indirect + github.com/creachadair/taskgroup v0.10.0 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set v1.8.0 // indirect github.com/decred/base58 v1.0.4 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect @@ -85,9 +87,9 @@ require ( github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/ethereum/go-ethereum v1.10.20 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/getsentry/sentry-go v0.23.0 // indirect - github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -97,28 +99,28 @@ require ( github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.4 // indirect + github.com/hashicorp/go-getter v1.7.5 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect @@ -132,21 +134,21 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/lib/pq v1.10.7 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-libp2p v0.27.8 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.9.3 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect - github.com/minio/highwayhash v1.0.2 // indirect + github.com/minio/highwayhash v1.0.3 // indirect github.com/minio/sha256-simd v1.0.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -163,30 +165,30 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.9 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect github.com/pierrec/xxHash v0.1.5 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.4 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.32.0 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sasha-s/go-deadlock v0.3.5 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.9.5 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect @@ -196,32 +198,32 @@ require ( github.com/ulikunitz/xz v0.5.11 // indirect github.com/vedhavyas/go-subkey/v2 v2.0.0 // indirect github.com/zondax/hid v0.9.2 // indirect - go.etcd.io/bbolt v1.3.7 // indirect + go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect - go.opentelemetry.io/otel v1.22.0 // indirect - go.opentelemetry.io/otel/metric v1.22.0 // indirect - go.opentelemetry.io/otel/trace v1.22.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.19.0 // indirect - golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.21.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/term v0.17.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/mod v0.18.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.13.0 // indirect - google.golang.org/api v0.162.0 // indirect + golang.org/x/tools v0.22.0 // indirect + google.golang.org/api v0.171.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect - google.golang.org/grpc v1.62.1 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/grpc v1.67.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/tests/interchaintest/go.sum b/tests/interchaintest/go.sum index a2d47601..09a05a48 100644 --- a/tests/interchaintest/go.sum +++ b/tests/interchaintest/go.sum @@ -34,6 +34,7 @@ cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34h cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -74,6 +75,7 @@ cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1Yl cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -176,6 +178,7 @@ cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeL cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -197,6 +200,7 @@ cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/simapp v0.0.0-20230602123434-616841b9704d h1:G24nV8KQ5tcSLJEYPUEpKxuX4usvpQg5r7LhCLYPs1o= @@ -227,6 +231,7 @@ github.com/Genuine-labs/interchaintest/v7 v7.0.0-terra.1/go.mod h1:CQkrkfD91W2A9 github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +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= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -262,6 +267,7 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -301,6 +307,7 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -349,6 +356,7 @@ github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONN github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= @@ -362,6 +370,7 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -370,6 +379,7 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20240321032823-2733d24a1b99 h1:AC05pevT3jIVTxJ0mABlN3hxyHESPpELhVQjwQVT6Pw= @@ -387,8 +397,10 @@ github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFg github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= +github.com/creachadair/taskgroup v0.10.0/go.mod h1:9oDDPt/5QPS4iylvPMC81GRlj+1je8AFDbjUh4zaQWo= 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/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= @@ -396,6 +408,7 @@ github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnG github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/base58 v1.0.4 h1:QJC6B0E0rXOPA8U/kw2rP+qiRJsUaE2Er+pYb3siUeA= @@ -465,6 +478,7 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -478,6 +492,7 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= @@ -521,6 +536,7 @@ github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6x github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -565,6 +581,7 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -633,6 +650,7 @@ github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqE github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -647,6 +665,7 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -671,6 +690,7 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -753,6 +773,7 @@ github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8 github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= @@ -772,6 +793,7 @@ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgx github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/libp2p/go-libp2p v0.27.8 h1:IX5x/4yKwyPQeVS2AXHZ3J4YATM9oHBGH1gBc23jBAI= @@ -780,6 +802,7 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -808,6 +831,7 @@ github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b h1:QrHweqAtyJ9EwCaG github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b/go.mod h1:xxLb2ip6sSUts3g1irPVHyk/DGslwQsNOo9I7smJfNU= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -902,10 +926,12 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= @@ -920,6 +946,7 @@ github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6J github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -929,6 +956,7 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -937,6 +965,7 @@ github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= @@ -945,6 +974,7 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -953,6 +983,7 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -969,12 +1000,15 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -982,6 +1016,7 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -1000,6 +1035,7 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2 github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= @@ -1007,6 +1043,7 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3 github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1017,6 +1054,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1025,6 +1063,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 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.1.5-0.20170601210322-f6abca593680/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1040,6 +1079,7 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/terra-money/ledger-terra-go v0.11.2 h1:BVXZl+OhJOri6vFNjjVaTabRLApw9MuG7mxWL4V718c= @@ -1081,6 +1121,7 @@ github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1095,15 +1136,20 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1142,6 +1188,7 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1168,6 +1215,7 @@ golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1232,6 +1280,7 @@ golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1259,6 +1308,7 @@ golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= 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-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1275,6 +1325,7 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1376,11 +1427,14 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1394,6 +1448,7 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1460,6 +1515,7 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= 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= @@ -1520,6 +1576,7 @@ google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= google.golang.org/api v0.162.0 h1:Vhs54HkaEpkMBdgGdOT2P6F0csGG/vxDS0hWHJzmmps= google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1641,10 +1698,13 @@ google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A= google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1688,6 +1748,7 @@ google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCD google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1706,6 +1767,7 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= From d86cba239b0d23a38ed9309e03cb32a7bee0761a Mon Sep 17 00:00:00 2001 From: tnv1 Date: Wed, 27 Nov 2024 13:21:03 +0700 Subject: [PATCH 26/26] test: add test override config cache size --- .gitignore | 2 -- cmd/terrad/config_test.go | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 cmd/terrad/config_test.go diff --git a/.gitignore b/.gitignore index cc75835f..4956a705 100644 --- a/.gitignore +++ b/.gitignore @@ -52,5 +52,3 @@ dependency-graph.png *.aux *.out *.synctex.gz -cmd -/cmd/ diff --git a/cmd/terrad/config_test.go b/cmd/terrad/config_test.go new file mode 100644 index 00000000..0b5fd9a2 --- /dev/null +++ b/cmd/terrad/config_test.go @@ -0,0 +1,15 @@ +package main + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestOverrideConfigCacheSize(t *testing.T) { + _, cfg := initAppConfig() + terraCfg, ok := cfg.(TerraAppConfig) + require.Equal(t, ok, true) + require.Equal(t, terraCfg.Config.IAVLCacheSize, uint64(DefaultIAVLCacheSize)) + require.Equal(t, terraCfg.Config.IAVLDisableFastNode, IavlDisablefastNodeDefault) +}