diff --git a/CHANGELOG.md b/CHANGELOG.md index 62f89fd70..e17895603 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## [v3.0.0](https://github.com/bandprotocol/chain/releases/tag/v3.0.0) * (bump) Use go 1.22.3 -* (bump) Use cosmos-sdk package v0.50.10 / ibc-go v8.5.2 +* (bump) Use cosmos-sdk package v0.50.11 / ibc-go v8.5.2 * (bump) replace github.com/tendermint/tendermint by github.com/cometbft/cometbft v0.38.12 * (bump) migrated from gogo/protobuf to cosmos/gogoproto * (bump) Use go-owasm v0.3.1 diff --git a/scripts/start_grogu.sh b/scripts/start_grogu.sh index e651e96df..cbf027594 100755 --- a/scripts/start_grogu.sh +++ b/scripts/start_grogu.sh @@ -47,7 +47,7 @@ sleep 3 # add feeder to bandchain echo "y" | bandd tx feeds add-feeders $(grogu keys list -a) --from validator --gas-prices 0.0025uband --keyring-backend test --chain-id bandchain -# wait for addding feeder transaction success +# wait for adding feeder transaction success sleep 3 # run grogu diff --git a/scripts/tunnel/update_and_reset_tunnel.sh b/scripts/tunnel/update_and_reset_tunnel.sh index 971ce0fed..758c47c63 100755 --- a/scripts/tunnel/update_and_reset_tunnel.sh +++ b/scripts/tunnel/update_and_reset_tunnel.sh @@ -1 +1 @@ -bandd tx tunnel update-and-reset-tunnel 1 60 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain +bandd tx tunnel update-signals-and-interval 1 60 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/x/bandtss/keeper/keeper_signing_test.go b/x/bandtss/keeper/keeper_signing_test.go index ba554cf57..4bf6bc6e6 100644 --- a/x/bandtss/keeper/keeper_signing_test.go +++ b/x/bandtss/keeper/keeper_signing_test.go @@ -3,6 +3,8 @@ package keeper_test import ( "go.uber.org/mock/gomock" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bandprotocol/chain/v3/pkg/tss" @@ -35,6 +37,8 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { { name: "test success with only current group", preProcess: func(s *KeeperTestSuite) { + params := s.keeper.GetParams(s.ctx) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(currentGroupID, s.ctx.BlockTime())) s.tssKeeper.EXPECT().GetGroup(gomock.Any(), currentGroupID). @@ -46,10 +50,12 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { gomock.Any(), bandtesting.Alice.Address, types.ModuleName, - sdk.NewCoins(sdk.NewInt64Coin("uband", 20)), + params.FeePerSigner.MulInt(math.NewInt(2)), ).Return(nil) }, postCheck: func(s *KeeperTestSuite) { + params := s.keeper.GetParams(s.ctx) + // check mapping of tss signingID -> bandtss signingID actualMappedSigningID := s.keeper.GetSigningIDMapping(s.ctx, tss.SigningID(1)) s.Require().Equal(types.SigningID(1), actualMappedSigningID) @@ -59,7 +65,7 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { s.Require().NoError(err) s.Require().Equal(types.Signing{ ID: types.SigningID(1), - FeePerSigner: sdk.NewCoins(sdk.NewInt64Coin("uband", 10)), + FeePerSigner: params.FeePerSigner, Requester: bandtesting.Alice.Address.String(), CurrentGroupSigningID: tss.SigningID(1), IncomingGroupSigningID: tss.SigningID(0), @@ -74,6 +80,8 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { { name: "test failed insufficient member in current group even normal incoming group", preProcess: func(s *KeeperTestSuite) { + params := s.keeper.GetParams(s.ctx) + incomingGroupID := tss.GroupID(2) transition := types.GroupTransition{ SigningID: tss.SigningID(1), @@ -103,7 +111,7 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { gomock.Any(), bandtesting.Alice.Address, types.ModuleName, - sdk.NewCoins(sdk.NewInt64Coin("uband", 20)), + params.FeePerSigner.MulInt(math.NewInt(2)), ).Return(nil) }, postCheck: func(s *KeeperTestSuite) { @@ -118,6 +126,8 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { { name: "test success with only current group; insufficient member on incoming group", preProcess: func(s *KeeperTestSuite) { + params := s.keeper.GetParams(s.ctx) + incomingGroupID := tss.GroupID(2) transition := types.GroupTransition{ SigningID: tss.SigningID(1), @@ -158,10 +168,12 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { gomock.Any(), bandtesting.Alice.Address, types.ModuleName, - sdk.NewCoins(sdk.NewInt64Coin("uband", 20)), + params.FeePerSigner.MulInt(math.NewInt(2)), ).Return(nil) }, postCheck: func(s *KeeperTestSuite) { + params := s.keeper.GetParams(s.ctx) + // check mapping of tss signingID -> bandtss signingID actualMappedSigningID := s.keeper.GetSigningIDMapping(s.ctx, tss.SigningID(1)) s.Require().Equal(types.SigningID(1), actualMappedSigningID) @@ -171,7 +183,7 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { s.Require().NoError(err) s.Require().Equal(types.Signing{ ID: types.SigningID(1), - FeePerSigner: sdk.NewCoins(sdk.NewInt64Coin("uband", 10)), + FeePerSigner: params.FeePerSigner, Requester: bandtesting.Alice.Address.String(), CurrentGroupSigningID: tss.SigningID(1), IncomingGroupSigningID: tss.SigningID(0), @@ -189,6 +201,8 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { { name: "test success with both current and incoming group", preProcess: func(s *KeeperTestSuite) { + params := s.keeper.GetParams(s.ctx) + incomingGroupID := tss.GroupID(2) transition := types.GroupTransition{ SigningID: tss.SigningID(1), @@ -210,10 +224,12 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { gomock.Any(), bandtesting.Alice.Address, types.ModuleName, - sdk.NewCoins(sdk.NewInt64Coin("uband", 20)), + params.FeePerSigner.MulInt(math.NewInt(2)), ).Return(nil) }, postCheck: func(s *KeeperTestSuite) { + params := s.keeper.GetParams(s.ctx) + // check mapping of tss signingID -> bandtss signingID bandtssSignignID := s.keeper.GetSigningIDMapping(s.ctx, tss.SigningID(2)) s.Require().Equal(types.SigningID(1), bandtssSignignID) @@ -225,7 +241,7 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { s.Require().NoError(err) s.Require().Equal(types.Signing{ ID: types.SigningID(1), - FeePerSigner: sdk.NewCoins(sdk.NewInt64Coin("uband", 10)), + FeePerSigner: params.FeePerSigner, Requester: bandtesting.Alice.Address.String(), CurrentGroupSigningID: tss.SigningID(2), IncomingGroupSigningID: tss.SigningID(3), @@ -240,6 +256,8 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { { name: "request only current group; transition message is not signed", preProcess: func(s *KeeperTestSuite) { + params := s.keeper.GetParams(s.ctx) + incomingGroupID := tss.GroupID(2) transition := types.GroupTransition{ SigningID: tss.SigningID(1), @@ -259,10 +277,12 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { gomock.Any(), bandtesting.Alice.Address, types.ModuleName, - sdk.NewCoins(sdk.NewInt64Coin("uband", 20)), + params.FeePerSigner.MulInt(math.NewInt(2)), ).Return(nil) }, postCheck: func(s *KeeperTestSuite) { + params := s.keeper.GetParams(s.ctx) + // check mapping of tss signingID -> bandtss signingID bandtssSignignID := s.keeper.GetSigningIDMapping(s.ctx, tss.SigningID(4)) s.Require().Equal(types.SigningID(1), bandtssSignignID) @@ -272,7 +292,7 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { s.Require().NoError(err) s.Require().Equal(types.Signing{ ID: types.SigningID(1), - FeePerSigner: sdk.NewCoins(sdk.NewInt64Coin("uband", 10)), + FeePerSigner: params.FeePerSigner, Requester: bandtesting.Alice.Address.String(), CurrentGroupSigningID: tss.SigningID(4), IncomingGroupSigningID: tss.SigningID(0), diff --git a/x/bandtss/keeper/msg_server_test.go b/x/bandtss/keeper/msg_server_test.go index 97a2b8bf7..8a30ba390 100644 --- a/x/bandtss/keeper/msg_server_test.go +++ b/x/bandtss/keeper/msg_server_test.go @@ -413,7 +413,7 @@ func (s *AppTestSuite) TestSuccessRequestSignatureOnCurrentGroup() { msg, err := types.NewMsgRequestSignature( tsstypes.NewTextSignatureOrder([]byte("msg")), - sdk.NewCoins(sdk.NewInt64Coin("uband", 100)), + sdk.NewCoins(sdk.NewInt64Coin("uband", 1000)), bandtesting.FeePayer.Address.String(), ) s.Require().NoError(err) @@ -540,7 +540,7 @@ func (s *AppTestSuite) TestSuccessRequestSignatureOnBothGroups() { msg, err := types.NewMsgRequestSignature( tsstypes.NewTextSignatureOrder([]byte("msg")), - sdk.NewCoins(sdk.NewInt64Coin("uband", 100)), + sdk.NewCoins(sdk.NewInt64Coin("uband", 1000)), bandtesting.FeePayer.Address.String(), ) s.Require().NoError(err) diff --git a/x/bandtss/types/params.go b/x/bandtss/types/params.go index 6c0eb1dab..41470f935 100644 --- a/x/bandtss/types/params.go +++ b/x/bandtss/types/params.go @@ -17,8 +17,8 @@ const ( DefaultRewardPercentage = uint64(10) ) -// DefaultFeePerSigner is the default value for the signing request fee. The value is ["10uband"] -var DefaultFeePerSigner = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) +// DefaultFeePerSigner is the default value for the signing request fee per signer. +var DefaultFeePerSigner = sdk.NewCoins(sdk.NewInt64Coin("uband", 50)) // NewParams creates a new Params instance func NewParams( diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 696755d8d..7f7842511 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -208,8 +208,8 @@ func GetTxCmdUpdateIBCRoute() *cobra.Command { func GetTxCmdUpdateSignalsAndInterval() *cobra.Command { cmd := &cobra.Command{ - Use: "update-and-reset-tunnel [tunnel-id] [interval] [signalDeviations-json-file] ", - Short: "Update an existing tunnel and reset the latest price interval of the tunnel", + Use: "update-signals-and-interval [tunnel-id] [interval] [signalDeviations-json-file] ", + Short: "Update signals and interval of the existing tunnel", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index faaa4925f..fdcaddebb 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -15,7 +15,7 @@ var ( DefaultMaxDeviationBPS = uint64(3000) DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 1_000_000_000)) DefaultMaxSignals = uint64(25) - DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10_000)) + DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 500)) ) // NewParams creates a new Params instance