From 9a9018fd44d8f52dfd32679e653215c96e82a00b Mon Sep 17 00:00:00 2001 From: yihuang Date: Sat, 2 Nov 2024 20:28:56 +0800 Subject: [PATCH] Problem: recent optimizations not included (#1669) * Problem: recent optimizations not included Solution: - add several optimizations in dependencies: a) async fireEvents, b) faster prepare proposal when using NopMempool * deps * changelog * unit test * parallel check tx * deps * fix ibc * Update CHANGELOG.md Signed-off-by: yihuang --------- Signed-off-by: yihuang Co-authored-by: mmsqe --- CHANGELOG.md | 1 + app/app.go | 2 +- app/proposal.go | 56 ++++++++++++++++--------- app/proposal_test.go | 74 ++++++++++++++++++++++++++++++++++ go.mod | 18 +++++---- go.sum | 36 ++++++++--------- gomod2nix.toml | 37 ++++++++--------- integration_tests/ibc_utils.py | 4 +- 8 files changed, 164 insertions(+), 64 deletions(-) create mode 100644 app/proposal_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index cf105b8d62..3c6cfbc258 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * [#1664](https://github.com/crypto-org-chain/cronos/pull/1664) Update cometbft to 0.38.13. * [#1660](https://github.com/crypto-org-chain/cronos/pull/1660) Support async check tx. * [#1667](https://github.com/crypto-org-chain/cronos/pull/1667) Add testnet benchmark command. +* [#1669](https://github.com/crypto-org-chain/cronos/pull/1669) Add performance optimizations: a) async fireEvents, b) faster prepare proposal when using NopMempool, c) parallel check-tx *Oct 24, 2024* diff --git a/app/app.go b/app/app.go index 14a2cad6df..04188c7703 100644 --- a/app/app.go +++ b/app/app.go @@ -420,7 +420,7 @@ func New( app.SetMempool(mpool) // Re-use the default prepare proposal handler, extend the transaction validation logic - defaultProposalHandler := baseapp.NewDefaultProposalHandler(mpool, app) + defaultProposalHandler := baseapp.NewDefaultProposalHandlerFast(mpool, app) defaultProposalHandler.SetTxSelector(NewExtTxSelector( baseapp.NewDefaultTxSelector(), txDecoder, diff --git a/app/proposal.go b/app/proposal.go index 3e4465b084..24f48b937c 100644 --- a/app/proposal.go +++ b/app/proposal.go @@ -26,10 +26,10 @@ var _ baseapp.TxSelector = &ExtTxSelector{} type ExtTxSelector struct { baseapp.TxSelector TxDecoder sdk.TxDecoder - ValidateTx func(sdk.Tx) error + ValidateTx func(sdk.Tx, []byte) error } -func NewExtTxSelector(parent baseapp.TxSelector, txDecoder sdk.TxDecoder, validateTx func(sdk.Tx) error) *ExtTxSelector { +func NewExtTxSelector(parent baseapp.TxSelector, txDecoder sdk.TxDecoder, validateTx func(sdk.Tx, []byte) error) *ExtTxSelector { return &ExtTxSelector{ TxSelector: parent, TxDecoder: txDecoder, @@ -38,15 +38,7 @@ func NewExtTxSelector(parent baseapp.TxSelector, txDecoder sdk.TxDecoder, valida } func (ts *ExtTxSelector) SelectTxForProposal(ctx context.Context, maxTxBytes, maxBlockGas uint64, memTx sdk.Tx, txBz []byte, gasWanted uint64) bool { - var err error - if memTx == nil { - memTx, err = ts.TxDecoder(txBz) - if err != nil { - return false - } - } - - if err := ts.ValidateTx(memTx); err != nil { + if err := ts.ValidateTx(memTx, txBz); err != nil { return false } @@ -55,6 +47,31 @@ func (ts *ExtTxSelector) SelectTxForProposal(ctx context.Context, maxTxBytes, ma return ts.TxSelector.SelectTxForProposal(ctx, maxTxBytes, maxBlockGas, nil, txBz, gasWanted) } +func (ts *ExtTxSelector) SelectTxForProposalFast(ctx context.Context, txs [][]byte) [][]byte { + var invalidTxs []int + for i, txBz := range txs { + if err := ts.ValidateTx(nil, txBz); err != nil { + invalidTxs = append(invalidTxs, i) + } + } + + if len(invalidTxs) > 0 { + filtered := make([][]byte, 0, len(txs)-len(invalidTxs)) + var offset int + for i, txBz := range txs { + if offset < len(invalidTxs) && i == invalidTxs[offset] { + offset++ + continue + } + filtered = append(filtered, txBz) + } + + txs = filtered + } + + return ts.TxSelector.SelectTxForProposalFast(ctx, txs) +} + type ProposalHandler struct { TxDecoder sdk.TxDecoder // Identity is nil if it's not a validator node @@ -123,12 +140,20 @@ func (h *ProposalHandler) SetBlockList(blob []byte) error { return nil } -func (h *ProposalHandler) ValidateTransaction(tx sdk.Tx) error { +func (h *ProposalHandler) ValidateTransaction(tx sdk.Tx, txBz []byte) error { if len(h.blocklist) == 0 { // fast path, accept all txs return nil } + var err error + if tx == nil { + tx, err = h.TxDecoder(txBz) + if err != nil { + return err + } + } + sigTx, ok := tx.(signing.SigVerifiableTx) if !ok { return fmt.Errorf("tx of type %T does not implement SigVerifiableTx", tx) @@ -158,12 +183,7 @@ func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { } for _, txBz := range req.Txs { - memTx, err := h.TxDecoder(txBz) - if err != nil { - return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil - } - - if err := h.ValidateTransaction(memTx); err != nil { + if err := h.ValidateTransaction(nil, txBz); err != nil { return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil } } diff --git a/app/proposal_test.go b/app/proposal_test.go new file mode 100644 index 0000000000..a1552cb511 --- /dev/null +++ b/app/proposal_test.go @@ -0,0 +1,74 @@ +package app + +import ( + "context" + "errors" + "testing" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" +) + +type mockTxSelector struct { + baseapp.TxSelector +} + +func (mts *mockTxSelector) SelectTxForProposalFast(ctx context.Context, txs [][]byte) [][]byte { + // For testing purposes, simply return the txs as is + return txs +} + +func TestSelectTxForProposalFast(t *testing.T) { + ctx := context.Background() + + txDecoder := func(txBytes []byte) (sdk.Tx, error) { + // Mock tx decoder; returns a dummy tx + return nil, nil + } + + validateTx := func(tx sdk.Tx, txBz []byte) error { + // Mock validation logic: return error if txBz is "invalid" + if string(txBz) == "invalid" { + return errors.New("invalid tx") + } + return nil + } + + mockSelector := &mockTxSelector{} + + extTxSelector := NewExtTxSelector(mockSelector, txDecoder, validateTx) + + t.Run("Empty transaction list", func(t *testing.T) { + txs := [][]byte{} + result := extTxSelector.SelectTxForProposalFast(ctx, txs) + require.Empty(t, result) + }) + + t.Run("All valid transactions", func(t *testing.T) { + txs := [][]byte{[]byte("valid1"), []byte("valid2"), []byte("valid3")} + result := extTxSelector.SelectTxForProposalFast(ctx, txs) + require.Equal(t, txs, result) + }) + + t.Run("All invalid transactions", func(t *testing.T) { + txs := [][]byte{[]byte("invalid"), []byte("invalid"), []byte("invalid")} + result := extTxSelector.SelectTxForProposalFast(ctx, txs) + require.Empty(t, result) + }) + + t.Run("Mixed valid and invalid transactions", func(t *testing.T) { + txs := [][]byte{[]byte("valid1"), []byte("invalid"), []byte("valid2"), []byte("invalid"), []byte("valid3")} + expected := [][]byte{[]byte("valid1"), []byte("valid2"), []byte("valid3")} + result := extTxSelector.SelectTxForProposalFast(ctx, txs) + require.Equal(t, expected, result) + }) + + t.Run("Edge cases in the filtering logic", func(t *testing.T) { + // Edge case: first and last transactions are invalid + txs := [][]byte{[]byte("invalid"), []byte("valid1"), []byte("valid2"), []byte("invalid")} + expected := [][]byte{[]byte("valid1"), []byte("valid2")} + result := extTxSelector.SelectTxForProposalFast(ctx, txs) + require.Equal(t, expected, result) + }) +} diff --git a/go.mod b/go.mod index 350622cb06..ae8fbc0741 100644 --- a/go.mod +++ b/go.mod @@ -41,9 +41,9 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.9.0 - golang.org/x/crypto v0.27.0 + golang.org/x/crypto v0.28.0 google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 ) @@ -190,7 +190,7 @@ require ( github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect github.com/pkg/errors v0.9.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_golang v1.20.5 // 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 @@ -235,9 +235,9 @@ require ( 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/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/text v0.19.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.22.0 // indirect google.golang.org/api v0.186.0 // indirect @@ -256,7 +256,7 @@ require ( replace ( cosmossdk.io/store => github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241018012743-d78d66e74712 cosmossdk.io/x/tx => github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241018012743-d78d66e74712 - github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.50.6-0.20241018012743-d78d66e74712 + github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.50.6-0.20241101065553-a70c19a03a81 ) replace ( @@ -268,12 +268,14 @@ replace ( replace ( // Use cosmos keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 + // v0.38.x + github.com/cometbft/cometbft => github.com/crypto-org-chain/cometbft v0.0.0-20241101110921-cee5fa03c9ba // dgrijalva/jwt-go is deprecated and doesn't receive security updates. // TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134 github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2 github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240926023215-d2275b4afb9a // develop - github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20241028015856-e567c5ad3acf + github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20241101134753-e4d00df93541 // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 diff --git a/go.sum b/go.sum index ed3b8d524d..591e9a60ef 100644 --- a/go.sum +++ b/go.sum @@ -370,8 +370,6 @@ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1: github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.38.13 h1:k0ssyC8W0FfFvGpSHpojZ4JrXAANlJEIM41hjRq6OoU= -github.com/cometbft/cometbft v0.38.13/go.mod h1:NMmNysQM+T5uxTXVLMgzcvq35OVOyC7GK2/bnHqldjE= github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz3DlerQ= github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= @@ -422,14 +420,16 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/crypto-org-chain/btree v0.0.0-20240406140148-2687063b042c h1:MOgfS4+FBB8cMkDE2j2VBVsbY+HCkPIu0YsJ/9bbGeQ= github.com/crypto-org-chain/btree v0.0.0-20240406140148-2687063b042c/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/crypto-org-chain/cosmos-sdk v0.50.6-0.20241018012743-d78d66e74712 h1:vIX5DQwYfRGuOIPMUQVv2m5LF2+bKaRlTKC67s8keCs= -github.com/crypto-org-chain/cosmos-sdk v0.50.6-0.20241018012743-d78d66e74712/go.mod h1:JwwsMeZldLN20b72mmbWPY0EV9rs+v/12hRu1JFttvY= +github.com/crypto-org-chain/cometbft v0.0.0-20241101110921-cee5fa03c9ba h1:g3uPF40faoyCZsRRyS1aljDGNSZmDP44e4VjRl8k1Ik= +github.com/crypto-org-chain/cometbft v0.0.0-20241101110921-cee5fa03c9ba/go.mod h1:7v7mf87Zd7umLS1rtRs4Z4wgUqs2stVPZza0eMLWd/Y= +github.com/crypto-org-chain/cosmos-sdk v0.50.6-0.20241101065553-a70c19a03a81 h1:2tf+XzZw7nKqwE81Lmct3VFNog+i7dI65p+/IHLv898= +github.com/crypto-org-chain/cosmos-sdk v0.50.6-0.20241101065553-a70c19a03a81/go.mod h1:JwwsMeZldLN20b72mmbWPY0EV9rs+v/12hRu1JFttvY= github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241018012743-d78d66e74712 h1:s6pcsyYoU3WvmCjVzryiQCuN+vMHnOqQwyWlHT3Gwks= github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241018012743-d78d66e74712/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241018012743-d78d66e74712 h1:vvN3FqhFTakKy4jgVC1GoEtHW52zQg49uNE/e16Scu8= github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241018012743-d78d66e74712/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= -github.com/crypto-org-chain/ethermint v0.6.1-0.20241028015856-e567c5ad3acf h1:n0iiQzO6ek6/mJKWkKqCjaExi+KDMOkDPgMpOI0qBzs= -github.com/crypto-org-chain/ethermint v0.6.1-0.20241028015856-e567c5ad3acf/go.mod h1:NBVPCs64TPZQJWBnJu/mJbSQwUpPhtjU+EiOZA4991Y= +github.com/crypto-org-chain/ethermint v0.6.1-0.20241101134753-e4d00df93541 h1:LXTYeYCOj8KWGolxz3NJGq0iMnw5pywmMDkZGhdZqME= +github.com/crypto-org-chain/ethermint v0.6.1-0.20241101134753-e4d00df93541/go.mod h1:bDouX0WGx+JWkT61l8uSUFqaj+WLOfZv0nxlirm3gsM= github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716 h1:OvD5Rm0B6LHUJk6z858UgwdP72jU2DuUdXeclRyKpDI= github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE= github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240926023215-d2275b4afb9a h1:IUPD+dg1YQl8cLocxQ/Mbx/ObTgAgcrZlcBhFjsLO40= @@ -993,8 +993,8 @@ 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.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= -github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/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= @@ -1210,8 +1210,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -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/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= 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= @@ -1458,15 +1458,15 @@ 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/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/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.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.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.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= 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= @@ -1480,8 +1480,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.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.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= @@ -1774,8 +1774,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.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/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= diff --git a/gomod2nix.toml b/gomod2nix.toml index 8b8b7bc4c8..426b6dab8b 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -158,8 +158,9 @@ schema = 3 version = "v1.0.0" hash = "sha256-z/0E0NiEGo7zxM7d94ImgUf8P0/KG6hbP9T4Vuym4p0=" [mod."github.com/cometbft/cometbft"] - version = "v0.38.13" - hash = "sha256-faMmyVlJUDpTl7dL1WKjEnGrQ56jxeCXPqPgbj/I1JY=" + version = "v0.0.0-20241101110921-cee5fa03c9ba" + hash = "sha256-Zlu11cj2cv++ecqF9urfsGhPgfh6Q4Rk9WBlB1hcwX4=" + replaced = "github.com/crypto-org-chain/cometbft" [mod."github.com/cometbft/cometbft-db"] version = "v0.14.1" hash = "sha256-QvWMRGsdgCsSfL+DHp3w1Bm4jXa14SeT7oRK3PiNGV0=" @@ -173,8 +174,8 @@ schema = 3 version = "v1.0.0-beta.5" hash = "sha256-Fy/PbsOsd6iq0Njy3DVWK6HqWsogI+MkE8QslHGWyVg=" [mod."github.com/cosmos/cosmos-sdk"] - version = "v0.50.6-0.20241018012743-d78d66e74712" - hash = "sha256-Eod4HaMzAipMfIoZrSBXS3iX79GEtIsVWBJLPE6sxwM=" + version = "v0.50.6-0.20241101065553-a70c19a03a81" + hash = "sha256-yiFlXStmCBxHB3qVhs/jDdRTuafQjCC4m7x7AM4fHbs=" replaced = "github.com/crypto-org-chain/cosmos-sdk" [mod."github.com/cosmos/go-bip39"] version = "v1.0.0" @@ -262,8 +263,8 @@ schema = 3 hash = "sha256-ozwVS2BhAoz+OOisAyMhgg+lq8FdQjf90xoOq9cxtGw=" replaced = "github.com/crypto-org-chain/go-ethereum" [mod."github.com/evmos/ethermint"] - version = "v0.6.1-0.20241028015856-e567c5ad3acf" - hash = "sha256-/TSmGsYqQkXZuPA8d18o4WGIp0etnH5TLn9e2LEE114=" + version = "v0.6.1-0.20241101134753-e4d00df93541" + hash = "sha256-V6ip8ZRlAcULLGfHE6W/MKOup4HEDK4m9au5EY8ADC4=" replaced = "github.com/crypto-org-chain/ethermint" [mod."github.com/fatih/color"] version = "v1.16.0" @@ -515,8 +516,8 @@ schema = 3 version = "v1.0.1-0.20181226105442-5d4384ee4fb2" hash = "sha256-XA4Oj1gdmdV/F/+8kMI+DBxKPthZ768hbKsO3d9Gx90=" [mod."github.com/prometheus/client_golang"] - version = "v1.20.4" - hash = "sha256-pdyQUDEkBwNmbT6IPtEVqmx7z0kBROvmOMMeeRVHAog=" + version = "v1.20.5" + hash = "sha256-RbDZTBH+j2ZNLbHSMFxW0j8UStvkwc4IHTz3My9w4qo=" [mod."github.com/prometheus/client_model"] version = "v0.6.1" hash = "sha256-rIDyUzNfxRA934PIoySR0EhuBbZVRK/25Jlc/r8WODw=" @@ -652,8 +653,8 @@ schema = 3 version = "v1.11.0" hash = "sha256-Lb6rHHfR62Ozg2j2JZy3MKOMKdsfzd1IYTR57r3Mhp0=" [mod."golang.org/x/crypto"] - version = "v0.27.0" - hash = "sha256-8HP4+gr4DbXI22GhdgZmCWr1ijtI9HNLsTcE0kltY9o=" + version = "v0.28.0" + hash = "sha256-AYjr0BcWQMwWY1u8c2hzUprtqHUmAH7RNSxHz2hhnZs=" [mod."golang.org/x/exp"] version = "v0.0.0-20240613232115-7f521ea00fb8" hash = "sha256-QRK52QHPPhj+JIcQbd4/hI5ceEbKu3e9mR57XxocwOE=" @@ -670,14 +671,14 @@ schema = 3 version = "v0.8.0" hash = "sha256-usvF0z7gq1vsX58p4orX+8WHlv52pdXgaueXlwj2Wss=" [mod."golang.org/x/sys"] - version = "v0.25.0" - hash = "sha256-PXZ9EQZ7SFpcL7d3E1+KGTxziYlHEIZPfoXEbnaVD3I=" + version = "v0.26.0" + hash = "sha256-YjklsWNhx4g4TaWRWfFe1TMFKujbqiaNvZ38bfI35fM=" [mod."golang.org/x/term"] - version = "v0.24.0" - hash = "sha256-PfC5psjzEWKRm1DlnBXX0ntw9OskJFrq1RRjyBa1lOk=" + version = "v0.25.0" + hash = "sha256-vwNqnxEcgeVxQxdKBUnkb7y9jg6LlNDJxfG1GugSeRQ=" [mod."golang.org/x/text"] - version = "v0.18.0" - hash = "sha256-aNvJW4gQs+MTfdz6DZqyyHQS2GJ9W8L8qKPVODPn4+k=" + version = "v0.19.0" + hash = "sha256-C92pSYLLUQ2NKKcc60wpoSJ5UWAfnWkmd997C13fXdU=" [mod."golang.org/x/time"] version = "v0.5.0" hash = "sha256-W6RgwgdYTO3byIPOFxrP2IpAZdgaGowAaVfYby7AULU=" @@ -697,8 +698,8 @@ schema = 3 version = "v0.0.0-20240814211410-ddb44dafa142" hash = "sha256-4T4DTrmFbqT4tD7PSL7Ie7u8ZN2iwGkhK02nWugssxk=" [mod."google.golang.org/grpc"] - version = "v1.67.0" - hash = "sha256-n/0i7nR+dm0mIkJfUlM1BNcOdkwWBxspr9TQtwHMXV0=" + version = "v1.67.1" + hash = "sha256-VqfKp80c2B1MK4m1WtHW4r7ykqdChJbqaMn+gMEYmYc=" [mod."google.golang.org/protobuf"] version = "v1.34.2" hash = "sha256-nMTlrDEE2dbpWz50eQMPBQXCyQh4IdjrTIccaU0F3m0=" diff --git a/integration_tests/ibc_utils.py b/integration_tests/ibc_utils.py index fcb68c42f9..3df6d0324d 100644 --- a/integration_tests/ibc_utils.py +++ b/integration_tests/ibc_utils.py @@ -164,8 +164,8 @@ def prepare_network( Path(__file__).parent / file, relayer=relayer, ) as cronos: + cli = cronos.cosmos_cli() if grantee: - cli = cronos.cosmos_cli() granter_addr = cli.address("signer1") grantee_addr = cli.address(grantee) max_gas = 1000000 @@ -181,6 +181,8 @@ def prepare_network( # wait for grpc ready wait_for_port(ports.grpc_port(chainmain.base_port(0))) # chainmain grpc wait_for_port(ports.grpc_port(cronos.base_port(0))) # cronos grpc + wait_for_new_blocks(chainmain.cosmos_cli(), 1) + wait_for_new_blocks(cli, 1) version = {"fee_version": "ics29-1", "app_version": "ics20-1"} path = cronos.base_dir.parent / "relayer"