From fdbbfd1875f3f1d780298806976d657cbca7c7ee Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Tue, 14 May 2024 20:06:22 +0200 Subject: [PATCH 01/22] fix: remove all stringer for proto types --- eth/account.pb.go | 26 +- proto/eth/types/v1/account.proto | 1 - proto/nibiru/oracle/v1/oracle.proto | 4 - proto/nibiru/perp/v2/event.proto | 262 ------------- proto/nibiru/perp/v2/genesis.proto | 102 ----- proto/nibiru/perp/v2/query.proto | 163 -------- proto/nibiru/perp/v2/state.proto | 250 ------------ proto/nibiru/perp/v2/tx.proto | 472 ----------------------- proto/nibiru/spot/v1/event.proto | 86 ----- proto/nibiru/spot/v1/genesis.proto | 18 - proto/nibiru/spot/v1/params.proto | 27 -- proto/nibiru/spot/v1/pool.proto | 97 ----- proto/nibiru/spot/v1/query.proto | 282 -------------- proto/nibiru/spot/v1/tx.proto | 120 ------ proto/nibiru/sudo/v1/state.proto | 1 - proto/nibiru/tokenfactory/v1/state.proto | 1 - x/oracle/types/oracle.pb.go | 145 +++---- x/oracle/types/params.go | 7 - x/oracle/types/vote.go | 26 -- x/sudo/keeper/msg_server.go | 3 +- x/sudo/types/state.go | 7 - x/sudo/types/state.pb.go | 41 +- x/tokenfactory/cli/cli_test.go | 6 +- x/tokenfactory/keeper/genesis.go | 4 +- x/tokenfactory/keeper/genesis_test.go | 2 +- x/tokenfactory/keeper/grpc_query_test.go | 6 +- x/tokenfactory/keeper/msg_server.go | 2 +- x/tokenfactory/keeper/msg_server_test.go | 24 +- x/tokenfactory/keeper/store.go | 6 +- x/tokenfactory/keeper/store_test.go | 2 +- x/tokenfactory/keeper/wasm_test.go | 14 +- x/tokenfactory/types/state.go | 6 +- x/tokenfactory/types/state.pb.go | 69 ++-- x/tokenfactory/types/state_test.go | 4 +- 34 files changed, 183 insertions(+), 2103 deletions(-) delete mode 100644 proto/nibiru/perp/v2/event.proto delete mode 100644 proto/nibiru/perp/v2/genesis.proto delete mode 100644 proto/nibiru/perp/v2/query.proto delete mode 100644 proto/nibiru/perp/v2/state.proto delete mode 100644 proto/nibiru/perp/v2/tx.proto delete mode 100644 proto/nibiru/spot/v1/event.proto delete mode 100644 proto/nibiru/spot/v1/genesis.proto delete mode 100644 proto/nibiru/spot/v1/params.proto delete mode 100644 proto/nibiru/spot/v1/pool.proto delete mode 100644 proto/nibiru/spot/v1/query.proto delete mode 100644 proto/nibiru/spot/v1/tx.proto diff --git a/eth/account.pb.go b/eth/account.pb.go index 59f2615f3..7cea10a19 100644 --- a/eth/account.pb.go +++ b/eth/account.pb.go @@ -34,8 +34,9 @@ type EthAccount struct { CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty" yaml:"code_hash"` } -func (m *EthAccount) Reset() { *m = EthAccount{} } -func (*EthAccount) ProtoMessage() {} +func (m *EthAccount) Reset() { *m = EthAccount{} } +func (m *EthAccount) String() string { return proto.CompactTextString(m) } +func (*EthAccount) ProtoMessage() {} func (*EthAccount) Descriptor() ([]byte, []int) { return fileDescriptor_33844e397ad0a9a0, []int{0} } @@ -73,28 +74,27 @@ func init() { func init() { proto.RegisterFile("eth/types/v1/account.proto", fileDescriptor_33844e397ad0a9a0) } var fileDescriptor_33844e397ad0a9a0 = []byte{ - // 322 bytes of a gzipped FileDescriptorProto + // 318 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0x2d, 0xc9, 0xd0, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x49, 0x2d, 0xc9, 0xd0, 0x03, 0xcb, 0xe9, 0x95, 0x19, 0x4a, 0xc9, 0x25, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xeb, 0x27, 0x96, 0x96, 0x64, 0xe8, 0x97, 0x19, 0x26, 0xa5, 0x96, 0x24, 0x1a, 0x82, 0x39, 0x10, 0xd5, 0x52, 0x92, 0x10, 0xf9, 0x78, 0x30, 0x4f, 0x1f, 0xc2, 0x81, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x43, 0xc4, 0x41, 0x2c, 0x88, 0xa8, - 0xd2, 0x4f, 0x46, 0x2e, 0x2e, 0xd7, 0x92, 0x0c, 0x47, 0x88, 0x9d, 0x42, 0x09, 0x5c, 0x3c, 0x49, + 0xd2, 0x57, 0x46, 0x2e, 0x2e, 0xd7, 0x92, 0x0c, 0x47, 0x88, 0x9d, 0x42, 0x09, 0x5c, 0x3c, 0x49, 0x89, 0xc5, 0xa9, 0xf1, 0x50, 0x37, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x29, 0xe8, 0x41, 0x4d, 0x02, 0xdb, 0x04, 0xb5, 0x56, 0xcf, 0x29, 0xb1, 0x38, 0x15, 0xaa, 0xcf, 0x49, 0xfa, 0xc2, 0x3d, 0x79, 0xc6, 0x4f, 0xf7, 0xe4, 0x85, 0x2b, 0x13, 0x73, 0x73, 0xac, 0x94, 0x90, 0xcd, 0x50, 0x0a, 0xe2, 0x4e, 0x42, 0xa8, 0x14, 0x32, 0xe4, 0xe2, 0x4c, 0xce, 0x4f, 0x49, 0x8d, 0xcf, 0x48, 0x2c, 0xce, 0x90, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x74, 0x12, 0xf9, 0x74, 0x4f, 0x5e, 0x00, 0xa2, - 0x11, 0x2e, 0xa5, 0x14, 0xc4, 0x01, 0x62, 0x7b, 0x24, 0x16, 0x67, 0x58, 0x85, 0x75, 0x2c, 0x90, - 0x67, 0x98, 0xb1, 0x40, 0x9e, 0xe1, 0xc5, 0x02, 0x79, 0x86, 0x53, 0x5b, 0x74, 0xdd, 0xd2, 0x33, - 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xa1, 0x5e, 0x84, 0x52, 0xba, 0xc5, 0x29, 0xd9, - 0xfa, 0x15, 0x90, 0xc0, 0x81, 0x04, 0x19, 0x36, 0x77, 0x43, 0x5d, 0xe2, 0xe9, 0x64, 0x7d, 0xe2, - 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, - 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x8a, 0x48, 0x36, 0xf8, 0x65, 0x26, 0x65, - 0x16, 0x95, 0x3a, 0x67, 0x24, 0x66, 0xe6, 0xe9, 0xe7, 0x81, 0xd9, 0xfa, 0xa9, 0x25, 0x19, 0x49, - 0x6c, 0xe0, 0xf0, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x86, 0xa7, 0xfe, 0xbc, 0x01, - 0x00, 0x00, + 0x11, 0x2e, 0xa5, 0x14, 0xc4, 0x01, 0x62, 0x7b, 0x24, 0x16, 0x67, 0x58, 0x05, 0x75, 0x2c, 0x90, + 0x67, 0x78, 0xb1, 0x40, 0x9e, 0xe1, 0xd4, 0x16, 0x5d, 0xb7, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, + 0xbd, 0xe4, 0xfc, 0x5c, 0xa8, 0xf7, 0xa0, 0x94, 0x6e, 0x71, 0x4a, 0xb6, 0x7e, 0x05, 0x24, 0x60, + 0x20, 0xc1, 0x85, 0xcd, 0xcd, 0x50, 0x57, 0x78, 0x3a, 0x59, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, + 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, + 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x22, 0x92, 0x0d, 0x7e, 0x99, 0x49, 0x99, 0x45, 0xa5, 0xce, 0x19, + 0x89, 0x99, 0x79, 0xfa, 0x79, 0x60, 0xb6, 0x7e, 0x6a, 0x49, 0x46, 0x12, 0x1b, 0x38, 0xec, 0x8c, + 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x66, 0xb4, 0x6d, 0xb8, 0x01, 0x00, 0x00, } func (m *EthAccount) Marshal() (dAtA []byte, err error) { diff --git a/proto/eth/types/v1/account.proto b/proto/eth/types/v1/account.proto index 6c750ac17..ada2d316b 100644 --- a/proto/eth/types/v1/account.proto +++ b/proto/eth/types/v1/account.proto @@ -12,7 +12,6 @@ option go_package = "github.com/NibiruChain/nibiru/eth"; // authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. message EthAccount { option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; option (gogoproto.equal) = false; option (cosmos_proto.implements_interface) = "github.com/cosmos/cosmos-sdk/x/auth/types.cosmos.auth.v1beta1.AccountI"; diff --git a/proto/nibiru/oracle/v1/oracle.proto b/proto/nibiru/oracle/v1/oracle.proto index 0e12baad2..e9f545623 100644 --- a/proto/nibiru/oracle/v1/oracle.proto +++ b/proto/nibiru/oracle/v1/oracle.proto @@ -10,7 +10,6 @@ option go_package = "github.com/NibiruChain/nibiru/x/oracle/types"; // Params defines the module parameters for the x/oracle module. message Params { option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; // VotePeriod defines the number of blocks during which voting takes place. uint64 vote_period = 1 [ (gogoproto.moretags) = "yaml:\"vote_period\"" ]; @@ -91,7 +90,6 @@ message Params { message AggregateExchangeRatePrevote { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; string hash = 1 [ (gogoproto.moretags) = "yaml:\"hash\"" ]; string voter = 2 [ (gogoproto.moretags) = "yaml:\"voter\"" ]; @@ -103,7 +101,6 @@ message AggregateExchangeRatePrevote { message AggregateExchangeRateVote { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; repeated ExchangeRateTuple exchange_rate_tuples = 1 [ (gogoproto.moretags) = "yaml:\"exchange_rate_tuples\"", @@ -118,7 +115,6 @@ message AggregateExchangeRateVote { message ExchangeRateTuple { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; string pair = 1 [ (gogoproto.moretags) = "yaml:\"pair\"", diff --git a/proto/nibiru/perp/v2/event.proto b/proto/nibiru/perp/v2/event.proto deleted file mode 100644 index 3e1b3d915..000000000 --- a/proto/nibiru/perp/v2/event.proto +++ /dev/null @@ -1,262 +0,0 @@ -syntax = "proto3"; - -package nibiru.perp.v2; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "nibiru/perp/v2/state.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/perp/v2/types"; - -// Emitted when a position changes. -message PositionChangedEvent { - nibiru.perp.v2.Position final_position = 1 [ (gogoproto.nullable) = false ]; - - // Position notional (in quote units) after the change. In general, - // 'notional = baseAmount * priceQuotePerBase', where size is the baseAmount. - string position_notional = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // Transaction fee paid. A "taker" fee. - cosmos.base.v1beta1.Coin transaction_fee = 3 [ - (gogoproto.moretags) = "yaml:\"transaction_fee\"", - (gogoproto.nullable) = false - ]; - - // realize profits and losses after the change - string realized_pnl = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // Amount of bad debt cleared by the PerpEF during the change. - // Bad debt is negative net margin past the liquidation point of a position. - cosmos.base.v1beta1.Coin bad_debt = 5 [ (gogoproto.nullable) = false ]; - - /* A funding payment made or received by the trader on the current position. - 'fundingPayment' is positive if 'owner' is the sender and negative if 'owner' - is the receiver of the payment. Its magnitude is abs(size * fundingRate). - Funding payments act to converge the mark price and index price - (average price on major exchanges). - */ - string funding_payment = 6 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The block number at which this position was changed. - int64 block_height = 7; - - // margin_to_user is the amount of collateral received by the trader during - // the position change. A positve value indicates that the trader received - // funds, while a negative value indicates that the trader spent funds. - string margin_to_user = 8 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - - // change_reason describes the reason for why the position resulted in a - // change. Change type can take the following values: - // - // - CHANGE_REASON_UNSPECIFIED: Unspecified change reason. - // - CHANGE_REASON_ADD_MARGIN: Margin was added to the position. - // - CHANGE_REASON_REMOVE_MARGIN: Margin was removed from the position. - // - CHANGE_REASON_OPEN_POSITION: A new position was opened. - // - CHANGE_REASON_CLOSE_POSITION: An existing position was closed. - string change_reason = 9 - [ (gogoproto.customtype) = "ChangeReason", (gogoproto.nullable) = false ]; - - // exchanged_size represent the change in size for an existing position - // after the change. A positive value indicates that the position size - // increased, while a negative value indicates that the position size - // decreased. - string exchanged_size = 10 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // exchanged_notional represent the change in notional for an existing - // position after the change. A positive value indicates that the position - // notional increased, while a negative value indicates that the position - // notional decreased. - string exchanged_notional = 11 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -// Emitted when a position is liquidated. Wraps a PositionChanged event since a -// liquidation causes position changes. -message PositionLiquidatedEvent { - nibiru.perp.v2.PositionChangedEvent position_changed_event = 1 - [ (gogoproto.nullable) = false ]; - - // Address of the account that executed the tx. - string liquidator_address = 2; - - // Commission (in margin units) received by 'liquidator'. - cosmos.base.v1beta1.Coin fee_to_liquidator = 3 [ - (gogoproto.moretags) = "yaml:\"fee_to_liquidator\"", - (gogoproto.nullable) = false - ]; - - // Commission (in margin units) given to the ecosystem fund. - cosmos.base.v1beta1.Coin fee_to_ecosystem_fund = 4 [ - (gogoproto.moretags) = "yaml:\"fee_to_ecosystem_fund\"", - (gogoproto.nullable) = false - ]; -} - -// Emitted when a position is settled. -message PositionSettledEvent { - // Identifier for the virtual pool of the position. - string pair = 1 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - // Owner of the position. - string trader_address = 2; - - // Settled coin as dictated by the settlement price of the perp.amm. - repeated cosmos.base.v1beta1.Coin settled_coins = 3 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"settled_coins\"", - (gogoproto.nullable) = false - ]; -} - -// Emitted when the funding rate changes for a market. -message FundingRateChangedEvent { - // The pair for which the funding rate was calculated. - string pair = 1 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - // The mark price of the pair. - string mark_price_twap = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The oracle index price of the pair. - string index_price_twap = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The latest premium fraction just calculated. - string premium_fraction = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The market's latest cumulative premium fraction. - // The funding payment a position will pay is the difference between this - // value and the latest cumulative premium fraction on the position, - // multiplied by the position size. - string cumulative_premium_fraction = 6 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -// Emitted when liquidation fails. -message LiquidationFailedEvent { - // The pair for which we are trying to liquidate. - string pair = 1 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - // owner of the position. - string trader = 2; - - // Address of the account that executed the tx. - string liquidator = 3; - - enum LiquidationFailedReason { - UNSPECIFIED = 0; - - // the position is healthy and does not need to be liquidated. - POSITION_HEALTHY = 1; - - // the pair does not exist. - NONEXISTENT_PAIR = 2; - - // the position does not exist. - NONEXISTENT_POSITION = 3; - } - // Reason for the liquidation failure. - LiquidationFailedReason reason = 4; -} - -// This event is emitted when the amm is updated, which can be triggered by -// the following events: -// -// - swap -// - edit price multiplier -// - edit depth -message AmmUpdatedEvent { - // the final state of the AMM - nibiru.perp.v2.AMM final_amm = 1 [ (gogoproto.nullable) = false ]; - - // The mark price of the pair. - string mark_price_twap = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The oracle index price of the pair. - string index_price_twap = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -// This event is emitted at the end of every block for persisting market changes -// off-chain -// -// Market changes are triggered by the following actions: -// -// - disabling market -// - changing market fees -// - bad debt is prepaid by the ecosystem fund -message MarketUpdatedEvent { - // the final state of the market - nibiru.perp.v2.Market final_market = 1 [ (gogoproto.nullable) = false ]; -} - -// EventShiftPegMultiplier: ABCI event emitted from MsgShiftPegMultiplier -message EventShiftPegMultiplier { - string old_peg_multiplier = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string new_peg_multiplier = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - cosmos.base.v1beta1.Coin cost_paid = 3 [ (gogoproto.nullable) = false ]; -} - -// EventShiftSwapInvariant: ABCI event emitted from MsgShiftSwapInvariant -message EventShiftSwapInvariant { - string old_swap_invariant = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string new_swap_invariant = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - cosmos.base.v1beta1.Coin cost_paid = 3 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/nibiru/perp/v2/genesis.proto b/proto/nibiru/perp/v2/genesis.proto deleted file mode 100644 index d0e921cc0..000000000 --- a/proto/nibiru/perp/v2/genesis.proto +++ /dev/null @@ -1,102 +0,0 @@ -syntax = "proto3"; - -package nibiru.perp.v2; - -import "cosmos/base/v1beta1/coin.proto"; -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; -import "nibiru/perp/v2/state.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/perp/v2/types"; - -// GenesisState defines the perp module's genesis state. -// Thge genesis state is used not only to start the network but also useful for -// exporting and importing state during network upgrades. -message GenesisState { - repeated nibiru.perp.v2.Market markets = 2 [ (gogoproto.nullable) = false ]; - - repeated nibiru.perp.v2.AMM amms = 3 [ (gogoproto.nullable) = false ]; - - repeated GenesisPosition positions = 4 [ (gogoproto.nullable) = false ]; - - repeated nibiru.perp.v2.ReserveSnapshot reserve_snapshots = 5 - [ (gogoproto.nullable) = false ]; - - uint64 dnr_epoch = 6; - - message TraderVolume { - string trader = 1; - uint64 epoch = 2; - string volume = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - } - - // For testing purposes, we allow the collateral to be set at genesis - string collateral_denom = 11; - - repeated TraderVolume trader_volumes = 7 [ (gogoproto.nullable) = false ]; - - message Discount { - string fee = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string volume = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - } - - repeated Discount global_discount = 8 [ (gogoproto.nullable) = false ]; - - repeated CustomDiscount custom_discounts = 9 [ (gogoproto.nullable) = false ]; - - message CustomDiscount { - string trader = 1; - Discount discount = 2; - } - - repeated nibiru.perp.v2.GenesisMarketLastVersion market_last_versions = 10 - [ (gogoproto.nullable) = false ]; - - repeated GlobalVolume global_volumes = 13 [ (gogoproto.nullable) = false ]; - - repeated DNRAllocation rebates_allocations = 12 - [ (gogoproto.nullable) = false ]; - - string dnr_epoch_name = 14; - - message GlobalVolume { - uint64 epoch = 1; - string volume = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - } -} - -// GenesisMarketLastVersion is the last version including pair only used for -// genesis -message GenesisMarketLastVersion { - string pair = 1 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - uint64 version = 2; -} - -message GenesisPosition { - string pair = 1 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - uint64 version = 2; - - Position position = 3 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/nibiru/perp/v2/query.proto b/proto/nibiru/perp/v2/query.proto deleted file mode 100644 index 70f9234b2..000000000 --- a/proto/nibiru/perp/v2/query.proto +++ /dev/null @@ -1,163 +0,0 @@ -syntax = "proto3"; - -package nibiru.perp.v2; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "nibiru/perp/v2/state.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/perp/v2/types"; - -// Query defines the gRPC querier service. -service Query { - // QueryPosition: Query one position on the given market for a user - rpc QueryPosition(QueryPositionRequest) returns (QueryPositionResponse) { - option (google.api.http).get = "/nibiru/perp/v2/position"; - } - - // QueryPositions: Query all positions for a user - rpc QueryPositions(QueryPositionsRequest) returns (QueryPositionsResponse) { - option (google.api.http).get = "/nibiru/perp/v2/positions"; - } - - // QueryPositionStore queries all of the positions in the KV store. - rpc QueryPositionStore(QueryPositionStoreRequest) - returns (QueryPositionStoreResponse) { - option (google.api.http).get = "/nibiru/perp/v2/position_store"; - } - - // Queries the module accounts for x/perp - rpc ModuleAccounts(QueryModuleAccountsRequest) - returns (QueryModuleAccountsResponse) { - option (google.api.http).get = "/nibiru/perp/v2/module_accounts"; - } - - // QueryMarkets: Query all markets - rpc QueryMarkets(QueryMarketsRequest) returns (QueryMarketsResponse) { - option (google.api.http).get = "/nibiru/perp/v2/markets"; - } - - // QueryCollateral: Queries info about the collateral - rpc QueryCollateral(QueryCollateralRequest) - returns (QueryCollateralResponse) { - option (google.api.http).get = "/nibiru/perp/v2/collateral"; - } -} - -// ---------------------------------------- Positions - -// QueryPositionsRequest: Request type for the -// "nibiru.perp.v2.Query/Positions" gRPC service method -message QueryPositionsRequest { string trader = 1; } - -// QueryPositionsResponse: Response type for the -// "nibiru.perp.v2.Query/Positions" gRPC service method -message QueryPositionsResponse { - repeated nibiru.perp.v2.QueryPositionResponse positions = 1 - [ (gogoproto.nullable) = false ]; -} - -// QueryPositionStoreRequest: Request type for the -// "nibiru.perp.v2.Query/PositionStore" gRPC service method -message QueryPositionStoreRequest { - // pagination defines a paginated request - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryPositionStoreResponse: Response type for the -// "nibiru.perp.v2.Query/PositionStore" gRPC service method -message QueryPositionStoreResponse { - // Position responses: collection of all stored positions (with pagination) - repeated nibiru.perp.v2.Position positions = 1 - [ (gogoproto.nullable) = false ]; - - // pagination defines a paginated response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// ---------------------------------------- Position - -// QueryPositionRequest: Request type for the -// "nibiru.perp.v2.Query/Position" gRPC service method -message QueryPositionRequest { - string pair = 1 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - string trader = 2; -} - -// QueryPositionResponse: Response type for the -// "nibiru.perp.v2.Query/Position" gRPC service method -message QueryPositionResponse { - // The position as it exists in the blockchain state - nibiru.perp.v2.Position position = 1 [ (gogoproto.nullable) = false ]; - - // The position's current notional value, if it were to be entirely closed (in - // margin units). - string position_notional = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The position's unrealized PnL. - string unrealized_pnl = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // margin ratio of the position based on the spot price - string margin_ratio = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -// ---------------------------------------- QueryModuleAccounts - -// QueryModuleAccountsRequest: Request type for the -// "nibiru.perp.v2.Query/ModuleAccounts" gRPC service method -message QueryModuleAccountsRequest {} - -// QueryModuleAccountsResponse: Response type for the -// "nibiru.perp.v2.Query/ModuleAccounts" gRPC service method -message QueryModuleAccountsResponse { - repeated nibiru.perp.v2.AccountWithBalance accounts = 1 - [ (gogoproto.nullable) = false ]; -} - -message AccountWithBalance { - string name = 1; - string address = 2; - - repeated cosmos.base.v1beta1.Coin balance = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message AmmMarket { - nibiru.perp.v2.Market market = 1 [ (gogoproto.nullable) = false ]; - nibiru.perp.v2.AMM amm = 2 [ (gogoproto.nullable) = false ]; -} - -message QueryMarketsRequest { bool versioned = 1; } - -message QueryMarketsResponse { - repeated nibiru.perp.v2.AmmMarket amm_markets = 1 - [ (gogoproto.nullable) = false ]; -} - -// ---------------------------------------- QueryCollateral - -// QueryCollateralRequest: Request type for the -// "nibiru.perp.v2.Query/Collateral" gRPC service method -message QueryCollateralRequest {} - -// QueryCollateralRequest: Response type for the -// "nibiru.perp.v2.Query/Collateral" gRPC service method -message QueryCollateralResponse { string collateral_denom = 1; } diff --git a/proto/nibiru/perp/v2/state.proto b/proto/nibiru/perp/v2/state.proto deleted file mode 100644 index 2d4d60abf..000000000 --- a/proto/nibiru/perp/v2/state.proto +++ /dev/null @@ -1,250 +0,0 @@ -syntax = "proto3"; - -package nibiru.perp.v2; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/perp/v2/types"; - -// The direction that the user is trading in -// LONG means the user is going long the base asset (e.g. buy BTC) -// SHORT means the user is shorting the base asset (e.g. sell BTC) -enum Direction { - DIRECTION_UNSPECIFIED = 0; - LONG = 1; - SHORT = 2; -} - -// Enumerates different options of calculating twap. -enum TwapCalcOption { - TWAP_CALC_OPTION_UNSPECIFIED = 0; - - // Spot price from quote asset reserve / base asset reserve - SPOT = 1; - - // Swapping with quote assets, output denominated in base assets - QUOTE_ASSET_SWAP = 2; - - // Swapping with base assets, output denominated in quote assets - BASE_ASSET_SWAP = 3; -} - -message Market { - // the trading pair represented by this market - // always BASE:QUOTE, e.g. BTC:NUSD or ETH:NUSD - string pair = 1 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - // whether or not the market is enabled - bool enabled = 2; - - // the version of the Market, only one market can exist per pair, when one is - // closed it cannot be reactivated, so a new market must be created, this is - // the version of the market - uint64 version = 14; - - // the minimum margin ratio which a user must maintain on this market - string maintenance_margin_ratio = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // the maximum leverage a user is able to be taken on this market - string max_leverage = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // Latest cumulative premium fraction for a given pair. - // Calculated once per funding rate interval. - // A premium fraction is the difference between mark and index, divided by the - // number of payments per day. (mark - index) / # payments in a day - string latest_cumulative_premium_fraction = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // the percentage of the notional given to the exchange when trading - string exchange_fee_ratio = 6 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // the percentage of the notional transferred to the ecosystem fund when - // trading - string ecosystem_fund_fee_ratio = 7 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // the percentage of liquidated position that will be - // given to out as a reward. Half of the liquidation fee is given to the - // liquidator, and the other half is given to the ecosystem fund. - string liquidation_fee_ratio = 8 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // the portion of the position size we try to liquidate if the available - // margin is higher than liquidation fee - string partial_liquidation_ratio = 9 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // specifies the interval on which the funding rate is updated - string funding_rate_epoch_id = 10; - - // amount of time to look back for TWAP calculations - google.protobuf.Duration twap_lookback_window = 11 - [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; - - // the amount of collateral already credited from the ecosystem fund - cosmos.base.v1beta1.Coin prepaid_bad_debt = 12 - [ (gogoproto.nullable) = false ]; - - // the maximum funding rate payment per epoch, this represents the maximum - // amount of funding that can be paid out per epoch as a percentage of the - // position size - string max_funding_rate = 13 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false - ]; - - // the pair of the oracle that is used to determine the index price - // for the market - string oracle_pair = 15 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; -} - -// MarketLastVersion is used to store the last version of the market -message MarketLastVersion { - // version of the market - uint64 version = 1; -} - -message AMM { - // identifies the market this AMM belongs to - string pair = 1 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - // the version of the AMM, only one AMM can exist per pair, when one is closed - // it cannot be reactivated, so a new AMM must be created, this is the version - // of the AMM - uint64 version = 8; - - // the amount of base reserves this AMM has - string base_reserve = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // the amount of quote reserves this AMM has - string quote_reserve = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // sqrt(k) - string sqrt_depth = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // the price multiplier of the dynamic AMM - string price_multiplier = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // Total long refers to the sum of long open notional in base. - string total_long = 6 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // Total short refers to the sum of short open notional in base. - string total_short = 7 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The settlement price if the AMM is settled. - string settlement_price = 9 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false - ]; -} - -message Position { - // address identifies the address owner of this position - string trader_address = 1; - - // pair identifies the pair associated with this position - string pair = 2 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - // the position size - string size = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // amount of margin remaining in the position - string margin = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // value of position in quote assets when opened - string open_notional = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The most recent cumulative premium fraction this position has. - // Used to calculate the next funding payment. - string latest_cumulative_premium_fraction = 6 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // last block number this position was updated - int64 last_updated_block_number = 7; -} - -// a snapshot of the perp.amm's reserves at a given point in time -message ReserveSnapshot { - AMM amm = 1 [ (gogoproto.nullable) = false ]; - - // milliseconds since unix epoch - int64 timestamp_ms = 2; -} - -// DNRAllocation represents a rebates allocation for a given epoch. -message DNRAllocation { - // epoch defines the reference epoch for the allocation. - uint64 epoch = 1; - // amount of DNR allocated for the epoch. - repeated cosmos.base.v1beta1.Coin amount = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} diff --git a/proto/nibiru/perp/v2/tx.proto b/proto/nibiru/perp/v2/tx.proto deleted file mode 100644 index 9153d4f13..000000000 --- a/proto/nibiru/perp/v2/tx.proto +++ /dev/null @@ -1,472 +0,0 @@ -syntax = "proto3"; - -package nibiru.perp.v2; - -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "nibiru/perp/v2/state.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/perp/v2/types"; - -// Msg defines the x/perp Msg service. -service Msg { - - rpc RemoveMargin(MsgRemoveMargin) returns (MsgRemoveMarginResponse) {} - - rpc AddMargin(MsgAddMargin) returns (MsgAddMarginResponse) {} - - rpc MultiLiquidate(MsgMultiLiquidate) returns (MsgMultiLiquidateResponse) {} - - rpc MarketOrder(MsgMarketOrder) returns (MsgMarketOrderResponse) {} - - rpc ClosePosition(MsgClosePosition) returns (MsgClosePositionResponse) {} - - rpc PartialClose(MsgPartialClose) returns (MsgPartialCloseResponse) {} - - rpc SettlePosition(MsgSettlePosition) returns (MsgClosePositionResponse) {} - - rpc DonateToEcosystemFund(MsgDonateToEcosystemFund) - returns (MsgDonateToEcosystemFundResponse) {} - - // ChangeCollateralDenom: Updates the collateral denom. A denom is valid if it - // is possible to make an sdk.Coin using it. [SUDO] Only callable by sudoers. - rpc ChangeCollateralDenom(MsgChangeCollateralDenom) - returns (MsgChangeCollateralDenomResponse) {} - - rpc AllocateEpochRebates(MsgAllocateEpochRebates) - returns (MsgAllocateEpochRebatesResponse) {} - - rpc WithdrawEpochRebates(MsgWithdrawEpochRebates) - returns (MsgWithdrawEpochRebatesResponse) {} - - // ShiftPegMultiplier: gRPC tx msg for changing a market's peg multiplier. - // [SUDO] Only callable by sudoers. - rpc ShiftPegMultiplier(MsgShiftPegMultiplier) - returns (MsgShiftPegMultiplierResponse) {} - - // ShiftSwapInvariant: gRPC tx msg for changing a market's swap invariant. - // [SUDO] Only callable by sudoers. - rpc ShiftSwapInvariant(MsgShiftSwapInvariant) - returns (MsgShiftSwapInvariantResponse) {} - - // WithdrawFromPerpFund: gRPC tx msg to withdraw from the perp fund module - // account. [SUDO] Only callable by sudoers. - rpc WithdrawFromPerpFund(MsgWithdrawFromPerpFund) - returns (MsgWithdrawFromPerpFundResponse) {} - - // CloseMarket: gRPC tx msg for closing a market. - // [Admin] Only callable by sudoers. - rpc CloseMarket(MsgCloseMarket) returns (MsgCloseMarketResponse) {} -} - -// -------------------------- Settle Position -------------------------- - -/* MsgSettlePosition: Msg to remove margin. */ -message MsgSettlePosition { - string sender = 1; - - string pair = 2 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - uint64 version = 3; -} - -// -------------------------- RemoveMargin -------------------------- - -/* MsgRemoveMargin: Msg to remove margin. */ -message MsgRemoveMargin { - string sender = 1; - - string pair = 2 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - cosmos.base.v1beta1.Coin margin = 3 [ (gogoproto.nullable) = false ]; -} - -message MsgRemoveMarginResponse { - // tokens transferred back to the trader - cosmos.base.v1beta1.Coin margin_out = 1 [ (gogoproto.nullable) = false ]; - - // the funding payment applied on this position interaction - string funding_payment = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The resulting position - nibiru.perp.v2.Position position = 3; -} - -// -------------------------- AddMargin -------------------------- - -/* MsgAddMargin: Msg to remove margin. */ -message MsgAddMargin { - string sender = 1; - - string pair = 2 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - cosmos.base.v1beta1.Coin margin = 3 [ (gogoproto.nullable) = false ]; -} - -message MsgAddMarginResponse { - string funding_payment = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - nibiru.perp.v2.Position position = 2; -} - -// -------------------------- Liquidation -------------------------- - -message MsgMultiLiquidate { - string sender = 1; - - message Liquidation { - string pair = 1 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - string trader = 2; - } - - repeated Liquidation liquidations = 2; -} - -message MsgMultiLiquidateResponse { - message LiquidationResponse { - bool success = 1; - string error = 2; - - cosmos.base.v1beta1.Coin liquidator_fee = 3 [ (gogoproto.nullable) = true ]; - // nullable since no fee is taken on failed liquidation - - cosmos.base.v1beta1.Coin perp_ef_fee = 4 - [ (gogoproto.nullable) = true ]; // perp ecosystem fund - // nullable since no fee is taken on failed liquidation - - string trader = 5; - string pair = 6 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - } - - repeated LiquidationResponse liquidations = 1; -} - -// -------------------------- MarketOrder -------------------------- - -message MsgMarketOrder { - string sender = 1; - - string pair = 2 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - nibiru.perp.v2.Direction side = 3; - - string quote_asset_amount = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - - string leverage = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - string base_asset_amount_limit = 6 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -message MsgMarketOrderResponse { - nibiru.perp.v2.Position position = 1; - - // The amount of quote assets exchanged. - string exchanged_notional_value = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The amount of base assets exchanged. - string exchanged_position_size = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The funding payment applied on this position change, measured in quote - // units. - string funding_payment = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The amount of PnL realized on this position changed, measured in quote - // units. - string realized_pnl = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The unrealized PnL in the position after the position change, measured in - // quote units. - string unrealized_pnl_after = 6 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The amount of margin the trader has to give to the vault. - // A negative value means the vault pays the trader. - string margin_to_vault = 7 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The position's notional value after the position change, measured in quote - // units. - string position_notional = 8 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -// -------------------------- ClosePosition -------------------------- - -message MsgClosePosition { - string sender = 1; - - string pair = 2 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; -} - -message MsgClosePositionResponse { - // The amount of quote assets exchanged. - string exchanged_notional_value = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The amount of base assets exchanged. - string exchanged_position_size = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The funding payment applied on this position change, measured in quote - // units. - string funding_payment = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The amount of PnL realized on this position changed, measured in quote - // units. - string realized_pnl = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The amount of margin the trader receives after closing the position, from - // the vault. Should never be negative. - string margin_to_trader = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -message MsgPartialClose { - string sender = 1; - - string pair = 2 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - - string size = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -message MsgPartialCloseResponse { - // The amount of quote assets exchanged. - string exchanged_notional_value = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The amount of base assets exchanged. - string exchanged_position_size = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The funding payment applied on this position change, measured in quote - // units. - string funding_payment = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The amount of PnL realized on this position changed, measured in quote - // units. - string realized_pnl = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // The amount of margin the trader receives after closing the position, from - // the vault. Should never be negative. - string margin_to_trader = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -// -------------------------- DonateToEcosystemFund -------------------------- - -message MsgDonateToEcosystemFund { - string sender = 1; - - // donation to the EF - cosmos.base.v1beta1.Coin donation = 2 [ - (gogoproto.moretags) = "yaml:\"donation\"", - (gogoproto.nullable) = false - ]; -} - -message MsgDonateToEcosystemFundResponse {} - -// ----------------------- MsgChangeCollateralDenom ----------------------- - -// MsgChangeCollateralDenom: Changes the collateral denom for the module. -// [SUDO] Only callable by sudoers. -message MsgChangeCollateralDenom { - string sender = 1; - string new_denom = 2; -} - -message MsgChangeCollateralDenomResponse {} - -// -------------------------- AllocateEpochRebates -------------------------- -message MsgAllocateEpochRebates { - string sender = 1; - - // rebates to allocate - repeated cosmos.base.v1beta1.Coin rebates = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message MsgAllocateEpochRebatesResponse { - repeated cosmos.base.v1beta1.Coin total_epoch_rebates = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// -------------------------- WithdrawEpochRebates -------------------------- -message MsgWithdrawEpochRebates { - string sender = 1; - repeated uint64 epochs = 2; -} - -message MsgWithdrawEpochRebatesResponse { - repeated cosmos.base.v1beta1.Coin withdrawn_rebates = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// -------------------------- ShiftPegMultiplier -------------------------- - -// MsgShiftPegMultiplier: gRPC tx msg for changing the peg multiplier. -// [SUDO] Only callable sudoers. -message MsgShiftPegMultiplier { - string sender = 1; - string pair = 2 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - string new_peg_mult = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -message MsgShiftPegMultiplierResponse {} - -// -------------------------- ShiftSwapInvariant -------------------------- - -// MsgShiftSwapInvariant: gRPC tx msg for changing the swap invariant. -// [SUDO] Only callable sudoers. -message MsgShiftSwapInvariant { - string sender = 1; - string pair = 2 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; - string new_swap_invariant = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -message MsgShiftSwapInvariantResponse {} - -// -------------------------- WithdrawFromPerpFund -------------------------- - -// MsgWithdrawFromPerpFund: gRPC tx msg for changing the swap invariant. -// [SUDO] Only callable sudoers. -message MsgWithdrawFromPerpFund { - string sender = 1; - string amount = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - // Optional denom in case withdrawing assets aside from NUSD. - string denom = 3; - string to_addr = 4; -} - -message MsgWithdrawFromPerpFundResponse {} - -// -------------------------- CloseMarket -------------------------- - -// CloseMarket: gRPC tx msg for closing a market. -// Admin-only. -message MsgCloseMarket { - string sender = 1; - string pair = 2 [ - (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", - (gogoproto.nullable) = false - ]; -} - -message MsgCloseMarketResponse {} diff --git a/proto/nibiru/spot/v1/event.proto b/proto/nibiru/spot/v1/event.proto deleted file mode 100644 index 3e4788d9a..000000000 --- a/proto/nibiru/spot/v1/event.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -package nibiru.spot.v1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "nibiru/spot/v1/pool.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; - -message EventPoolCreated { - // the address of the user who created the pool - string creator = 1; - - // the create pool fee - repeated cosmos.base.v1beta1.Coin fees = 2 [ (gogoproto.nullable) = false ]; - - // the final state of the pool - nibiru.spot.v1.Pool final_pool = 4 [ (gogoproto.nullable) = false ]; - - // the amount of pool shares that the user received - cosmos.base.v1beta1.Coin final_user_pool_shares = 5 - [ (gogoproto.nullable) = false ]; -} - -message EventPoolJoined { - // the address of the user who joined the pool - string address = 1; - - // the amount of tokens that the user deposited - repeated cosmos.base.v1beta1.Coin tokens_in = 2 - [ (gogoproto.nullable) = false ]; - - // the amount of pool shares that the user received - cosmos.base.v1beta1.Coin pool_shares_out = 3 [ (gogoproto.nullable) = false ]; - - // the amount of tokens remaining for the user - repeated cosmos.base.v1beta1.Coin rem_coins = 4 - [ (gogoproto.nullable) = false ]; - - // the final state of the pool - nibiru.spot.v1.Pool final_pool = 5 [ (gogoproto.nullable) = false ]; - - // the final amount of user pool shares - cosmos.base.v1beta1.Coin final_user_pool_shares = 6 - [ (gogoproto.nullable) = false ]; -} - -message EventPoolExited { - // the address of the user who exited the pool - string address = 1; - - // the amount of pool shares that the user exited with - cosmos.base.v1beta1.Coin pool_shares_in = 2 [ (gogoproto.nullable) = false ]; - - // the amount of tokens returned to the user - repeated cosmos.base.v1beta1.Coin tokens_out = 3 - [ (gogoproto.nullable) = false ]; - - // the amount of fees collected by the pool - repeated cosmos.base.v1beta1.Coin fees = 4 [ (gogoproto.nullable) = false ]; - - // the final state of the pool - nibiru.spot.v1.Pool final_pool = 5 [ (gogoproto.nullable) = false ]; - - // the final amount of user pool shares - cosmos.base.v1beta1.Coin final_user_pool_shares = 6 - [ (gogoproto.nullable) = false ]; -} - -message EventAssetsSwapped { - // the address of the user who swapped tokens - string address = 1; - - // the amount of tokens that the user deposited - cosmos.base.v1beta1.Coin token_in = 2 [ (gogoproto.nullable) = false ]; - - // the amount of tokens that the user received - cosmos.base.v1beta1.Coin token_out = 3 [ (gogoproto.nullable) = false ]; - - // the amount of fees collected by the pool - cosmos.base.v1beta1.Coin fee = 4 [ (gogoproto.nullable) = false ]; - - // the final state of the pool - nibiru.spot.v1.Pool final_pool = 5 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/nibiru/spot/v1/genesis.proto b/proto/nibiru/spot/v1/genesis.proto deleted file mode 100644 index 0d2e222ee..000000000 --- a/proto/nibiru/spot/v1/genesis.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package nibiru.spot.v1; - -import "nibiru/spot/v1/params.proto"; -import "nibiru/spot/v1/pool.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; - -// GenesisState defines the spot module's genesis state. -message GenesisState { - // params defines all the parameters of the module. - nibiru.spot.v1.Params params = 1 [ (gogoproto.nullable) = false ]; - - // pools defines all the pools of the module. - repeated nibiru.spot.v1.Pool pools = 2 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/nibiru/spot/v1/params.proto b/proto/nibiru/spot/v1/params.proto deleted file mode 100644 index d16d71e85..000000000 --- a/proto/nibiru/spot/v1/params.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package nibiru.spot.v1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; - -// Params defines the parameters for the module. -message Params { - option (gogoproto.goproto_stringer) = false; - - // The start pool number, i.e. the first pool number that isn't taken yet. - uint64 starting_pool_number = 1; - - // The cost of creating a pool, taken from the pool creator's account. - repeated cosmos.base.v1beta1.Coin pool_creation_fee = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"pool_creation_fee\"", - (gogoproto.nullable) = false - ]; - - // The assets that can be used to create liquidity pools - repeated string whitelisted_asset = 3; -} diff --git a/proto/nibiru/spot/v1/pool.proto b/proto/nibiru/spot/v1/pool.proto deleted file mode 100644 index 3b2053d49..000000000 --- a/proto/nibiru/spot/v1/pool.proto +++ /dev/null @@ -1,97 +0,0 @@ -syntax = "proto3"; - -package nibiru.spot.v1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; - -// Configuration parameters for the pool. -message PoolParams { - string swap_fee = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.moretags) = "yaml:\"swap_fee\"", - (gogoproto.nullable) = false - ]; - - string exit_fee = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.moretags) = "yaml:\"exit_fee\"", - (gogoproto.nullable) = false - ]; - - // Amplification Parameter (A): Larger value of A make the curve better - // resemble a straight line in the center (when pool is near balance). Highly - // volatile assets should use a lower value, while assets that are closer - // together may be best with a higher value. This is only used if the - // pool_type is set to 1 (stableswap) - string A = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"amplification\"", - (gogoproto.nullable) = false - ]; - - nibiru.spot.v1.PoolType pool_type = 4 - [ (gogoproto.moretags) = "yaml:\"pool_type\"" ]; -} - -// - `balancer`: Balancer are pools defined by the equation xy=k, extended by -// the weighs introduced by Balancer. -// - `stableswap`: Stableswap pools are defined by a combination of -// constant-product and constant-sum pool -enum PoolType { - BALANCER = 0; - STABLESWAP = 1; -} - -// Which assets the pool contains. -message PoolAsset { - // Coins we are talking about, - // the denomination must be unique amongst all PoolAssets for this pool. - cosmos.base.v1beta1.Coin token = 1 - [ (gogoproto.moretags) = "yaml:\"token\"", (gogoproto.nullable) = false ]; - // Weight that is not normalized. This weight must be less than 2^50 - string weight = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"weight\"", - (gogoproto.nullable) = false - ]; -} - -message Pool { - option (gogoproto.goproto_getters) = false; - - // The pool id. - uint64 id = 1; - - // The pool account address. - string address = 2 [ (gogoproto.moretags) = "yaml:\"address\"" ]; - - // Fees and other pool-specific parameters. - nibiru.spot.v1.PoolParams pool_params = 3 [ - (gogoproto.moretags) = "yaml:\"pool_params\"", - (gogoproto.nullable) = false - ]; - - // These are assumed to be sorted by denomiation. - // They contain the pool asset and the information about the weight - repeated PoolAsset pool_assets = 4 [ - (gogoproto.moretags) = "yaml:\"pool_assets\"", - (gogoproto.nullable) = false - ]; - - // sum of all non-normalized pool weights - string total_weight = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"total_weight\"", - (gogoproto.nullable) = false - ]; - - // sum of all LP tokens sent out - cosmos.base.v1beta1.Coin total_shares = 6 [ - (gogoproto.moretags) = "yaml:\"total_shares\"", - (gogoproto.nullable) = false - ]; -} diff --git a/proto/nibiru/spot/v1/query.proto b/proto/nibiru/spot/v1/query.proto deleted file mode 100644 index 5c63cc8bb..000000000 --- a/proto/nibiru/spot/v1/query.proto +++ /dev/null @@ -1,282 +0,0 @@ -syntax = "proto3"; - -package nibiru.spot.v1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "nibiru/spot/v1/params.proto"; -import "nibiru/spot/v1/pool.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; - -// Query defines the gRPC querier service. -service Query { - // Parameters of the spot module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/nibiru/spot/params"; - } - - // Next available pool id number. - rpc PoolNumber(QueryPoolNumberRequest) returns (QueryPoolNumberResponse) { - option (google.api.http).get = "/nibiru/spot/pool_number"; - } - - // Fetch a pool by id. - rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { - option (google.api.http).get = "/nibiru/spot/pool"; - } - - // Returns all pools. - rpc Pools(QueryPoolsRequest) returns (QueryPoolsResponse) { - option (google.api.http).get = "/nibiru/spot/pools"; - } - - // Parameters of a single pool. - rpc PoolParams(QueryPoolParamsRequest) returns (QueryPoolParamsResponse) { - option (google.api.http).get = "/nibiru/spot/pools/{pool_id}/params"; - } - - // Number of pools. - rpc NumPools(QueryNumPoolsRequest) returns (QueryNumPoolsResponse) { - option (google.api.http).get = "/nibiru/spot/num_pools"; - } - - // Total liquidity across all pools. - rpc TotalLiquidity(QueryTotalLiquidityRequest) - returns (QueryTotalLiquidityResponse) { - option (google.api.http).get = "/nibiru/spot/total_liquidity"; - } - - // Total liquidity in a single pool. - rpc TotalPoolLiquidity(QueryTotalPoolLiquidityRequest) - returns (QueryTotalPoolLiquidityResponse) { - option (google.api.http).get = - "/nibiru/spot/pools/{pool_id}/total_pool_liquidity"; - } - - // Total shares in a single pool. - rpc TotalShares(QueryTotalSharesRequest) returns (QueryTotalSharesResponse) { - option (google.api.http).get = "/nibiru/spot/pools/{pool_id}/total_shares"; - } - - // Instantaneous price of an asset in a pool. - rpc SpotPrice(QuerySpotPriceRequest) returns (QuerySpotPriceResponse) { - option (google.api.http).get = "/nibiru/spot/pools/{pool_id}/prices"; - } - - // Estimates the amount of assets returned given an exact amount of tokens to - // swap. - rpc EstimateSwapExactAmountIn(QuerySwapExactAmountInRequest) - returns (QuerySwapExactAmountInResponse) { - option (google.api.http).get = - "/nibiru/spot/{pool_id}/estimate/swap_exact_amount_in"; - } - - // Estimates the amount of tokens required to return the exact amount of - // assets requested. - rpc EstimateSwapExactAmountOut(QuerySwapExactAmountOutRequest) - returns (QuerySwapExactAmountOutResponse) { - option (google.api.http).get = - "/nibiru/spot/{pool_id}/estimate/swap_exact_amount_out"; - } - - // Estimates the amount of pool shares returned given an amount of tokens to - // join. - rpc EstimateJoinExactAmountIn(QueryJoinExactAmountInRequest) - returns (QueryJoinExactAmountInResponse) { - option (google.api.http).get = - "/nibiru/spot/{pool_id}/estimate/join_exact_amount_in"; - } - - // Estimates the amount of tokens required to obtain an exact amount of pool - // shares. - rpc EstimateJoinExactAmountOut(QueryJoinExactAmountOutRequest) - returns (QueryJoinExactAmountOutResponse) { - option (google.api.http).get = - "/nibiru/spot/{pool_id}/estimate/join_exact_amount_out"; - } - - // Estimates the amount of tokens returned to the user given an exact amount - // of pool shares. - rpc EstimateExitExactAmountIn(QueryExitExactAmountInRequest) - returns (QueryExitExactAmountInResponse) { - option (google.api.http).get = - "/nibiru/spot/{pool_id}/estimate/exit_exact_amount_in"; - } - - // Estimates the amount of pool shares required to extract an exact amount of - // tokens from the pool. - rpc EstimateExitExactAmountOut(QueryExitExactAmountOutRequest) - returns (QueryExitExactAmountOutResponse) { - option (google.api.http).get = - "/nibiru/spot/{pool_id}/estimate/exit_exact_amount_out"; - } -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest {} -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // params holds all the parameters of this module. - nibiru.spot.v1.Params params = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryPoolNumberRequest {} -message QueryPoolNumberResponse { uint64 pool_id = 1; } - -message QueryPoolRequest { uint64 pool_id = 1; } -message QueryPoolResponse { nibiru.spot.v1.Pool pool = 1; } - -message QueryPoolsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} -message QueryPoolsResponse { - repeated nibiru.spot.v1.Pool pools = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message QueryPoolParamsRequest { uint64 pool_id = 1; } -message QueryPoolParamsResponse { nibiru.spot.v1.PoolParams pool_params = 1; } - -message QueryNumPoolsRequest {} -message QueryNumPoolsResponse { uint64 num_pools = 1; } - -// -------------------------------------------- -// Query total liquidity the protocol -message QueryTotalLiquidityRequest {} -message QueryTotalLiquidityResponse { - repeated cosmos.base.v1beta1.Coin liquidity = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"liquidity\"", - (gogoproto.nullable) = false - ]; -} - -// -------------------------------------------- -// Query total liquidity for a pool -message QueryTotalPoolLiquidityRequest { uint64 pool_id = 1; } - -message QueryTotalPoolLiquidityResponse { - repeated cosmos.base.v1beta1.Coin liquidity = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"liquidity\"", - (gogoproto.nullable) = false - ]; -} - -message QueryTotalSharesRequest { uint64 pool_id = 1; } -message QueryTotalSharesResponse { - // sum of all LP tokens sent out - cosmos.base.v1beta1.Coin total_shares = 1 [ - (gogoproto.moretags) = "yaml:\"total_shares\"", - (gogoproto.nullable) = false - ]; -} - -// Returns the amount of tokenInDenom to produce 1 tokenOutDenom -// For example, if the price of NIBI = 9.123 NUSD, then setting -// tokenInDenom=NUSD and tokenOutDenom=NIBI would give "9.123". -message QuerySpotPriceRequest { - uint64 pool_id = 1; - // the denomination of the token you are giving into the pool - string token_in_denom = 2; - // the denomination of the token you are taking out of the pool - string token_out_denom = 3; -} -message QuerySpotPriceResponse { string spot_price = 1; } - -// Given an exact amount of tokens in and a target tokenOutDenom, calculates -// the expected amount of tokens out received from a swap. -message QuerySwapExactAmountInRequest { - uint64 pool_id = 1; - cosmos.base.v1beta1.Coin token_in = 2 [ - (gogoproto.moretags) = "yaml:\"token_in\"", - (gogoproto.nullable) = false - ]; - string token_out_denom = 3; -} -message QuerySwapExactAmountInResponse { - cosmos.base.v1beta1.Coin token_out = 2 [ - (gogoproto.moretags) = "yaml:\"token_out\"", - (gogoproto.nullable) = false - ]; - cosmos.base.v1beta1.Coin fee = 3 - [ (gogoproto.moretags) = "yaml:\"fee\"", (gogoproto.nullable) = false ]; -} - -// Given an exact amount of tokens out and a target tokenInDenom, calculates -// the expected amount of tokens in required to do the swap. -message QuerySwapExactAmountOutRequest { - uint64 pool_id = 1; - cosmos.base.v1beta1.Coin token_out = 2 [ - (gogoproto.moretags) = "yaml:\"token_out\"", - (gogoproto.nullable) = false - ]; - string token_in_denom = 3; -} -message QuerySwapExactAmountOutResponse { - cosmos.base.v1beta1.Coin token_in = 2 [ - (gogoproto.moretags) = "yaml:\"token_in\"", - (gogoproto.nullable) = false - ]; -} - -message QueryJoinExactAmountInRequest { - uint64 pool_id = 1; - repeated cosmos.base.v1beta1.Coin tokens_in = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"tokens_in\"", - (gogoproto.nullable) = false - ]; -} -message QueryJoinExactAmountInResponse { - - // amount of pool shares returned to user after join - string pool_shares_out = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"pool_shares_out\"", - (gogoproto.nullable) = false - ]; - - // coins remaining after pool join - repeated cosmos.base.v1beta1.Coin rem_coins = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"rem_coins\"", - (gogoproto.nullable) = false - ]; -} - -message QueryJoinExactAmountOutRequest { uint64 pool_id = 1; } -message QueryJoinExactAmountOutResponse {} - -message QueryExitExactAmountInRequest { - uint64 pool_id = 1; - // amount of pool shares to return to pool - string pool_shares_in = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"pool_shares_in\"", - (gogoproto.nullable) = false - ]; -} -message QueryExitExactAmountInResponse { - // coins obtained after exiting - repeated cosmos.base.v1beta1.Coin tokens_out = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"tokens_out\"", - (gogoproto.nullable) = false - ]; - - repeated cosmos.base.v1beta1.Coin fees = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"fees\"", - (gogoproto.nullable) = false - ]; -} - -message QueryExitExactAmountOutRequest { uint64 pool_id = 1; } -message QueryExitExactAmountOutResponse {} diff --git a/proto/nibiru/spot/v1/tx.proto b/proto/nibiru/spot/v1/tx.proto deleted file mode 100644 index 8e9a3fc1c..000000000 --- a/proto/nibiru/spot/v1/tx.proto +++ /dev/null @@ -1,120 +0,0 @@ -syntax = "proto3"; - -package nibiru.spot.v1; - -import "nibiru/spot/v1/pool.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; - -// Msg defines the Msg service. -service Msg { - // Used to create a pool. - rpc CreatePool(MsgCreatePool) returns (MsgCreatePoolResponse) { - option (google.api.http).post = "/nibiru/spot/pool"; - } - - // Join a pool as a liquidity provider. - rpc JoinPool(MsgJoinPool) returns (MsgJoinPoolResponse) { - option (google.api.http).post = "/nibiru/spot/{pool_id}/join"; - } - - // Exit a pool position by returning LP shares - rpc ExitPool(MsgExitPool) returns (MsgExitPoolResponse) { - option (google.api.http).post = "/nibiru/spot/{pool_id}/exit"; - } - - // Swap assets in a pool - rpc SwapAssets(MsgSwapAssets) returns (MsgSwapAssetsResponse) { - option (google.api.http).post = "/nibiru/spot/{pool_id}/swap"; - } -} - -message MsgCreatePool { - string creator = 1; - - nibiru.spot.v1.PoolParams pool_params = 2 - [ (gogoproto.moretags) = "yaml:\"pool_params\"" ]; - - repeated nibiru.spot.v1.PoolAsset pool_assets = 3 - [ (gogoproto.nullable) = false ]; -} - -message MsgCreatePoolResponse { uint64 pool_id = 1; } - -/* -Message to join a pool (identified by poolId) with a set of tokens to deposit. -*/ -message MsgJoinPool { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - - repeated cosmos.base.v1beta1.Coin tokens_in = 3 [ - (gogoproto.moretags) = "yaml:\"tokens_in\"", - (gogoproto.nullable) = false - ]; - - bool use_all_coins = 4 [ (gogoproto.moretags) = "yaml:\"use_all_coins\"" ]; -} - -/* -Response when a user joins a pool. -*/ -message MsgJoinPoolResponse { - // the final state of the pool after a join - nibiru.spot.v1.Pool pool = 1; - - // sum of LP tokens minted from the join - cosmos.base.v1beta1.Coin num_pool_shares_out = 2 [ - (gogoproto.moretags) = "yaml:\"num_pool_shares_out\"", - (gogoproto.nullable) = false - ]; - - // remaining tokens from attempting to join the pool - repeated cosmos.base.v1beta1.Coin remaining_coins = 3 [ - (gogoproto.moretags) = "yaml:\"tokens_in\"", - (gogoproto.nullable) = false - ]; -} - -message MsgExitPool { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - - cosmos.base.v1beta1.Coin pool_shares = 3 [ - (gogoproto.moretags) = "yaml:\"pool_shares\"", - (gogoproto.nullable) = false - ]; -} - -message MsgExitPoolResponse { - repeated cosmos.base.v1beta1.Coin tokens_out = 3 [ - (gogoproto.moretags) = "yaml:\"tokens_out\"", - (gogoproto.nullable) = false - ]; -} - -message MsgSwapAssets { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - - uint64 pool_id = 2 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - - cosmos.base.v1beta1.Coin token_in = 3 [ - (gogoproto.moretags) = "yaml:\"token_in\"", - (gogoproto.nullable) = false - ]; - - string token_out_denom = 4 - [ (gogoproto.moretags) = "yaml:\"token_out_denom\"" ]; -} - -message MsgSwapAssetsResponse { - cosmos.base.v1beta1.Coin token_out = 3 [ - (gogoproto.moretags) = "yaml:\"token_out\"", - (gogoproto.nullable) = false - ]; -} diff --git a/proto/nibiru/sudo/v1/state.proto b/proto/nibiru/sudo/v1/state.proto index 8e54d80fb..bce368185 100644 --- a/proto/nibiru/sudo/v1/state.proto +++ b/proto/nibiru/sudo/v1/state.proto @@ -8,7 +8,6 @@ import "google/api/annotations.proto"; option go_package = "github.com/NibiruChain/nibiru/x/sudo/types"; message Sudoers { - option (gogoproto.goproto_stringer) = false; // Root: The "root" user. string root = 1; diff --git a/proto/nibiru/tokenfactory/v1/state.proto b/proto/nibiru/tokenfactory/v1/state.proto index 255398aa2..e476ddbb5 100644 --- a/proto/nibiru/tokenfactory/v1/state.proto +++ b/proto/nibiru/tokenfactory/v1/state.proto @@ -55,7 +55,6 @@ message ModuleParams { // TFDenom is a token factory (TF) denom. The canonical representation is // "tf/{creator}/{subdenom}", its unique denomination in the x/bank module. message TFDenom { - option (gogoproto.goproto_stringer) = false; option (gogoproto.stringer) = false; // Creator: Bech32 address of the creator of the denom. diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index fc2b10c6d..65b124512 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -70,8 +70,9 @@ type Params struct { ExpirationBlocks uint64 `protobuf:"varint,11,opt,name=expiration_blocks,json=expirationBlocks,proto3" json:"expiration_blocks,omitempty" yaml:"expiration_blocks"` } -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_43d45df86ea09ed4, []int{0} } @@ -147,8 +148,9 @@ type AggregateExchangeRatePrevote struct { SubmitBlock uint64 `protobuf:"varint,3,opt,name=submit_block,json=submitBlock,proto3" json:"submit_block,omitempty" yaml:"submit_block"` } -func (m *AggregateExchangeRatePrevote) Reset() { *m = AggregateExchangeRatePrevote{} } -func (*AggregateExchangeRatePrevote) ProtoMessage() {} +func (m *AggregateExchangeRatePrevote) Reset() { *m = AggregateExchangeRatePrevote{} } +func (m *AggregateExchangeRatePrevote) String() string { return proto.CompactTextString(m) } +func (*AggregateExchangeRatePrevote) ProtoMessage() {} func (*AggregateExchangeRatePrevote) Descriptor() ([]byte, []int) { return fileDescriptor_43d45df86ea09ed4, []int{1} } @@ -186,8 +188,9 @@ type AggregateExchangeRateVote struct { Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty" yaml:"voter"` } -func (m *AggregateExchangeRateVote) Reset() { *m = AggregateExchangeRateVote{} } -func (*AggregateExchangeRateVote) ProtoMessage() {} +func (m *AggregateExchangeRateVote) Reset() { *m = AggregateExchangeRateVote{} } +func (m *AggregateExchangeRateVote) String() string { return proto.CompactTextString(m) } +func (*AggregateExchangeRateVote) ProtoMessage() {} func (*AggregateExchangeRateVote) Descriptor() ([]byte, []int) { return fileDescriptor_43d45df86ea09ed4, []int{2} } @@ -224,8 +227,9 @@ type ExchangeRateTuple struct { ExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"exchange_rate" yaml:"exchange_rate"` } -func (m *ExchangeRateTuple) Reset() { *m = ExchangeRateTuple{} } -func (*ExchangeRateTuple) ProtoMessage() {} +func (m *ExchangeRateTuple) Reset() { *m = ExchangeRateTuple{} } +func (m *ExchangeRateTuple) String() string { return proto.CompactTextString(m) } +func (*ExchangeRateTuple) ProtoMessage() {} func (*ExchangeRateTuple) Descriptor() ([]byte, []int) { return fileDescriptor_43d45df86ea09ed4, []int{3} } @@ -379,69 +383,68 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/oracle.proto", fileDescriptor_43d45df86ea09ed4) } var fileDescriptor_43d45df86ea09ed4 = []byte{ - // 979 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xe6, 0x57, 0xe3, 0xb1, 0x53, 0x92, 0x69, 0x0a, 0x9b, 0x50, 0xbc, 0x61, 0x2a, 0x55, - 0x39, 0x94, 0x5d, 0xa5, 0x80, 0x10, 0x91, 0x38, 0xb0, 0x0d, 0x81, 0x48, 0x05, 0x59, 0xa3, 0x0a, - 0x24, 0x84, 0x64, 0xcd, 0xee, 0x4e, 0xd6, 0x23, 0xef, 0xee, 0x58, 0x33, 0xeb, 0x38, 0x91, 0x10, - 0x67, 0x8e, 0x3d, 0xa1, 0x1e, 0x73, 0xe6, 0x8e, 0xc4, 0x9f, 0xd0, 0x1b, 0x3d, 0xa2, 0x1e, 0xb6, - 0x28, 0xe1, 0x80, 0x10, 0x27, 0xff, 0x05, 0x68, 0x66, 0xc7, 0xf1, 0x26, 0xb6, 0x04, 0x01, 0xf5, - 0x64, 0xbf, 0xf7, 0xcd, 0x7c, 0xef, 0x7b, 0x3f, 0x66, 0x66, 0xc1, 0x5b, 0x19, 0x0b, 0x98, 0x18, - 0x78, 0x5c, 0x90, 0x30, 0xa1, 0xde, 0xd1, 0x8e, 0xf9, 0xe7, 0xf6, 0x05, 0xcf, 0x39, 0x5c, 0x2d, - 0x61, 0xd7, 0x38, 0x8f, 0x76, 0x36, 0xd7, 0x63, 0x1e, 0x73, 0x0d, 0x7a, 0xea, 0x5f, 0xb9,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de, 0x04, 0x73, 0xcc, 0xbc, 0xc8, 0x78, 0x8e, - 0x45, 0xf0, 0x6d, 0xd0, 0xac, 0xbc, 0xc6, 0xb2, 0x24, 0xc6, 0x8d, 0xc9, 0x9b, 0x2c, 0xe1, 0xfb, - 0x60, 0x51, 0x3d, 0xf3, 0xd2, 0x9e, 0xd7, 0x03, 0xba, 0xe1, 0x96, 0x89, 0xb8, 0xea, 0x43, 0xc0, - 0x35, 0x1f, 0x02, 0xee, 0x43, 0xce, 0x32, 0x7f, 0x41, 0x25, 0x8f, 0xcb, 0xd5, 0xfe, 0xfe, 0xb3, - 0xb3, 0x96, 0xf5, 0xfc, 0xac, 0x65, 0xfd, 0x76, 0xd6, 0xb2, 0x9e, 0x9c, 0xb7, 0x6a, 0xcf, 0xcf, - 0x5b, 0xb5, 0x5f, 0xcf, 0x5b, 0xb5, 0xaf, 0xef, 0xff, 0xd3, 0x30, 0x98, 0x2f, 0x19, 0x5d, 0xa5, - 0x60, 0x49, 0x5f, 0xc0, 0xef, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x73, 0x48, 0x19, 0x08, 0xe7, - 0x08, 0x00, 0x00, + // 976 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 0xc5, + 0x1b, 0xf6, 0x26, 0x4e, 0x1a, 0x8f, 0x93, 0xfe, 0x92, 0x69, 0xfa, 0x63, 0x13, 0x8a, 0x37, 0x4c, + 0xa5, 0xca, 0x87, 0xb2, 0xab, 0x14, 0x10, 0x22, 0x12, 0x07, 0xb6, 0x21, 0x10, 0xa9, 0x20, 0x6b, + 0x54, 0x81, 0x84, 0x90, 0xac, 0xd9, 0xdd, 0xc9, 0x7a, 0xe4, 0xdd, 0x1d, 0x6b, 0x66, 0x1d, 0x27, + 0x12, 0xe2, 0xcc, 0xb1, 0x27, 0xc4, 0x31, 0x67, 0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, 0xb0, 0x0f, 0xd6, 0xae, 0x25, 0x6a, 0xd4, 0x1e, 0xdc, 0x78, 0xa6, 0x37, 0xe7, 0x54, + 0x0d, 0xe1, 0xd5, 0x6a, 0x61, 0x2a, 0xa9, 0xfe, 0x62, 0x01, 0xb0, 0x4f, 0x72, 0x1a, 0x75, 0x04, + 0x0b, 0xe9, 0xac, 0x0a, 0xeb, 0xbf, 0x53, 0x01, 0x3f, 0x02, 0x6b, 0xa1, 0xa0, 0x2a, 0xb8, 0x19, + 0xc8, 0x05, 0x3d, 0x90, 0xf6, 0x74, 0xfb, 0x35, 0x18, 0xe1, 0x55, 0x63, 0xeb, 0x91, 0x44, 0x12, + 0xdc, 0xc2, 0xfa, 0xf5, 0x91, 0xf0, 0x36, 0x58, 0x60, 0xe6, 0x05, 0xc6, 0x0b, 0x2c, 0x82, 0x6f, + 0x83, 0xd5, 0xca, 0xeb, 0x2b, 0x4b, 0x62, 0xdc, 0x9c, 0xbe, 0xc1, 0x12, 0xbe, 0x0f, 0x96, 0xd4, + 0xb3, 0x2e, 0xed, 0x45, 0x3d, 0x98, 0x5b, 0x6e, 0x99, 0x88, 0xab, 0x1e, 0x7e, 0xd7, 0x3c, 0xfc, + 0xee, 0x63, 0xce, 0x32, 0xbf, 0xae, 0x92, 0xc7, 0xe5, 0x6a, 0xff, 0xe0, 0xf9, 0x79, 0xcb, 0x7a, + 0x71, 0xde, 0xb2, 0x5e, 0x9f, 0xb7, 0xac, 0x67, 0x17, 0xad, 0xda, 0x8b, 0x8b, 0x56, 0xed, 0xb7, + 0x8b, 0x56, 0xed, 0xeb, 0x87, 0x7f, 0x35, 0x08, 0xe6, 0x9f, 0x8b, 0xae, 0x52, 0xb0, 0xac, 0x2f, + 0xdc, 0x77, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x42, 0xc8, 0x75, 0xd7, 0x08, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/oracle/types/params.go b/x/oracle/types/params.go index cf17b313c..b31e8ac7a 100644 --- a/x/oracle/types/params.go +++ b/x/oracle/types/params.go @@ -5,7 +5,6 @@ import ( time "time" "cosmossdk.io/math" - "gopkg.in/yaml.v2" "github.com/NibiruChain/nibiru/x/common/asset" "github.com/NibiruChain/nibiru/x/common/denoms" @@ -74,12 +73,6 @@ func DefaultParams() Params { } } -// String implements fmt.Stringer interface -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} - // Validate performs basic validation on oracle parameters. func (p Params) Validate() error { if p.VotePeriod == 0 { diff --git a/x/oracle/types/vote.go b/x/oracle/types/vote.go index 46937e949..5a74eecc8 100644 --- a/x/oracle/types/vote.go +++ b/x/oracle/types/vote.go @@ -9,8 +9,6 @@ import ( "github.com/NibiruChain/nibiru/x/common/asset" "github.com/NibiruChain/nibiru/x/common/set" - "gopkg.in/yaml.v2" - sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -30,12 +28,6 @@ func NewAggregateExchangeRatePrevote(hash AggregateVoteHash, voter sdk.ValAddres } } -// String implement stringify -func (v AggregateExchangeRatePrevote) String() string { - out, _ := yaml.Marshal(v) - return string(out) -} - // NewAggregateExchangeRateVote creates a AggregateExchangeRateVote instance func NewAggregateExchangeRateVote(exchangeRateTuples ExchangeRateTuples, voter sdk.ValAddress) AggregateExchangeRateVote { return AggregateExchangeRateVote{ @@ -44,12 +36,6 @@ func NewAggregateExchangeRateVote(exchangeRateTuples ExchangeRateTuples, voter s } } -// String implement stringify -func (v AggregateExchangeRateVote) String() string { - out, _ := yaml.Marshal(v) - return string(out) -} - // NewExchangeRateTuple creates a ExchangeRateTuple instance func NewExchangeRateTuple(pair asset.Pair, exchangeRate sdk.Dec) ExchangeRateTuple { return ExchangeRateTuple{ @@ -58,12 +44,6 @@ func NewExchangeRateTuple(pair asset.Pair, exchangeRate sdk.Dec) ExchangeRateTup } } -// String implement stringify -func (m ExchangeRateTuple) String() string { - out, _ := yaml.Marshal(m) - return string(out) -} - // ToString converts the ExchangeRateTuple to the vote string. func (m ExchangeRateTuple) ToString() (string, error) { err := m.Pair.Validate() @@ -125,12 +105,6 @@ func (tuples ExchangeRateTuples) ToMap() (exchangeRateMap map[asset.Pair]sdk.Dec return exchangeRateMap } -// String implements fmt.Stringer interface -func (tuples ExchangeRateTuples) String() string { - out, _ := yaml.Marshal(tuples) - return string(out) -} - func NewExchangeRateTuplesFromString(s string) (ExchangeRateTuples, error) { stringTuples := strings.Split(s, ExchangeRateTuplesSeparator) diff --git a/x/sudo/keeper/msg_server.go b/x/sudo/keeper/msg_server.go index ad22c3afb..bfba6d5c1 100644 --- a/x/sudo/keeper/msg_server.go +++ b/x/sudo/keeper/msg_server.go @@ -89,7 +89,8 @@ type Sudoers struct { } func (sudo Sudoers) String() string { - return sudo.ToPb().String() + r := sudo.ToPb() + return r.String() } func (sudo Sudoers) ToPb() sudotypes.Sudoers { diff --git a/x/sudo/types/state.go b/x/sudo/types/state.go index 94128577e..80517bc78 100644 --- a/x/sudo/types/state.go +++ b/x/sudo/types/state.go @@ -1,8 +1,6 @@ package types import ( - "encoding/json" - sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -22,8 +20,3 @@ type SudoersJson struct { Root string `json:"root"` Contracts []string `json:"contracts"` } - -func (sudo Sudoers) String() string { - jsonBz, _ := json.Marshal(SudoersJson(sudo)) - return string(jsonBz) -} diff --git a/x/sudo/types/state.pb.go b/x/sudo/types/state.pb.go index 2fcf10a1a..9ca78c3ea 100644 --- a/x/sudo/types/state.pb.go +++ b/x/sudo/types/state.pb.go @@ -31,8 +31,9 @@ type Sudoers struct { Contracts []string `protobuf:"bytes,2,rep,name=contracts,proto3" json:"contracts,omitempty"` } -func (m *Sudoers) Reset() { *m = Sudoers{} } -func (*Sudoers) ProtoMessage() {} +func (m *Sudoers) Reset() { *m = Sudoers{} } +func (m *Sudoers) String() string { return proto.CompactTextString(m) } +func (*Sudoers) ProtoMessage() {} func (*Sudoers) Descriptor() ([]byte, []int) { return fileDescriptor_4b462ff6aaf658cf, []int{0} } @@ -130,24 +131,24 @@ func init() { func init() { proto.RegisterFile("nibiru/sudo/v1/state.proto", fileDescriptor_4b462ff6aaf658cf) } var fileDescriptor_4b462ff6aaf658cf = []byte{ - // 264 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0xcb, 0x4c, 0xca, - 0x2c, 0x2a, 0xd5, 0x2f, 0x2e, 0x4d, 0xc9, 0xd7, 0x2f, 0x33, 0xd4, 0x2f, 0x2e, 0x49, 0x2c, 0x49, - 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc8, 0xe9, 0x81, 0xe4, 0xf4, 0xca, 0x0c, - 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x94, 0x4c, 0x7a, - 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x7e, 0x62, 0x41, 0xa6, 0x7e, 0x62, 0x5e, 0x5e, 0x7e, 0x49, 0x62, - 0x49, 0x66, 0x7e, 0x5e, 0x31, 0x44, 0x56, 0xc9, 0x91, 0x8b, 0x3d, 0xb8, 0x34, 0x25, 0x3f, 0xb5, - 0xa8, 0x58, 0x48, 0x88, 0x8b, 0xa5, 0x28, 0x3f, 0xbf, 0x44, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, - 0x08, 0xcc, 0x16, 0x92, 0xe1, 0xe2, 0x4c, 0xce, 0xcf, 0x2b, 0x29, 0x4a, 0x4c, 0x2e, 0x29, 0x96, - 0x60, 0x52, 0x60, 0xd6, 0xe0, 0x0c, 0x42, 0x08, 0x58, 0xb1, 0xcc, 0x58, 0x20, 0xcf, 0xa0, 0xe4, - 0xce, 0xc5, 0xe3, 0x9e, 0x9a, 0x97, 0x5a, 0x9c, 0x59, 0x1c, 0x0c, 0x72, 0x9c, 0x90, 0x39, 0x17, - 0x7b, 0x31, 0xc4, 0x48, 0xb0, 0x51, 0xdc, 0x46, 0xe2, 0x7a, 0xa8, 0x0e, 0xd5, 0x83, 0xda, 0xe8, - 0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x4c, 0xb5, 0x93, 0xcb, 0x89, 0x47, 0x72, 0x8c, 0x17, - 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, - 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, - 0xea, 0xfb, 0x81, 0xcd, 0x72, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x87, 0x06, 0x4e, 0x05, 0x24, 0x78, - 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x1e, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, - 0x5e, 0x2c, 0x41, 0x6d, 0x3a, 0x01, 0x00, 0x00, + // 258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x31, 0x4b, 0x03, 0x31, + 0x1c, 0xc5, 0xef, 0xb4, 0x58, 0x2e, 0x8a, 0x43, 0x10, 0x2c, 0x47, 0x89, 0xa5, 0x53, 0x71, 0x48, + 0xa8, 0x0e, 0x0e, 0x6e, 0x55, 0xe8, 0xe6, 0x70, 0xdd, 0xdc, 0x72, 0xd7, 0x90, 0x06, 0x34, 0xff, + 0x23, 0xf9, 0x5f, 0xd1, 0x6f, 0xe1, 0xc7, 0xea, 0xd8, 0xd1, 0x49, 0xe4, 0xee, 0x8b, 0xc8, 0x25, + 0x15, 0x71, 0x7b, 0xe4, 0xf7, 0x78, 0x79, 0xff, 0x47, 0x72, 0x6b, 0x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 0x00, } func (m *Sudoers) Marshal() (dAtA []byte, err error) { diff --git a/x/tokenfactory/cli/cli_test.go b/x/tokenfactory/cli/cli_test.go index f1f1e37e1..ab920d7e0 100644 --- a/x/tokenfactory/cli/cli_test.go +++ b/x/tokenfactory/cli/cli_test.go @@ -81,9 +81,9 @@ func (s *IntegrationTestSuite) CreateDenomTest() { ) denoms := denomResp.Denoms wantDenoms := []string{ - types.TFDenom{Creator: creator.String(), Subdenom: "nusd"}.String(), - types.TFDenom{Creator: creator.String(), Subdenom: "stnibi"}.String(), - types.TFDenom{Creator: creator.String(), Subdenom: "stnusd"}.String(), + types.TFDenom{Creator: creator.String(), Subdenom: "nusd"}.PrettyString(), + types.TFDenom{Creator: creator.String(), Subdenom: "stnibi"}.PrettyString(), + types.TFDenom{Creator: creator.String(), Subdenom: "stnusd"}.PrettyString(), } s.ElementsMatch(denoms, wantDenoms) } diff --git a/x/tokenfactory/keeper/genesis.go b/x/tokenfactory/keeper/genesis.go index 488861333..a73939847 100644 --- a/x/tokenfactory/keeper/genesis.go +++ b/x/tokenfactory/keeper/genesis.go @@ -36,13 +36,13 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { denom := iter.Value() authorityMetadata, err := k.Store.GetDenomAuthorityMetadata( - ctx, denom.String()) + ctx, denom.PrettyString()) if err != nil { panic(err) } genDenoms = append(genDenoms, types.GenesisDenom{ - Denom: denom.String(), + Denom: denom.PrettyString(), AuthorityMetadata: authorityMetadata, }) } diff --git a/x/tokenfactory/keeper/genesis_test.go b/x/tokenfactory/keeper/genesis_test.go index 7ead2f7e8..640c9bc77 100644 --- a/x/tokenfactory/keeper/genesis_test.go +++ b/x/tokenfactory/keeper/genesis_test.go @@ -13,7 +13,7 @@ func (s *TestSuite) TestGenesis() { Subdenom: testutil.RandLetters(3), } s.Require().NoError(denom.Validate()) - return denom.String() + return denom.PrettyString() } testCases := []struct { diff --git a/x/tokenfactory/keeper/grpc_query_test.go b/x/tokenfactory/keeper/grpc_query_test.go index a9a2ff5b3..fd4079c31 100644 --- a/x/tokenfactory/keeper/grpc_query_test.go +++ b/x/tokenfactory/keeper/grpc_query_test.go @@ -45,11 +45,11 @@ func (s *TestSuite) TestQueryDenoms() { denomsResp, err := queryDenoms(denom.Creator) s.NoError(err) s.ElementsMatch(denomsResp.Denoms, []string{ - denom.String(), + denom.PrettyString(), types.TFDenom{ Creator: denom.Creator, Subdenom: "foobar", - }.String(), + }.PrettyString(), }) denomsResp, err = queryDenoms("creator") @@ -91,7 +91,7 @@ func (s *TestSuite) TestQueryDenomInfo() { s.Run("case: happy", func() { resp, err := s.querier.DenomInfo(s.GoCtx(), &types.QueryDenomInfoRequest{ - Denom: denom.String(), + Denom: denom.PrettyString(), }) s.NoError(err) s.Equal(creator.String(), resp.Admin) diff --git a/x/tokenfactory/keeper/msg_server.go b/x/tokenfactory/keeper/msg_server.go index e804d6fa1..9a6042660 100644 --- a/x/tokenfactory/keeper/msg_server.go +++ b/x/tokenfactory/keeper/msg_server.go @@ -36,7 +36,7 @@ func (k Keeper) CreateDenom( } return &types.MsgCreateDenomResponse{ - NewTokenDenom: denom.String(), + NewTokenDenom: denom.PrettyString(), }, err } diff --git a/x/tokenfactory/keeper/msg_server_test.go b/x/tokenfactory/keeper/msg_server_test.go index 8caf497fc..00d3315da 100644 --- a/x/tokenfactory/keeper/msg_server_test.go +++ b/x/tokenfactory/keeper/msg_server_test.go @@ -99,7 +99,7 @@ func (s *TestSuite) TestCreateDenom() { want := types.TFDenom{ Creator: tc.txMsg.Sender, Subdenom: tc.txMsg.Subdenom, - }.String() + }.PrettyString() s.Equal(want, resp.NewTokenDenom) if tc.postHook != nil { @@ -137,7 +137,7 @@ func (s *TestSuite) TestChangeAdmin() { Name: "sad: non-admin tries to change admin", txMsg: &types.MsgChangeAdmin{ Sender: testutil.AccAddress().String(), - Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.String(), + Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.PrettyString(), NewAdmin: testutil.AccAddress().String(), }, wantErr: "only the current admin can set a new admin", @@ -156,7 +156,7 @@ func (s *TestSuite) TestChangeAdmin() { Name: "happy: SBF changes FTT admin", txMsg: &types.MsgChangeAdmin{ Sender: sbf, - Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.String(), + Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.PrettyString(), NewAdmin: testutil.AccAddress().String(), }, wantErr: "", @@ -175,7 +175,7 @@ func (s *TestSuite) TestChangeAdmin() { Name: "sad: change admin for denom that doesn't exist ", txMsg: &types.MsgChangeAdmin{ Sender: sbf, - Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.String(), + Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.PrettyString(), NewAdmin: testutil.AccAddress().String(), }, wantErr: collections.ErrNotFound.Error(), @@ -330,7 +330,7 @@ func (s *TestSuite) TestMintBurn() { Subdenom: "nusd", } nusd69420 := sdk.Coin{ - Denom: tfdenom.String(), + Denom: tfdenom.PrettyString(), Amount: math.NewInt(69_420), } @@ -349,7 +349,7 @@ func (s *TestSuite) TestMintBurn() { Denom: types.TFDenom{ Creator: addrs[0].String(), Subdenom: "nusd", - }.String(), + }.PrettyString(), Amount: math.NewInt(69_420), }, MintTo: "", @@ -363,7 +363,7 @@ func (s *TestSuite) TestMintBurn() { Denom: types.TFDenom{ Creator: addrs[0].String(), Subdenom: "nusd", - }.String(), + }.PrettyString(), Amount: math.NewInt(1), }, BurnFrom: "", @@ -383,12 +383,12 @@ func (s *TestSuite) TestMintBurn() { s.T().Log("Total supply should decrease by burned amount.") denom := allDenoms[0] s.Equal( - math.NewInt(69_419), s.app.BankKeeper.GetSupply(s.ctx, denom.String()).Amount, + math.NewInt(69_419), s.app.BankKeeper.GetSupply(s.ctx, denom.PrettyString()).Amount, ) s.T().Log("Module account should be empty.") coin := s.app.BankKeeper.GetBalance( - s.ctx, tfModuleAddr, denom.String()) + s.ctx, tfModuleAddr, denom.PrettyString()) s.Equal( math.NewInt(0), coin.Amount, @@ -435,7 +435,7 @@ func (s *TestSuite) TestMintBurn() { &types.MsgChangeAdmin{ Sender: addrs[0].String(), - Denom: tfdenom.String(), + Denom: tfdenom.PrettyString(), NewAdmin: addrs[1].String(), }, }, @@ -533,13 +533,13 @@ func (s *TestSuite) TestSetDenomMetadata() { Description: "US Dollar", DenomUnits: []*banktypes.DenomUnit{ { - Denom: tfdenom.String(), + Denom: tfdenom.PrettyString(), Exponent: 0, Aliases: []string{"unusd"}, }, {Denom: "USD", Exponent: 6}, }, - Base: tfdenom.String(), + Base: tfdenom.PrettyString(), Display: "USD", Name: "USD", Symbol: "USD", diff --git a/x/tokenfactory/keeper/store.go b/x/tokenfactory/keeper/store.go index c0d7db2bf..fa9f409c9 100644 --- a/x/tokenfactory/keeper/store.go +++ b/x/tokenfactory/keeper/store.go @@ -34,7 +34,7 @@ func (api StoreAPI) InsertDenom( return err } // The x/bank keeper is the source of truth. - key := denom.String() + key := denom.PrettyString() found := api.HasDenom(ctx, denom) if found { return tftypes.ErrDenomAlreadyRegistered.Wrap(key) @@ -55,7 +55,7 @@ func (api StoreAPI) InsertDenom( func (api StoreAPI) unsafeInsertDenom( ctx sdk.Context, denom tftypes.TFDenom, admin string, ) { - denomStr := denom.String() + denomStr := denom.PrettyString() api.Denoms.Insert(ctx, denomStr, denom) api.creator.Insert(ctx, denom.Creator) api.bankKeeper.SetDenomMetaData(ctx, denom.DefaultBankMetadata()) @@ -84,7 +84,7 @@ func (api StoreAPI) unsafeGenesisInsertDenom( func (api StoreAPI) HasDenom( ctx sdk.Context, denom tftypes.TFDenom, ) bool { - _, found := api.bankKeeper.GetDenomMetaData(ctx, denom.String()) + _, found := api.bankKeeper.GetDenomMetaData(ctx, denom.PrettyString()) return found } diff --git a/x/tokenfactory/keeper/store_test.go b/x/tokenfactory/keeper/store_test.go index 23c716fc1..af0878e9f 100644 --- a/x/tokenfactory/keeper/store_test.go +++ b/x/tokenfactory/keeper/store_test.go @@ -31,7 +31,7 @@ func (s *TestSuite) TestStoreWrite() { s.NoError(tfdenom.Validate(), tfdenom) // query by denom should fail for all denoms - _, err := api.Denoms.Get(s.ctx, tfdenom.String()) + _, err := api.Denoms.Get(s.ctx, tfdenom.PrettyString()) s.Error(err) // query by creator should fail for all addrs diff --git a/x/tokenfactory/keeper/wasm_test.go b/x/tokenfactory/keeper/wasm_test.go index 105f0f5a0..a13c5a66d 100644 --- a/x/tokenfactory/keeper/wasm_test.go +++ b/x/tokenfactory/keeper/wasm_test.go @@ -161,7 +161,7 @@ func (s *TestSuite) TestStargate() { denoms := s.app.TokenFactoryKeeper.QueryDenoms(s.ctx, contract.Addr.String(), ) - s.ElementsMatch(denoms, []string{tfdenom.String()}) + s.ElementsMatch(denoms, []string{tfdenom.PrettyString()}) }) someoneElse := testutil.AccAddress() @@ -173,11 +173,11 @@ func (s *TestSuite) TestStargate() { "mint_to": "%s" } } - `, tfdenom, someoneElse), " ") + `, tfdenom.PrettyString(), someoneElse), " ") _, err := s.ExecuteAgainstContract(contract, execMsgJson) s.NoError(err, "execMsgJson: %v", execMsgJson) - balance := s.app.BankKeeper.GetBalance(s.ctx, someoneElse, tfdenom.String()) + balance := s.app.BankKeeper.GetBalance(s.ctx, someoneElse, tfdenom.PrettyString()) s.Equal(math.NewInt(69_420), balance.Amount) }) @@ -189,11 +189,11 @@ func (s *TestSuite) TestStargate() { "burn_from": "%s" } } - `, tfdenom, someoneElse), " ") + `, tfdenom.PrettyString(), someoneElse), " ") _, err := s.ExecuteAgainstContract(contract, execMsgJson) s.NoError(err, "execMsgJson: %v", execMsgJson) - balance := s.app.BankKeeper.GetBalance(s.ctx, someoneElse, tfdenom.String()) + balance := s.app.BankKeeper.GetBalance(s.ctx, someoneElse, tfdenom.PrettyString()) s.Equal(math.NewInt(420), balance.Amount) }) @@ -205,12 +205,12 @@ func (s *TestSuite) TestStargate() { "new_admin": "%s" } } - `, tfdenom, someoneElse), " ") + `, tfdenom.PrettyString(), someoneElse), " ") _, err := s.ExecuteAgainstContract(contract, execMsgJson) s.NoError(err, "execMsgJson: %v", execMsgJson) denomInfo, err := s.app.TokenFactoryKeeper.QueryDenomInfo( - s.ctx, tfdenom.String(), + s.ctx, tfdenom.PrettyString(), ) s.NoError(err) s.Equal(someoneElse.String(), denomInfo.Admin) diff --git a/x/tokenfactory/types/state.go b/x/tokenfactory/types/state.go index 05f0d0774..75e7abcf8 100644 --- a/x/tokenfactory/types/state.go +++ b/x/tokenfactory/types/state.go @@ -29,11 +29,11 @@ func (params ModuleParams) Validate() error { // ---------------------------------------------------- func (tfd TFDenom) Denom() DenomStr { - return DenomStr(tfd.String()) + return DenomStr(tfd.PrettyString()) } // String: returns the standard string representation. -func (tfd TFDenom) String() string { +func (tfd TFDenom) PrettyString() string { return fmt.Sprintf("tf/%s/%s", tfd.Creator, tfd.Subdenom) } @@ -42,7 +42,7 @@ func (tfd TFDenom) Validate() error { } func (tfd TFDenom) DefaultBankMetadata() banktypes.Metadata { - denom := tfd.String() + denom := tfd.PrettyString() return banktypes.Metadata{ DenomUnits: []*banktypes.DenomUnit{{ Denom: denom, diff --git a/x/tokenfactory/types/state.pb.go b/x/tokenfactory/types/state.pb.go index 8c4005b78..097e89c20 100644 --- a/x/tokenfactory/types/state.pb.go +++ b/x/tokenfactory/types/state.pb.go @@ -157,8 +157,9 @@ type TFDenom struct { Subdenom string `protobuf:"bytes,2,opt,name=subdenom,proto3" json:"subdenom,omitempty"` } -func (m *TFDenom) Reset() { *m = TFDenom{} } -func (*TFDenom) ProtoMessage() {} +func (m *TFDenom) Reset() { *m = TFDenom{} } +func (m *TFDenom) String() string { return proto.CompactTextString(m) } +func (*TFDenom) ProtoMessage() {} func (*TFDenom) Descriptor() ([]byte, []int) { return fileDescriptor_452ec984f7eef90f, []int{2} } @@ -322,38 +323,38 @@ func init() { } var fileDescriptor_452ec984f7eef90f = []byte{ - // 496 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xbd, 0x6e, 0x13, 0x4d, - 0x14, 0xdd, 0xcd, 0xe7, 0xfc, 0x7c, 0x13, 0x83, 0x60, 0x04, 0xc1, 0xb1, 0xc4, 0xae, 0x33, 0x82, - 0x88, 0x6a, 0x47, 0x36, 0x9d, 0x3b, 0xd6, 0x51, 0x22, 0x24, 0x82, 0xd0, 0x42, 0x45, 0xb3, 0xba, - 0xbb, 0x1e, 0xec, 0x81, 0xec, 0x8c, 0xb5, 0x33, 0x6b, 0xe1, 0x2e, 0x8f, 0x40, 0x49, 0x99, 0x27, - 0x81, 0x36, 0x65, 0x4a, 0x0a, 0x64, 0x21, 0xbb, 0xa1, 0xf6, 0x13, 0x20, 0xcf, 0x4c, 0x20, 0x21, - 0x09, 0xdd, 0xde, 0x7b, 0xce, 0x3d, 0x7b, 0xee, 0xcf, 0x20, 0x22, 0x78, 0xc6, 0xcb, 0x8a, 0x6a, - 0xf9, 0x81, 0x89, 0x77, 0x90, 0x6b, 0x59, 0x4e, 0xe8, 0xb8, 0x4d, 0x95, 0x06, 0xcd, 0xa2, 0x51, - 0x29, 0xb5, 0xc4, 0x5b, 0x96, 0x13, 0x5d, 0xe4, 0x44, 0xe3, 0x76, 0xf3, 0xde, 0x40, 0x0e, 0xa4, - 0xa1, 0xd0, 0xe5, 0x97, 0x65, 0x37, 0xb7, 0x73, 0xa9, 0x0a, 0xa9, 0x52, 0x0b, 0xd8, 0xc0, 0x41, - 0x81, 0x8d, 0x68, 0x06, 0x8a, 0xd1, 0x71, 0x3b, 0x63, 0x1a, 0xda, 0x34, 0x97, 0x5c, 0x58, 0x9c, - 0xec, 0xa3, 0xad, 0x3d, 0x26, 0x64, 0xf1, 0xac, 0xd2, 0x43, 0x59, 0x72, 0x3d, 0x39, 0x64, 0x1a, - 0xfa, 0xa0, 0x01, 0xef, 0xa2, 0x55, 0xe8, 0x17, 0x5c, 0x34, 0xfc, 0x96, 0xff, 0xe4,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b9, 0xc4, 0x9e, 0x8d, 0xbf, 0xfe, 0x69, 0xc0, 0x4e, 0x64, 0x17, 0xad, 0xda, - 0xa6, 0xaf, 0xac, 0xcf, 0xa4, 0x49, 0x62, 0x61, 0x7c, 0xec, 0x23, 0x0c, 0xe7, 0xcb, 0x4f, 0x0b, - 0xb7, 0x7d, 0x33, 0xaa, 0xcd, 0x4e, 0x74, 0x93, 0xd3, 0xeb, 0x6f, 0x26, 0xde, 0x71, 0x9e, 0xb7, - 0xdd, 0xa1, 0x5c, 0xd1, 0x25, 0xc9, 0x5d, 0xf8, 0xbb, 0xca, 0x5e, 0x50, 0xfc, 0xe2, 0x74, 0x16, - 0xf8, 0x67, 0xb3, 0xc0, 0xff, 0x31, 0x0b, 0xfc, 0x4f, 0xf3, 0xc0, 0x3b, 0x9b, 0x07, 0xde, 0xb7, - 0x79, 0xe0, 0xbd, 0xed, 0x0c, 0xb8, 0x1e, 0x56, 0x59, 0x94, 0xcb, 0x82, 0xbe, 0x34, 0x7e, 0x7a, - 0x43, 0xe0, 0x82, 0xba, 0x77, 0xf4, 0xf1, 0xf2, 0x4b, 0xd2, 0x93, 0x11, 0x53, 0xd9, 0x9a, 0x39, - 0xef, 0xa7, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd7, 0xfc, 0x2e, 0x39, 0x6d, 0x03, 0x00, 0x00, + // 490 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x3f, 0x6f, 0xd3, 0x40, + 0x14, 0xb7, 0x4b, 0xda, 0xc2, 0x35, 0x20, 0x38, 0x41, 0x49, 0x23, 0x61, 0xa7, 0x27, 0xa8, 0x98, + 0x7c, 0x4a, 0xd8, 0xb2, 0xe1, 0x94, 0x76, 0xa1, 0x08, 0x19, 0x26, 0x16, 0xeb, 0xd9, 0x39, 0x92, + 0x83, 0xfa, 0x2e, 0xf2, 0x9d, 0x23, 0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ff, 0x56, 0xd9, 0xeb, 0x89, 0x5f, 0x9e, 0xce, 0x02, 0xff, 0x6c, 0x16, 0xf8, 0x3f, 0x67, + 0x81, 0xff, 0x79, 0x1e, 0x78, 0x67, 0xf3, 0xc0, 0xfb, 0x3e, 0x0f, 0xbc, 0x77, 0x9d, 0x01, 0xd7, + 0xc3, 0x2a, 0x8b, 0x72, 0x59, 0xd0, 0x57, 0xc6, 0x4f, 0x6f, 0x08, 0x5c, 0x50, 0xf7, 0x86, 0x3e, + 0x5d, 0x7e, 0x45, 0x7a, 0x32, 0x62, 0x2a, 0xdb, 0x30, 0xa7, 0xfd, 0xec, 0x77, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x37, 0x74, 0x40, 0xb6, 0x69, 0x03, 0x00, 0x00, } func (this *DenomAuthorityMetadata) Equal(that interface{}) bool { diff --git a/x/tokenfactory/types/state_test.go b/x/tokenfactory/types/state_test.go index d532d47d5..e32031737 100644 --- a/x/tokenfactory/types/state_test.go +++ b/x/tokenfactory/types/state_test.go @@ -35,7 +35,7 @@ func TestDenomStr_Validate(t *testing.T) { } require.NoError(t, err) assert.Equal(t, tfDenom.Denom(), tc.denom) - assert.Equal(t, tfDenom.String(), string(tc.denom)) + assert.Equal(t, tfDenom.PrettyString(), string(tc.denom)) assert.NoError(t, tfDenom.Validate()) assert.NotPanics(t, func() { @@ -68,7 +68,7 @@ func TestGenesisState(t *testing.T) { Denom: types.TFDenom{ Creator: creator.String(), Subdenom: testutil.Latin.Letters[lettersIdx : lettersIdx+4], - }.String(), + }.PrettyString(), AuthorityMetadata: types.DenomAuthorityMetadata{ Admin: creator.String(), }, From 7d4a29ea50bc3c81f4e134017d943125a367e993 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Tue, 14 May 2024 20:07:53 +0200 Subject: [PATCH 02/22] chore: changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f18836b81..8d72e7d91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1820](https://github.com/NibiruChain/nibiru/pull/1820) - feat(ica): add interchain accounts - [#1864](https://github.com/NibiruChain/nibiru/pull/1864) - fix(ica): add ICA controller stack - [#1872](https://github.com/NibiruChain/nibiru/pull/1872) - chore(math): use cosmossdk.io/math to replace sdk types +- [#1874](https://github.com/NibiruChain/nibiru/pull/1874) - chore(proto): remove the proto stringer #### Nibiru EVM From d0dd56b670d740119c2054c7ec5bb172bbef05c0 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Tue, 14 May 2024 21:03:06 +0200 Subject: [PATCH 03/22] chore: changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d72e7d91..84ff55311 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,7 +49,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1820](https://github.com/NibiruChain/nibiru/pull/1820) - feat(ica): add interchain accounts - [#1864](https://github.com/NibiruChain/nibiru/pull/1864) - fix(ica): add ICA controller stack - [#1872](https://github.com/NibiruChain/nibiru/pull/1872) - chore(math): use cosmossdk.io/math to replace sdk types -- [#1874](https://github.com/NibiruChain/nibiru/pull/1874) - chore(proto): remove the proto stringer + +* [#1874](https://github.com/NibiruChain/nibiru/pull/1874) - chore(proto): remove the proto stringer as per Cosmos SDK migration guidelines #### Nibiru EVM From f770f49a1751aedfa9d1a527dafd9762b0f2e450 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Wed, 15 May 2024 03:29:38 +0200 Subject: [PATCH 04/22] fix: fix test --- x/tokenfactory/cli/cli_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/x/tokenfactory/cli/cli_test.go b/x/tokenfactory/cli/cli_test.go index ab920d7e0..ba4fbb735 100644 --- a/x/tokenfactory/cli/cli_test.go +++ b/x/tokenfactory/cli/cli_test.go @@ -120,7 +120,7 @@ func (s *IntegrationTestSuite) MintBurnTest() { Creator: creator.String(), Subdenom: "nusd", } - coin := sdk.NewInt64Coin(denom.String(), 420) + coin := sdk.NewInt64Coin(denom.PrettyString(), 420) wantErr := false mint(coin.String(), creator.String(), wantErr) // happy @@ -135,12 +135,12 @@ func (s *IntegrationTestSuite) MintBurnTest() { burn("notacoin_231,,", creator.String(), wantErr) t.Log(`want error: unable to parse "mint-to" or "burn-from"`) - coin.Denom = denom.String() + coin.Denom = denom.PrettyString() mint(coin.String(), "invalidAddr", wantErr) burn(coin.String(), "invalidAddr", wantErr) t.Log("burn successfully") - coin.Denom = denom.String() + coin.Denom = denom.PrettyString() wantErr = false burn(coin.String(), creator.String(), wantErr) // happy } @@ -158,7 +158,7 @@ func (s *IntegrationTestSuite) ChangeAdminTest() { infoResp := new(types.QueryDenomInfoResponse) s.NoError( s.network.ExecQuery( - cli.NewQueryCmd(), []string{"denom-info", denom.String()}, infoResp, + cli.NewQueryCmd(), []string{"denom-info", denom.PrettyString()}, infoResp, ), ) s.Equal(infoResp.Admin, admin.String()) @@ -166,14 +166,14 @@ func (s *IntegrationTestSuite) ChangeAdminTest() { s.T().Log("Change to a new admin") _, err := s.network.ExecTxCmd( cli.NewTxCmd(), - admin, []string{"change-admin", denom.String(), newAdmin.String()}) + admin, []string{"change-admin", denom.PrettyString(), newAdmin.String()}) s.Require().NoError(err) s.T().Log("Verify new admin is in state") infoResp = new(types.QueryDenomInfoResponse) s.NoError( s.network.ExecQuery( - cli.NewQueryCmd(), []string{"denom-info", denom.String()}, infoResp, + cli.NewQueryCmd(), []string{"denom-info", denom.PrettyString()}, infoResp, ), ) s.Equal(infoResp.Admin, newAdmin.String()) From 3b051a42cbd3fa5be88af15945841ecf550e495b Mon Sep 17 00:00:00 2001 From: Matthias <97468149+matthiasmatt@users.noreply.github.com> Date: Wed, 15 May 2024 03:30:01 +0200 Subject: [PATCH 05/22] Update CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84ff55311..c1200d18b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,7 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1864](https://github.com/NibiruChain/nibiru/pull/1864) - fix(ica): add ICA controller stack - [#1872](https://github.com/NibiruChain/nibiru/pull/1872) - chore(math): use cosmossdk.io/math to replace sdk types -* [#1874](https://github.com/NibiruChain/nibiru/pull/1874) - chore(proto): remove the proto stringer as per Cosmos SDK migration guidelines +- [#1874](https://github.com/NibiruChain/nibiru/pull/1874) - chore(proto): remove the proto stringer as per Cosmos SDK migration guidelines #### Nibiru EVM From 2e831aa12c15c7c38e1c39f0f7b4fd2d540953c1 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Thu, 16 May 2024 01:58:37 +0200 Subject: [PATCH 06/22] fix: fix name of pretty string funcction --- x/tokenfactory/cli/cli_test.go | 18 +++++++++--------- x/tokenfactory/keeper/genesis.go | 4 ++-- x/tokenfactory/keeper/genesis_test.go | 2 +- x/tokenfactory/keeper/grpc_query_test.go | 6 +++--- x/tokenfactory/keeper/msg_server.go | 2 +- x/tokenfactory/keeper/msg_server_test.go | 24 ++++++++++++------------ x/tokenfactory/keeper/store.go | 16 ++++++++-------- x/tokenfactory/keeper/store_test.go | 2 +- x/tokenfactory/keeper/wasm_test.go | 14 +++++++------- x/tokenfactory/types/state.go | 16 ++++++++-------- x/tokenfactory/types/state_test.go | 4 ++-- 11 files changed, 54 insertions(+), 54 deletions(-) diff --git a/x/tokenfactory/cli/cli_test.go b/x/tokenfactory/cli/cli_test.go index ba4fbb735..c7d432cb4 100644 --- a/x/tokenfactory/cli/cli_test.go +++ b/x/tokenfactory/cli/cli_test.go @@ -81,9 +81,9 @@ func (s *IntegrationTestSuite) CreateDenomTest() { ) denoms := denomResp.Denoms wantDenoms := []string{ - types.TFDenom{Creator: creator.String(), Subdenom: "nusd"}.PrettyString(), - types.TFDenom{Creator: creator.String(), Subdenom: "stnibi"}.PrettyString(), - types.TFDenom{Creator: creator.String(), Subdenom: "stnusd"}.PrettyString(), + types.TFDenom{Creator: creator.String(), Subdenom: "nusd"}.Denom().String(), + types.TFDenom{Creator: creator.String(), Subdenom: "stnibi"}.Denom().String(), + types.TFDenom{Creator: creator.String(), Subdenom: "stnusd"}.Denom().String(), } s.ElementsMatch(denoms, wantDenoms) } @@ -120,7 +120,7 @@ func (s *IntegrationTestSuite) MintBurnTest() { Creator: creator.String(), Subdenom: "nusd", } - coin := sdk.NewInt64Coin(denom.PrettyString(), 420) + coin := sdk.NewInt64Coin(denom.Denom().String(), 420) wantErr := false mint(coin.String(), creator.String(), wantErr) // happy @@ -135,12 +135,12 @@ func (s *IntegrationTestSuite) MintBurnTest() { burn("notacoin_231,,", creator.String(), wantErr) t.Log(`want error: unable to parse "mint-to" or "burn-from"`) - coin.Denom = denom.PrettyString() + coin.Denom = denom.Denom().String() mint(coin.String(), "invalidAddr", wantErr) burn(coin.String(), "invalidAddr", wantErr) t.Log("burn successfully") - coin.Denom = denom.PrettyString() + coin.Denom = denom.Denom().String() wantErr = false burn(coin.String(), creator.String(), wantErr) // happy } @@ -158,7 +158,7 @@ func (s *IntegrationTestSuite) ChangeAdminTest() { infoResp := new(types.QueryDenomInfoResponse) s.NoError( s.network.ExecQuery( - cli.NewQueryCmd(), []string{"denom-info", denom.PrettyString()}, infoResp, + cli.NewQueryCmd(), []string{"denom-info", denom.Denom().String()}, infoResp, ), ) s.Equal(infoResp.Admin, admin.String()) @@ -166,14 +166,14 @@ func (s *IntegrationTestSuite) ChangeAdminTest() { s.T().Log("Change to a new admin") _, err := s.network.ExecTxCmd( cli.NewTxCmd(), - admin, []string{"change-admin", denom.PrettyString(), newAdmin.String()}) + admin, []string{"change-admin", denom.Denom().String(), newAdmin.String()}) s.Require().NoError(err) s.T().Log("Verify new admin is in state") infoResp = new(types.QueryDenomInfoResponse) s.NoError( s.network.ExecQuery( - cli.NewQueryCmd(), []string{"denom-info", denom.PrettyString()}, infoResp, + cli.NewQueryCmd(), []string{"denom-info", denom.Denom().String()}, infoResp, ), ) s.Equal(infoResp.Admin, newAdmin.String()) diff --git a/x/tokenfactory/keeper/genesis.go b/x/tokenfactory/keeper/genesis.go index a73939847..01f08fb16 100644 --- a/x/tokenfactory/keeper/genesis.go +++ b/x/tokenfactory/keeper/genesis.go @@ -36,13 +36,13 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { denom := iter.Value() authorityMetadata, err := k.Store.GetDenomAuthorityMetadata( - ctx, denom.PrettyString()) + ctx, denom.Denom().String()) if err != nil { panic(err) } genDenoms = append(genDenoms, types.GenesisDenom{ - Denom: denom.PrettyString(), + Denom: denom.Denom().String(), AuthorityMetadata: authorityMetadata, }) } diff --git a/x/tokenfactory/keeper/genesis_test.go b/x/tokenfactory/keeper/genesis_test.go index 640c9bc77..8c2748b57 100644 --- a/x/tokenfactory/keeper/genesis_test.go +++ b/x/tokenfactory/keeper/genesis_test.go @@ -13,7 +13,7 @@ func (s *TestSuite) TestGenesis() { Subdenom: testutil.RandLetters(3), } s.Require().NoError(denom.Validate()) - return denom.PrettyString() + return denom.Denom().String() } testCases := []struct { diff --git a/x/tokenfactory/keeper/grpc_query_test.go b/x/tokenfactory/keeper/grpc_query_test.go index fd4079c31..6897a5ec3 100644 --- a/x/tokenfactory/keeper/grpc_query_test.go +++ b/x/tokenfactory/keeper/grpc_query_test.go @@ -45,11 +45,11 @@ func (s *TestSuite) TestQueryDenoms() { denomsResp, err := queryDenoms(denom.Creator) s.NoError(err) s.ElementsMatch(denomsResp.Denoms, []string{ - denom.PrettyString(), + denom.Denom().String(), types.TFDenom{ Creator: denom.Creator, Subdenom: "foobar", - }.PrettyString(), + }.Denom().String(), }) denomsResp, err = queryDenoms("creator") @@ -91,7 +91,7 @@ func (s *TestSuite) TestQueryDenomInfo() { s.Run("case: happy", func() { resp, err := s.querier.DenomInfo(s.GoCtx(), &types.QueryDenomInfoRequest{ - Denom: denom.PrettyString(), + Denom: denom.Denom().String(), }) s.NoError(err) s.Equal(creator.String(), resp.Admin) diff --git a/x/tokenfactory/keeper/msg_server.go b/x/tokenfactory/keeper/msg_server.go index 9a6042660..dac1d6127 100644 --- a/x/tokenfactory/keeper/msg_server.go +++ b/x/tokenfactory/keeper/msg_server.go @@ -36,7 +36,7 @@ func (k Keeper) CreateDenom( } return &types.MsgCreateDenomResponse{ - NewTokenDenom: denom.PrettyString(), + NewTokenDenom: denom.Denom().String(), }, err } diff --git a/x/tokenfactory/keeper/msg_server_test.go b/x/tokenfactory/keeper/msg_server_test.go index 00d3315da..484c1883f 100644 --- a/x/tokenfactory/keeper/msg_server_test.go +++ b/x/tokenfactory/keeper/msg_server_test.go @@ -99,7 +99,7 @@ func (s *TestSuite) TestCreateDenom() { want := types.TFDenom{ Creator: tc.txMsg.Sender, Subdenom: tc.txMsg.Subdenom, - }.PrettyString() + }.Denom() s.Equal(want, resp.NewTokenDenom) if tc.postHook != nil { @@ -137,7 +137,7 @@ func (s *TestSuite) TestChangeAdmin() { Name: "sad: non-admin tries to change admin", txMsg: &types.MsgChangeAdmin{ Sender: testutil.AccAddress().String(), - Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.PrettyString(), + Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.Denom().String(), NewAdmin: testutil.AccAddress().String(), }, wantErr: "only the current admin can set a new admin", @@ -156,7 +156,7 @@ func (s *TestSuite) TestChangeAdmin() { Name: "happy: SBF changes FTT admin", txMsg: &types.MsgChangeAdmin{ Sender: sbf, - Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.PrettyString(), + Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.Denom().String(), NewAdmin: testutil.AccAddress().String(), }, wantErr: "", @@ -175,7 +175,7 @@ func (s *TestSuite) TestChangeAdmin() { Name: "sad: change admin for denom that doesn't exist ", txMsg: &types.MsgChangeAdmin{ Sender: sbf, - Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.PrettyString(), + Denom: types.TFDenom{Creator: sbf, Subdenom: "ftt"}.Denom().String(), NewAdmin: testutil.AccAddress().String(), }, wantErr: collections.ErrNotFound.Error(), @@ -330,7 +330,7 @@ func (s *TestSuite) TestMintBurn() { Subdenom: "nusd", } nusd69420 := sdk.Coin{ - Denom: tfdenom.PrettyString(), + Denom: tfdenom.Denom().String(), Amount: math.NewInt(69_420), } @@ -349,7 +349,7 @@ func (s *TestSuite) TestMintBurn() { Denom: types.TFDenom{ Creator: addrs[0].String(), Subdenom: "nusd", - }.PrettyString(), + }.Denom().String(), Amount: math.NewInt(69_420), }, MintTo: "", @@ -363,7 +363,7 @@ func (s *TestSuite) TestMintBurn() { Denom: types.TFDenom{ Creator: addrs[0].String(), Subdenom: "nusd", - }.PrettyString(), + }.Denom().String(), Amount: math.NewInt(1), }, BurnFrom: "", @@ -383,12 +383,12 @@ func (s *TestSuite) TestMintBurn() { s.T().Log("Total supply should decrease by burned amount.") denom := allDenoms[0] s.Equal( - math.NewInt(69_419), s.app.BankKeeper.GetSupply(s.ctx, denom.PrettyString()).Amount, + math.NewInt(69_419), s.app.BankKeeper.GetSupply(s.ctx, denom.Denom().String()).Amount, ) s.T().Log("Module account should be empty.") coin := s.app.BankKeeper.GetBalance( - s.ctx, tfModuleAddr, denom.PrettyString()) + s.ctx, tfModuleAddr, denom.Denom().String()) s.Equal( math.NewInt(0), coin.Amount, @@ -435,7 +435,7 @@ func (s *TestSuite) TestMintBurn() { &types.MsgChangeAdmin{ Sender: addrs[0].String(), - Denom: tfdenom.PrettyString(), + Denom: tfdenom.Denom().String(), NewAdmin: addrs[1].String(), }, }, @@ -533,13 +533,13 @@ func (s *TestSuite) TestSetDenomMetadata() { Description: "US Dollar", DenomUnits: []*banktypes.DenomUnit{ { - Denom: tfdenom.PrettyString(), + Denom: tfdenom.Denom().String(), Exponent: 0, Aliases: []string{"unusd"}, }, {Denom: "USD", Exponent: 6}, }, - Base: tfdenom.PrettyString(), + Base: tfdenom.Denom().String(), Display: "USD", Name: "USD", Symbol: "USD", diff --git a/x/tokenfactory/keeper/store.go b/x/tokenfactory/keeper/store.go index fa9f409c9..a548ba392 100644 --- a/x/tokenfactory/keeper/store.go +++ b/x/tokenfactory/keeper/store.go @@ -34,17 +34,17 @@ func (api StoreAPI) InsertDenom( return err } // The x/bank keeper is the source of truth. - key := denom.PrettyString() + key := denom.Denom() found := api.HasDenom(ctx, denom) if found { - return tftypes.ErrDenomAlreadyRegistered.Wrap(key) + return tftypes.ErrDenomAlreadyRegistered.Wrap(key.String()) } admin := denom.Creator api.unsafeInsertDenom(ctx, denom, admin) api.bankKeeper.SetDenomMetaData(ctx, denom.DefaultBankMetadata()) - api.denomAdmins.Insert(ctx, key, tftypes.DenomAuthorityMetadata{ + api.denomAdmins.Insert(ctx, key.String(), tftypes.DenomAuthorityMetadata{ Admin: admin, }) return nil @@ -55,15 +55,15 @@ func (api StoreAPI) InsertDenom( func (api StoreAPI) unsafeInsertDenom( ctx sdk.Context, denom tftypes.TFDenom, admin string, ) { - denomStr := denom.PrettyString() - api.Denoms.Insert(ctx, denomStr, denom) + denomStr := denom.Denom() + api.Denoms.Insert(ctx, denomStr.String(), denom) api.creator.Insert(ctx, denom.Creator) api.bankKeeper.SetDenomMetaData(ctx, denom.DefaultBankMetadata()) - api.denomAdmins.Insert(ctx, denomStr, tftypes.DenomAuthorityMetadata{ + api.denomAdmins.Insert(ctx, denomStr.String(), tftypes.DenomAuthorityMetadata{ Admin: admin, }) _ = ctx.EventManager().EmitTypedEvent(&tftypes.EventCreateDenom{ - Denom: denomStr, + Denom: denomStr.String(), Creator: denom.Creator, }) } @@ -84,7 +84,7 @@ func (api StoreAPI) unsafeGenesisInsertDenom( func (api StoreAPI) HasDenom( ctx sdk.Context, denom tftypes.TFDenom, ) bool { - _, found := api.bankKeeper.GetDenomMetaData(ctx, denom.PrettyString()) + _, found := api.bankKeeper.GetDenomMetaData(ctx, denom.Denom().String()) return found } diff --git a/x/tokenfactory/keeper/store_test.go b/x/tokenfactory/keeper/store_test.go index af0878e9f..c4892cdcc 100644 --- a/x/tokenfactory/keeper/store_test.go +++ b/x/tokenfactory/keeper/store_test.go @@ -31,7 +31,7 @@ func (s *TestSuite) TestStoreWrite() { s.NoError(tfdenom.Validate(), tfdenom) // query by denom should fail for all denoms - _, err := api.Denoms.Get(s.ctx, tfdenom.PrettyString()) + _, err := api.Denoms.Get(s.ctx, tfdenom.Denom().String()) s.Error(err) // query by creator should fail for all addrs diff --git a/x/tokenfactory/keeper/wasm_test.go b/x/tokenfactory/keeper/wasm_test.go index a13c5a66d..c145868ad 100644 --- a/x/tokenfactory/keeper/wasm_test.go +++ b/x/tokenfactory/keeper/wasm_test.go @@ -161,7 +161,7 @@ func (s *TestSuite) TestStargate() { denoms := s.app.TokenFactoryKeeper.QueryDenoms(s.ctx, contract.Addr.String(), ) - s.ElementsMatch(denoms, []string{tfdenom.PrettyString()}) + s.ElementsMatch(denoms, []string{tfdenom.Denom().String()}) }) someoneElse := testutil.AccAddress() @@ -173,11 +173,11 @@ func (s *TestSuite) TestStargate() { "mint_to": "%s" } } - `, tfdenom.PrettyString(), someoneElse), " ") + `, tfdenom.Denom(), someoneElse), " ") _, err := s.ExecuteAgainstContract(contract, execMsgJson) s.NoError(err, "execMsgJson: %v", execMsgJson) - balance := s.app.BankKeeper.GetBalance(s.ctx, someoneElse, tfdenom.PrettyString()) + balance := s.app.BankKeeper.GetBalance(s.ctx, someoneElse, tfdenom.Denom().String()) s.Equal(math.NewInt(69_420), balance.Amount) }) @@ -189,11 +189,11 @@ func (s *TestSuite) TestStargate() { "burn_from": "%s" } } - `, tfdenom.PrettyString(), someoneElse), " ") + `, tfdenom.Denom(), someoneElse), " ") _, err := s.ExecuteAgainstContract(contract, execMsgJson) s.NoError(err, "execMsgJson: %v", execMsgJson) - balance := s.app.BankKeeper.GetBalance(s.ctx, someoneElse, tfdenom.PrettyString()) + balance := s.app.BankKeeper.GetBalance(s.ctx, someoneElse, tfdenom.Denom().String()) s.Equal(math.NewInt(420), balance.Amount) }) @@ -205,12 +205,12 @@ func (s *TestSuite) TestStargate() { "new_admin": "%s" } } - `, tfdenom.PrettyString(), someoneElse), " ") + `, tfdenom.Denom(), someoneElse), " ") _, err := s.ExecuteAgainstContract(contract, execMsgJson) s.NoError(err, "execMsgJson: %v", execMsgJson) denomInfo, err := s.app.TokenFactoryKeeper.QueryDenomInfo( - s.ctx, tfdenom.PrettyString(), + s.ctx, tfdenom.Denom().String(), ) s.NoError(err) s.Equal(someoneElse.String(), denomInfo.Admin) diff --git a/x/tokenfactory/types/state.go b/x/tokenfactory/types/state.go index 75e7abcf8..1ef251f04 100644 --- a/x/tokenfactory/types/state.go +++ b/x/tokenfactory/types/state.go @@ -29,11 +29,11 @@ func (params ModuleParams) Validate() error { // ---------------------------------------------------- func (tfd TFDenom) Denom() DenomStr { - return DenomStr(tfd.PrettyString()) + return DenomStr(tfd.Denom()) } // String: returns the standard string representation. -func (tfd TFDenom) PrettyString() string { +func (tfd TFDenom) DenomStr() string { return fmt.Sprintf("tf/%s/%s", tfd.Creator, tfd.Subdenom) } @@ -42,17 +42,17 @@ func (tfd TFDenom) Validate() error { } func (tfd TFDenom) DefaultBankMetadata() banktypes.Metadata { - denom := tfd.PrettyString() + denom := tfd.Denom() return banktypes.Metadata{ DenomUnits: []*banktypes.DenomUnit{{ - Denom: denom, + Denom: denom.String(), Exponent: 0, }}, - Base: denom, + Base: denom.String(), // The following is necessary for x/bank denom validation - Display: denom, - Name: denom, - Symbol: denom, + Display: denom.String(), + Name: denom.String(), + Symbol: denom.String(), } } diff --git a/x/tokenfactory/types/state_test.go b/x/tokenfactory/types/state_test.go index e32031737..375670a16 100644 --- a/x/tokenfactory/types/state_test.go +++ b/x/tokenfactory/types/state_test.go @@ -35,7 +35,7 @@ func TestDenomStr_Validate(t *testing.T) { } require.NoError(t, err) assert.Equal(t, tfDenom.Denom(), tc.denom) - assert.Equal(t, tfDenom.PrettyString(), string(tc.denom)) + assert.Equal(t, tfDenom.Denom(), string(tc.denom)) assert.NoError(t, tfDenom.Validate()) assert.NotPanics(t, func() { @@ -68,7 +68,7 @@ func TestGenesisState(t *testing.T) { Denom: types.TFDenom{ Creator: creator.String(), Subdenom: testutil.Latin.Letters[lettersIdx : lettersIdx+4], - }.PrettyString(), + }.Denom().String(), AuthorityMetadata: types.DenomAuthorityMetadata{ Admin: creator.String(), }, From 0e02cf374832869aa09c96cd5bc68be679d43011 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Thu, 16 May 2024 16:09:57 +0200 Subject: [PATCH 07/22] fix: remove the infinite loop --- x/tokenfactory/keeper/msg_server_test.go | 2 +- x/tokenfactory/types/state.go | 10 +++++----- x/tokenfactory/types/state_test.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/x/tokenfactory/keeper/msg_server_test.go b/x/tokenfactory/keeper/msg_server_test.go index 484c1883f..0167bd507 100644 --- a/x/tokenfactory/keeper/msg_server_test.go +++ b/x/tokenfactory/keeper/msg_server_test.go @@ -100,7 +100,7 @@ func (s *TestSuite) TestCreateDenom() { Creator: tc.txMsg.Sender, Subdenom: tc.txMsg.Subdenom, }.Denom() - s.Equal(want, resp.NewTokenDenom) + s.Equal(want.String(), resp.NewTokenDenom) if tc.postHook != nil { tc.postHook(s.ctx, s.app) diff --git a/x/tokenfactory/types/state.go b/x/tokenfactory/types/state.go index 1ef251f04..1a0f56b15 100644 --- a/x/tokenfactory/types/state.go +++ b/x/tokenfactory/types/state.go @@ -29,13 +29,13 @@ func (params ModuleParams) Validate() error { // ---------------------------------------------------- func (tfd TFDenom) Denom() DenomStr { - return DenomStr(tfd.Denom()) + return DenomStr(fmt.Sprintf("tf/%s/%s", tfd.Creator, tfd.Subdenom)) } -// String: returns the standard string representation. -func (tfd TFDenom) DenomStr() string { - return fmt.Sprintf("tf/%s/%s", tfd.Creator, tfd.Subdenom) -} +// // String: returns the standard string representation. +// func (tfd TFDenom) DenomStr() string { +// return fmt.Sprintf("tf/%s/%s", tfd.Creator, tfd.Subdenom) +// } func (tfd TFDenom) Validate() error { return tfd.Denom().Validate() diff --git a/x/tokenfactory/types/state_test.go b/x/tokenfactory/types/state_test.go index 375670a16..614bc3794 100644 --- a/x/tokenfactory/types/state_test.go +++ b/x/tokenfactory/types/state_test.go @@ -35,7 +35,7 @@ func TestDenomStr_Validate(t *testing.T) { } require.NoError(t, err) assert.Equal(t, tfDenom.Denom(), tc.denom) - assert.Equal(t, tfDenom.Denom(), string(tc.denom)) + assert.Equal(t, tfDenom.Denom().String(), string(tc.denom)) assert.NoError(t, tfDenom.Validate()) assert.NotPanics(t, func() { From 937274770f0d19af491b1a21d178f5f8978881d0 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Wed, 22 May 2024 16:01:28 +0200 Subject: [PATCH 08/22] feat: upgrate go.mod to v0.50 --- app/ante.go | 6 +- app/ante/gas.go | 2 +- app/ante/testutil_test.go | 2 +- app/app.go | 17 +- app/export.go | 2 +- app/genesis.go | 1 + app/ibc_test.go | 4 +- app/keepers.go | 86 +++-- app/server/start.go | 2 +- app/upgrades.go | 2 +- app/upgrades/types.go | 4 +- app/upgrades/v1_1_0/constants.go | 4 +- app/upgrades/v1_2_0/constants.go | 4 +- app/upgrades/v1_3_0/constants.go | 14 +- app/wasmext/stargate_query.go | 6 +- eth/rpc/backend/utils.go | 2 +- eth/rpc/backend/utils_test.go | 2 +- eth/rpc/query_client.go | 2 +- go.mod | 229 +++++++------ go.sum | 477 +++++++++++++++------------ simapp/sim_test.go | 8 +- x/common/codec.go | 6 +- x/common/testutil/action/block.go | 2 +- x/common/testutil/cli/network.go | 2 +- x/common/testutil/sample.go | 6 +- x/common/testutil/testapp/testapp.go | 2 +- x/devgas/v1/keeper/keeper.go | 2 +- x/devgas/v1/keeper/store.go | 2 +- x/epochs/keeper/keeper.go | 2 +- x/evm/keeper/evm_state.go | 2 +- x/evm/keeper/keeper.go | 2 +- x/evm/params.go | 4 +- x/genmsg/integration_test.go | 2 +- x/inflation/keeper/keeper.go | 2 +- x/oracle/keeper/keeper.go | 2 +- x/oracle/keeper/test_utils.go | 6 +- x/oracle/types/ballot_test.go | 2 +- x/oracle/types/test_utils.go | 2 +- x/sudo/keeper/keeper.go | 2 +- x/tokenfactory/keeper/keeper.go | 2 +- x/tokenfactory/keeper/store.go | 2 +- 41 files changed, 502 insertions(+), 428 deletions(-) diff --git a/app/ante.go b/app/ante.go index a0d70a1bc..bb86d126f 100644 --- a/app/ante.go +++ b/app/ante.go @@ -2,14 +2,14 @@ package app import ( sdkerrors "cosmossdk.io/errors" + "cosmossdk.io/store/types" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" sdkante "github.com/cosmos/cosmos-sdk/x/auth/ante" - ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" "github.com/NibiruChain/nibiru/app/ante" devgasante "github.com/NibiruChain/nibiru/x/devgas/v1/ante" diff --git a/app/ante/gas.go b/app/ante/gas.go index 7b4c2da98..f9c551633 100644 --- a/app/ante/gas.go +++ b/app/ante/gas.go @@ -3,7 +3,7 @@ package ante import ( "fmt" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/types" ) diff --git a/app/ante/testutil_test.go b/app/ante/testutil_test.go index 071415826..d0ca41fea 100644 --- a/app/ante/testutil_test.go +++ b/app/ante/testutil_test.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/ante" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" + ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" diff --git a/app/app.go b/app/app.go index 8245208cf..ab7db35f8 100644 --- a/app/app.go +++ b/app/app.go @@ -13,22 +13,21 @@ import ( "github.com/NibiruChain/nibiru/app/wasmext" + storetypes "cosmossdk.io/store/types" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/libs/log" tmos "github.com/cometbft/cometbft/libs/os" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" "github.com/cosmos/cosmos-sdk/client/grpc/node" - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -36,12 +35,12 @@ import ( authante "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" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" "github.com/cosmos/cosmos-sdk/x/crisis" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - ibctesting "github.com/cosmos/ibc-go/v7/testing" - "github.com/cosmos/ibc-go/v7/testing/types" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" + ibctesting "github.com/cosmos/ibc-go/v8/testing" + "github.com/cosmos/ibc-go/v8/testing/types" "github.com/gorilla/mux" "github.com/prometheus/client_golang/prometheus" "github.com/rakyll/statik/fs" @@ -346,7 +345,7 @@ func (app *NibiruApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.API // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. - tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + cmtservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register legacy and grpc-gateway routes for all modules. ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) @@ -366,7 +365,7 @@ func (app *NibiruApp) RegisterTxService(clientCtx client.Context) { // RegisterTendermintService implements the Application.RegisterTendermintService method. func (app *NibiruApp) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService( + cmtservice.RegisterTendermintService( clientCtx, app.BaseApp.GRPCQueryRouter(), app.interfaceRegistry, diff --git a/app/export.go b/app/export.go index 7a9a5ed6a..07544b947 100644 --- a/app/export.go +++ b/app/export.go @@ -4,7 +4,7 @@ import ( "encoding/json" "log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/app/genesis.go b/app/genesis.go index 0710a5b9a..7410d6435 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -22,6 +22,7 @@ func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile str } var genesis tmtypes.GenesisDoc + // NOTE: Tendermint uses a custom JSON decoder for GenesisDoc err = tmjson.Unmarshal(bytes, &genesis) if err != nil { diff --git a/app/ibc_test.go b/app/ibc_test.go index 5e16338c1..105dfb4ab 100644 --- a/app/ibc_test.go +++ b/app/ibc_test.go @@ -6,8 +6,8 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibctesting "github.com/cosmos/ibc-go/v7/testing" + transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibctesting "github.com/cosmos/ibc-go/v8/testing" "github.com/stretchr/testify/suite" "github.com/NibiruChain/nibiru/app" diff --git a/app/keepers.go b/app/keepers.go index e5ed3f5c6..07ffaca37 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -4,25 +4,30 @@ import ( "path/filepath" "strings" - ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" - icacontroller "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller" - icacontrollerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" - icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - + ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" + icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" + icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" + icahost "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" + + "cosmossdk.io/store/types" + storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/evidence" + evidencekeeper "cosmossdk.io/x/evidence/keeper" + evidencetypes "cosmossdk.io/x/evidence/types" + "cosmossdk.io/x/feegrant" + feegrantkeeper "cosmossdk.io/x/feegrant/keeper" + feegrantmodule "cosmossdk.io/x/feegrant/module" wasmdapp "github.com/CosmWasm/wasmd/app" "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/store/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" @@ -37,9 +42,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" "github.com/cosmos/cosmos-sdk/x/crisis" @@ -48,12 +50,6 @@ import ( distr "github.com/cosmos/cosmos-sdk/x/distribution" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/x/gov" @@ -62,6 +58,9 @@ import ( govv1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" + "github.com/cosmos/ibc-go/modules/capability" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" "github.com/cosmos/cosmos-sdk/x/params" paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" @@ -76,30 +75,28 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" - upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "cosmossdk.io/x/upgrade" + upgradekeeper "cosmossdk.io/x/upgrade/keeper" + upgradetypes "cosmossdk.io/x/upgrade/types" // --------------------------------------------------------------- // IBC imports - icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper" - ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee" - ibcfeekeeper "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper" - ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" - ibctransfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v7/modules/core" - ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" + icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" + ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" + ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" + ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" + ibctransfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v8/modules/core" + ibcclient "github.com/cosmos/ibc-go/v8/modules/core/02-client" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" + ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" + ibcmock "github.com/cosmos/ibc-go/v8/testing/mock" "github.com/spf13/cast" // --------------------------------------------------------------- @@ -809,10 +806,11 @@ func ModuleBasicManager() module.BasicManager { distr.AppModuleBasic{}, NewGovModuleBasic( paramsclient.ProposalHandler, - upgradeclient.LegacyProposalHandler, - upgradeclient.LegacyCancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, - ibcclientclient.UpgradeProposalHandler, + // upgradeclient.LegacyProposalHandler, + // upgradeclient.LegacyCancelProposalHandler, + // seems to be removed per https://github.com/cosmos/ibc-go/pull/4620 + // ibcclientclient.UpdateClientProposalHandler, + // ibcclientclient.UpgradeProposalHandler, ), params.AppModuleBasic{}, CrisisModule{}, diff --git a/app/server/start.go b/app/server/start.go index 274f31fa6..0d700342b 100644 --- a/app/server/start.go +++ b/app/server/start.go @@ -44,6 +44,7 @@ import ( ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" errorsmod "cosmossdk.io/errors" + pruningtypes "cosmossdk.io/store/pruning/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" @@ -51,7 +52,6 @@ import ( serverconfig "github.com/cosmos/cosmos-sdk/server/config" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" "github.com/cosmos/cosmos-sdk/server/types" - pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/app/upgrades.go b/app/upgrades.go index 07bccfb09..7f8781ad4 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -3,7 +3,7 @@ package app import ( "fmt" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/NibiruChain/nibiru/app/upgrades" "github.com/NibiruChain/nibiru/app/upgrades/v1_1_0" diff --git a/app/upgrades/types.go b/app/upgrades/types.go index a2cdde4b5..966fcd20c 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -1,9 +1,9 @@ package upgrades import ( - store "github.com/cosmos/cosmos-sdk/store/types" + store "cosmossdk.io/store/types" + "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) type Upgrade struct { diff --git a/app/upgrades/v1_1_0/constants.go b/app/upgrades/v1_1_0/constants.go index 257ef77c5..cf8a998cd 100644 --- a/app/upgrades/v1_1_0/constants.go +++ b/app/upgrades/v1_1_0/constants.go @@ -1,10 +1,10 @@ package v1_1_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/NibiruChain/nibiru/app/upgrades" inflationtypes "github.com/NibiruChain/nibiru/x/inflation/types" diff --git a/app/upgrades/v1_2_0/constants.go b/app/upgrades/v1_2_0/constants.go index fea9289a7..4dabae844 100644 --- a/app/upgrades/v1_2_0/constants.go +++ b/app/upgrades/v1_2_0/constants.go @@ -1,10 +1,10 @@ package v1_2_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/NibiruChain/nibiru/app/upgrades" ) diff --git a/app/upgrades/v1_3_0/constants.go b/app/upgrades/v1_3_0/constants.go index 4788dbdd6..917de11ef 100644 --- a/app/upgrades/v1_3_0/constants.go +++ b/app/upgrades/v1_3_0/constants.go @@ -1,19 +1,19 @@ package v1_3_0 import ( - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" - icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" + icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" + icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" "github.com/NibiruChain/nibiru/app/upgrades" ) diff --git a/app/wasmext/stargate_query.go b/app/wasmext/stargate_query.go index 3a08dd327..dbd58401c 100644 --- a/app/wasmext/stargate_query.go +++ b/app/wasmext/stargate_query.go @@ -14,9 +14,9 @@ import ( bank "github.com/cosmos/cosmos-sdk/x/bank/types" gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - ibcconnectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" ) /* diff --git a/eth/rpc/backend/utils.go b/eth/rpc/backend/utils.go index 4f93b0ea4..054a5d1e7 100644 --- a/eth/rpc/backend/utils.go +++ b/eth/rpc/backend/utils.go @@ -22,7 +22,7 @@ import ( "github.com/cometbft/cometbft/libs/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" - "github.com/cometbft/cometbft/proto/tendermint/crypto" + "github.com/cometbft/cometbft/api/cometbft/crypto/v1" "github.com/NibiruChain/nibiru/eth/rpc" "github.com/NibiruChain/nibiru/x/evm" diff --git a/eth/rpc/backend/utils_test.go b/eth/rpc/backend/utils_test.go index 4c7c14a74..6c50a7f6e 100644 --- a/eth/rpc/backend/utils_test.go +++ b/eth/rpc/backend/utils_test.go @@ -3,7 +3,7 @@ package backend import ( "fmt" - "github.com/cometbft/cometbft/proto/tendermint/crypto" + "github.com/cometbft/cometbft/api/cometbft/crypto/v1" ) func mookProofs(num int, withData bool) *crypto.ProofOps { diff --git a/eth/rpc/query_client.go b/eth/rpc/query_client.go index bc30fd19b..79ec2c865 100644 --- a/eth/rpc/query_client.go +++ b/eth/rpc/query_client.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/proto/tendermint/crypto" + "github.com/cometbft/cometbft/api/cometbft/crypto/v1" "github.com/cosmos/cosmos-sdk/client" diff --git a/go.mod b/go.mod index a5a516f40..77537e782 100644 --- a/go.mod +++ b/go.mod @@ -1,88 +1,106 @@ module github.com/NibiruChain/nibiru -go 1.21 +go 1.22.2 + +toolchain go1.22.3 require ( + cosmossdk.io/api v0.7.5 // indirect + cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect + cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7 // indirect cosmossdk.io/errors v1.0.1 - cosmossdk.io/math v1.3.0 - cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d - github.com/CosmWasm/wasmd v0.44.0 - github.com/CosmWasm/wasmvm v1.5.0 + cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc + cosmossdk.io/x/circuit v0.1.0 // indirect + cosmossdk.io/x/evidence v0.1.0 + cosmossdk.io/x/feegrant v0.1.0 + cosmossdk.io/x/upgrade v0.1.1 + github.com/CosmWasm/wasmd v0.50.0 + github.com/CosmWasm/wasmvm v1.5.2 github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/NibiruChain/collections v0.5.0 + github.com/NibiruChain/collections v0.50.0 github.com/armon/go-metrics v0.4.1 // EVM-specific deps github.com/btcsuite/btcd v0.23.3 github.com/btcsuite/btcd/btcutil v1.1.3 - github.com/cometbft/cometbft v0.37.4 - github.com/cometbft/cometbft-db v0.11.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.4 - github.com/cosmos/cosmos-sdk v0.47.10 + github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 + github.com/cometbft/cometbft-db v0.12.0 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + + // migration to v0.50 + github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.3.2 + github.com/cosmos/gogoproto v1.4.12 + github.com/cosmos/ibc-go/v8 v8.0.0 github.com/ethereum/go-ethereum v1.10.17 github.com/gogo/protobuf v1.3.3 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 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/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/holiman/uint256 v1.2.4 // indirect github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/client_golang v1.19.1 github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.16.0 - github.com/stretchr/testify v1.8.4 + github.com/spf13/viper v1.18.2 + github.com/stretchr/testify v1.9.0 github.com/tidwall/gjson v1.17.0 github.com/tidwall/sjson v1.2.5 github.com/tyler-smith/go-bip39 v1.1.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe - google.golang.org/grpc v1.61.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be + google.golang.org/grpc v1.64.0 + google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v2 v2.4.0 ) require ( cosmossdk.io/collections v0.4.0 - github.com/davecgh/go-spew v1.1.1 - github.com/gorilla/websocket v1.5.0 - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb - golang.org/x/text v0.14.0 + cosmossdk.io/math v1.3.0 + cosmossdk.io/simapp v0.0.0-20240522060652-a1ae4c3e0337 + cosmossdk.io/tools/rosetta v0.2.1 + github.com/cometbft/cometbft/api v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 + github.com/cosmos/ibc-go/modules/capability v1.0.0 + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc + github.com/gorilla/websocket v1.5.1 + github.com/rs/cors v1.11.0 + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 + golang.org/x/net v0.25.0 + golang.org/x/text v0.15.0 ) require ( - cloud.google.com/go v0.111.0 // indirect - cloud.google.com/go/compute v1.23.3 // 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 - cosmossdk.io/api v0.7.0 // indirect - cosmossdk.io/core v0.10.0 // indirect + cloud.google.com/go v0.112.2 // indirect + cloud.google.com/go/auth v0.2.2 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.1 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect + cloud.google.com/go/iam v1.1.7 // indirect + cloud.google.com/go/storage v1.40.0 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect - cosmossdk.io/log v1.3.1 // indirect - cosmossdk.io/tools/rosetta v0.2.1 // indirect - filippo.io/edwards25519 v1.0.0 // indirect + cosmossdk.io/x/nft v0.1.0 // indirect + cosmossdk.io/x/tx v0.13.3 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect - github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect - github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/aws/aws-sdk-go v1.51.25 // 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/bits-and-blooms/bitset v1.10.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // 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/cockroachdb/errors v1.11.1 // indirect @@ -91,150 +109,163 @@ require ( github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect 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-db v1.0.2 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v0.21.0-beta.1 // indirect + github.com/cosmos/iavl v1.1.4 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.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 + github.com/danieljoos/wincred v1.2.1 // indirect github.com/deckarep/golang-set v1.8.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.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/badger/v4 v4.2.0 // indirect 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/distribution/reference v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.23.0 // indirect + github.com/emicklei/dot v1.6.2 // indirect + github.com/fatih/color v1.17.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/gin-gonic/gin v1.9.1 // 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.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.1 // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // 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/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect + github.com/google/flatbuffers v2.0.8+incompatible // 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/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect + github.com/gorilla/handlers v1.5.2 // 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 github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.4 // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-plugin v1.6.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hdevalence/ed25519consensus v0.2.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect 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/klauspost/compress v1.17.8 // 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/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // 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/mattn/go-runewidth v0.0.9 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect + github.com/mattn/go-runewidth v0.0.14 // indirect github.com/minio/highwayhash v1.0.2 // 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/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20240327183114-c42a807a84ba // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect + github.com/prometheus/procfs v0.14.0 // indirect github.com/prometheus/tsdb v0.7.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/rjeczalik/notify v0.9.1 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/cors v1.8.3 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/zerolog v1.32.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/stretchr/objx v0.5.2 // 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 + github.com/tidwall/btree v1.7.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tklauser/go-sysconf v0.3.5 // indirect github.com/tklauser/numcpus v0.2.2 // indirect - github.com/ulikunitz/xz v0.5.11 // indirect + github.com/ulikunitz/xz v0.5.12 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // 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 - 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 - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - google.golang.org/api v0.149.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.50.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/oauth2 v0.19.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.21.0 // indirect + google.golang.org/api v0.175.0 // indirect + google.golang.org/genproto v0.0.0-20240415180920-8c6c420018be // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) replace ( - cosmossdk.io/api => cosmossdk.io/api v0.3.1 + github.com/cometbft/cometbft => github.com/cometbft/cometbft v0.38.7 + github.com/cosmos/cosmos-sdk v0.51.0 => github.com/cosmos/cosmos-sdk v0.50.6 - github.com/cosmos/iavl => github.com/cosmos/iavl v0.20.0 + // github.com/cosmos/iavl => github.com/cosmos/iavl v0.20.0 github.com/ethereum/go-ethereum => ./geth github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/linxGnu/grocksdb => github.com/linxGnu/grocksdb v1.8.12 // pin version! 126854af5e6d has issues with the store so that queries fail github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 + ) + +// replace github.com/cometbft/cometbft/libs/os => github.com/cometbft/cometbft/libs/os v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 diff --git a/go.sum b/go.sum index 77a205df5..7f281067b 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= @@ -34,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.2 h1:ZaGT6LiG7dBzi6zNOvVZwacaXlmf3lRqnC4DQzqyRQw= +cloud.google.com/go v0.112.2/go.mod h1:iEqjp//KquGIJV/m+Pk3xecgKNhV+ry+vVTsy4TbDms= 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= @@ -50,6 +48,10 @@ cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjby cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/auth v0.2.2 h1:gmxNJs4YZYcw6YvKRtVBaF2fyUE6UrWPyzU8jHvYfmI= +cloud.google.com/go/auth v0.2.2/go.mod h1:2bDNJWtWziDT3Pu1URxHHbkHE/BbOCuyUiKIGcNvafo= +cloud.google.com/go/auth/oauth2adapt v0.2.1 h1:VSPmMmUlT8CkIZ2PzD9AlLN+R3+D1clXMWHHa6vG/Ag= +cloud.google.com/go/auth/oauth2adapt v0.2.1/go.mod h1:tOdK/k+D2e4GEwfBRA48dKNQiDsqIXxLh7VU319eV0g= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -73,10 +75,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/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.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= 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= @@ -114,8 +114,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.7 h1:z4VHOhwKLF/+UYXAJDFwGtNF0b6gjsW1Pk9Ml0U/IoM= +cloud.google.com/go/iam v1.1.7/go.mod h1:J4PMPg8TtyurAUvSmPj8FF3EDgY1SPRZxcUGrn7WXGA= 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= @@ -173,12 +173,11 @@ 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= -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.40.0 h1:VEpDQV5CJxFmJ6ueWNsKxcr1QAYOXEgxDa+sBbJahPw= +cloud.google.com/go/storage v1.40.0/go.mod h1:Rrj7/hKlG87BLqDJYtwR0fbPld8uJPbQ2ucUMY7Ir0g= 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= @@ -191,12 +190,14 @@ cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuW cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= -cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= +cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= -cosmossdk.io/core v0.10.0 h1:NP28Ol9YyRODmZLJg2ko/mUl40hMegeMzhJnG+XPkcY= -cosmossdk.io/core v0.10.0/go.mod h1:MygXNld9DvMgYY4yE76DM/mdZpgfeyRjy6FPjEEehlY= +cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7 h1:hOzi4yo2Fc7h3mod+xX4m4QA4+Uq+PkFRjY/yalZ0B8= +cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7/go.mod h1:3v0JJNNd8ye0cOvJ+wUUvE7Ke0d2qxnNIDcXd5mziHk= cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -205,46 +206,59 @@ 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-20230608160436-666c345ad23d h1:E/8y0oG3u9hBR8l4F9MtC0LdZIamPCUwUoLlrHrX86I= -cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d/go.mod h1:xbjky3L3DJEylaho6gXplkrMvJ5sFgv+qNX+Nn47bzY= +cosmossdk.io/simapp v0.0.0-20240522060652-a1ae4c3e0337 h1:7juhrs+IZ2ZsfpNaVuI2ZA1+8OttRzKXRicjcjOHW0Q= +cosmossdk.io/simapp v0.0.0-20240522060652-a1ae4c3e0337/go.mod h1:HGidcqY4qtfjEKzliLol/BQNXEXjpP7LpVRvVvrpJxM= +cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc h1:R9O9d75e0qZYUsVV0zzi+D7cNLnX2JrUOQNoIPaF0Bg= +cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc/go.mod h1:amTTatOUV3u1PsKmNb87z6/galCxrRbz9kRdJkL0DyU= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= +cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= +cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= +cosmossdk.io/x/evidence v0.1.0 h1:J6OEyDl1rbykksdGynzPKG5R/zm6TacwW2fbLTW4nCk= +cosmossdk.io/x/evidence v0.1.0/go.mod h1:hTaiiXsoiJ3InMz1uptgF0BnGqROllAN8mwisOMMsfw= +cosmossdk.io/x/feegrant v0.1.0 h1:c7s3oAq/8/UO0EiN1H5BIjwVntujVTkYs35YPvvrdQk= +cosmossdk.io/x/feegrant v0.1.0/go.mod h1:4r+FsViJRpcZif/yhTn+E0E6OFfg4n0Lx+6cCtnZElU= +cosmossdk.io/x/nft v0.1.0 h1:VhcsFiEK33ODN27kxKLa0r/CeFd8laBfbDBwYqCyYCM= +cosmossdk.io/x/nft v0.1.0/go.mod h1:ec4j4QAO4mJZ+45jeYRnW7awLHby1JZANqe1hNZ4S3g= +cosmossdk.io/x/tx v0.13.3 h1:Ha4mNaHmxBc6RMun9aKuqul8yHiL78EKJQ8g23Zf73g= +cosmossdk.io/x/tx v0.13.3/go.mod h1:I8xaHv0rhUdIvIdptKIqzYy27+n2+zBVaxO6fscFhys= +cosmossdk.io/x/upgrade v0.1.1 h1:aoPe2gNvH+Gwt/Pgq3dOxxQVU3j5P6Xf+DaUJTDZATc= +cosmossdk.io/x/upgrade v0.1.1/go.mod h1:MNLptLPcIFK9CWt7Ra//8WUZAxweyRDNcbs5nkOcQy0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= -github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -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/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.1.0/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/wasmd v0.44.0 h1:2sbcoCAvfjCs1O0SWt53xULKjkV06dbSFthEViIC6Zg= -github.com/CosmWasm/wasmd v0.44.0/go.mod h1:tDyYN050qUcdd7LOxGeo2e185sEShyO3nJGl2Cf59+k= -github.com/CosmWasm/wasmvm v1.5.0 h1:3hKeT9SfwfLhxTGKH3vXaKFzBz1yuvP8SlfwfQXbQfw= -github.com/CosmWasm/wasmvm v1.5.0/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= +github.com/CosmWasm/wasmd v0.50.0 h1:NVaGqCSTRfb9UTDHJwT6nQIWcb6VjlQl88iI+u1+qjE= +github.com/CosmWasm/wasmd v0.50.0/go.mod h1:UjmShW4l9YxaMytwJZ7IB7MWzHiynSZP3DdWrG0FRtk= +github.com/CosmWasm/wasmvm v1.5.2 h1:+pKB1Mz9GZVt1vadxB+EDdD1FOz3dMNjIKq/58/lrag= +github.com/CosmWasm/wasmvm v1.5.2/go.mod h1:Q0bSEtlktzh7W2hhEaifrFp1Erx11ckQZmjq8FLCyys= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= +github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZYIR/J6A= github.com/MakeNowJust/heredoc/v2 v2.0.1/go.mod h1:6/2Abh5s+hc3g9nbWLe9ObDIOhaRrqsyY9MWy+4JdRM= -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/NibiruChain/collections v0.5.0 h1:33pXpVTe1PK/tfdZlAJF1JF7AdzGNARG+iL9G/z3X7k= -github.com/NibiruChain/collections v0.5.0/go.mod h1:43L6yjuF0BMre/mw4gqn/kUOZz1c2Y3huZ/RQfBFrOQ= +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/NibiruChain/collections v0.50.0 h1:zjwZ17G1f/0hoKUeoljIQval0HERF8NmojfQYKEOymw= +github.com/NibiruChain/collections v0.50.0/go.mod h1:u3NETehzjViSEZLmSjps0Akd8mWVfw3FXSh8lswf5PU= 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= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -282,8 +296,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.51.25 h1:DjTT8mtmsachhV6yrXR8+yhnG6120dazr720nopRsls= +github.com/aws/aws-sdk-go v1.51.25/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= 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= @@ -294,6 +308,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= @@ -303,6 +318,8 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= +github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= @@ -316,8 +333,8 @@ github.com/btcsuite/btcd v0.23.3/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZg github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= -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/btcec/v2 v2.3.3 h1:6+iXlDKE8RMtKsvK0gshlXIuPbyWM/h84Ensb7o3sC0= +github.com/btcsuite/btcd/btcec/v2 v2.3.3/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= @@ -337,8 +354,8 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= @@ -352,11 +369,10 @@ github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -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-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= @@ -402,12 +418,12 @@ 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.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= -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/cometbft/cometbft v0.38.7 h1:ULhIOJ9+LgSy6nLekhq9ae3juX3NnQUMMPyVdhZV6Hk= +github.com/cometbft/cometbft v0.38.7/go.mod h1:HIyf811dFMI73IE0F7RrnY/Fr+d1+HuJAgtkEpQjCMY= +github.com/cometbft/cometbft-db v0.12.0 h1:v77/z0VyfSU7k682IzZeZPFZrQAKiQwkqGN0QzAjMi0= +github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= +github.com/cometbft/cometbft/api v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 h1:Bj+DkG59qYZE54uWBKXsNtiug1u6M4x8Tk3l5tAb/3I= +github.com/cometbft/cometbft/api v1.0.0-alpha.2.0.20240429102542-490e9bc3de65/go.mod h1:NDFKiBBD8HJC6QQLAoUI99YhsiRZtg2+FJWfk6A6m6o= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= @@ -422,30 +438,29 @@ 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-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= -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/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.50.6 h1:efR3MsvMHX5sxS3be+hOobGk87IzlZbSpsI2x/Vw3hk= +github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= 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/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= -github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.3.2 h1:FeUDcBX7VYY0e0iRmcVkPPUjYfAqIc//QuHXo8JHz9c= -github.com/cosmos/ibc-go/v7 v7.3.2/go.mod h1:IMeOXb7gwpZ+/nOG5BuUkdW4weM1ezvN4PQPws4uzOI= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= +github.com/cosmos/iavl v1.1.4 h1:Z0cVVjeQqOUp78/nWt/uhQy83vYluWlAMGQ4zbH9G34= +github.com/cosmos/iavl v1.1.4/go.mod h1:vCYmRQUJU1wwj0oRD3wMEtOM9sJNDP+GFMaXmIxZ/rU= +github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= +github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= +github.com/cosmos/ibc-go/v8 v8.0.0 h1:QKipnr/NGwc+9L7NZipURvmSIu+nw9jOIWTJuDBqOhg= +github.com/cosmos/ibc-go/v8 v8.0.0/go.mod h1:C6IiJom0F3cIQCD5fKwVPDrDK9j/xTu563AWuOmXois= 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/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= -github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= 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 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= @@ -454,32 +469,33 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= 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= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= 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 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= 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.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.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= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= +github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= @@ -490,9 +506,9 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -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 v1.6.2/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= @@ -512,6 +528,8 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= +github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -525,9 +543,10 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -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/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= 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= @@ -539,15 +558,15 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk 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/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= 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= -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/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -566,8 +585,9 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 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= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -576,8 +596,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.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= @@ -599,10 +619,12 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= 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= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= @@ -620,8 +642,8 @@ github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw 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.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= @@ -656,8 +678,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= @@ -668,6 +690,8 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ 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/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= +github.com/google/flatbuffers v2.0.8+incompatible/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= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -708,7 +732,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= @@ -722,8 +745,8 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/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= @@ -738,14 +761,13 @@ 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/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= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= 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/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -754,13 +776,13 @@ 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.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= 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= @@ -769,11 +791,7 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0Q github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= 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= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -785,11 +803,17 @@ 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-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= 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= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI= +github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -797,24 +821,28 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 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 v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 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= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= -github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= +github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= @@ -829,6 +857,8 @@ github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmK github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= @@ -853,8 +883,8 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= 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.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= 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= @@ -889,8 +919,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.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= +github.com/klauspost/compress v1.17.8/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.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= @@ -899,7 +929,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= @@ -917,8 +946,8 @@ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgx github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= 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= @@ -940,6 +969,7 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -955,17 +985,14 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= +github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 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/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/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/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -1013,8 +1040,12 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA 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/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= 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/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -1023,14 +1054,14 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W 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/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +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/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= 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= @@ -1056,14 +1087,14 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= 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.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.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-20240327183114-c42a807a84ba h1:3jPgmsFGBID1wFfU2AbYocNcN4wqU68UaHSdMjiw/7U= +github.com/petermattis/goid v0.0.0-20240327183114-c42a807a84ba/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= @@ -1075,10 +1106,10 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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= @@ -1086,16 +1117,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.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= 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.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +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= @@ -1104,16 +1135,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.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= 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.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.14.0 h1:Lw4VdGGoKEZilJsayHf0B+9YgLGREba2C6xr+Fdfq6s= +github.com/prometheus/procfs v0.14.0/go.mod h1:XL+Iwz8k8ZabyZfMFHPiilCniixqQarAy5Mu67pHlNQ= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= @@ -1124,17 +1155,19 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqn github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 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= +github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= +github.com/rs/cors v1.11.0/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= @@ -1144,6 +1177,10 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= 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= @@ -1165,12 +1202,13 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 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= @@ -1179,15 +1217,13 @@ github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tL 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= 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= @@ -1195,8 +1231,9 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.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= @@ -1208,18 +1245,18 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= 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 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/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.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= 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/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -1252,8 +1289,8 @@ github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLY github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= -github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= +github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -1284,8 +1321,8 @@ github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= 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= @@ -1298,24 +1335,34 @@ 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/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= -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.50.0 h1:zvpPXY7RfYAGSdYQLjp6zxdJNSYD/+FFoCTQN9IPxBs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.50.0/go.mod h1:BMn8NB1vsxTljvuorms2hyOs8IBuuBEq0pl7ltOfy30= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 h1:cEPbyTSEHlQR89XVlyo78gqluF8Y3oMeBkXGWzQsfXY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0/go.mod h1:DKdbWcT4GH1D0Y3Sqt/PFXt2naRKDWtU+eE6oLdFNA8= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +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.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= 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.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.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.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1329,7 +1376,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= @@ -1337,13 +1383,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.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1359,8 +1404,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH 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/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -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/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= 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= @@ -1391,8 +1436,8 @@ golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -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.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.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= @@ -1435,7 +1480,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= @@ -1444,7 +1488,6 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/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= @@ -1460,8 +1503,9 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= 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= @@ -1487,8 +1531,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.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg= +golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= 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= @@ -1504,8 +1548,8 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ 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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.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= @@ -1567,7 +1611,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= @@ -1576,7 +1619,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= @@ -1585,10 +1627,11 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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-20210927094055-39ccf1dd6fa6/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= @@ -1608,7 +1651,6 @@ golang.org/x/sys v0.0.0-20220624220833-87e55d714810/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.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1616,8 +1658,9 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.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/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.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= @@ -1625,8 +1668,9 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= 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= @@ -1636,18 +1680,20 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.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.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -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.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +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-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1669,6 +1715,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn 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= 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= @@ -1703,7 +1750,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= @@ -1712,8 +1758,9 @@ 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.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= @@ -1721,8 +1768,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= @@ -1778,8 +1826,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.175.0 h1:9bMDh10V9cBuU8N45Wlc3cKkItfqMRV0Fi8UscLEtbY= +google.golang.org/api v0.175.0/go.mod h1:Rra+ltKu14pps/4xTycZfobMgLpbosoaaL7c+SEMrO8= 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= @@ -1788,8 +1836,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= @@ -1831,10 +1877,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= @@ -1901,12 +1945,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-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= -google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= -google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= -google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -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-20240415180920-8c6c420018be h1:g4aX8SUFA8V5F4LrSY5EclyGYw1OZN4HS1jTyjB9ZDc= +google.golang.org/genproto v0.0.0-20240415180920-8c6c420018be/go.mod h1:FeSdT5fk+lkxatqJP38MsUicGqHax5cLtmy/6TAuxO4= +google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be h1:Zz7rLWqp0ApfsR/l7+zSHhY3PMiH2xqgxlfYfAfNpoU= +google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be/go.mod h1:dvdCTIoAGbkWbcIKBniID56/7XHTt6WfxXNMxuziJ+w= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 h1:AgADTJarZTBqgjiUzRgfaBchgYB3/WFTC80GPwsMcRI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= 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= @@ -1948,8 +1992,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.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= -google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= 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= @@ -1966,8 +2010,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.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/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= @@ -2002,7 +2046,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C 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= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= 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= diff --git a/simapp/sim_test.go b/simapp/sim_test.go index 52466eac9..d56651436 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -9,23 +9,22 @@ import ( "strings" "testing" + storetypes "cosmossdk.io/store/types" + evidencetypes "cosmossdk.io/x/evidence/types" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" - storetypes "github.com/cosmos/cosmos-sdk/store/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -33,6 +32,7 @@ import ( simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" "github.com/stretchr/testify/require" "github.com/NibiruChain/nibiru/app" diff --git a/x/common/codec.go b/x/common/codec.go index 8bb5f7bf4..74d80f957 100644 --- a/x/common/codec.go +++ b/x/common/codec.go @@ -1,9 +1,11 @@ package common import ( - "cosmossdk.io/collections" - collcodec "cosmossdk.io/collections/codec" sdkmath "cosmossdk.io/math" + "github.com/NibiruChain/collections" + + collcodec "cosmossdk.io/collections/codec" + sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/common/testutil/action/block.go b/x/common/testutil/action/block.go index bb19c4629..69d4006fa 100644 --- a/x/common/testutil/action/block.go +++ b/x/common/testutil/action/block.go @@ -4,7 +4,7 @@ import ( "time" "github.com/cometbft/cometbft/abci/types" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/nibiru/app" diff --git a/x/common/testutil/cli/network.go b/x/common/testutil/cli/network.go index cd2b5333f..cae38372d 100644 --- a/x/common/testutil/cli/network.go +++ b/x/common/testutil/cli/network.go @@ -14,8 +14,8 @@ import ( "sync" "time" + "cosmossdk.io/store/pruning/types" "github.com/cometbft/cometbft/libs/log" - "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/testutil/sims" "cosmossdk.io/math" diff --git a/x/common/testutil/sample.go b/x/common/testutil/sample.go index fc23896f8..46754ae4b 100644 --- a/x/common/testutil/sample.go +++ b/x/common/testutil/sample.go @@ -3,8 +3,8 @@ package testutil import ( "math/rand" - "github.com/cosmos/cosmos-sdk/store" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store" + "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -13,7 +13,7 @@ import ( tmdb "github.com/cometbft/cometbft-db" "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" diff --git a/x/common/testutil/testapp/testapp.go b/x/common/testutil/testapp/testapp.go index 94280dfc8..8df17c2dc 100644 --- a/x/common/testutil/testapp/testapp.go +++ b/x/common/testutil/testapp/testapp.go @@ -8,7 +8,7 @@ import ( tmdb "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/devgas/v1/keeper/keeper.go b/x/devgas/v1/keeper/keeper.go index 97081ccd2..ccae4a59d 100644 --- a/x/devgas/v1/keeper/keeper.go +++ b/x/devgas/v1/keeper/keeper.go @@ -7,8 +7,8 @@ import ( "github.com/cometbft/cometbft/libs/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/collections" diff --git a/x/devgas/v1/keeper/store.go b/x/devgas/v1/keeper/store.go index 93a2ff2db..b48f85b0d 100644 --- a/x/devgas/v1/keeper/store.go +++ b/x/devgas/v1/keeper/store.go @@ -1,9 +1,9 @@ package keeper import ( + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/collections" sdkcodec "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" ) diff --git a/x/epochs/keeper/keeper.go b/x/epochs/keeper/keeper.go index a1d997938..7292c867c 100644 --- a/x/epochs/keeper/keeper.go +++ b/x/epochs/keeper/keeper.go @@ -1,7 +1,7 @@ package keeper import ( - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/collections" diff --git a/x/evm/keeper/evm_state.go b/x/evm/keeper/evm_state.go index 5cf7cea3c..15703edb4 100644 --- a/x/evm/keeper/evm_state.go +++ b/x/evm/keeper/evm_state.go @@ -5,9 +5,9 @@ import ( "fmt" "slices" + sdkstore "cosmossdk.io/store/types" "github.com/NibiruChain/collections" "github.com/cosmos/cosmos-sdk/codec" - sdkstore "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index 7f3a2a813..3b3e78631 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -5,8 +5,8 @@ import ( // "github.com/NibiruChain/nibiru/x/evm" "math/big" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" diff --git a/x/evm/params.go b/x/evm/params.go index 8112b61e0..01363cd52 100644 --- a/x/evm/params.go +++ b/x/evm/params.go @@ -9,8 +9,8 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v7/modules/core/24-host" + channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v8/modules/core/24-host" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" diff --git a/x/genmsg/integration_test.go b/x/genmsg/integration_test.go index e37476649..405268ac0 100644 --- a/x/genmsg/integration_test.go +++ b/x/genmsg/integration_test.go @@ -3,7 +3,7 @@ package genmsg_test import ( "testing" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" diff --git a/x/inflation/keeper/keeper.go b/x/inflation/keeper/keeper.go index 43742b843..6c576d336 100644 --- a/x/inflation/keeper/keeper.go +++ b/x/inflation/keeper/keeper.go @@ -1,10 +1,10 @@ package keeper import ( + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/collections" "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 9ebd24b43..52b22c2ac 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" sdkerrors "cosmossdk.io/errors" "cosmossdk.io/math" diff --git a/x/oracle/keeper/test_utils.go b/x/oracle/keeper/test_utils.go index 72f91aada..5119211b1 100644 --- a/x/oracle/keeper/test_utils.go +++ b/x/oracle/keeper/test_utils.go @@ -6,6 +6,8 @@ import ( "time" "cosmossdk.io/math" + "cosmossdk.io/store" + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/nibiru/x/common/denoms" "github.com/NibiruChain/nibiru/x/oracle/types" "github.com/NibiruChain/nibiru/x/sudo" @@ -15,13 +17,11 @@ import ( "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/secp256k1" "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/std" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" diff --git a/x/oracle/types/ballot_test.go b/x/oracle/types/ballot_test.go index 317a6ff2c..a626ace12 100644 --- a/x/oracle/types/ballot_test.go +++ b/x/oracle/types/ballot_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" "github.com/cometbft/cometbft/crypto/secp256k1" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/types" "cosmossdk.io/math" diff --git a/x/oracle/types/test_utils.go b/x/oracle/types/test_utils.go index c5e06e88f..90faef124 100644 --- a/x/oracle/types/test_utils.go +++ b/x/oracle/types/test_utils.go @@ -12,8 +12,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + tmprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1" "github.com/cometbft/cometbft/crypto/secp256k1" - tmprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" ) // OracleDecPrecision nolint diff --git a/x/sudo/keeper/keeper.go b/x/sudo/keeper/keeper.go index e7474b0ee..55920493c 100644 --- a/x/sudo/keeper/keeper.go +++ b/x/sudo/keeper/keeper.go @@ -4,9 +4,9 @@ import ( "context" "fmt" + "cosmossdk.io/store/types" "github.com/NibiruChain/collections" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/nibiru/x/common/set" diff --git a/x/tokenfactory/keeper/keeper.go b/x/tokenfactory/keeper/keeper.go index bc2908d16..e67e084e4 100644 --- a/x/tokenfactory/keeper/keeper.go +++ b/x/tokenfactory/keeper/keeper.go @@ -5,8 +5,8 @@ import ( "github.com/cometbft/cometbft/libs/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/collections" diff --git a/x/tokenfactory/keeper/store.go b/x/tokenfactory/keeper/store.go index a548ba392..897566517 100644 --- a/x/tokenfactory/keeper/store.go +++ b/x/tokenfactory/keeper/store.go @@ -1,9 +1,9 @@ package keeper import ( + storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/collections" sdkcodec "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" tftypes "github.com/NibiruChain/nibiru/x/tokenfactory/types" From 9f5444101980a134ebed20e2e4b392bd07ba60a2 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Wed, 22 May 2024 16:02:48 +0200 Subject: [PATCH 09/22] fix: update sdk.Dec to math.LegacyDec --- app/ante/commission.go | 2 +- app/ante/commission_test.go | 4 ++-- app/ante/errors.go | 4 ++-- eth/rpc/backend/node_info.go | 2 +- eth/rpc/backend/node_info_test.go | 2 +- x/common/dec.go | 9 ++++---- x/common/dec_test.go | 11 +++++----- x/common/ewma/ewma.go | 19 ++++++++-------- x/devgas/v1/ante/ante.go | 2 +- x/devgas/v1/ante/ante_test.go | 2 +- x/devgas/v1/simulation/genesis.go | 5 ++--- x/devgas/v1/types/params.go | 5 ++--- x/inflation/client/cli/tx.go | 8 +++---- x/inflation/keeper/hooks_test.go | 2 +- x/inflation/keeper/inflation.go | 6 ++--- x/inflation/keeper/inflation_test.go | 4 ++-- x/inflation/keeper/params.go | 2 +- x/inflation/keeper/sudo_test.go | 7 +++--- x/inflation/simulation/genesis.go | 3 +-- x/inflation/types/inflation_calculation.go | 5 ++--- .../types/inflation_calculation_test.go | 5 ++--- x/inflation/types/interfaces.go | 2 +- x/inflation/types/params.go | 7 +++--- x/inflation/types/params_test.go | 3 +-- x/oracle/integration/action/price.go | 8 +++---- x/oracle/integration/app_test.go | 11 +++++----- x/oracle/keeper/ballot.go | 4 ++-- x/oracle/keeper/ballot_test.go | 20 ++++++++--------- x/oracle/keeper/keeper.go | 6 ++--- x/oracle/keeper/params.go | 8 +++---- x/oracle/keeper/querier_test.go | 4 ++-- x/oracle/keeper/reward.go | 2 +- x/oracle/keeper/slash_test.go | 2 +- x/oracle/simulation/genesis.go | 17 +++++++------- x/oracle/types/ballot.go | 16 +++++++------- x/oracle/types/ballot_test.go | 10 ++++----- x/oracle/types/expected_keeper.go | 18 +++++++-------- x/oracle/types/msgs.go | 2 +- x/oracle/types/msgs_test.go | 4 ++-- x/oracle/types/test_utils.go | 22 ++++++++++++------- x/oracle/types/vote.go | 6 ++--- 41 files changed, 137 insertions(+), 144 deletions(-) diff --git a/app/ante/commission.go b/app/ante/commission.go index a0fca11da..affae481b 100644 --- a/app/ante/commission.go +++ b/app/ante/commission.go @@ -6,7 +6,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) -func MAX_COMMISSION() sdk.Dec { return math.LegacyMustNewDecFromStr("0.25") } +func MAX_COMMISSION() math.LegacyDec { return math.LegacyMustNewDecFromStr("0.25") } var _ sdk.AnteDecorator = (*AnteDecoratorStakingCommission)(nil) diff --git a/app/ante/commission_test.go b/app/ante/commission_test.go index db96b5776..de79aa9b2 100644 --- a/app/ante/commission_test.go +++ b/app/ante/commission_test.go @@ -32,7 +32,7 @@ func (s *AnteTestSuite) TestAnteDecoratorStakingCommission() { } valAddr := sdk.ValAddress(testutil.AccAddress()).String() - commissionRatePointer := new(sdk.Dec) + commissionRatePointer := new(math.LegacyDec) *commissionRatePointer = math.LegacyNewDecWithPrec(10, 2) happyMsgs := []sdk.Msg{ &stakingtypes.MsgCreateValidator{ @@ -63,7 +63,7 @@ func (s *AnteTestSuite) TestAnteDecoratorStakingCommission() { sadMsgEditVal := new(stakingtypes.MsgEditValidator) *sadMsgEditVal = *(happyMsgs[1]).(*stakingtypes.MsgEditValidator) - newCommissionRate := new(sdk.Dec) + newCommissionRate := new(math.LegacyDec) *newCommissionRate = math.LegacyNewDecWithPrec(26, 2) sadMsgEditVal.CommissionRate = newCommissionRate diff --git a/app/ante/errors.go b/app/ante/errors.go index 5e5ef2bdc..4f4e48865 100644 --- a/app/ante/errors.go +++ b/app/ante/errors.go @@ -2,7 +2,7 @@ package ante import ( sdkerrors "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/math" ) var errorCodeIdx uint32 = 1 @@ -18,7 +18,7 @@ var ( ErrMaxValidatorCommission = registerError("validator commission rate is above max") ) -func NewErrMaxValidatorCommission(gotCommission sdk.Dec) error { +func NewErrMaxValidatorCommission(gotCommission math.LegacyDec) error { return ErrMaxValidatorCommission.Wrapf( "got (%s), max rate is (%s)", gotCommission, MAX_COMMISSION()) } diff --git a/eth/rpc/backend/node_info.go b/eth/rpc/backend/node_info.go index e99cee5d9..7df603588 100644 --- a/eth/rpc/backend/node_info.go +++ b/eth/rpc/backend/node_info.go @@ -275,7 +275,7 @@ func (b *Backend) SetGasPrice(gasPrice hexutil.Big) bool { c := sdk.NewDecCoin(unit, sdkmath.NewIntFromBigInt(gasPrice.ToInt())) - appConf.SetMinGasPrices(sdk.DecCoins{c}) + appConf.SetMinGasPrices(math.LegacyDecCoins{c}) sdkconfig.WriteConfigFile(b.clientCtx.Viper.ConfigFileUsed(), appConf) b.logger.Info("Your configuration file was modified. Please RESTART your node.", "gas-price", c.String()) return true diff --git a/eth/rpc/backend/node_info_test.go b/eth/rpc/backend/node_info_test.go index 87fe46b63..279d95d22 100644 --- a/eth/rpc/backend/node_info_test.go +++ b/eth/rpc/backend/node_info_test.go @@ -257,7 +257,7 @@ func (s *BackendSuite) TestSetEtherbase() { RegisterValidatorAccount(queryClient, s.acc) RegisterParams(queryClient, &header, 1) c := sdk.NewDecCoin(eth.EthBaseDenom, math.NewIntFromBigInt(big.NewInt(1))) - s.backend.cfg.SetMinGasPrices(sdk.DecCoins{c}) + s.backend.cfg.SetMinGasPrices(math.LegacyDecCoins{c}) delAddr, _ := s.backend.GetCoinbase() // account, _ := suite.backend.clientCtx.AccountRetriever.GetAccount(suite.backend.clientCtx, delAddr) delCommonAddr := common.BytesToAddress(delAddr.Bytes()) diff --git a/x/common/dec.go b/x/common/dec.go index 2a62e2c47..0d1e2ffac 100644 --- a/x/common/dec.go +++ b/x/common/dec.go @@ -6,7 +6,6 @@ import ( "strings" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" ) const ( @@ -40,7 +39,7 @@ var ( // - NOTE, MustSqrtDec panics if it is called on a negative number, similar to the // sdk.NewCoin and SqrtBigInt functions. A panic safe version of MustSqrtDec // is available in the SqrtDec method. -func MustSqrtDec(dec sdk.Dec) sdk.Dec { +func MustSqrtDec(dec math.LegacyDec) math.LegacyDec { sqrtBigInt := MustSqrtBigInt(dec.BigInt()) precision := math.LegacyNewDecFromBigInt(PRECISION_MULT) return math.LegacyNewDecFromBigInt(sqrtBigInt).Quo(precision) @@ -53,8 +52,8 @@ func MustSqrtDec(dec sdk.Dec) sdk.Dec { // The big.Int.Sqrt method is part of the standard library, // thoroughly tested, works at seemingly unbound precision (e.g. for numbers as // large as 10**99. -func SqrtDec(dec sdk.Dec) (sdk.Dec, error) { - var sqrtDec sdk.Dec +func SqrtDec(dec math.LegacyDec) (math.LegacyDec, error) { + var sqrtDec math.LegacyDec var panicErr error = TryCatch(func() { sqrtDec = MustSqrtDec(dec) })() @@ -180,7 +179,7 @@ func BankersRound(quo, rem, halfPrecision *big.Int) *big.Int { // Clamp return the value if it is within the clampValue, otherwise return the clampValue. // e.g. Clamp(1.5, 1) = 1, Clamp(-1.5, 1) = -1, Clamp(0.5, 1) = 0.5 -func Clamp(value sdk.Dec, clampValue sdk.Dec) sdk.Dec { +func Clamp(value math.LegacyDec, clampValue math.LegacyDec) math.LegacyDec { if value.GT(clampValue) { return clampValue } else if value.LT(clampValue.Neg()) { diff --git a/x/common/dec_test.go b/x/common/dec_test.go index 70f0a892a..bb3c8a9d0 100644 --- a/x/common/dec_test.go +++ b/x/common/dec_test.go @@ -6,7 +6,6 @@ import ( "testing" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" @@ -44,8 +43,8 @@ func TestSqrtBigInt(t *testing.T) { func TestSqrtDec(t *testing.T) { testCases := []struct { - dec sdk.Dec - sqrtDec sdk.Dec + dec math.LegacyDec + sqrtDec math.LegacyDec }{ // -------------------------------------------------------------------- // Cases: 1 or higher @@ -133,9 +132,9 @@ func TestBankersRound(t *testing.T) { func TestClamp(t *testing.T) { tests := []struct { - value sdk.Dec - clampValue sdk.Dec - expected sdk.Dec + value math.LegacyDec + clampValue math.LegacyDec + expected math.LegacyDec description string }{ { diff --git a/x/common/ewma/ewma.go b/x/common/ewma/ewma.go index 7967d32e5..323b018cf 100644 --- a/x/common/ewma/ewma.go +++ b/x/common/ewma/ewma.go @@ -2,16 +2,15 @@ package ewma import ( "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" ) type MovingAverage interface { - Add(sdk.Dec) - Value() sdk.Dec - Set(sdk.Dec) + Add(math.LegacyDec) + Value() math.LegacyDec + Set(math.LegacyDec) } -func NewMovingAverage(span sdk.Dec) MovingAverage { +func NewMovingAverage(span math.LegacyDec) MovingAverage { return &variableEWMA{ value: math.LegacyZeroDec(), decay: math.LegacyMustNewDecFromStr("2").Quo(span.Add(math.LegacyOneDec())), @@ -19,11 +18,11 @@ func NewMovingAverage(span sdk.Dec) MovingAverage { } type variableEWMA struct { - decay sdk.Dec - value sdk.Dec + decay math.LegacyDec + value math.LegacyDec } -func (v *variableEWMA) Add(dec sdk.Dec) { +func (v *variableEWMA) Add(dec math.LegacyDec) { if v.value.IsZero() { v.value = dec @@ -34,10 +33,10 @@ func (v *variableEWMA) Add(dec sdk.Dec) { v.value = v.value.Mul(math.LegacyOneDec().Sub(v.decay)).Add(dec.Mul(v.decay)) } -func (v *variableEWMA) Value() sdk.Dec { +func (v *variableEWMA) Value() math.LegacyDec { return v.value } -func (v *variableEWMA) Set(dec sdk.Dec) { +func (v *variableEWMA) Set(dec math.LegacyDec) { v.value = dec } diff --git a/x/devgas/v1/ante/ante.go b/x/devgas/v1/ante/ante.go index 1583138bd..27df8327e 100644 --- a/x/devgas/v1/ante/ante.go +++ b/x/devgas/v1/ante/ante.go @@ -168,7 +168,7 @@ func (a DevGasPayoutDecorator) getWithdrawAddressesFromMsgs(ctx sdk.Context, msg // FeePayLogic takes the total fees and splits them based on the governance // params and the number of contracts we are executing on. This returns the // amount of fees each contract developer should get. tested in ante_test.go -func FeePayLogic(fees sdk.Coins, govPercent sdk.Dec, numPairs int) sdk.Coins { +func FeePayLogic(fees sdk.Coins, govPercent math.LegacyDec, numPairs int) sdk.Coins { var splitFees sdk.Coins for _, c := range fees.Sort() { rewardAmount := govPercent.MulInt(c.Amount).QuoInt64(int64(numPairs)).RoundInt() diff --git a/x/devgas/v1/ante/ante_test.go b/x/devgas/v1/ante/ante_test.go index fe520bca7..bc0808f86 100644 --- a/x/devgas/v1/ante/ante_test.go +++ b/x/devgas/v1/ante/ante_test.go @@ -37,7 +37,7 @@ func (suite *AnteTestSuite) TestFeeLogic() { testCases := []struct { name string incomingFee sdk.Coins - govPercent sdk.Dec + govPercent math.LegacyDec numContracts int expectedFeePayment sdk.Coins }{ diff --git a/x/devgas/v1/simulation/genesis.go b/x/devgas/v1/simulation/genesis.go index 24f2c7ba2..0c98b3767 100644 --- a/x/devgas/v1/simulation/genesis.go +++ b/x/devgas/v1/simulation/genesis.go @@ -8,7 +8,6 @@ import ( "math/rand" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/NibiruChain/nibiru/x/devgas/v1/types" @@ -18,12 +17,12 @@ const ( DeveloperFeeShare = "developer_fee_share" ) -func GenDeveloperFeeShare(r *rand.Rand) sdk.Dec { +func GenDeveloperFeeShare(r *rand.Rand) math.LegacyDec { return math.LegacyNewDecWithPrec(int64(r.Intn(100)), 2) } func RandomizedGenState(simState *module.SimulationState) { - var developerFeeShare sdk.Dec + var developerFeeShare math.LegacyDec simState.AppParams.GetOrGenerate( simState.Cdc, DeveloperFeeShare, &developerFeeShare, simState.Rand, func(r *rand.Rand) { developerFeeShare = GenDeveloperFeeShare(r) }, diff --git a/x/devgas/v1/types/params.go b/x/devgas/v1/types/params.go index 433aa4d43..e3a42d5a5 100644 --- a/x/devgas/v1/types/params.go +++ b/x/devgas/v1/types/params.go @@ -4,13 +4,12 @@ import ( "fmt" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" ) // NewParams creates a new Params object func NewParams( enableFeeShare bool, - developerShares sdk.Dec, + developerShares math.LegacyDec, allowedDenoms []string, ) ModuleParams { return ModuleParams{ @@ -38,7 +37,7 @@ func validateBool(i interface{}) error { } func validateShares(i interface{}) error { - v, ok := i.(sdk.Dec) + v, ok := i.(math.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) diff --git a/x/inflation/client/cli/tx.go b/x/inflation/client/cli/tx.go index 5e073a4d3..2f325f163 100644 --- a/x/inflation/client/cli/tx.go +++ b/x/inflation/client/cli/tx.go @@ -98,19 +98,19 @@ $ nibid tx oracle edit-params --staking-proportion 0.6 --community-pool-proporti Sender: clientCtx.GetFromAddress().String(), } - var stakingProportionDec sdk.Dec + var stakingProportionDec math.LegacyDec if stakingProportion, _ := cmd.Flags().GetString("staking-proportion"); stakingProportion != "" { stakingProportionDec = math.LegacyMustNewDecFromStr(stakingProportion) msg.InflationDistribution.StakingRewards = stakingProportionDec } - var communityPoolProportionDec sdk.Dec + var communityPoolProportionDec math.LegacyDec if communityPoolProportion, _ := cmd.Flags().GetString("community-pool-proportion"); communityPoolProportion != "" { communityPoolProportionDec = math.LegacyMustNewDecFromStr(communityPoolProportion) msg.InflationDistribution.CommunityPool = communityPoolProportionDec } - var strategicReservesProportionDec sdk.Dec + var strategicReservesProportionDec math.LegacyDec if strategicReservesProportion, _ := cmd.Flags().GetString("strategic-reserves-proportion"); strategicReservesProportion != "" { strategicReservesProportionDec = math.LegacyMustNewDecFromStr(strategicReservesProportion) msg.InflationDistribution.StrategicReserves = strategicReservesProportionDec @@ -126,7 +126,7 @@ $ nibid tx oracle edit-params --staking-proportion 0.6 --community-pool-proporti if polynomialFactors, _ := cmd.Flags().GetString("polynomial-factors"); polynomialFactors != "" { polynomialFactorsArr := strings.Split(polynomialFactors, ",") - realPolynomialFactors := make([]sdk.Dec, len(polynomialFactorsArr)) + realPolynomialFactors := make([]math.LegacyDec, len(polynomialFactorsArr)) for i, factor := range polynomialFactorsArr { factorDec := math.LegacyMustNewDecFromStr(factor) realPolynomialFactors[i] = factorDec diff --git a/x/inflation/keeper/hooks_test.go b/x/inflation/keeper/hooks_test.go index 73114a535..3c449f36c 100644 --- a/x/inflation/keeper/hooks_test.go +++ b/x/inflation/keeper/hooks_test.go @@ -225,7 +225,7 @@ func TestManual(t *testing.T) { params.EpochsPerPeriod = 30 // y = 3 * x + 3 -> 3 nibi per epoch for period 0, 6 nibi per epoch for period 1 - params.PolynomialFactors = []sdk.Dec{math.LegacyNewDec(3), math.LegacyNewDec(3)} + params.PolynomialFactors = []math.LegacyDec{math.LegacyNewDec(3), math.LegacyNewDec(3)} params.InflationDistribution = types.InflationDistribution{ CommunityPool: math.LegacyZeroDec(), StakingRewards: math.LegacyOneDec(), diff --git a/x/inflation/keeper/inflation.go b/x/inflation/keeper/inflation.go index 67f8ab81f..d8f9175f7 100644 --- a/x/inflation/keeper/inflation.go +++ b/x/inflation/keeper/inflation.go @@ -128,7 +128,7 @@ func (k Keeper) AllocatePolynomialInflation( func (k Keeper) GetProportions( _ sdk.Context, coin sdk.Coin, - proportion sdk.Dec, + proportion math.LegacyDec, ) sdk.Coin { return sdk.Coin{ Denom: coin.Denom, @@ -143,7 +143,7 @@ func (k Keeper) GetCirculatingSupply(ctx sdk.Context, mintDenom string) sdkmath. } // GetInflationRate returns the inflation rate for the current period. -func (k Keeper) GetInflationRate(ctx sdk.Context, mintDenom string) sdk.Dec { +func (k Keeper) GetInflationRate(ctx sdk.Context, mintDenom string) math.LegacyDec { epochMintProvision := k.GetEpochMintProvision(ctx) if epochMintProvision.IsZero() { return math.LegacyZeroDec() @@ -165,7 +165,7 @@ func (k Keeper) GetInflationRate(ctx sdk.Context, mintDenom string) sdk.Dec { // GetEpochMintProvision retrieves necessary params KV storage // and calculate EpochMintProvision -func (k Keeper) GetEpochMintProvision(ctx sdk.Context) sdk.Dec { +func (k Keeper) GetEpochMintProvision(ctx sdk.Context) math.LegacyDec { peek := k.CurrentPeriod.Peek(ctx) return types.CalculateEpochMintProvision( diff --git a/x/inflation/keeper/inflation_test.go b/x/inflation/keeper/inflation_test.go index fe09a54a4..221f34dc4 100644 --- a/x/inflation/keeper/inflation_test.go +++ b/x/inflation/keeper/inflation_test.go @@ -33,7 +33,7 @@ func TestMintAndAllocateInflation(t *testing.T) { expectedCommunityAmt sdk.Coin expectedStakingRewardsBalance sdk.Coin expectedStrategicReservesBalance sdk.Coin - expectedCommunityPoolBalance sdk.DecCoins + expectedCommunityPoolBalance math.LegacyDecCoins rootAccount string }{ { @@ -133,7 +133,7 @@ func TestGetCirculatingSupplyAndInflationRate(t *testing.T) { name string supply sdkmath.Int malleate func(nibiruApp *app.NibiruApp, ctx sdk.Context) - expInflationRate sdk.Dec + expInflationRate math.LegacyDec }{ { "no epochs per period", diff --git a/x/inflation/keeper/params.go b/x/inflation/keeper/params.go index 3068045de..68c7a040b 100644 --- a/x/inflation/keeper/params.go +++ b/x/inflation/keeper/params.go @@ -11,7 +11,7 @@ func (k Keeper) GetParams(ctx sdk.Context) types.Params { return params } -func (k Keeper) GetPolynomialFactors(ctx sdk.Context) (res []sdk.Dec) { +func (k Keeper) GetPolynomialFactors(ctx sdk.Context) (res []math.LegacyDec) { params, _ := k.Params.Get(ctx) return params.PolynomialFactors } diff --git a/x/inflation/keeper/sudo_test.go b/x/inflation/keeper/sudo_test.go index 511719352..be3838467 100644 --- a/x/inflation/keeper/sudo_test.go +++ b/x/inflation/keeper/sudo_test.go @@ -4,7 +4,6 @@ import ( "testing" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" "github.com/NibiruChain/nibiru/x/common/testutil/testapp" @@ -50,7 +49,7 @@ func (s *SuiteInflationSudo) TestMergeInflationParams() { EpochsPerPeriod: &newEpochsPerPeriod, PeriodsPerYear: &newEpochsPerPeriod, MaxPeriod: &newEpochsPerPeriod, - PolynomialFactors: []sdk.Dec{ + PolynomialFactors: []math.LegacyDec{ math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.2"), }, @@ -62,7 +61,7 @@ func (s *SuiteInflationSudo) TestMergeInflationParams() { s.Require().EqualValues(4, paramsAfter.EpochsPerPeriod) s.Require().EqualValues(4, paramsAfter.PeriodsPerYear) s.Require().EqualValues(4, paramsAfter.MaxPeriod) - s.Require().EqualValues([]sdk.Dec{ + s.Require().EqualValues([]math.LegacyDec{ math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.2"), }, paramsAfter.PolynomialFactors) @@ -76,7 +75,7 @@ func (s *SuiteInflationSudo) TestEditInflationParams() { epochsPerPeriod := math.NewInt(1_234) periodsPerYear := math.NewInt(1_234) maxPeriod := math.NewInt(1_234) - polynomialFactors := []sdk.Dec{ + polynomialFactors := []math.LegacyDec{ math.LegacyMustNewDecFromStr("0.1"), math.LegacyMustNewDecFromStr("0.2"), } diff --git a/x/inflation/simulation/genesis.go b/x/inflation/simulation/genesis.go index da5e65c54..338c200b5 100644 --- a/x/inflation/simulation/genesis.go +++ b/x/inflation/simulation/genesis.go @@ -7,7 +7,6 @@ import ( "fmt" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/NibiruChain/nibiru/x/inflation/types" @@ -18,7 +17,7 @@ func RandomizedGenState(simState *module.SimulationState) { inflationGenesis := types.GenesisState{ Params: types.Params{ InflationEnabled: true, - PolynomialFactors: []sdk.Dec{ + PolynomialFactors: []math.LegacyDec{ math.LegacyMustNewDecFromStr("-0.00014851"), math.LegacyMustNewDecFromStr("0.07501029"), math.LegacyMustNewDecFromStr("-19.04983993"), diff --git a/x/inflation/types/inflation_calculation.go b/x/inflation/types/inflation_calculation.go index b62eeb222..ee0aa8846 100644 --- a/x/inflation/types/inflation_calculation.go +++ b/x/inflation/types/inflation_calculation.go @@ -2,14 +2,13 @@ package types import ( "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" ) // CalculateEpochMintProvision returns mint provision per epoch func CalculateEpochMintProvision( params Params, period uint64, -) sdk.Dec { +) math.LegacyDec { if params.EpochsPerPeriod == 0 || !params.InflationEnabled || period >= params.MaxPeriod { return math.LegacyZeroDec() } @@ -29,7 +28,7 @@ func CalculateEpochMintProvision( } // Compute the value of x given the polynomial factors -func polynomial(factors []sdk.Dec, x sdk.Dec) sdk.Dec { +func polynomial(factors []math.LegacyDec, x math.LegacyDec) math.LegacyDec { result := math.LegacyZeroDec() for i, factor := range factors { result = result.Add(factor.Mul(x.Power(uint64(len(factors) - i - 1)))) diff --git a/x/inflation/types/inflation_calculation_test.go b/x/inflation/types/inflation_calculation_test.go index f8a3d83f1..880dc2806 100644 --- a/x/inflation/types/inflation_calculation_test.go +++ b/x/inflation/types/inflation_calculation_test.go @@ -6,12 +6,11 @@ import ( "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" ) // These numbers are for year n month 1 -var ExpectedYearlyInflation = []sdk.Dec{ +var ExpectedYearlyInflation = []math.LegacyDec{ math.LegacyNewDec(193_333_719e6), math.LegacyNewDec(154_304_107e6), math.LegacyNewDec(123_153_673e6), @@ -95,7 +94,7 @@ func TestCalculateEpochMintProvision_ZeroEpochs(t *testing.T) { // withinRange returns an error if the actual value is not within the expected value +/- tolerance // tolerance is a percentage set to 0.01% by default -func withinRange(expected, actual sdk.Dec) error { +func withinRange(expected, actual math.LegacyDec) error { tolerance := math.LegacyNewDecWithPrec(1, 4) if expected.Sub(actual).Abs().Quo(expected).GT(tolerance) { tolerancePercent := tolerance.Mul(math.LegacyNewDec(100)) diff --git a/x/inflation/types/interfaces.go b/x/inflation/types/interfaces.go index 1fccafed4..153cf76f6 100644 --- a/x/inflation/types/interfaces.go +++ b/x/inflation/types/interfaces.go @@ -38,7 +38,7 @@ type DistrKeeper interface { // StakingKeeper expected staking keeper type StakingKeeper interface { // BondedRatio the fraction of the staking tokens which are currently bonded - BondedRatio(ctx sdk.Context) sdk.Dec + BondedRatio(ctx sdk.Context) math.LegacyDec StakingTokenSupply(ctx sdk.Context) sdkmath.Int TotalBondedTokens(ctx sdk.Context) sdkmath.Int } diff --git a/x/inflation/types/params.go b/x/inflation/types/params.go index 1ca46623b..893fda5e8 100644 --- a/x/inflation/types/params.go +++ b/x/inflation/types/params.go @@ -5,7 +5,6 @@ import ( "fmt" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" ) var ( @@ -20,7 +19,7 @@ var ( var ( DefaultInflation = false - DefaultPolynomialFactors = []sdk.Dec{ + DefaultPolynomialFactors = []math.LegacyDec{ math.LegacyMustNewDecFromStr("-0.000147085524"), math.LegacyMustNewDecFromStr("0.074291982762"), math.LegacyMustNewDecFromStr("-18.867415611180"), @@ -39,7 +38,7 @@ var ( ) func NewParams( - polynomialCalculation []sdk.Dec, + polynomialCalculation []math.LegacyDec, inflationDistribution InflationDistribution, inflationEnabled bool, hasInflationStarted bool, @@ -72,7 +71,7 @@ func DefaultParams() Params { } func validatePolynomialFactors(i interface{}) error { - v, ok := i.([]sdk.Dec) + v, ok := i.([]math.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } diff --git a/x/inflation/types/params_test.go b/x/inflation/types/params_test.go index 054dcc19a..49dc6e25b 100644 --- a/x/inflation/types/params_test.go +++ b/x/inflation/types/params_test.go @@ -7,7 +7,6 @@ import ( inflationtypes "github.com/NibiruChain/nibiru/x/inflation/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" ) @@ -50,7 +49,7 @@ func TestParamsValidate(t *testing.T) { { "invalid - polynomial calculation - no coefficient", inflationtypes.Params{ - PolynomialFactors: []sdk.Dec{}, + PolynomialFactors: []math.LegacyDec{}, InflationDistribution: inflationtypes.DefaultInflationDistribution, InflationEnabled: true, HasInflationStarted: true, diff --git a/x/oracle/integration/action/price.go b/x/oracle/integration/action/price.go index 0d80f5e10..9fd5ebc37 100644 --- a/x/oracle/integration/action/price.go +++ b/x/oracle/integration/action/price.go @@ -13,7 +13,7 @@ import ( "github.com/NibiruChain/nibiru/x/oracle/types" ) -func SetOraclePrice(pair asset.Pair, price sdk.Dec) action.Action { +func SetOraclePrice(pair asset.Pair, price math.LegacyDec) action.Action { return &setPairPrice{ Pair: pair, Price: price, @@ -22,7 +22,7 @@ func SetOraclePrice(pair asset.Pair, price sdk.Dec) action.Action { type setPairPrice struct { Pair asset.Pair - Price sdk.Dec + Price math.LegacyDec } func (s setPairPrice) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { @@ -31,7 +31,7 @@ func (s setPairPrice) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, erro return ctx, nil } -func InsertOraclePriceSnapshot(pair asset.Pair, time time.Time, price sdk.Dec) action.Action { +func InsertOraclePriceSnapshot(pair asset.Pair, time time.Time, price math.LegacyDec) action.Action { return &insertOraclePriceSnapshot{ Pair: pair, Time: time, @@ -42,7 +42,7 @@ func InsertOraclePriceSnapshot(pair asset.Pair, time time.Time, price sdk.Dec) a type insertOraclePriceSnapshot struct { Pair asset.Pair Time time.Time - Price sdk.Dec + Price math.LegacyDec } func (s insertOraclePriceSnapshot) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { diff --git a/x/oracle/integration/app_test.go b/x/oracle/integration/app_test.go index d8e46a3be..4ae8258fd 100644 --- a/x/oracle/integration/app_test.go +++ b/x/oracle/integration/app_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -69,7 +68,7 @@ func (s *IntegrationTestSuite) TestSuccessfulVoting() { // so obviously, in this case, since validators have the same power // once weight (based on power) >= total power (sum of weights) // then the number picked is the one in the middle always. - prices := []map[asset.Pair]sdk.Dec{ + prices := []map[asset.Pair]math.LegacyDec{ { "nibi:usdc": math.LegacyOneDec(), "btc:usdc": math.LegacyMustNewDecFromStr("100203.0"), @@ -97,7 +96,7 @@ func (s *IntegrationTestSuite) TestSuccessfulVoting() { gotPrices := s.currentPrices() require.Equal(s.T(), - map[asset.Pair]sdk.Dec{ + map[asset.Pair]math.LegacyDec{ "nibi:usdc": math.LegacyOneDec(), "btc:usdc": math.LegacyMustNewDecFromStr("100200.9"), }, @@ -105,7 +104,7 @@ func (s *IntegrationTestSuite) TestSuccessfulVoting() { ) } -func (s *IntegrationTestSuite) sendPrevotes(prices []map[asset.Pair]sdk.Dec) []string { +func (s *IntegrationTestSuite) sendPrevotes(prices []map[asset.Pair]math.LegacyDec) []string { strVotes := make([]string, len(prices)) for i, val := range s.network.Validators { raw := prices[i] @@ -161,11 +160,11 @@ func (s *IntegrationTestSuite) waitPriceUpdateBlock() { s.waitVoteRevealBlock() } -func (s *IntegrationTestSuite) currentPrices() map[asset.Pair]sdk.Dec { +func (s *IntegrationTestSuite) currentPrices() map[asset.Pair]math.LegacyDec { rawRates, err := types.NewQueryClient(s.network.Validators[0].ClientCtx).ExchangeRates(context.Background(), &types.QueryExchangeRatesRequest{}) require.NoError(s.T(), err) - prices := make(map[asset.Pair]sdk.Dec) + prices := make(map[asset.Pair]math.LegacyDec) for _, p := range rawRates.ExchangeRates { prices[p.Pair] = p.ExchangeRate diff --git a/x/oracle/keeper/ballot.go b/x/oracle/keeper/ballot.go index bf873c7c5..9a309f8ba 100644 --- a/x/oracle/keeper/ballot.go +++ b/x/oracle/keeper/ballot.go @@ -148,9 +148,9 @@ func (k Keeper) removeInvalidVotes( // made by the validators. func Tally( votes types.ExchangeRateVotes, - rewardBand sdk.Dec, + rewardBand math.LegacyDec, validatorPerformances types.ValidatorPerformances, -) sdk.Dec { +) math.LegacyDec { weightedMedian := votes.WeightedMedianWithAssertion() standardDeviation := votes.StandardDeviation(weightedMedian) rewardSpread := weightedMedian.Mul(rewardBand.QuoInt64(2)) diff --git a/x/oracle/keeper/ballot_test.go b/x/oracle/keeper/ballot_test.go index 9245d5dd5..1bf5e3574 100644 --- a/x/oracle/keeper/ballot_test.go +++ b/x/oracle/keeper/ballot_test.go @@ -153,7 +153,7 @@ func TestFuzzTally(t *testing.T) { validators := map[string]int64{} f := fuzz.New().NilChance(0).Funcs( - func(e *sdk.Dec, c fuzz.Continue) { + func(e *math.LegacyDec, c fuzz.Continue) { *e = math.LegacyNewDec(c.Int63()) }, func(e *map[string]int64, c fuzz.Continue) { @@ -175,7 +175,7 @@ func TestFuzzTally(t *testing.T) { for addr, power := range validators { addr, _ := sdk.ValAddressFromBech32(addr) - var rate sdk.Dec + var rate math.LegacyDec c.Fuzz(&rate) votes = append(votes, types.NewExchangeRateVote(rate, asset.NewPair(c.RandString(), c.RandString()), addr, power)) @@ -194,7 +194,7 @@ func TestFuzzTally(t *testing.T) { votes := types.ExchangeRateVotes{} f.Fuzz(&votes) - var rewardBand sdk.Dec + var rewardBand math.LegacyDec f.Fuzz(&rewardBand) require.NotPanics(t, func() { @@ -249,13 +249,13 @@ func TestRemoveInvalidBallots(t *testing.T) { name: "nonempty key, nonempty votes, whitelisted", voteMap: VoteMap{ "x": types.ExchangeRateVotes{ - {Pair: "x", ExchangeRate: sdk.Dec{}, Voter: sdk.ValAddress{123}, Power: 5}, + {Pair: "x", ExchangeRate: math.LegacyDec{}, Voter: sdk.ValAddress{123}, Power: 5}, }, asset.Registry.Pair(denoms.BTC, denoms.NUSD): types.ExchangeRateVotes{ - {Pair: asset.Registry.Pair(denoms.BTC, denoms.NUSD), ExchangeRate: sdk.Dec{}, Voter: sdk.ValAddress{123}, Power: 5}, + {Pair: asset.Registry.Pair(denoms.BTC, denoms.NUSD), ExchangeRate: math.LegacyDec{}, Voter: sdk.ValAddress{123}, Power: 5}, }, asset.Registry.Pair(denoms.ETH, denoms.NUSD): types.ExchangeRateVotes{ - {Pair: asset.Registry.Pair(denoms.BTC, denoms.NUSD), ExchangeRate: sdk.Dec{}, Voter: sdk.ValAddress{123}, Power: 5}, + {Pair: asset.Registry.Pair(denoms.BTC, denoms.NUSD), ExchangeRate: math.LegacyDec{}, Voter: sdk.ValAddress{123}, Power: 5}, }, }, }, @@ -289,12 +289,12 @@ func TestFuzzPickReferencePair(t *testing.T) { *e = append(*e, asset.NewPair(testutil.RandLetters(5), testutil.RandLetters(5))) } }, - func(e *sdk.Dec, c fuzz.Continue) { + func(e *math.LegacyDec, c fuzz.Continue) { *e = math.LegacyNewDec(c.Int63()) }, - func(e *map[asset.Pair]sdk.Dec, c fuzz.Continue) { + func(e *map[asset.Pair]math.LegacyDec, c fuzz.Continue) { for _, pair := range pairs { - var rate sdk.Dec + var rate math.LegacyDec c.Fuzz(&rate) (*e)[pair] = rate @@ -315,7 +315,7 @@ func TestFuzzPickReferencePair(t *testing.T) { for addr, power := range validators { addr, _ := sdk.ValAddressFromBech32(addr) - var rate sdk.Dec + var rate math.LegacyDec c.Fuzz(&rate) votes = append(votes, types.NewExchangeRateVote(rate, pair, addr, power)) diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 52b22c2ac..9d3a07d7b 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -127,7 +127,7 @@ func (k Keeper) ValidateFeeder( return nil } -func (k Keeper) GetExchangeRateTwap(ctx sdk.Context, pair asset.Pair) (price sdk.Dec, err error) { +func (k Keeper) GetExchangeRateTwap(ctx sdk.Context, pair asset.Pair) (price math.LegacyDec, err error) { params, err := k.Params.Get(ctx) if err != nil { return math.LegacyOneDec().Neg(), err @@ -181,14 +181,14 @@ func (k Keeper) GetExchangeRateTwap(ctx sdk.Context, pair asset.Pair) (price sdk return cumulativePrice.QuoInt64(ctx.BlockTime().UnixMilli() - firstTimestampMs), nil } -func (k Keeper) GetExchangeRate(ctx sdk.Context, pair asset.Pair) (price sdk.Dec, err error) { +func (k Keeper) GetExchangeRate(ctx sdk.Context, pair asset.Pair) (price math.LegacyDec, err error) { exchangeRate, err := k.ExchangeRates.Get(ctx, pair) price = exchangeRate.ExchangeRate return } // SetPrice sets the price for a pair as well as the price snapshot. -func (k Keeper) SetPrice(ctx sdk.Context, pair asset.Pair, price sdk.Dec) { +func (k Keeper) SetPrice(ctx sdk.Context, pair asset.Pair, price math.LegacyDec) { k.ExchangeRates.Insert(ctx, pair, types.DatedPrice{ExchangeRate: price, CreatedBlock: uint64(ctx.BlockHeight())}) key := collections.Join(pair, ctx.BlockTime()) diff --git a/x/oracle/keeper/params.go b/x/oracle/keeper/params.go index f45f7b3fb..0c67443c1 100644 --- a/x/oracle/keeper/params.go +++ b/x/oracle/keeper/params.go @@ -19,7 +19,7 @@ func (k Keeper) VotePeriod(ctx sdk.Context) (res uint64) { } // VoteThreshold returns the minimum percentage of votes that must be received for a votes to pass. -func (k Keeper) VoteThreshold(ctx sdk.Context) (res sdk.Dec) { +func (k Keeper) VoteThreshold(ctx sdk.Context) (res math.LegacyDec) { params, _ := k.Params.Get(ctx) return params.VoteThreshold } @@ -40,7 +40,7 @@ func (k Keeper) MinVoters(ctx sdk.Context) (res uint64) { // then rewards are added to the validator performance. // Note that if the reward band is smaller than 1 standard // deviation, the band is taken to be 1 standard deviation. -func (k Keeper) RewardBand(ctx sdk.Context) (res sdk.Dec) { +func (k Keeper) RewardBand(ctx sdk.Context) (res math.LegacyDec) { params, _ := k.Params.Get(ctx) return params.RewardBand } @@ -52,7 +52,7 @@ func (k Keeper) Whitelist(ctx sdk.Context) (res []asset.Pair) { } // SlashFraction returns oracle voting penalty rate -func (k Keeper) SlashFraction(ctx sdk.Context) (res sdk.Dec) { +func (k Keeper) SlashFraction(ctx sdk.Context) (res math.LegacyDec) { params, _ := k.Params.Get(ctx) return params.SlashFraction } @@ -67,7 +67,7 @@ func (k Keeper) SlashWindow(ctx sdk.Context) (res uint64) { } // MinValidPerWindow returns oracle slashing threshold -func (k Keeper) MinValidPerWindow(ctx sdk.Context) (res sdk.Dec) { +func (k Keeper) MinValidPerWindow(ctx sdk.Context) (res math.LegacyDec) { params, _ := k.Params.Get(ctx) return params.MinValidPerWindow } diff --git a/x/oracle/keeper/querier_test.go b/x/oracle/keeper/querier_test.go index be92c347d..89a8f4818 100644 --- a/x/oracle/keeper/querier_test.go +++ b/x/oracle/keeper/querier_test.go @@ -126,8 +126,8 @@ func TestCalcTwap(t *testing.T) { currentBlockTime time.Time currentBlockHeight int64 lookbackInterval time.Duration - assetAmount sdk.Dec - expectedPrice sdk.Dec + assetAmount math.LegacyDec + expectedPrice math.LegacyDec expectedErr error }{ // expected price: (9.5 * (35 - 30) + 8.5 * (30 - 20) + 9.0 * (20 - 5)) / 30 = 8.916666 diff --git a/x/oracle/keeper/reward.go b/x/oracle/keeper/reward.go index 35688c2da..2d0bfc923 100644 --- a/x/oracle/keeper/reward.go +++ b/x/oracle/keeper/reward.go @@ -37,7 +37,7 @@ func (k Keeper) rewardWinners( return } - var totalRewards sdk.DecCoins + var totalRewards math.LegacyDecCoins rewards := k.GatherRewardsForVotePeriod(ctx) totalRewards = totalRewards.Add(sdk.NewDecCoinsFromCoins(rewards...)...) diff --git a/x/oracle/keeper/slash_test.go b/x/oracle/keeper/slash_test.go index 51f8d0436..462f742cc 100644 --- a/x/oracle/keeper/slash_test.go +++ b/x/oracle/keeper/slash_test.go @@ -173,7 +173,7 @@ func TestWhitelistSlashing(t *testing.T) { minValidVotePeriodsPerWindow := input.OracleKeeper.MinValidPerWindow(input.Ctx) pair := asset.Registry.Pair(denoms.ATOM, denoms.USD) - priceVoteFromVal := func(valIdx int, block int64, erate sdk.Dec) { + priceVoteFromVal := func(valIdx int, block int64, erate math.LegacyDec) { MakeAggregatePrevoteAndVote(t, input, msgServer, block, types.ExchangeRateTuples{{Pair: pair, ExchangeRate: erate}}, valIdx) diff --git a/x/oracle/simulation/genesis.go b/x/oracle/simulation/genesis.go index 3bae9471b..fb69ca617 100644 --- a/x/oracle/simulation/genesis.go +++ b/x/oracle/simulation/genesis.go @@ -11,7 +11,6 @@ import ( "github.com/NibiruChain/nibiru/x/common/denoms" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/NibiruChain/nibiru/x/oracle/types" @@ -32,12 +31,12 @@ func GenVotePeriod(r *rand.Rand) uint64 { } // GenVoteThreshold randomized VoteThreshold -func GenVoteThreshold(r *rand.Rand) sdk.Dec { +func GenVoteThreshold(r *rand.Rand) math.LegacyDec { return math.LegacyNewDecWithPrec(333, 3).Add(math.LegacyNewDecWithPrec(int64(r.Intn(333)), 3)) } // GenRewardBand randomized RewardBand -func GenRewardBand(r *rand.Rand) sdk.Dec { +func GenRewardBand(r *rand.Rand) math.LegacyDec { return math.LegacyZeroDec().Add(math.LegacyNewDecWithPrec(int64(r.Intn(100)), 3)) } @@ -47,7 +46,7 @@ func GenRewardDistributionWindow(r *rand.Rand) uint64 { } // GenSlashFraction randomized SlashFraction -func GenSlashFraction(r *rand.Rand) sdk.Dec { +func GenSlashFraction(r *rand.Rand) math.LegacyDec { return math.LegacyZeroDec().Add(math.LegacyNewDecWithPrec(int64(r.Intn(100)), 3)) } @@ -57,25 +56,25 @@ func GenSlashWindow(r *rand.Rand) uint64 { } // GenMinValidPerWindow randomized MinValidPerWindow -func GenMinValidPerWindow(r *rand.Rand) sdk.Dec { +func GenMinValidPerWindow(r *rand.Rand) math.LegacyDec { return math.LegacyZeroDec().Add(math.LegacyNewDecWithPrec(int64(r.Intn(500)), 3)) } // RandomizedGenState generates a random GenesisState for oracle func RandomizedGenState(simState *module.SimulationState) { - var voteThreshold sdk.Dec + var voteThreshold math.LegacyDec simState.AppParams.GetOrGenerate( simState.Cdc, voteThresholdKey, &voteThreshold, simState.Rand, func(r *rand.Rand) { voteThreshold = GenVoteThreshold(r) }, ) - var rewardBand sdk.Dec + var rewardBand math.LegacyDec simState.AppParams.GetOrGenerate( simState.Cdc, rewardBandKey, &rewardBand, simState.Rand, func(r *rand.Rand) { rewardBand = GenRewardBand(r) }, ) - var slashFraction sdk.Dec + var slashFraction math.LegacyDec simState.AppParams.GetOrGenerate( simState.Cdc, slashFractionKey, &slashFraction, simState.Rand, func(r *rand.Rand) { slashFraction = GenSlashFraction(r) }, @@ -87,7 +86,7 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { slashWindow = GenSlashWindow(r) }, ) - var minValidPerWindow sdk.Dec + var minValidPerWindow math.LegacyDec simState.AppParams.GetOrGenerate( simState.Cdc, minValidPerWindowKey, &minValidPerWindow, simState.Rand, func(r *rand.Rand) { minValidPerWindow = GenMinValidPerWindow(r) }, diff --git a/x/oracle/types/ballot.go b/x/oracle/types/ballot.go index 4311db6fc..ec402d4ce 100644 --- a/x/oracle/types/ballot.go +++ b/x/oracle/types/ballot.go @@ -17,13 +17,13 @@ import ( // ExchangeRateVote is a convenience wrapper to reduce redundant lookup cost type ExchangeRateVote struct { Pair asset.Pair - ExchangeRate sdk.Dec // aka price + ExchangeRate math.LegacyDec // aka price Voter sdk.ValAddress Power int64 // how much tendermint consensus power this vote should have } // NewExchangeRateVote returns a new ExchangeRateVote instance -func NewExchangeRateVote(rate sdk.Dec, pair asset.Pair, voter sdk.ValAddress, power int64) ExchangeRateVote { +func NewExchangeRateVote(rate math.LegacyDec, pair asset.Pair, voter sdk.ValAddress, power int64) ExchangeRateVote { return ExchangeRateVote{ ExchangeRate: rate, Pair: pair, @@ -36,8 +36,8 @@ func NewExchangeRateVote(rate sdk.Dec, pair asset.Pair, voter sdk.ValAddress, po type ExchangeRateVotes []ExchangeRateVote // ToMap return organized exchange rate map by validator -func (pb ExchangeRateVotes) ToMap() map[string]sdk.Dec { - validatorExchangeRateMap := make(map[string]sdk.Dec) +func (pb ExchangeRateVotes) ToMap() map[string]math.LegacyDec { + validatorExchangeRateMap := make(map[string]math.LegacyDec) for _, vote := range pb { if vote.ExchangeRate.IsPositive() { validatorExchangeRateMap[string(vote.Voter)] = vote.ExchangeRate @@ -48,7 +48,7 @@ func (pb ExchangeRateVotes) ToMap() map[string]sdk.Dec { } // ToCrossRate return cross_rate(base/exchange_rate) votes -func (pb ExchangeRateVotes) ToCrossRate(bases map[string]sdk.Dec) (cb ExchangeRateVotes) { +func (pb ExchangeRateVotes) ToCrossRate(bases map[string]math.LegacyDec) (cb ExchangeRateVotes) { for i := range pb { vote := pb[i] @@ -89,7 +89,7 @@ func (v ExchangeRateVotes) Power() int64 { // WeightedMedian returns the median weighted by the power of the ExchangeRateVote. // CONTRACT: votes must be sorted -func (votes ExchangeRateVotes) WeightedMedian() sdk.Dec { +func (votes ExchangeRateVotes) WeightedMedian() math.LegacyDec { totalPower := votes.Power() if votes.Len() > 0 { pivot := int64(0) @@ -106,7 +106,7 @@ func (votes ExchangeRateVotes) WeightedMedian() sdk.Dec { } // WeightedMedianWithAssertion returns the median weighted by the power of the ExchangeRateVote. -func (pb ExchangeRateVotes) WeightedMedianWithAssertion() sdk.Dec { +func (pb ExchangeRateVotes) WeightedMedianWithAssertion() math.LegacyDec { sort.Sort(pb) totalPower := pb.Power() if pb.Len() > 0 { @@ -124,7 +124,7 @@ func (pb ExchangeRateVotes) WeightedMedianWithAssertion() sdk.Dec { } // StandardDeviation returns the standard deviation by the power of the ExchangeRateVote. -func (pb ExchangeRateVotes) StandardDeviation(median sdk.Dec) (standardDeviation sdk.Dec) { +func (pb ExchangeRateVotes) StandardDeviation(median math.LegacyDec) (standardDeviation math.LegacyDec) { if len(pb) == 0 { return math.LegacyZeroDec() } diff --git a/x/oracle/types/ballot_test.go b/x/oracle/types/ballot_test.go index a626ace12..7ff5e2b53 100644 --- a/x/oracle/types/ballot_test.go +++ b/x/oracle/types/ballot_test.go @@ -68,9 +68,9 @@ func TestExchangeRateVotesToMap(t *testing.T) { func TestToCrossRate(t *testing.T) { data := []struct { - base sdk.Dec - quote sdk.Dec - expected sdk.Dec + base math.LegacyDec + quote math.LegacyDec + expected math.LegacyDec }{ { base: math.LegacyNewDec(1600), @@ -168,7 +168,7 @@ func TestPBWeightedMedian(t *testing.T) { inputs []int64 weights []int64 isValidator []bool - median sdk.Dec + median math.LegacyDec }{ { // Supermajority one number @@ -237,7 +237,7 @@ func TestPBStandardDeviation(t *testing.T) { inputs []float64 weights []int64 isValidator []bool - standardDeviation sdk.Dec + standardDeviation math.LegacyDec }{ { // Supermajority one number diff --git a/x/oracle/types/expected_keeper.go b/x/oracle/types/expected_keeper.go index c50f4b987..60cf0a1ee 100644 --- a/x/oracle/types/expected_keeper.go +++ b/x/oracle/types/expected_keeper.go @@ -9,26 +9,26 @@ import ( // StakingKeeper is expected keeper for staking module type StakingKeeper interface { - Validator(ctx sdk.Context, address sdk.ValAddress) stakingtypes.ValidatorI // get validator by operator address; nil when validator not found - TotalBondedTokens(sdk.Context) sdkmath.Int // total bonded tokens within the validator set - Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) sdkmath.Int // slash the validator and delegators of the validator, specifying offense height, offense power, and slash fraction - Jail(sdk.Context, sdk.ConsAddress) // jail a validator - ValidatorsPowerStoreIterator(ctx sdk.Context) sdk.Iterator // an iterator for the current validator power store - MaxValidators(sdk.Context) uint32 // MaxValidators returns the maximum amount of bonded validators + Validator(ctx sdk.Context, address sdk.ValAddress) stakingtypes.ValidatorI // get validator by operator address; nil when validator not found + TotalBondedTokens(sdk.Context) sdkmath.Int // total bonded tokens within the validator set + Slash(sdk.Context, sdk.ConsAddress, int64, int64, math.LegacyDec) sdkmath.Int // slash the validator and delegators of the validator, specifying offense height, offense power, and slash fraction + Jail(sdk.Context, sdk.ConsAddress) // jail a validator + ValidatorsPowerStoreIterator(ctx sdk.Context) sdk.Iterator // an iterator for the current validator power store + MaxValidators(sdk.Context) uint32 // MaxValidators returns the maximum amount of bonded validators PowerReduction(ctx sdk.Context) (res sdkmath.Int) } type SlashingKeeper interface { - Slash(ctx sdk.Context, consAddr sdk.ConsAddress, fraction sdk.Dec, power int64, height int64) + Slash(ctx sdk.Context, consAddr sdk.ConsAddress, fraction math.LegacyDec, power int64, height int64) Jail(sdk.Context, sdk.ConsAddress) } // DistributionKeeper is expected keeper for distribution module type DistributionKeeper interface { - AllocateTokensToValidator(ctx sdk.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins) + AllocateTokensToValidator(ctx sdk.Context, val stakingtypes.ValidatorI, tokens math.LegacyDecCoins) // only used for simulation - GetValidatorOutstandingRewardsCoins(ctx sdk.Context, val sdk.ValAddress) sdk.DecCoins + GetValidatorOutstandingRewardsCoins(ctx sdk.Context, val sdk.ValAddress) math.LegacyDecCoins } // AccountKeeper is expected keeper for auth module diff --git a/x/oracle/types/msgs.go b/x/oracle/types/msgs.go index 317566226..3973554c2 100644 --- a/x/oracle/types/msgs.go +++ b/x/oracle/types/msgs.go @@ -139,7 +139,7 @@ func (msg MsgAggregateExchangeRateVote) ValidateBasic() error { for _, exchangeRate := range exchangeRates { // Check overflow bit length - if exchangeRate.ExchangeRate.BigInt().BitLen() > 255+sdk.DecimalPrecisionBits { + if exchangeRate.ExchangeRate.BigInt().BitLen() > 255+math.LegacyDecimalPrecisionBits { return sdkerrors.Wrap(ErrInvalidExchangeRate, "overflow") } } diff --git a/x/oracle/types/msgs_test.go b/x/oracle/types/msgs_test.go index 9f1d9c8f8..ab647d923 100644 --- a/x/oracle/types/msgs_test.go +++ b/x/oracle/types/msgs_test.go @@ -45,12 +45,12 @@ func TestMsgAggregateExchangeRatePrevote(t *testing.T) { sdk.AccAddress([]byte("addr1_______________")), } - exchangeRates := sdk.DecCoins{sdk.NewDecCoinFromDec(denoms.USDC, math.LegacyOneDec()), sdk.NewDecCoinFromDec(denoms.NUSD, math.LegacyNewDecWithPrec(32121, 1))} + exchangeRates := math.LegacyDecCoins{sdk.NewDecCoinFromDec(denoms.USDC, math.LegacyOneDec()), sdk.NewDecCoinFromDec(denoms.NUSD, math.LegacyNewDecWithPrec(32121, 1))} bz := types.GetAggregateVoteHash("1", exchangeRates.String(), sdk.ValAddress(addrs[0])) tests := []struct { hash types.AggregateVoteHash - exchangeRates sdk.DecCoins + exchangeRates math.LegacyDecCoins voter sdk.AccAddress expectPass bool }{ diff --git a/x/oracle/types/test_utils.go b/x/oracle/types/test_utils.go index 90faef124..7edb27486 100644 --- a/x/oracle/types/test_utils.go +++ b/x/oracle/types/test_utils.go @@ -82,7 +82,7 @@ func (DummyStakingKeeper) TotalBondedTokens(_ sdk.Context) sdk.Int { } // Slash nolint -func (DummyStakingKeeper) Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) sdkmath.Int { +func (DummyStakingKeeper) Slash(sdk.Context, sdk.ConsAddress, int64, int64, math.LegacyDec) sdkmath.Int { return sdkmath.ZeroInt() } @@ -140,17 +140,23 @@ func (v MockValidator) GetBondedTokens() sdk.Int { } func (v MockValidator) GetConsensusPower(powerReduction sdk.Int) int64 { return v.power } func (v *MockValidator) SetConsensusPower(power int64) { v.power = power } -func (v MockValidator) GetCommission() sdk.Dec { return sdkmath.LegacyZeroDec() } +func (v MockValidator) GetCommission() math.LegacyDec { return sdkmath.LegacyZeroDec() } func (v MockValidator) GetMinSelfDelegation() sdk.Int { return sdkmath.OneInt() } -func (v MockValidator) GetDelegatorShares() sdk.Dec { return sdkmath.LegacyNewDec(v.power) } -func (v MockValidator) TokensFromShares(sdk.Dec) sdk.Dec { return sdkmath.LegacyZeroDec() } -func (v MockValidator) TokensFromSharesTruncated(sdk.Dec) sdk.Dec { return sdkmath.LegacyZeroDec() } -func (v MockValidator) TokensFromSharesRoundUp(sdk.Dec) sdk.Dec { return sdkmath.LegacyZeroDec() } -func (v MockValidator) SharesFromTokens(amt sdk.Int) (sdk.Dec, error) { +func (v MockValidator) GetDelegatorShares() math.LegacyDec { return sdkmath.LegacyNewDec(v.power) } +func (v MockValidator) TokensFromShares(math.LegacyDec) math.LegacyDec { + return sdkmath.LegacyZeroDec() +} +func (v MockValidator) TokensFromSharesTruncated(math.LegacyDec) math.LegacyDec { + return sdkmath.LegacyZeroDec() +} +func (v MockValidator) TokensFromSharesRoundUp(math.LegacyDec) math.LegacyDec { + return sdkmath.LegacyZeroDec() +} +func (v MockValidator) SharesFromTokens(amt sdk.Int) (math.LegacyDec, error) { return sdkmath.LegacyZeroDec(), nil } -func (v MockValidator) SharesFromTokensTruncated(amt sdk.Int) (sdk.Dec, error) { +func (v MockValidator) SharesFromTokensTruncated(amt sdk.Int) (math.LegacyDec, error) { return sdkmath.LegacyZeroDec(), nil } diff --git a/x/oracle/types/vote.go b/x/oracle/types/vote.go index 5a74eecc8..6a01c1458 100644 --- a/x/oracle/types/vote.go +++ b/x/oracle/types/vote.go @@ -37,7 +37,7 @@ func NewAggregateExchangeRateVote(exchangeRateTuples ExchangeRateTuples, voter s } // NewExchangeRateTuple creates a ExchangeRateTuple instance -func NewExchangeRateTuple(pair asset.Pair, exchangeRate sdk.Dec) ExchangeRateTuple { +func NewExchangeRateTuple(pair asset.Pair, exchangeRate math.LegacyDec) ExchangeRateTuple { return ExchangeRateTuple{ pair, exchangeRate, @@ -97,8 +97,8 @@ func NewExchangeRateTupleFromString(s string) (ExchangeRateTuple, error) { // ExchangeRateTuples - array of ExchangeRateTuple type ExchangeRateTuples []ExchangeRateTuple -func (tuples ExchangeRateTuples) ToMap() (exchangeRateMap map[asset.Pair]sdk.Dec) { - exchangeRateMap = make(map[asset.Pair]sdk.Dec) +func (tuples ExchangeRateTuples) ToMap() (exchangeRateMap map[asset.Pair]math.LegacyDec) { + exchangeRateMap = make(map[asset.Pair]math.LegacyDec) for _, tuple := range tuples { exchangeRateMap[tuple.Pair] = tuple.ExchangeRate } From aab03440d94e33b60c136c2e783154203e223b2d Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Wed, 22 May 2024 16:07:02 +0200 Subject: [PATCH 10/22] fix: migrate sdk.Gas to storetypes --- app/ante/fixed_gas_test.go | 3 ++- app/ante/gas.go | 16 +++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/ante/fixed_gas_test.go b/app/ante/fixed_gas_test.go index 264a66ab6..9067646cf 100644 --- a/app/ante/fixed_gas_test.go +++ b/app/ante/fixed_gas_test.go @@ -7,6 +7,7 @@ import ( sdkioerrors "cosmossdk.io/errors" "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -26,7 +27,7 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() { tests := []struct { name string messages []sdk.Msg - expectedGas sdk.Gas + expectedGas storetypes.Gas expectedErr error }{ { diff --git a/app/ante/gas.go b/app/ante/gas.go index f9c551633..591e5f93d 100644 --- a/app/ante/gas.go +++ b/app/ante/gas.go @@ -4,30 +4,28 @@ import ( "fmt" storetypes "cosmossdk.io/store/types" - - "github.com/cosmos/cosmos-sdk/types" ) type fixedGasMeter struct { - consumed types.Gas + consumed storetypes.Gas } // NewFixedGasMeter returns a reference to a new fixedGasMeter. -func NewFixedGasMeter(fixedGas types.Gas) types.GasMeter { +func NewFixedGasMeter(fixedGas storetypes.Gas) storetypes.GasMeter { return &fixedGasMeter{ consumed: fixedGas, } } -func (g *fixedGasMeter) GasConsumed() types.Gas { +func (g *fixedGasMeter) GasConsumed() storetypes.Gas { return g.consumed } -func (g *fixedGasMeter) GasConsumedToLimit() types.Gas { +func (g *fixedGasMeter) GasConsumedToLimit() storetypes.Gas { return g.consumed } -func (g *fixedGasMeter) Limit() types.Gas { +func (g *fixedGasMeter) Limit() storetypes.Gas { return g.consumed } @@ -35,8 +33,8 @@ func (g *fixedGasMeter) GasRemaining() storetypes.Gas { return g.consumed } -func (g *fixedGasMeter) ConsumeGas(types.Gas, string) {} -func (g *fixedGasMeter) RefundGas(types.Gas, string) {} +func (g *fixedGasMeter) ConsumeGas(storetypes.Gas, string) {} +func (g *fixedGasMeter) RefundGas(storetypes.Gas, string) {} func (g *fixedGasMeter) IsPastLimit() bool { return false From d41e51f54fd36920b1ecb7d348ed8ae61134f54a Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Wed, 22 May 2024 19:10:11 +0200 Subject: [PATCH 11/22] fix: fix ante module --- app/ante/fixed_gas_test.go | 2 +- app/ante/testutil_test.go | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/ante/fixed_gas_test.go b/app/ante/fixed_gas_test.go index 9067646cf..942c286d6 100644 --- a/app/ante/fixed_gas_test.go +++ b/app/ante/fixed_gas_test.go @@ -219,7 +219,7 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() { suite.NoError(suite.txBuilder.SetMsgs(tc.messages...)) privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{11}, []uint64{0} - tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + tx, err := suite.CreateTestTx(suite.ctx, privs, accNums, accSeqs, suite.ctx.ChainID()) suite.NoErrorf(err, "tx: %v", tx) suite.NoError(tx.ValidateBasic()) suite.ValidateTx(tx, suite.T()) diff --git a/app/ante/testutil_test.go b/app/ante/testutil_test.go index d0ca41fea..ea553e330 100644 --- a/app/ante/testutil_test.go +++ b/app/ante/testutil_test.go @@ -1,6 +1,7 @@ package ante_test import ( + "context" "testing" "time" @@ -41,7 +42,8 @@ func (suite *AnteTestSuite) SetupTest() { encodingConfig := app.MakeEncodingConfig() suite.app = testapp.NewNibiruTestApp(app.NewDefaultGenesisState(encodingConfig.Codec)) chainId := "test-chain-id" - ctx := suite.app.NewContext(true, tmproto.Header{ + ctx := suite.app.NewContext(true) + ctx.WithBlockHeader(tmproto.Header{ Height: 1, ChainID: chainId, Time: time.Now().UTC(), @@ -54,7 +56,7 @@ func (suite *AnteTestSuite) SetupTest() { WithChainID(chainId). WithLegacyAmino(encodingConfig.Amino) - err := suite.app.AccountKeeper.SetParams(ctx, authtypes.DefaultParams()) + err := suite.app.AccountKeeper.Params.Set(ctx, authtypes.DefaultParams()) suite.Require().NoError(err) params := suite.app.AccountKeeper.GetParams(ctx) suite.Require().NoError(params.Validate()) @@ -84,15 +86,17 @@ func (suite *AnteTestSuite) SetupTest() { } // CreateTestTx is a helper function to create a tx given multiple inputs. -func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { +func (suite *AnteTestSuite) CreateTestTx(ctx context.Context, privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { // First round: we gather all the signer infos. We use the "set empty // signature" hack to do that. + signMode := signing.SignMode_SIGN_MODE_DIRECT + var sigsV2 []signing.SignatureV2 for i, priv := range privs { sigV2 := signing.SignatureV2{ PubKey: priv.PubKey(), Data: &signing.SingleSignatureData{ - SignMode: suite.clientCtx.TxConfig.SignModeHandler().DefaultMode(), + SignMode: signMode, Signature: nil, }, Sequence: accSeqs[i], @@ -117,8 +121,13 @@ func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums [] Sequence: accSeqs[i], } sigV2, err := tx.SignWithPrivKey( - suite.clientCtx.TxConfig.SignModeHandler().DefaultMode(), signerData, - suite.txBuilder, priv, suite.clientCtx.TxConfig, accSeqs[i]) + ctx, + signMode, + signerData, + suite.txBuilder, + priv, + suite.clientCtx.TxConfig, + accSeqs[i]) if err != nil { return nil, err } From 636a62a14a2b7b2c6a44581c264f8e46acbfeeae Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Wed, 22 May 2024 19:57:17 +0200 Subject: [PATCH 12/22] fix: update rosetta --- app/server/config/server_config.go | 20 +++++++++++++++++++- app/server/start.go | 19 ++++++++++--------- go.mod | 5 ++++- go.sum | 8 ++++++++ 4 files changed, 41 insertions(+), 11 deletions(-) diff --git a/app/server/config/server_config.go b/app/server/config/server_config.go index 18ad43d93..a468033c7 100644 --- a/app/server/config/server_config.go +++ b/app/server/config/server_config.go @@ -7,6 +7,7 @@ import ( "path" "time" + "github.com/cosmos/rosetta" "github.com/spf13/viper" "github.com/cometbft/cometbft/libs/strings" @@ -108,6 +109,7 @@ type Config struct { EVM EVMConfig `mapstructure:"evm"` JSONRPC JSONRPCConfig `mapstructure:"json-rpc"` TLS TLSConfig `mapstructure:"tls"` + Rosetta RosettaConfig `mapstructure:"rosetta"` } // EVMConfig defines the application configuration values for the EVM. @@ -119,6 +121,14 @@ type EVMConfig struct { MaxTxGasWanted uint64 `mapstructure:"max-tx-gas-wanted"` } +// RosettaConfig defines the application configuration values for the Rosetta API. +type RosettaConfig struct { + // Enable defines if the Rosetta API server should be enabled. + Enable bool `mapstructure:"enable"` + // Config defines the Rosetta configuration. + Config rosetta.Config `mapstructure:"config"` +} + // JSONRPCConfig defines configuration for the EVM RPC server. type JSONRPCConfig struct { // API defines a list of JSON-RPC namespaces that should be enabled @@ -201,7 +211,6 @@ func DefaultConfig() *Config { defaultSDKConfig.API.Enable = DefaultAPIEnable defaultSDKConfig.GRPC.Enable = DefaultGRPCEnable defaultSDKConfig.GRPCWeb.Enable = DefaultGRPCWebEnable - defaultSDKConfig.Rosetta.Enable = DefaultRosettaEnable defaultSDKConfig.Telemetry.Enabled = DefaultTelemetryEnable return &Config{ @@ -209,6 +218,7 @@ func DefaultConfig() *Config { EVM: *DefaultEVMConfig(), JSONRPC: *DefaultJSONRPCConfig(), TLS: *DefaultTLSConfig(), + Rosetta: *DefaultRosettaConfig(), } } @@ -220,6 +230,14 @@ func DefaultEVMConfig() *EVMConfig { } } +// DefaultRosettaConfig returns the default Rosetta configuration +func DefaultRosettaConfig() *RosettaConfig { + return &RosettaConfig{ + Enable: false, + Config: rosetta.Config{}, + } +} + // Validate returns an error if the tracer type is invalid. func (c EVMConfig) Validate() error { if c.Tracer != "" && !strings.StringInSlice(c.Tracer, evmTracers) { diff --git a/app/server/start.go b/app/server/start.go index 0d700342b..11cf8246c 100644 --- a/app/server/start.go +++ b/app/server/start.go @@ -38,8 +38,8 @@ import ( "github.com/cometbft/cometbft/proxy" "github.com/cometbft/cometbft/rpc/client/local" - "cosmossdk.io/tools/rosetta" - crgserver "cosmossdk.io/tools/rosetta/lib/server" + "github.com/cosmos/rosetta" + crgserver "ithub.com/cosmos/rosetta/lib/server" ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" @@ -538,8 +538,9 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, opts StartOpt } var rosettaSrv crgserver.Server + if conf.Rosetta.Enable { - offlineMode := conf.Rosetta.Offline + offlineMode := conf.Rosetta.Config.Offline // If GRPC is not enabled rosetta cannot work in online mode, so it works in // offline mode. @@ -554,15 +555,15 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, opts StartOpt } conf := &rosetta.Config{ - Blockchain: conf.Rosetta.Blockchain, - Network: conf.Rosetta.Network, + Blockchain: conf.Rosetta.Config.Blockchain, + Network: conf.Rosetta.Config.Network, TendermintRPC: ctx.Config.RPC.ListenAddress, GRPCEndpoint: conf.GRPC.Address, - Addr: conf.Rosetta.Address, - Retries: conf.Rosetta.Retries, + Addr: conf.Rosetta.Config.Addr, + Retries: conf.Rosetta.Config.Retries, Offline: offlineMode, - GasToSuggest: conf.Rosetta.GasToSuggest, - EnableFeeSuggestion: conf.Rosetta.EnableFeeSuggestion, + GasToSuggest: conf.Rosetta.Config.GasToSuggest, + EnableFeeSuggestion: conf.Rosetta.Config.EnableFeeSuggestion, GasPrices: minGasPrices.Sort(), Codec: clientCtx.Codec.(*codec.ProtoCodec), InterfaceRegistry: clientCtx.InterfaceRegistry, diff --git a/go.mod b/go.mod index 77537e782..f99b8be74 100644 --- a/go.mod +++ b/go.mod @@ -66,6 +66,7 @@ require ( cosmossdk.io/tools/rosetta v0.2.1 github.com/cometbft/cometbft/api v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 github.com/cosmos/ibc-go/modules/capability v1.0.0 + github.com/cosmos/rosetta v0.50.6 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/gorilla/websocket v1.5.1 github.com/rs/cors v1.11.0 @@ -90,6 +91,8 @@ require ( github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/aws/aws-sdk-go v1.51.25 // indirect @@ -154,6 +157,7 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/gorilla/handlers v1.5.2 // indirect + github.com/goware/urlx v0.3.2 // 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/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -265,7 +269,6 @@ replace ( // pin version! 126854af5e6d has issues with the store so that queries fail github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - ) // replace github.com/cometbft/cometbft/libs/os => github.com/cometbft/cometbft/libs/os v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 diff --git a/go.sum b/go.sum index 7f281067b..df9a858d1 100644 --- a/go.sum +++ b/go.sum @@ -260,6 +260,10 @@ github.com/NibiruChain/collections v0.50.0/go.mod h1:u3NETehzjViSEZLmSjps0Akd8mW 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/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= @@ -461,6 +465,8 @@ github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZD github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/cosmos/rosetta v0.50.6 h1:+Hgog7CUHevZuPxZaoqR8klTs1G3ukAcoVTIMporBmw= +github.com/cosmos/rosetta v0.50.6/go.mod h1:KUnwp2i9W0766Dv78HYNV5YKym+imaKmDvXc2W0Y1wA= 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 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= @@ -778,6 +784,8 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/goware/urlx v0.3.2 h1:gdoo4kBHlkqZNaf6XlQ12LGtQOmpKJrR04Rc3RnpJEo= +github.com/goware/urlx v0.3.2/go.mod h1:h8uwbJy68o+tQXCGZNa9D73WN8n0r9OBae5bUnLcgjw= 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= From 4d672590a7b29bde8272aa4e1890d235a1f1d03a Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Wed, 22 May 2024 19:59:06 +0200 Subject: [PATCH 13/22] fix: fix typo in roseta import --- app/server/start.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server/start.go b/app/server/start.go index 11cf8246c..fc4880628 100644 --- a/app/server/start.go +++ b/app/server/start.go @@ -39,7 +39,7 @@ import ( "github.com/cometbft/cometbft/rpc/client/local" "github.com/cosmos/rosetta" - crgserver "ithub.com/cosmos/rosetta/lib/server" + crgserver "github.com/cosmos/rosetta/lib/server" ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" From 266beb3c51e2d09d9a05f3bb7c933bf3ac7dec9d Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Mon, 27 May 2024 19:54:05 +0200 Subject: [PATCH 14/22] feat: upgrade server to cometBFT and cleanup --- app/ante.go | 4 +- app/app.go | 5 +- app/keepers.go | 6 +- app/server/json_rpc.go | 36 +- app/server/start.go | 865 +++++++++++---------- app/server/util.go | 6 +- eth/indexer/kv_indexer.go | 4 +- eth/rpc/rpcapi/apis.go | 2 +- eth/rpc/rpcapi/filtersapi/filter_system.go | 2 +- eth/rpc/rpcapi/websockets.go | 2 +- go.mod | 11 +- go.sum | 2 - 12 files changed, 506 insertions(+), 439 deletions(-) diff --git a/app/ante.go b/app/ante.go index bb86d126f..63fdebd67 100644 --- a/app/ante.go +++ b/app/ante.go @@ -1,8 +1,8 @@ package app import ( + corestoretypes "cosmossdk.io/core/store" sdkerrors "cosmossdk.io/errors" - "cosmossdk.io/store/types" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -22,7 +22,7 @@ type AnteHandlerOptions struct { DevGasKeeper *devgaskeeper.Keeper DevGasBankKeeper devgasante.BankKeeper - TxCounterStoreKey types.StoreKey + TxCounterStoreKey corestoretypes.KVStoreService WasmConfig *wasmtypes.WasmConfig } diff --git a/app/app.go b/app/app.go index ab7db35f8..b8d35b545 100644 --- a/app/app.go +++ b/app/app.go @@ -10,6 +10,7 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/cosmos/cosmos-sdk/server" "github.com/NibiruChain/nibiru/app/wasmext" @@ -266,8 +267,8 @@ func (app *NibiruApp) LoadHeight(height int64) error { return app.LoadVersion(height) } -func (app *NibiruApp) RegisterNodeService(clientCtx client.Context) { - node.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) +func (app *NibiruApp) RegisterNodeService(clientCtx client.Context, config server.Config) { + node.RegisterNodeService(clientCtx, app.GRPCQueryRouter(), config) } // ModuleAccountAddrs returns all the app's module account addresses. diff --git a/app/keepers.go b/app/keepers.go index 07ffaca37..86eb372d4 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -196,7 +196,7 @@ func initStoreKeys() ( tkeys map[string]*types.TransientStoreKey, memKeys map[string]*types.MemoryStoreKey, ) { - keys = sdk.NewKVStoreKeys( + keys = storetypes.NewKVStoreKeys( authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, @@ -230,8 +230,8 @@ func initStoreKeys() ( evm.StoreKey, ) - tkeys = sdk.NewTransientStoreKeys(paramstypes.TStoreKey) - memKeys = sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) + tkeys = storetypes.NewTransientStoreKeys(paramstypes.TStoreKey) + memKeys = storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) return keys, tkeys, memKeys } diff --git a/app/server/json_rpc.go b/app/server/json_rpc.go index ae02cfe60..05a652f56 100644 --- a/app/server/json_rpc.go +++ b/app/server/json_rpc.go @@ -1,6 +1,8 @@ package server import ( + "context" + "fmt" "net/http" "time" @@ -10,9 +12,9 @@ import ( "github.com/gorilla/mux" "github.com/rs/cors" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" - "github.com/cosmos/cosmos-sdk/server/types" ethlog "github.com/ethereum/go-ethereum/log" ethrpc "github.com/ethereum/go-ethereum/rpc" @@ -20,16 +22,17 @@ import ( ) // StartJSONRPC starts the JSON-RPC server -func StartJSONRPC(ctx *server.Context, +func StartJSONRPC(ctx context.Context, clientCtx client.Context, + srvCtx *server.Context, + logger log.Logger, tmRPCAddr, tmEndpoint string, config *srvconfig.Config, indexer eth.EVMTxIndexer, ) (*http.Server, chan struct{}, error) { - tmWsClient := ConnectTmWS(tmRPCAddr, tmEndpoint, ctx.Logger) + tmWsClient := ConnectTmWS(tmRPCAddr, tmEndpoint, logger) - logger := ctx.Logger.With("module", "geth") ethlog.Root().SetHandler(ethlog.FuncHandler(func(r *ethlog.Record) error { switch r.Lvl { case ethlog.LvlTrace, ethlog.LvlDebug: @@ -47,11 +50,11 @@ func StartJSONRPC(ctx *server.Context, allowUnprotectedTxs := config.JSONRPC.AllowUnprotectedTxs rpcAPIArr := config.JSONRPC.API - apis := rpcapi.GetRPCAPIs(ctx, clientCtx, tmWsClient, allowUnprotectedTxs, indexer, rpcAPIArr) + apis := rpcapi.GetRPCAPIs(srvCtx, clientCtx, tmWsClient, allowUnprotectedTxs, indexer, rpcAPIArr) for _, api := range apis { if err := rpcServer.RegisterName(api.Namespace, api.Service); err != nil { - ctx.Logger.Error( + logger.Error( "failed to register service in JSON RPC namespace", "namespace", api.Namespace, "service", api.Service, @@ -85,30 +88,37 @@ func StartJSONRPC(ctx *server.Context, errCh := make(chan error) go func() { - ctx.Logger.Info("Starting JSON-RPC server", "address", config.JSONRPC.Address) + logger.Info("Starting JSON-RPC server", "address", config.JSONRPC.Address) if err := httpSrv.Serve(ln); err != nil { if err == http.ErrServerClosed { close(httpSrvDone) return } - ctx.Logger.Error("failed to start JSON-RPC server", "error", err.Error()) + logger.Error("failed to start JSON-RPC server", "error", err.Error()) errCh <- err } }() select { case err := <-errCh: - ctx.Logger.Error("failed to boot JSON-RPC server", "error", err.Error()) + logger.Error("failed to boot JSON-RPC server", "error", err.Error()) return nil, nil, err - case <-time.After(types.ServerStartTime): // assume JSON RPC server started successfully + + case <-ctx.Done(): + // The calling process canceled or closed the provided context, so we must + // gracefully stop the gRPC server. + logger.Info("stopping gRPC server...", "address", config.GRPC.Address) + + return nil, nil, fmt.Errorf("gRPC server stopped") + case <-time.After(ServerStartTime): // assume JSON RPC server started successfully } - ctx.Logger.Info("Starting JSON WebSocket server", "address", config.JSONRPC.WsAddress) + logger.Info("Starting JSON WebSocket server", "address", config.JSONRPC.WsAddress) // allocate separate WS connection to Tendermint - tmWsClient = ConnectTmWS(tmRPCAddr, tmEndpoint, ctx.Logger) - wsSrv := rpcapi.NewWebsocketsServer(clientCtx, ctx.Logger, tmWsClient, config) + tmWsClient = ConnectTmWS(tmRPCAddr, tmEndpoint, logger) + wsSrv := rpcapi.NewWebsocketsServer(clientCtx, logger, tmWsClient, config) wsSrv.Start() return httpSrv, httpSrvDone, nil } diff --git a/app/server/start.go b/app/server/start.go index fc4880628..9dbfbf615 100644 --- a/app/server/start.go +++ b/app/server/start.go @@ -5,56 +5,57 @@ import ( "fmt" "io" "net" - "net/http" "os" - "os/signal" "path/filepath" "regexp" "runtime/pprof" "strings" - "syscall" "time" + cmtcfg "github.com/cometbft/cometbft/config" + + "github.com/cometbft/cometbft/node" + "github.com/cometbft/cometbft/p2p" + pvm "github.com/cometbft/cometbft/privval" + "github.com/cometbft/cometbft/proxy" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + cmttypes "github.com/cometbft/cometbft/types" + "github.com/hashicorp/go-metrics" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + + "golang.org/x/sync/errgroup" + "github.com/NibiruChain/nibiru/app/server/config" "github.com/NibiruChain/nibiru/eth" "github.com/NibiruChain/nibiru/eth/indexer" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/cosmos/cosmos-sdk/server/api" + servercmtlog "github.com/cosmos/cosmos-sdk/server/log" "github.com/cosmos/cosmos-sdk/telemetry" + "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - - dbm "github.com/cometbft/cometbft-db" abciserver "github.com/cometbft/cometbft/abci/server" tcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" - tmos "github.com/cometbft/cometbft/libs/os" - "github.com/cometbft/cometbft/node" - "github.com/cometbft/cometbft/p2p" - pvm "github.com/cometbft/cometbft/privval" - "github.com/cometbft/cometbft/proxy" "github.com/cometbft/cometbft/rpc/client/local" + dbm "github.com/cosmos/cosmos-db" + servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" - "github.com/cosmos/rosetta" - crgserver "github.com/cosmos/rosetta/lib/server" - - ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" - - errorsmod "cosmossdk.io/errors" pruningtypes "cosmossdk.io/store/pruning/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" - "github.com/cosmos/cosmos-sdk/server/api" serverconfig "github.com/cosmos/cosmos-sdk/server/config" - servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" "github.com/cosmos/cosmos-sdk/server/types" - sdk "github.com/cosmos/cosmos-sdk/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ) +const ServerStartTime = 5 * time.Second + // StartOptions defines options that can be customized in `StartCmd` type StartOptions struct { AppCreator types.AppCreator @@ -74,23 +75,33 @@ func openDB(rootDir string, backendType dbm.BackendType) (dbm.DB, error) { return dbm.NewDB("application", backendType, dataDir) } +// StartCmd runs the service passed in, either stand-alone or in-process with +// CometBFT. +func StartCmd(appCreator types.AppCreator, defaultNodeHome string) *cobra.Command { + return StartCmdWithOptions(appCreator, defaultNodeHome, server.StartCmdOptions{}) +} + // StartCmd runs the service passed in, either stand-alone or in-process with // Tendermint. -func StartCmd(opts StartOptions) *cobra.Command { +func StartCmdWithOptions(appCreator types.AppCreator, defaultNodeHome string, opts server.StartCmdOptions) *cobra.Command { + if opts.StartCommandHandler == nil { + opts.StartCommandHandler = start + } + cmd := &cobra.Command{ Use: "start", Short: "Run the full node", - Long: `Run the full node application with Tendermint in or out of process. By -default, the application will run with Tendermint in process. + Long: `Run the full node application with CometBFT in or out of process. By +default, the application will run with CometBFT in process. Pruning options can be provided via the '--pruning' flag or alternatively with '--pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' together. For '--pruning' the options are as follows: -default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals +default: the last 362880 states are kept, pruning at 10 block intervals nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) -everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals +everything: 2 latest states will be kept; pruning at 10 block intervals. custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' Node halting configurations exist in the form of two flags: '--halt-height' and '--halt-time'. During @@ -101,6 +112,11 @@ will not be able to commit subsequent blocks. For profiling and benchmarking purposes, CPU profiling can be enabled via the '--cpu-profile' flag which accepts a path for the resulting pprof file. + +The node may be started in a 'query only' mode where only the gRPC and JSON HTTP +API services are enabled via the 'grpc-only' flag. In this mode, CometBFT is +bypassed and can be used when legacy queries are needed after an on-chain upgrade +is performed. Note, when enabled, gRPC will also be automatically enabled. `, PreRunE: func(cmd *cobra.Command, _ []string) error { serverCtx := server.GetServerContextFromCmd(cmd) @@ -122,16 +138,30 @@ which accepts a path for the resulting pprof file. return err } - withTM, _ := cmd.Flags().GetBool(WithTendermint) - if !withTM { + withCMT, _ := cmd.Flags().GetBool(WithTendermint) + if !withCMT { serverCtx.Logger.Info("starting ABCI without Tendermint") - return wrapCPUProfile(serverCtx, func() error { - return startStandAlone(serverCtx, opts) - }) } - serverCtx.Logger.Info("Unlocking keyring") + serverCtx.Logger.Info("starting ABCI with Tendermint") + err = wrapCPUProfile(serverCtx, func() error { + return opts.StartCommandHandler(serverCtx, clientCtx, appCreator, withCMT, opts) + }) + + if err != nil { + serverCtx.Logger.Error("failed to start ABCI with Tendermint", "error", err.Error()) + return err + } + + serverCtx.Logger.Debug("received quit signal") + graceDuration, _ := cmd.Flags().GetDuration(server.FlagShutdownGrace) + if graceDuration > 0 { + serverCtx.Logger.Info("graceful shutdown start", server.FlagShutdownGrace, graceDuration) + <-time.After(graceDuration) + serverCtx.Logger.Info("graceful shutdown complete") + } + serverCtx.Logger.Info("Unlocking keyring") // fire unlock precess for keyring keyringBackend, _ := cmd.Flags().GetString(flags.FlagKeyringBackend) if keyringBackend == keyring.BackendFile { @@ -141,367 +171,234 @@ which accepts a path for the resulting pprof file. } } - serverCtx.Logger.Info("starting ABCI with Tendermint") - - // amino is needed here for backwards compatibility of REST routes - err = startInProcess(serverCtx, clientCtx, opts) - errCode, ok := err.(server.ErrorCode) - if !ok { - return err - } - - serverCtx.Logger.Debug(fmt.Sprintf("received quit signal: %d", errCode.Code)) return nil }, } - cmd.Flags().String(flags.FlagHome, opts.DefaultNodeHome, "The application home directory") - cmd.Flags().Bool(WithTendermint, true, "Run abci app embedded in-process with tendermint") - cmd.Flags().String(Address, "tcp://0.0.0.0:26658", "Listen address") - cmd.Flags().String(Transport, "socket", "Transport protocol: socket, grpc") - cmd.Flags().String(TraceStore, "", "Enable KVStore tracing to an output file") - cmd.Flags().String(server.FlagMinGasPrices, "", "Minimum gas prices to accept for transactions; Any fee in a tx must meet this minimum (e.g. 5000unibi)") //nolint:lll - cmd.Flags().IntSlice(server.FlagUnsafeSkipUpgrades, []int{}, "Skip a set of upgrade heights to continue the old binary") - cmd.Flags().Uint64(server.FlagHaltHeight, 0, "Block height at which to gracefully halt the chain and shutdown the node") - cmd.Flags().Uint64(server.FlagHaltTime, 0, "Minimum block time (in Unix seconds) at which to gracefully halt the chain and shutdown the node") - cmd.Flags().Bool(server.FlagInterBlockCache, true, "Enable inter-block caching") - cmd.Flags().String(CPUProfile, "", "Enable CPU profiling and write to the provided file") - cmd.Flags().Bool(server.FlagTrace, false, "Provide full stack traces for errors in ABCI Log") - cmd.Flags().String(server.FlagPruning, pruningtypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") - cmd.Flags().Uint64(server.FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") - cmd.Flags().Uint64(server.FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')") //nolint:lll - cmd.Flags().Uint(server.FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks") - cmd.Flags().Uint64(server.FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks") - cmd.Flags().String(AppDBBackend, "", "The type of database for application and snapshots databases") - - cmd.Flags().Bool(GRPCOnly, false, "Start the node in gRPC query only mode without Tendermint process") - cmd.Flags().Bool(GRPCEnable, config.DefaultGRPCEnable, "Define if the gRPC server should be enabled") - cmd.Flags().String(GRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on") - cmd.Flags().Bool(GRPCWebEnable, config.DefaultGRPCWebEnable, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled.)") - cmd.Flags().String(GRPCWebAddress, serverconfig.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on") - - cmd.Flags().Bool(RPCEnable, config.DefaultAPIEnable, "Defines if Cosmos-sdk REST server should be enabled") - cmd.Flags().Bool(EnabledUnsafeCors, false, "Defines if CORS should be enabled (unsafe - use it at your own risk)") - - cmd.Flags().Bool(JSONRPCEnable, config.DefaultJSONRPCEnable, "Define if the JSON-RPC server should be enabled") - cmd.Flags().StringSlice(JSONRPCAPI, config.GetDefaultAPINamespaces(), "Defines a list of JSON-RPC namespaces that should be enabled") - cmd.Flags().String(JSONRPCAddress, config.DefaultJSONRPCAddress, "the JSON-RPC server address to listen on") - cmd.Flags().String(JSONWsAddress, config.DefaultJSONRPCWsAddress, "the JSON-RPC WS server address to listen on") - cmd.Flags().Uint64(JSONRPCGasCap, config.DefaultGasCap, "Sets a cap on gas that can be used in eth_call/estimateGas unit is unibi (0=infinite)") //nolint:lll - cmd.Flags().Float64(JSONRPCTxFeeCap, config.DefaultTxFeeCap, "Sets a cap on transaction fee that can be sent via the RPC APIs (1 = default 1 nibi)") //nolint:lll - cmd.Flags().Int32(JSONRPCFilterCap, config.DefaultFilterCap, "Sets the global cap for total number of filters that can be created") - cmd.Flags().Duration(JSONRPCEVMTimeout, config.DefaultEVMTimeout, "Sets a timeout used for eth_call (0=infinite)") - cmd.Flags().Duration(JSONRPCHTTPTimeout, config.DefaultHTTPTimeout, "Sets a read/write timeout for json-rpc http server (0=infinite)") - cmd.Flags().Duration(JSONRPCHTTPIdleTimeout, config.DefaultHTTPIdleTimeout, "Sets a idle timeout for json-rpc http server (0=infinite)") - cmd.Flags().Bool(JSONRPCAllowUnprotectedTxs, config.DefaultAllowUnprotectedTxs, "Allow for unprotected (non EIP155 signed) transactions to be submitted via the node's RPC when the global parameter is disabled") //nolint:lll - cmd.Flags().Int32(JSONRPCLogsCap, config.DefaultLogsCap, "Sets the max number of results can be returned from single `eth_getLogs` query") - cmd.Flags().Int32(JSONRPCBlockRangeCap, config.DefaultBlockRangeCap, "Sets the max block range allowed for `eth_getLogs` query") - cmd.Flags().Int(JSONRPCMaxOpenConnections, config.DefaultMaxOpenConnections, "Sets the maximum number of simultaneous connections for the server listener") //nolint:lll - cmd.Flags().Bool(JSONRPCEnableIndexer, false, "Enable the custom tx indexer for json-rpc") - cmd.Flags().Bool(JSONRPCEnableMetrics, false, "Define if EVM rpc metrics server should be enabled") - - cmd.Flags().String(EVMTracer, config.DefaultEVMTracer, "the EVM tracer type to collect execution traces from the EVM transaction execution (json|struct|access_list|markdown)") //nolint:lll - cmd.Flags().Uint64(EVMMaxTxGasWanted, config.DefaultMaxTxGasWanted, "the gas wanted for each eth tx returned in ante handler in check tx mode") //nolint:lll - - cmd.Flags().String(TLSCertPath, "", "the cert.pem file path for the server TLS configuration") - cmd.Flags().String(TLSKeyPath, "", "the key.pem file path for the server TLS configuration") - - cmd.Flags().Uint64(server.FlagStateSyncSnapshotInterval, 0, "State sync snapshot interval") - cmd.Flags().Uint32(server.FlagStateSyncSnapshotKeepRecent, 2, "State sync snapshot to keep") - - // add support for all Tendermint-specific command line options - tcmd.AddNodeFlags(cmd) + cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") + addStartNodeFlags(cmd, opts) return cmd } -func startStandAlone(ctx *server.Context, opts StartOptions) error { - addr := ctx.Viper.GetString(Address) - transport := ctx.Viper.GetString(Transport) - home := ctx.Viper.GetString(flags.FlagHome) - - db, err := openDB(home, server.GetAppDBBackend(ctx.Viper)) +func start(svrCtx *server.Context, clientCtx client.Context, appCreator types.AppCreator, withCmt bool, opts server.StartCmdOptions) error { + svrCfg, err := getAndValidateConfig(svrCtx) if err != nil { return err } - defer func() { - if err := db.Close(); err != nil { - ctx.Logger.Error("error closing db", "error", err.Error()) - } - }() - - traceWriterFile := ctx.Viper.GetString(TraceStore) - traceWriter, err := openTraceWriter(traceWriterFile) - + app, appCleanupFn, err := startApp(svrCtx, appCreator, opts) if err != nil { return err } + defer appCleanupFn() - app := opts.AppCreator(ctx.Logger, db, traceWriter, ctx.Viper) - - conf, err := config.GetConfig(ctx.Viper) + metrics, err := startTelemetry(svrCfg) if err != nil { - ctx.Logger.Error("failed to get server config", "error", err.Error()) return err } - if err := conf.ValidateBasic(); err != nil { - ctx.Logger.Error("invalid server config", "error", err.Error()) - return err - } + emitServerInfoMetrics() - _, err = startTelemetry(conf) - if err != nil { - return err + if !withCmt { + return startStandAlone(svrCtx, svrCfg, clientCtx, app, metrics, opts) } + return startInProcess(svrCtx, svrCfg, clientCtx, app, metrics, opts) +} + +func startStandAlone(svrCtx *server.Context, svrCfg config.Config, clientCtx client.Context, app types.Application, metrics *telemetry.Metrics, opts server.StartCmdOptions) error { + addr := svrCtx.Viper.GetString(Address) + transport := svrCtx.Viper.GetString(Transport) - svr, err := abciserver.NewServer(addr, transport, app) + cmtApp := server.NewCometABCIWrapper(app) + svr, err := abciserver.NewServer(addr, transport, cmtApp) if err != nil { return fmt.Errorf("error creating listener: %v", err) } - svr.SetLogger(ctx.Logger.With("server", "abci")) + svr.SetLogger(servercmtlog.CometLoggerWrapper{Logger: svrCtx.Logger.With("module", "abci-server")}) - err = svr.Start() - if err != nil { - tmos.Exit(err.Error()) - } + g, ctx := getCtx(svrCtx, false) - defer func() { - if err = svr.Stop(); err != nil { - tmos.Exit(err.Error()) + // Add the tx service to the gRPC router. We only need to register this + // service if API or gRPC is enabled, and avoid doing so in the general + // case, because it spawns a new local CometBFT RPC client. + if svrCfg.API.Enable || svrCfg.GRPC.Enable { + // create tendermint client + // assumes the rpc listen address is where tendermint has its rpc server + rpcclient, err := rpchttp.New(svrCtx.Config.RPC.ListenAddress, "/websocket") + if err != nil { + return err } - }() + // re-assign for making the client available below + // do not use := to avoid shadowing clientCtx + clientCtx = clientCtx.WithClient(rpcclient) - // Wait for SIGINT or SIGTERM signal - return server.WaitForQuitSignals() -} - -// legacyAminoCdc is used for the legacy REST API -func startInProcess(ctx *server.Context, clientCtx client.Context, opts StartOptions) (err error) { - cfg := ctx.Config - home := cfg.RootDir - logger := ctx.Logger - - db, err := openDB(home, server.GetAppDBBackend(ctx.Viper)) - if err != nil { - logger.Error("failed to open DB", "error", err.Error()) - return err + // use the provided clientCtx to register the services + app.RegisterTxService(clientCtx) + app.RegisterTendermintService(clientCtx) + app.RegisterNodeService(clientCtx, svrCfg.Config) } - defer func() { - if err := db.Close(); err != nil { - ctx.Logger.With("error", err).Error("error closing db") - } - }() - - traceWriterFile := ctx.Viper.GetString(TraceStore) - traceWriter, err := openTraceWriter(traceWriterFile) + grpcSrv, clientCtx, err := startGrpcServer(ctx, g, svrCfg.GRPC, clientCtx, svrCtx, app) if err != nil { - logger.Error("failed to open trace writer", "error", err.Error()) return err } - conf, err := config.GetConfig(ctx.Viper) + err = startAPIServer(ctx, g, svrCfg.Config, clientCtx, svrCtx, app, svrCtx.Config.RootDir, grpcSrv, metrics) if err != nil { - logger.Error("failed to get server config", "error", err.Error()) return err } - if err := conf.ValidateBasic(); err != nil { - logger.Error("invalid server config", "error", err.Error()) - return err + if opts.PostSetupStandalone != nil { + if err := opts.PostSetupStandalone(svrCtx, clientCtx, ctx, g); err != nil { + return err + } } - app := opts.AppCreator(ctx.Logger, db, traceWriter, ctx.Viper) + g.Go(func() error { + if err := svr.Start(); err != nil { + svrCtx.Logger.Error("failed to start out-of-process ABCI server", "err", err) + return err + } - nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile()) - if err != nil { - logger.Error("failed load or gen node key", "error", err.Error()) - return err - } + // Wait for the calling process to be canceled or close the provided context, + // so we can gracefully stop the ABCI server. + <-ctx.Done() + svrCtx.Logger.Info("stopping the ABCI server...") + return svr.Stop() + }) - genDocProvider := node.DefaultGenesisDocProviderFunc(cfg) + return g.Wait() +} - var ( - tmNode *node.Node - gRPCOnly = ctx.Viper.GetBool(GRPCOnly) - ) +// legacyAminoCdc is used for the legacy REST API +func startInProcess(svrCtx *server.Context, svrCfg config.Config, clientCtx client.Context, app types.Application, + metrics *telemetry.Metrics, opts server.StartCmdOptions, +) error { + cfg := svrCtx.Config + + gRPCOnly := svrCtx.Viper.GetBool(GRPCOnly) + + g, ctx := getCtx(svrCtx, true) if gRPCOnly { - logger.Info("starting node in query only mode; Tendermint is disabled") - conf.GRPC.Enable = true - conf.JSONRPC.EnableIndexer = false + // TODO: Generalize logic so that gRPC only is really in startStandAlone + svrCtx.Logger.Info("starting node in gRPC only mode; CometBFT is disabled") + svrCfg.GRPC.Enable = true } else { - logger.Info("starting node with ABCI Tendermint in-process") - - tmNode, err = node.NewNode( - cfg, - pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()), - nodeKey, - proxy.NewLocalClientCreator(app), - genDocProvider, - node.DefaultDBProvider, - node.DefaultMetricsProvider(cfg.Instrumentation), - ctx.Logger.With("server", "node"), - ) + svrCtx.Logger.Info("starting node with ABCI CometBFT in-process") + tmNode, cleanupFn, err := startCmtNode(ctx, cfg, app, svrCtx) if err != nil { - logger.Error("failed init node", "error", err.Error()) return err } - - if err := tmNode.Start(); err != nil { - logger.Error("failed start tendermint server", "error", err.Error()) - return err + defer cleanupFn() + + // Add the tx service to the gRPC router. We only need to register this + // service if API or gRPC is enabled, and avoid doing so in the general + // case, because it spawns a new local CometBFT RPC client. + if svrCfg.API.Enable || svrCfg.GRPC.Enable { + // Re-assign for making the client available below do not use := to avoid + // shadowing the clientCtx variable. + clientCtx = clientCtx.WithClient(local.New(tmNode)) + + app.RegisterTxService(clientCtx) + app.RegisterTendermintService(clientCtx) + app.RegisterNodeService(clientCtx, svrCfg.Config) } - - defer func() { - if tmNode.IsRunning() { - _ = tmNode.Stop() - } - }() } - // Add the tx service to the gRPC router. We only need to register this - // service if API or gRPC or JSONRPC is enabled, and avoid doing so in the general - // case, because it spawns a new local tendermint RPC client. - if (conf.API.Enable || conf.GRPC.Enable || conf.JSONRPC.Enable || conf.JSONRPC.EnableIndexer) && tmNode != nil { - clientCtx = clientCtx.WithClient(local.New(tmNode)) - - app.RegisterTxService(clientCtx) - app.RegisterTendermintService(clientCtx) - app.RegisterNodeService(clientCtx) + err := startJsonServer(ctx, clientCtx, svrCfg, svrCtx) + if err != nil { + return err } - metrics, err := startTelemetry(conf) + grpcSrv, clientCtx, err := startGrpcServer(ctx, g, svrCfg.GRPC, clientCtx, svrCtx, app) if err != nil { return err } - // Enable metrics if JSONRPC is enabled and --metrics is passed - // Flag not added in config to avoid user enabling in config without passing in CLI - if conf.JSONRPC.Enable && ctx.Viper.GetBool(JSONRPCEnableMetrics) { - ethmetricsexp.Setup(conf.JSONRPC.MetricsAddress) + err = startAPIServer(ctx, g, svrCfg.Config, clientCtx, svrCtx, app, cfg.RootDir, grpcSrv, metrics) + if err != nil { + return err } - var idxer eth.EVMTxIndexer - if conf.JSONRPC.EnableIndexer { - idxDB, err := OpenIndexerDB(home, server.GetAppDBBackend(ctx.Viper)) - if err != nil { - logger.Error("failed to open evm indexer DB", "error", err.Error()) + if opts.PostSetup != nil { + if err := opts.PostSetup(svrCtx, clientCtx, ctx, g); err != nil { return err } - - idxLogger := ctx.Logger.With("indexer", "evm") - idxer = indexer.NewKVIndexer(idxDB, idxLogger, clientCtx) } + // wait for signal capture and gracefully return + // we are guaranteed to be waiting for the "ListenForQuitSignals" goroutine. + return g.Wait() +} - if conf.API.Enable || conf.JSONRPC.Enable { - genDoc, err := genDocProvider() - if err != nil { - return err - } - - clientCtx = clientCtx. - WithHomeDir(home). - WithChainID(hackChainID(genDoc.ChainID)) - - // Set `GRPCClient` to `clientCtx` to enjoy concurrent grpc query. - // only use it if gRPC server is enabled. - if conf.GRPC.Enable { - _, port, err := net.SplitHostPort(conf.GRPC.Address) - if err != nil { - return errorsmod.Wrapf(err, "invalid grpc address %s", conf.GRPC.Address) - } +type cometABCIWrapper struct { + app types.ABCI +} - maxSendMsgSize := conf.GRPC.MaxSendMsgSize - if maxSendMsgSize == 0 { - maxSendMsgSize = serverconfig.DefaultGRPCMaxSendMsgSize - } +func startApp(svrCtx *server.Context, appCreator types.AppCreator, opts server.StartCmdOptions) (app types.Application, cleanupFn func(), err error) { + traceWriter, traceCleanupFn, err := setupTraceWriter(svrCtx) + if err != nil { + return app, traceCleanupFn, err + } - maxRecvMsgSize := conf.GRPC.MaxRecvMsgSize - if maxRecvMsgSize == 0 { - maxRecvMsgSize = serverconfig.DefaultGRPCMaxRecvMsgSize - } + home := svrCtx.Config.RootDir + db, err := opts.DBOpener(home, server.GetAppDBBackend(svrCtx.Viper)) + if err != nil { + return app, traceCleanupFn, err + } - grpcAddress := fmt.Sprintf("127.0.0.1:%s", port) - - // If grpc is enabled, configure grpc client for grpc gateway and json-rpc. - grpcClient, err := grpc.Dial( - grpcAddress, - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithDefaultCallOptions( - grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), - grpc.MaxCallRecvMsgSize(maxRecvMsgSize), - grpc.MaxCallSendMsgSize(maxSendMsgSize), - ), - ) - if err != nil { - return err - } + app = appCreator(svrCtx.Logger, db, traceWriter, svrCtx.Viper) - clientCtx = clientCtx.WithGRPCClient(grpcClient) - ctx.Logger.Debug("gRPC client assigned to client context", "address", grpcAddress) + cleanupFn = func() { + traceCleanupFn() + if localErr := app.Close(); localErr != nil { + svrCtx.Logger.Error(localErr.Error()) } } + return app, cleanupFn, nil +} - var apiSrv *api.Server - if conf.API.Enable { - apiSrv = api.New(clientCtx, ctx.Logger.With("server", "api")) - app.RegisterAPIRoutes(apiSrv, conf.API) +func setupTraceWriter(svrCtx *server.Context) (traceWriter io.WriteCloser, cleanup func(), err error) { + // clean up the traceWriter when the server is shutting down + cleanup = func() {} - if conf.Telemetry.Enabled { - apiSrv.SetTelemetry(metrics) - } + traceWriterFile := svrCtx.Viper.GetString(TraceStore) + traceWriter, err = openTraceWriter(traceWriterFile) + if err != nil { + return traceWriter, cleanup, err + } - errCh := make(chan error) - go func() { - if err := apiSrv.Start(conf.Config); err != nil { - errCh <- err + // if flagTraceStore is not used then traceWriter is nil + if traceWriter != nil { + cleanup = func() { + if err = traceWriter.Close(); err != nil { + svrCtx.Logger.Error("failed to close trace writer", "err", err) } - }() - - select { - case err := <-errCh: - return err - case <-time.After(types.ServerStartTime): // assume server started successfully } - - defer apiSrv.Close() } - var ( - grpcSrv *grpc.Server - grpcWebSrv *http.Server - ) + return traceWriter, cleanup, nil +} - if conf.GRPC.Enable { - grpcSrv, err = servergrpc.StartGRPCServer(clientCtx, app, conf.GRPC) +func startJsonServer(ctx context.Context, clientCtx client.Context, cfg config.Config, svrCtx *server.Context) error { + logger := svrCtx.Logger + home := svrCtx.Config.RootDir + var idxer eth.EVMTxIndexer + + if cfg.JSONRPC.EnableIndexer { + idxDB, err := OpenIndexerDB(home, server.GetAppDBBackend(svrCtx.Viper)) if err != nil { + svrCtx.Logger.Error("failed to open evm indexer DB", "error", err.Error()) return err } - defer grpcSrv.Stop() - if conf.GRPCWeb.Enable { - grpcWebSrv, err = servergrpc.StartGRPCWeb(grpcSrv, conf.Config) - if err != nil { - ctx.Logger.Error("failed to start grpc-web http server", "error", err.Error()) - return err - } - defer func() { - if err := grpcWebSrv.Close(); err != nil { - logger.Error("failed to close the grpc-web http server", "error", err.Error()) - } - }() - } + idxLogger := logger.With("indexer", "evm") + idxer = indexer.NewKVIndexer(idxDB, idxLogger, clientCtx) } - var ( - httpSrv *http.Server - httpSrvDone chan struct{} - ) - - if conf.JSONRPC.Enable { + if cfg.JSONRPC.Enable { + genDocProvider := node.DefaultGenesisDocProviderFunc(svrCtx.Config) genDoc, err := genDocProvider() if err != nil { return err @@ -510,8 +407,8 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, opts StartOpt clientCtx := clientCtx.WithChainID(hackChainID(genDoc.ChainID)) tmEndpoint := "/websocket" - tmRPCAddr := cfg.RPC.ListenAddress - httpSrv, httpSrvDone, err = StartJSONRPC(ctx, clientCtx, tmRPCAddr, tmEndpoint, &conf, idxer) + tmRPCAddr := svrCtx.Config.RPC.ListenAddress + httpSrv, httpSrvDone, err := StartJSONRPC(ctx, clientCtx, svrCtx, logger, tmRPCAddr, tmEndpoint, &cfg, idxer) if err != nil { return err } @@ -519,9 +416,9 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, opts StartOpt shutdownCtx, cancelFn := context.WithTimeout(context.Background(), 10*time.Second) defer cancelFn() if err := httpSrv.Shutdown(shutdownCtx); err != nil { - logger.Error("HTTP server shutdown produced a warning", "error", err.Error()) + svrCtx.Logger.Error("HTTP server shutdown produced a warning", "error", err.Error()) } else { - logger.Info("HTTP server shut down, waiting 5 sec") + svrCtx.Logger.Info("HTTP server shut down, waiting 5 sec") select { case <-time.Tick(5 * time.Second): case <-httpSrvDone: @@ -529,66 +426,7 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, opts StartOpt } }() } - - // At this point it is safe to block the process if we're in query only mode as - // we do not need to start Rosetta or handle any Tendermint related processes. - if gRPCOnly { - // wait for signal capture and gracefully return - return server.WaitForQuitSignals() - } - - var rosettaSrv crgserver.Server - - if conf.Rosetta.Enable { - offlineMode := conf.Rosetta.Config.Offline - - // If GRPC is not enabled rosetta cannot work in online mode, so it works in - // offline mode. - if !conf.GRPC.Enable { - offlineMode = true - } - - minGasPrices, err := sdk.ParseDecCoins(conf.MinGasPrices) - if err != nil { - ctx.Logger.Error("failed to parse minimum-gas-prices", "error", err.Error()) - return err - } - - conf := &rosetta.Config{ - Blockchain: conf.Rosetta.Config.Blockchain, - Network: conf.Rosetta.Config.Network, - TendermintRPC: ctx.Config.RPC.ListenAddress, - GRPCEndpoint: conf.GRPC.Address, - Addr: conf.Rosetta.Config.Addr, - Retries: conf.Rosetta.Config.Retries, - Offline: offlineMode, - GasToSuggest: conf.Rosetta.Config.GasToSuggest, - EnableFeeSuggestion: conf.Rosetta.Config.EnableFeeSuggestion, - GasPrices: minGasPrices.Sort(), - Codec: clientCtx.Codec.(*codec.ProtoCodec), - InterfaceRegistry: clientCtx.InterfaceRegistry, - } - - rosettaSrv, err = rosetta.ServerFromConfig(conf) - if err != nil { - return err - } - - errCh := make(chan error) - go func() { - if err := rosettaSrv.Start(); err != nil { - errCh <- err - } - }() - - select { - case err := <-errCh: - return err - case <-time.After(types.ServerStartTime): // assume server started successfully - } - } - // Wait for SIGINT or SIGTERM signal - return server.WaitForQuitSignals() + return nil } // OpenIndexerDB opens the custom eth indexer db, using the same db backend as the main app @@ -597,16 +435,14 @@ func OpenIndexerDB(rootDir string, backendType dbm.BackendType) (dbm.DB, error) return dbm.NewDB("evmindexer", backendType, dataDir) } -func openTraceWriter(traceWriterFile string) (w io.Writer, err error) { +func openTraceWriter(traceWriterFile string) (w io.WriteCloser, err error) { if traceWriterFile == "" { return } - - filePath := filepath.Clean(traceWriterFile) return os.OpenFile( - filePath, + traceWriterFile, os.O_WRONLY|os.O_APPEND|os.O_CREATE, - 0o600, + 0o666, ) } @@ -617,49 +453,35 @@ func startTelemetry(cfg config.Config) (*telemetry.Metrics, error) { return telemetry.New(cfg.Telemetry) } -// WaitForQuitSignals waits for SIGINT and SIGTERM and returns. -func WaitForQuitSignals() server.ErrorCode { - sigs := make(chan os.Signal, 1) - signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) - sig := <-sigs - return server.ErrorCode{Code: int(sig.(syscall.Signal)) + 128} -} - -// wrapCPUProfile runs callback in a goroutine, then wait for quit signals. -func wrapCPUProfile(ctx *server.Context, callback func() error) error { - if cpuProfile := ctx.Viper.GetString(CPUProfile); cpuProfile != "" { +// wrapCPUProfile starts CPU profiling, if enabled, and executes the provided +// callbackFn in a separate goroutine, then will wait for that callback to +// return. +// +// NOTE: We expect the caller to handle graceful shutdown and signal handling. +func wrapCPUProfile(svrCtx *server.Context, callbackFn func() error) error { + if cpuProfile := svrCtx.Viper.GetString(CPUProfile); cpuProfile != "" { f, err := os.Create(cpuProfile) if err != nil { return err } - ctx.Logger.Info("starting CPU profiler", "profile", cpuProfile) + svrCtx.Logger.Info("starting CPU profiler", "profile", cpuProfile) + if err := pprof.StartCPUProfile(f); err != nil { return err } defer func() { - ctx.Logger.Info("stopping CPU profiler", "profile", cpuProfile) + svrCtx.Logger.Info("stopping CPU profiler", "profile", cpuProfile) pprof.StopCPUProfile() + if err := f.Close(); err != nil { - ctx.Logger.Info("failed to close cpu-profile file", "profile", cpuProfile, "err", err.Error()) + svrCtx.Logger.Info("failed to close cpu-profile file", "profile", cpuProfile, "err", err.Error()) } }() } - errCh := make(chan error) - go func() { - errCh <- callback() - }() - - select { - case err := <-errCh: - return err - - case <-time.After(types.ServerStartTime): - } - - return WaitForQuitSignals() + return callbackFn() } // hackChainID replaces nibiru-localnet-0 with nibirulocalnet-9000-1 which matches the standard @@ -675,3 +497,240 @@ func hackChainID(chainID string) string { return result } + +// emitServerInfoMetrics emits server info related metrics using application telemetry. +func emitServerInfoMetrics() { + var ls []metrics.Label + + versionInfo := version.NewInfo() + if len(versionInfo.GoVersion) > 0 { + ls = append(ls, telemetry.NewLabel("go", versionInfo.GoVersion)) + } + if len(versionInfo.CosmosSdkVersion) > 0 { + ls = append(ls, telemetry.NewLabel("version", versionInfo.CosmosSdkVersion)) + } + + if len(ls) == 0 { + return + } + + telemetry.SetGaugeWithLabels([]string{"server", "info"}, 1, ls) +} + +func startGrpcServer(ctx context.Context, g *errgroup.Group, config serverconfig.GRPCConfig, + clientCtx client.Context, + svrCtx *server.Context, + app types.Application) (*grpc.Server, client.Context, error) { + if !config.Enable { + return nil, clientCtx, nil + } + + _, _, err := net.SplitHostPort(config.Address) + if err != nil { + return nil, clientCtx, err + } + + maxSendMsgSize := config.MaxSendMsgSize + if maxSendMsgSize == 0 { + maxSendMsgSize = serverconfig.DefaultGRPCMaxSendMsgSize + } + + maxRecvMsgSize := config.MaxRecvMsgSize + if maxRecvMsgSize == 0 { + maxRecvMsgSize = serverconfig.DefaultGRPCMaxRecvMsgSize + } + + // if gRPC is enabled, configure gRPC client for gRPC gateway + grpcClient, err := grpc.Dial( + config.Address, + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithDefaultCallOptions( + grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), + grpc.MaxCallRecvMsgSize(maxRecvMsgSize), + grpc.MaxCallSendMsgSize(maxSendMsgSize), + ), + ) + if err != nil { + return nil, clientCtx, err + } + + clientCtx = clientCtx.WithGRPCClient(grpcClient) + svrCtx.Logger.Debug("gRPC client assigned to client context", "target", config.Address) + + grpcSrv, err := servergrpc.NewGRPCServer(clientCtx, app, config) + if err != nil { + return nil, clientCtx, err + } + + // Start the gRPC server in a goroutine. Note, the provided ctx will ensure + // that the server is gracefully shut down. + g.Go(func() error { + return servergrpc.StartGRPCServer(ctx, svrCtx.Logger.With("module", "grpc-server"), config, grpcSrv) + }) + return grpcSrv, clientCtx, nil +} + +// returns a function which returns the genesis doc from the genesis file. +func getGenDocProvider(cfg *cmtcfg.Config) func() (*cmttypes.GenesisDoc, error) { + return func() (*cmttypes.GenesisDoc, error) { + appGenesis, err := genutiltypes.AppGenesisFromFile(cfg.GenesisFile()) + if err != nil { + return nil, err + } + + return appGenesis.ToGenesisDoc() + } +} + +func startAPIServer( + ctx context.Context, + g *errgroup.Group, + svrCfg serverconfig.Config, + clientCtx client.Context, + svrCtx *server.Context, + app types.Application, + home string, + grpcSrv *grpc.Server, + metrics *telemetry.Metrics, +) error { + if !svrCfg.API.Enable { + return nil + } + + clientCtx = clientCtx.WithHomeDir(home) + + apiSrv := api.New(clientCtx, svrCtx.Logger.With("module", "api-server"), grpcSrv) + app.RegisterAPIRoutes(apiSrv, svrCfg.API) + + if svrCfg.Telemetry.Enabled { + apiSrv.SetTelemetry(metrics) + } + + g.Go(func() error { + return apiSrv.Start(ctx, svrCfg) + }) + return nil +} + +// TODO: Move nodeKey into being created within the function. +func startCmtNode( + ctx context.Context, + cfg *cmtcfg.Config, + app types.Application, + svrCtx *server.Context, +) (tmNode *node.Node, cleanupFn func(), err error) { + nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile()) + if err != nil { + return nil, cleanupFn, err + } + + cmtApp := server.NewCometABCIWrapper(app) + tmNode, err = node.NewNodeWithContext( + ctx, + cfg, + pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()), + nodeKey, + proxy.NewLocalClientCreator(cmtApp), + getGenDocProvider(cfg), + cmtcfg.DefaultDBProvider, + node.DefaultMetricsProvider(cfg.Instrumentation), + servercmtlog.CometLoggerWrapper{Logger: svrCtx.Logger}, + ) + if err != nil { + return tmNode, cleanupFn, err + } + + if err := tmNode.Start(); err != nil { + return tmNode, cleanupFn, err + } + + cleanupFn = func() { + if tmNode != nil && tmNode.IsRunning() { + _ = tmNode.Stop() + } + } + + return tmNode, cleanupFn, nil +} + +func addStartNodeFlags(cmd *cobra.Command, opts server.StartCmdOptions) { + cmd.Flags().Bool(WithTendermint, true, "Run abci app embedded in-process with tendermint") + cmd.Flags().String(Address, "tcp://0.0.0.0:26658", "Listen address") + cmd.Flags().String(Transport, "socket", "Transport protocol: socket, grpc") + cmd.Flags().String(TraceStore, "", "Enable KVStore tracing to an output file") + cmd.Flags().String(server.FlagMinGasPrices, "", "Minimum gas prices to accept for transactions; Any fee in a tx must meet this minimum (e.g. 5000unibi)") //nolint:lll + cmd.Flags().IntSlice(server.FlagUnsafeSkipUpgrades, []int{}, "Skip a set of upgrade heights to continue the old binary") + cmd.Flags().Uint64(server.FlagHaltHeight, 0, "Block height at which to gracefully halt the chain and shutdown the node") + cmd.Flags().Uint64(server.FlagHaltTime, 0, "Minimum block time (in Unix seconds) at which to gracefully halt the chain and shutdown the node") + cmd.Flags().Bool(server.FlagInterBlockCache, true, "Enable inter-block caching") + cmd.Flags().String(CPUProfile, "", "Enable CPU profiling and write to the provided file") + cmd.Flags().Bool(server.FlagTrace, false, "Provide full stack traces for errors in ABCI Log") + cmd.Flags().String(server.FlagPruning, pruningtypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") + cmd.Flags().Uint64(server.FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") + cmd.Flags().Uint64(server.FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')") //nolint:lll + cmd.Flags().Uint(server.FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks") + cmd.Flags().Uint64(server.FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks") + cmd.Flags().String(AppDBBackend, "", "The type of database for application and snapshots databases") + + cmd.Flags().Bool(GRPCOnly, false, "Start the node in gRPC query only mode without Tendermint process") + cmd.Flags().Bool(GRPCEnable, config.DefaultGRPCEnable, "Define if the gRPC server should be enabled") + cmd.Flags().String(GRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on") + cmd.Flags().Bool(GRPCWebEnable, config.DefaultGRPCWebEnable, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled.)") + cmd.Flags().String(GRPCWebAddress, serverconfig.DefaultGRPCAddress, "The gRPC-Web server address to listen on") + + cmd.Flags().Bool(RPCEnable, config.DefaultAPIEnable, "Defines if Cosmos-sdk REST server should be enabled") + cmd.Flags().Bool(EnabledUnsafeCors, false, "Defines if CORS should be enabled (unsafe - use it at your own risk)") + + cmd.Flags().Bool(JSONRPCEnable, config.DefaultJSONRPCEnable, "Define if the JSON-RPC server should be enabled") + cmd.Flags().StringSlice(JSONRPCAPI, config.GetDefaultAPINamespaces(), "Defines a list of JSON-RPC namespaces that should be enabled") + cmd.Flags().String(JSONRPCAddress, config.DefaultJSONRPCAddress, "the JSON-RPC server address to listen on") + cmd.Flags().String(JSONWsAddress, config.DefaultJSONRPCWsAddress, "the JSON-RPC WS server address to listen on") + cmd.Flags().Uint64(JSONRPCGasCap, config.DefaultGasCap, "Sets a cap on gas that can be used in eth_call/estimateGas unit is unibi (0=infinite)") //nolint:lll + cmd.Flags().Float64(JSONRPCTxFeeCap, config.DefaultTxFeeCap, "Sets a cap on transaction fee that can be sent via the RPC APIs (1 = default 1 nibi)") //nolint:lll + cmd.Flags().Int32(JSONRPCFilterCap, config.DefaultFilterCap, "Sets the global cap for total number of filters that can be created") + cmd.Flags().Duration(JSONRPCEVMTimeout, config.DefaultEVMTimeout, "Sets a timeout used for eth_call (0=infinite)") + cmd.Flags().Duration(JSONRPCHTTPTimeout, config.DefaultHTTPTimeout, "Sets a read/write timeout for json-rpc http server (0=infinite)") + cmd.Flags().Duration(JSONRPCHTTPIdleTimeout, config.DefaultHTTPIdleTimeout, "Sets a idle timeout for json-rpc http server (0=infinite)") + cmd.Flags().Bool(JSONRPCAllowUnprotectedTxs, config.DefaultAllowUnprotectedTxs, "Allow for unprotected (non EIP155 signed) transactions to be submitted via the node's RPC when the global parameter is disabled") //nolint:lll + cmd.Flags().Int32(JSONRPCLogsCap, config.DefaultLogsCap, "Sets the max number of results can be returned from single `eth_getLogs` query") + cmd.Flags().Int32(JSONRPCBlockRangeCap, config.DefaultBlockRangeCap, "Sets the max block range allowed for `eth_getLogs` query") + cmd.Flags().Int(JSONRPCMaxOpenConnections, config.DefaultMaxOpenConnections, "Sets the maximum number of simultaneous connections for the server listener") //nolint:lll + cmd.Flags().Bool(JSONRPCEnableIndexer, false, "Enable the custom tx indexer for json-rpc") + cmd.Flags().Bool(JSONRPCEnableMetrics, false, "Define if EVM rpc metrics server should be enabled") + + cmd.Flags().String(EVMTracer, config.DefaultEVMTracer, "the EVM tracer type to collect execution traces from the EVM transaction execution (json|struct|access_list|markdown)") //nolint:lll + cmd.Flags().Uint64(EVMMaxTxGasWanted, config.DefaultMaxTxGasWanted, "the gas wanted for each eth tx returned in ante handler in check tx mode") //nolint:lll + + cmd.Flags().String(TLSCertPath, "", "the cert.pem file path for the server TLS configuration") + cmd.Flags().String(TLSKeyPath, "", "the key.pem file path for the server TLS configuration") + + cmd.Flags().Uint64(server.FlagStateSyncSnapshotInterval, 0, "State sync snapshot interval") + cmd.Flags().Uint32(server.FlagStateSyncSnapshotKeepRecent, 2, "State sync snapshot to keep") + + // add support for all Tendermint-specific command line options + tcmd.AddNodeFlags(cmd) + + if opts.AddFlags != nil { + opts.AddFlags(cmd) + } +} + +func getCtx(svrCtx *server.Context, block bool) (*errgroup.Group, context.Context) { + ctx, cancelFn := context.WithCancel(context.Background()) + g, ctx := errgroup.WithContext(ctx) + // listen for quit signals so the calling parent process can gracefully exit + server.ListenForQuitSignals(g, block, cancelFn, svrCtx.Logger) + return g, ctx +} + +func getAndValidateConfig(svrCtx *server.Context) (config.Config, error) { + config, err := config.GetConfig(svrCtx.Viper) + if err != nil { + return config, err + } + + if err := config.ValidateBasic(); err != nil { + return config, err + } + return config, nil +} diff --git a/app/server/util.go b/app/server/util.go index a604e1d13..6ac9a7308 100644 --- a/app/server/util.go +++ b/app/server/util.go @@ -13,8 +13,8 @@ import ( "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/version" + "cosmossdk.io/log" tmcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" - tmlog "github.com/cometbft/cometbft/libs/log" rpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" ) @@ -40,7 +40,7 @@ func AddCommands( sdkserver.BootstrapStateCmd(opts.AppCreator), ) - startCmd := StartCmd(opts) + startCmd := StartCmd(opts.AppCreator, opts.DefaultNodeHome) addStartFlags(startCmd) rootCmd.AddCommand( @@ -55,7 +55,7 @@ func AddCommands( ) } -func ConnectTmWS(tmRPCAddr, tmEndpoint string, logger tmlog.Logger) *rpcclient.WSClient { +func ConnectTmWS(tmRPCAddr, tmEndpoint string, logger log.Logger) *rpcclient.WSClient { tmWsClient, err := rpcclient.NewWS(tmRPCAddr, tmEndpoint, rpcclient.MaxReconnectAttempts(256), rpcclient.ReadWait(120*time.Second), diff --git a/eth/indexer/kv_indexer.go b/eth/indexer/kv_indexer.go index cb3054aef..ec6c554ab 100644 --- a/eth/indexer/kv_indexer.go +++ b/eth/indexer/kv_indexer.go @@ -5,10 +5,10 @@ import ( "fmt" errorsmod "cosmossdk.io/errors" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmtypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/eth/rpc/rpcapi/apis.go b/eth/rpc/rpcapi/apis.go index 336674c1e..c10f612ee 100644 --- a/eth/rpc/rpcapi/apis.go +++ b/eth/rpc/rpcapi/apis.go @@ -175,7 +175,7 @@ func GetRPCAPIs(ctx *server.Context, for _, ns := range selectedAPIs { if creator, ok := apiCreators[ns]; ok { - apis = append(apis, creator(ctx, clientCtx, tmWSClient, allowUnprotectedTxs, indexer)...) + apis = append(apis, creator(ctx, clientCtx, allowUnprotectedTxs, indexer)...) } else { ctx.Logger.Error("invalid namespace value", "namespace", ns) } diff --git a/eth/rpc/rpcapi/filtersapi/filter_system.go b/eth/rpc/rpcapi/filtersapi/filter_system.go index 5d91c0963..891aebefa 100644 --- a/eth/rpc/rpcapi/filtersapi/filter_system.go +++ b/eth/rpc/rpcapi/filtersapi/filter_system.go @@ -9,8 +9,8 @@ import ( "github.com/pkg/errors" + "cosmossdk.io/log" tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/libs/log" tmquery "github.com/cometbft/cometbft/libs/pubsub/query" coretypes "github.com/cometbft/cometbft/rpc/core/types" rpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" diff --git a/eth/rpc/rpcapi/websockets.go b/eth/rpc/rpcapi/websockets.go index c168b9054..122094360 100644 --- a/eth/rpc/rpcapi/websockets.go +++ b/eth/rpc/rpcapi/websockets.go @@ -24,7 +24,7 @@ import ( "github.com/ethereum/go-ethereum/params" gethrpc "github.com/ethereum/go-ethereum/rpc" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" rpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" tmtypes "github.com/cometbft/cometbft/types" diff --git a/go.mod b/go.mod index f99b8be74..65ee40d56 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7 // indirect cosmossdk.io/errors v1.0.1 - cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/log v1.3.1 cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc cosmossdk.io/x/circuit v0.1.0 // indirect cosmossdk.io/x/evidence v0.1.0 @@ -19,7 +19,6 @@ require ( github.com/CosmWasm/wasmvm v1.5.2 github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/NibiruChain/collections v0.50.0 - github.com/armon/go-metrics v0.4.1 // EVM-specific deps github.com/btcsuite/btcd v0.23.3 @@ -41,6 +40,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 + github.com/hashicorp/go-metrics v0.5.3 // indirect github.com/holiman/uint256 v1.2.4 // indirect github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.19.1 @@ -63,8 +63,9 @@ require ( cosmossdk.io/collections v0.4.0 cosmossdk.io/math v1.3.0 cosmossdk.io/simapp v0.0.0-20240522060652-a1ae4c3e0337 - cosmossdk.io/tools/rosetta v0.2.1 + github.com/armon/go-metrics v0.4.1 github.com/cometbft/cometbft/api v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 + github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/ibc-go/modules/capability v1.0.0 github.com/cosmos/rosetta v0.50.6 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc @@ -72,6 +73,7 @@ require ( github.com/rs/cors v1.11.0 golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 golang.org/x/net v0.25.0 + golang.org/x/sync v0.7.0 golang.org/x/text v0.15.0 ) @@ -113,7 +115,6 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.1.4 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect @@ -164,7 +165,6 @@ require ( github.com/hashicorp/go-getter v1.7.4 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-metrics v0.5.3 // indirect github.com/hashicorp/go-plugin v1.6.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect @@ -240,7 +240,6 @@ require ( golang.org/x/crypto v0.23.0 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/oauth2 v0.19.0 // indirect - golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/term v0.20.0 // indirect golang.org/x/time v0.5.0 // indirect diff --git a/go.sum b/go.sum index df9a858d1..bca80d041 100644 --- a/go.sum +++ b/go.sum @@ -210,8 +210,6 @@ cosmossdk.io/simapp v0.0.0-20240522060652-a1ae4c3e0337 h1:7juhrs+IZ2ZsfpNaVuI2ZA cosmossdk.io/simapp v0.0.0-20240522060652-a1ae4c3e0337/go.mod h1:HGidcqY4qtfjEKzliLol/BQNXEXjpP7LpVRvVvrpJxM= cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc h1:R9O9d75e0qZYUsVV0zzi+D7cNLnX2JrUOQNoIPaF0Bg= cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc/go.mod h1:amTTatOUV3u1PsKmNb87z6/galCxrRbz9kRdJkL0DyU= -cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= -cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= cosmossdk.io/x/evidence v0.1.0 h1:J6OEyDl1rbykksdGynzPKG5R/zm6TacwW2fbLTW4nCk= From a606f27eb822d063d6d6fcdced6623c916ee26a5 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Mon, 27 May 2024 21:01:27 +0200 Subject: [PATCH 15/22] feat: upgrade comet bft log to cosmossdk.io/log --- cmd/nibid/cmd/decode_base64_test.go | 2 +- cmd/nibid/cmd/genaccounts_test.go | 2 +- cmd/nibid/cmd/root.go | 2 +- cmd/nibid/cmd/testnet_test.go | 2 +- eth/indexer/kv_indexer_test.go | 2 +- eth/rpc/backend/backend.go | 2 +- eth/rpc/backend/mocks/client.go | 2 +- eth/rpc/backend/tracing_test.go | 2 +- eth/rpc/backend/tx_info_test.go | 2 +- eth/rpc/backend/utils.go | 2 +- eth/rpc/rpcapi/apis.go | 2 +- eth/rpc/rpcapi/debugapi/api.go | 2 +- eth/rpc/rpcapi/debugapi/utils.go | 2 +- eth/rpc/rpcapi/eth_api.go | 2 +- eth/rpc/rpcapi/filtersapi/api.go | 2 +- eth/rpc/rpcapi/filtersapi/filter_system_test.go | 2 +- eth/rpc/rpcapi/filtersapi/filters.go | 2 +- eth/rpc/rpcapi/miner_api.go | 2 +- eth/rpc/rpcapi/personal_api.go | 2 +- eth/rpc/rpcapi/txpool_api.go | 2 +- x/common/testutil/assertion/balances.go | 2 +- x/common/testutil/cli/network.go | 2 +- x/common/testutil/client_ctx.go | 2 +- x/common/testutil/sample.go | 2 +- x/common/testutil/testapp/testapp.go | 2 +- x/devgas/v1/keeper/keeper.go | 2 +- x/inflation/keeper/keeper.go | 2 +- x/oracle/keeper/keeper.go | 2 +- x/oracle/keeper/test_utils.go | 2 +- x/tokenfactory/keeper/keeper.go | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/cmd/nibid/cmd/decode_base64_test.go b/cmd/nibid/cmd/decode_base64_test.go index 5711d8cf6..c452dfbd9 100644 --- a/cmd/nibid/cmd/decode_base64_test.go +++ b/cmd/nibid/cmd/decode_base64_test.go @@ -6,7 +6,7 @@ import ( "github.com/NibiruChain/nibiru/app" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" genutiltest "github.com/cosmos/cosmos-sdk/x/genutil/client/testutil" diff --git a/cmd/nibid/cmd/genaccounts_test.go b/cmd/nibid/cmd/genaccounts_test.go index d451673bd..a68f741e9 100644 --- a/cmd/nibid/cmd/genaccounts_test.go +++ b/cmd/nibid/cmd/genaccounts_test.go @@ -7,7 +7,7 @@ import ( "github.com/NibiruChain/nibiru/app" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" diff --git a/cmd/nibid/cmd/root.go b/cmd/nibid/cmd/root.go index 5bc620516..44390d718 100644 --- a/cmd/nibid/cmd/root.go +++ b/cmd/nibid/cmd/root.go @@ -11,9 +11,9 @@ import ( "github.com/NibiruChain/nibiru/app/appconst" "github.com/NibiruChain/nibiru/x/sudo/cli" + "cosmossdk.io/log" dbm "github.com/cometbft/cometbft-db" tmcli "github.com/cometbft/cometbft/libs/cli" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" diff --git a/cmd/nibid/cmd/testnet_test.go b/cmd/nibid/cmd/testnet_test.go index fa2892689..db8c5ac45 100644 --- a/cmd/nibid/cmd/testnet_test.go +++ b/cmd/nibid/cmd/testnet_test.go @@ -7,7 +7,7 @@ import ( "github.com/NibiruChain/nibiru/app" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" diff --git a/eth/indexer/kv_indexer_test.go b/eth/indexer/kv_indexer_test.go index bb446aa71..62aa100e9 100644 --- a/eth/indexer/kv_indexer_test.go +++ b/eth/indexer/kv_indexer_test.go @@ -4,10 +4,10 @@ import ( "math/big" "testing" + tmlog "cosmossdk.io/log" "cosmossdk.io/simapp/params" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" - tmlog "github.com/cometbft/cometbft/libs/log" tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/client" "github.com/ethereum/go-ethereum/common" diff --git a/eth/rpc/backend/backend.go b/eth/rpc/backend/backend.go index c6344efe6..8cf88eea4 100644 --- a/eth/rpc/backend/backend.go +++ b/eth/rpc/backend/backend.go @@ -6,7 +6,7 @@ import ( "math/big" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto/keyring" diff --git a/eth/rpc/backend/mocks/client.go b/eth/rpc/backend/mocks/client.go index 2fabaa113..2553ba7a2 100644 --- a/eth/rpc/backend/mocks/client.go +++ b/eth/rpc/backend/mocks/client.go @@ -10,7 +10,7 @@ import ( coretypes "github.com/cometbft/cometbft/rpc/core/types" - log "github.com/cometbft/cometbft/libs/log" + log "cosmossdk.io/log" mock "github.com/stretchr/testify/mock" diff --git a/eth/rpc/backend/tracing_test.go b/eth/rpc/backend/tracing_test.go index 53f7b9f85..83612bcee 100644 --- a/eth/rpc/backend/tracing_test.go +++ b/eth/rpc/backend/tracing_test.go @@ -3,9 +3,9 @@ package backend import ( "fmt" + tmlog "cosmossdk.io/log" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" - tmlog "github.com/cometbft/cometbft/libs/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/crypto" diff --git a/eth/rpc/backend/tx_info_test.go b/eth/rpc/backend/tx_info_test.go index beb708047..646096a53 100644 --- a/eth/rpc/backend/tx_info_test.go +++ b/eth/rpc/backend/tx_info_test.go @@ -4,10 +4,10 @@ import ( "fmt" "math/big" + tmlog "cosmossdk.io/log" "cosmossdk.io/math" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" - tmlog "github.com/cometbft/cometbft/libs/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cometbft/cometbft/types" "github.com/ethereum/go-ethereum/common" diff --git a/eth/rpc/backend/utils.go b/eth/rpc/backend/utils.go index 054a5d1e7..a8c786a9a 100644 --- a/eth/rpc/backend/utils.go +++ b/eth/rpc/backend/utils.go @@ -18,8 +18,8 @@ import ( "github.com/ethereum/go-ethereum/consensus/misc" gethcore "github.com/ethereum/go-ethereum/core/types" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cometbft/cometbft/api/cometbft/crypto/v1" diff --git a/eth/rpc/rpcapi/apis.go b/eth/rpc/rpcapi/apis.go index c10f612ee..336674c1e 100644 --- a/eth/rpc/rpcapi/apis.go +++ b/eth/rpc/rpcapi/apis.go @@ -175,7 +175,7 @@ func GetRPCAPIs(ctx *server.Context, for _, ns := range selectedAPIs { if creator, ok := apiCreators[ns]; ok { - apis = append(apis, creator(ctx, clientCtx, allowUnprotectedTxs, indexer)...) + apis = append(apis, creator(ctx, clientCtx, tmWSClient, allowUnprotectedTxs, indexer)...) } else { ctx.Logger.Error("invalid namespace value", "namespace", ns) } diff --git a/eth/rpc/rpcapi/debugapi/api.go b/eth/rpc/rpcapi/debugapi/api.go index 7b0bf65d6..9ab57b34d 100644 --- a/eth/rpc/rpcapi/debugapi/api.go +++ b/eth/rpc/rpcapi/debugapi/api.go @@ -21,7 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/server" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/consensus/ethash" diff --git a/eth/rpc/rpcapi/debugapi/utils.go b/eth/rpc/rpcapi/debugapi/utils.go index 95fbad86e..745b7f9d7 100644 --- a/eth/rpc/rpcapi/debugapi/utils.go +++ b/eth/rpc/rpcapi/debugapi/utils.go @@ -8,7 +8,7 @@ import ( "runtime/pprof" "strings" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/server" ) diff --git a/eth/rpc/rpcapi/eth_api.go b/eth/rpc/rpcapi/eth_api.go index 1283e47b6..48883178f 100644 --- a/eth/rpc/rpcapi/eth_api.go +++ b/eth/rpc/rpcapi/eth_api.go @@ -8,7 +8,7 @@ import ( gethrpc "github.com/ethereum/go-ethereum/rpc" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/eth/rpc/rpcapi/filtersapi/api.go b/eth/rpc/rpcapi/filtersapi/api.go index bb9f5ea69..8d03cfcc6 100644 --- a/eth/rpc/rpcapi/filtersapi/api.go +++ b/eth/rpc/rpcapi/filtersapi/api.go @@ -12,7 +12,7 @@ import ( "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" coretypes "github.com/cometbft/cometbft/rpc/core/types" rpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" diff --git a/eth/rpc/rpcapi/filtersapi/filter_system_test.go b/eth/rpc/rpcapi/filtersapi/filter_system_test.go index d55b2c188..c34199156 100644 --- a/eth/rpc/rpcapi/filtersapi/filter_system_test.go +++ b/eth/rpc/rpcapi/filtersapi/filter_system_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" coretypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" diff --git a/eth/rpc/rpcapi/filtersapi/filters.go b/eth/rpc/rpcapi/filtersapi/filters.go index 4710dff8c..ed3ce9a14 100644 --- a/eth/rpc/rpcapi/filtersapi/filters.go +++ b/eth/rpc/rpcapi/filtersapi/filters.go @@ -10,7 +10,7 @@ import ( "github.com/NibiruChain/nibiru/eth/rpc" "github.com/NibiruChain/nibiru/eth/rpc/backend" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/pkg/errors" diff --git a/eth/rpc/rpcapi/miner_api.go b/eth/rpc/rpcapi/miner_api.go index 298d8c4a5..e6377a7b6 100644 --- a/eth/rpc/rpcapi/miner_api.go +++ b/eth/rpc/rpcapi/miner_api.go @@ -11,7 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" ) // MinerAPI is the private miner prefixed set of APIs in the Miner JSON-RPC spec. diff --git a/eth/rpc/rpcapi/personal_api.go b/eth/rpc/rpcapi/personal_api.go index 1ea0f6f52..ee6aef587 100644 --- a/eth/rpc/rpcapi/personal_api.go +++ b/eth/rpc/rpcapi/personal_api.go @@ -13,7 +13,7 @@ import ( "github.com/NibiruChain/nibiru/eth" "github.com/NibiruChain/nibiru/eth/crypto/hd" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/eth/rpc/rpcapi/txpool_api.go b/eth/rpc/rpcapi/txpool_api.go index ab2bc0055..4e1fae17d 100644 --- a/eth/rpc/rpcapi/txpool_api.go +++ b/eth/rpc/rpcapi/txpool_api.go @@ -2,7 +2,7 @@ package rpcapi import ( - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/x/common/testutil/assertion/balances.go b/x/common/testutil/assertion/balances.go index 309505c4c..aa96e54c5 100644 --- a/x/common/testutil/assertion/balances.go +++ b/x/common/testutil/assertion/balances.go @@ -23,7 +23,7 @@ type allBalancesEqual struct { func (b allBalancesEqual) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { coins := app.BankKeeper.GetAllBalances(ctx, b.Account) - if !coins.IsEqual(b.Amount) { + if !coins.Equal(b.Amount) { return ctx, fmt.Errorf( "account %s balance not equal, expected %s, got %s", b.Account.String(), diff --git a/x/common/testutil/cli/network.go b/x/common/testutil/cli/network.go index cae38372d..d385a8b47 100644 --- a/x/common/testutil/cli/network.go +++ b/x/common/testutil/cli/network.go @@ -14,8 +14,8 @@ import ( "sync" "time" + "cosmossdk.io/log" "cosmossdk.io/store/pruning/types" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/testutil/sims" "cosmossdk.io/math" diff --git a/x/common/testutil/client_ctx.go b/x/common/testutil/client_ctx.go index 76a88332c..3c6e09f98 100644 --- a/x/common/testutil/client_ctx.go +++ b/x/common/testutil/client_ctx.go @@ -6,7 +6,7 @@ import ( moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/types/module" diff --git a/x/common/testutil/sample.go b/x/common/testutil/sample.go index 46754ae4b..54ca5aa5e 100644 --- a/x/common/testutil/sample.go +++ b/x/common/testutil/sample.go @@ -11,8 +11,8 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/log" tmdb "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" diff --git a/x/common/testutil/testapp/testapp.go b/x/common/testutil/testapp/testapp.go index 8df17c2dc..9a6602ff0 100644 --- a/x/common/testutil/testapp/testapp.go +++ b/x/common/testutil/testapp/testapp.go @@ -4,10 +4,10 @@ import ( "encoding/json" "time" + "cosmossdk.io/log" "cosmossdk.io/math" tmdb "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/testutil/sims" diff --git a/x/devgas/v1/keeper/keeper.go b/x/devgas/v1/keeper/keeper.go index ccae4a59d..fb1869932 100644 --- a/x/devgas/v1/keeper/keeper.go +++ b/x/devgas/v1/keeper/keeper.go @@ -5,7 +5,7 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/inflation/keeper/keeper.go b/x/inflation/keeper/keeper.go index 6c576d336..bc28ff7e5 100644 --- a/x/inflation/keeper/keeper.go +++ b/x/inflation/keeper/keeper.go @@ -1,9 +1,9 @@ package keeper import ( + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" "github.com/NibiruChain/collections" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 9d3a07d7b..9e06f56e2 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -7,8 +7,8 @@ import ( storetypes "cosmossdk.io/store/types" sdkerrors "cosmossdk.io/errors" + "cosmossdk.io/log" "cosmossdk.io/math" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" diff --git a/x/oracle/keeper/test_utils.go b/x/oracle/keeper/test_utils.go index 5119211b1..a410a4ed7 100644 --- a/x/oracle/keeper/test_utils.go +++ b/x/oracle/keeper/test_utils.go @@ -5,6 +5,7 @@ import ( "testing" "time" + "cosmossdk.io/log" "cosmossdk.io/math" "cosmossdk.io/store" storetypes "cosmossdk.io/store/types" @@ -16,7 +17,6 @@ import ( dbm "github.com/cometbft/cometbft-db" "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/secp256k1" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/tokenfactory/keeper/keeper.go b/x/tokenfactory/keeper/keeper.go index e67e084e4..7aaf47f9a 100644 --- a/x/tokenfactory/keeper/keeper.go +++ b/x/tokenfactory/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" From ba38df5ee80122ccb25459a7d47f15d00e791a01 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Mon, 27 May 2024 21:01:58 +0200 Subject: [PATCH 16/22] feat: upgrade migration to use context.Context --- app/upgrades/v1_1_0/constants.go | 5 +++-- app/upgrades/v1_2_0/constants.go | 5 +++-- app/upgrades/v1_3_0/constants.go | 7 +++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/upgrades/v1_1_0/constants.go b/app/upgrades/v1_1_0/constants.go index cf8a998cd..3a6afd6ed 100644 --- a/app/upgrades/v1_1_0/constants.go +++ b/app/upgrades/v1_1_0/constants.go @@ -1,9 +1,10 @@ package v1_1_0 import ( + "context" + "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/NibiruChain/nibiru/app/upgrades" @@ -15,7 +16,7 @@ const UpgradeName = "v1.1.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v1_2_0/constants.go b/app/upgrades/v1_2_0/constants.go index 4dabae844..a9578f998 100644 --- a/app/upgrades/v1_2_0/constants.go +++ b/app/upgrades/v1_2_0/constants.go @@ -1,9 +1,10 @@ package v1_2_0 import ( + "context" + "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/NibiruChain/nibiru/app/upgrades" @@ -14,7 +15,7 @@ const UpgradeName = "v1.2.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, cfg, fromVM) } }, diff --git a/app/upgrades/v1_3_0/constants.go b/app/upgrades/v1_3_0/constants.go index 917de11ef..2684f0ea3 100644 --- a/app/upgrades/v1_3_0/constants.go +++ b/app/upgrades/v1_3_0/constants.go @@ -1,6 +1,8 @@ package v1_3_0 import ( + "context" + "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -23,7 +25,7 @@ const UpgradeName = "v1.3.0" var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { // set the ICS27 consensus version so InitGenesis is not run fromVM[icatypes.ModuleName] = mm.GetVersionMap()[icatypes.ModuleName] @@ -55,7 +57,8 @@ var Upgrade = upgrades.Upgrade{ if !correctTypecast { panic("mm.Modules[icatypes.ModuleName] is not of type ica.AppModule") } - icamodule.InitModule(ctx, controllerParams, hostParams) + sdkCtx := sdk.UnwrapSDKContext(ctx) + icamodule.InitModule(sdkCtx, controllerParams, hostParams) return mm.RunMigrations(ctx, cfg, fromVM) } From 713331e1cde7f19661ad0b64cb76424908a37f3c Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Mon, 27 May 2024 22:11:45 +0200 Subject: [PATCH 17/22] feat: almost upgrade all of app.go except begin/end block --- app/ante.go | 6 +++--- app/app.go | 19 +++++++++---------- go.mod | 4 ++-- simapp/sim_test.go | 2 +- x/devgas/v1/ante/expected_keepers.go | 6 ++++-- x/inflation/types/interfaces.go | 2 +- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/app/ante.go b/app/ante.go index 63fdebd67..cb4210176 100644 --- a/app/ante.go +++ b/app/ante.go @@ -22,8 +22,8 @@ type AnteHandlerOptions struct { DevGasKeeper *devgaskeeper.Keeper DevGasBankKeeper devgasante.BankKeeper - TxCounterStoreKey corestoretypes.KVStoreService - WasmConfig *wasmtypes.WasmConfig + TXCounterStoreService corestoretypes.KVStoreService + WasmConfig *wasmtypes.WasmConfig } // NewAnteHandler returns and AnteHandler that checks and increments sequence @@ -37,7 +37,7 @@ func NewAnteHandler(options AnteHandlerOptions) (sdk.AnteHandler, error) { anteDecorators := []sdk.AnteDecorator{ sdkante.NewSetUpContextDecorator(), wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit), - wasmkeeper.NewCountTXDecorator(options.TxCounterStoreKey), + wasmkeeper.NewCountTXDecorator(options.TXCounterStoreService), sdkante.NewExtensionOptionsDecorator(nil), sdkante.NewValidateBasicDecorator(), sdkante.NewTxTimeoutHeightDecorator(), diff --git a/app/app.go b/app/app.go index b8d35b545..08224ff60 100644 --- a/app/app.go +++ b/app/app.go @@ -10,15 +10,14 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - "github.com/cosmos/cosmos-sdk/server" "github.com/NibiruChain/nibiru/app/wasmext" + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmos "github.com/cometbft/cometbft/libs/os" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" @@ -190,11 +189,11 @@ func NewNibiruApp( SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), SigGasConsumer: authante.DefaultSigVerificationGasConsumer, }, - IBCKeeper: app.ibcKeeper, - TxCounterStoreKey: keys[wasmtypes.StoreKey], - WasmConfig: &wasmConfig, - DevGasKeeper: &app.DevGasKeeper, - DevGasBankKeeper: app.BankKeeper, + IBCKeeper: app.ibcKeeper, + TXCounterStoreService: runtime.NewKVStoreService(keys[wasmtypes.StoreKey]), + WasmConfig: &wasmConfig, + DevGasKeeper: &app.DevGasKeeper, + DevGasBankKeeper: app.BankKeeper, }) if err != nil { panic(fmt.Errorf("failed to create sdk.AnteHandler: %s", err)) @@ -253,7 +252,7 @@ func (app *NibiruApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci } // InitChainer application update at chain initialization -func (app *NibiruApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { +func (app *NibiruApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { var genesisState GenesisState if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) @@ -267,7 +266,7 @@ func (app *NibiruApp) LoadHeight(height int64) error { return app.LoadVersion(height) } -func (app *NibiruApp) RegisterNodeService(clientCtx client.Context, config server.Config) { +func (app *NibiruApp) RegisterNodeService(clientCtx client.Context, config config.Config) { node.RegisterNodeService(clientCtx, app.GRPCQueryRouter(), config) } diff --git a/go.mod b/go.mod index 65ee40d56..443303d2a 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ toolchain go1.22.3 require ( cosmossdk.io/api v0.7.5 // indirect cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect - cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7 // indirect + cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7 cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.3.1 cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc @@ -40,7 +40,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 - github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-metrics v0.5.3 github.com/holiman/uint256 v1.2.4 // indirect github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.19.1 diff --git a/simapp/sim_test.go b/simapp/sim_test.go index d56651436..b4f9ce164 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -9,11 +9,11 @@ import ( "strings" "testing" + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" evidencetypes "cosmossdk.io/x/evidence/types" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/devgas/v1/ante/expected_keepers.go b/x/devgas/v1/ante/expected_keepers.go index eefe11c35..905dd778f 100644 --- a/x/devgas/v1/ante/expected_keepers.go +++ b/x/devgas/v1/ante/expected_keepers.go @@ -3,6 +3,8 @@ package ante // Interfaces needed for the for the Nibiru Chain ante handler import ( + "context" + sdk "github.com/cosmos/cosmos-sdk/types" devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" @@ -10,11 +12,11 @@ import ( type BankKeeper interface { SendCoinsFromAccountToModule( - ctx sdk.Context, senderAddr sdk.AccAddress, + ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, ) error SendCoinsFromModuleToAccount( - ctx sdk.Context, senderModule string, + ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins, ) error } diff --git a/x/inflation/types/interfaces.go b/x/inflation/types/interfaces.go index 153cf76f6..1ab6ed971 100644 --- a/x/inflation/types/interfaces.go +++ b/x/inflation/types/interfaces.go @@ -38,7 +38,7 @@ type DistrKeeper interface { // StakingKeeper expected staking keeper type StakingKeeper interface { // BondedRatio the fraction of the staking tokens which are currently bonded - BondedRatio(ctx sdk.Context) math.LegacyDec + BondedRatio(ctx sdk.Context) sdkmath.LegacyDec StakingTokenSupply(ctx sdk.Context) sdkmath.Int TotalBondedTokens(ctx sdk.Context) sdkmath.Int } From 03c6782d5ae343189b3046624ff82b8b103a9a7e Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Mon, 27 May 2024 22:28:15 +0200 Subject: [PATCH 18/22] feat: update the export.go --- app/export.go | 55 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/app/export.go b/app/export.go index 07544b947..fd927444d 100644 --- a/app/export.go +++ b/app/export.go @@ -4,7 +4,7 @@ import ( "encoding/json" "log" - tmproto "github.com/cometbft/cometbft/types" + storetypes "cosmossdk.io/store/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -19,7 +19,7 @@ func (app *NibiruApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block - ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) + ctx := app.NewContext(true) // We export at last height + 1, because that's the height at which // Tendermint will start InitChain. @@ -29,7 +29,11 @@ func (app *NibiruApp) ExportAppStateAndValidators( app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState := app.ModuleManager.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + genState, err := app.ModuleManager.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + if err != nil { + return servertypes.ExportedApp{}, err + } + appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err @@ -73,12 +77,19 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs // withdraw all validator commission app.stakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) + valBz, err := app.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } + _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, valBz) return false }) // withdraw all delegator rewards - dels := app.stakingKeeper.GetAllDelegations(ctx) + dels, err := app.stakingKeeper.GetAllDelegations(ctx) + if err != nil { + panic(err) + } for _, delegation := range dels { valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) if err != nil { @@ -104,14 +115,25 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs // reinitialize all validators app.stakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valBz, err := app.stakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } // donate any unwithdrawn outstanding reward fraction tokens to the community pool - scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) - feePool := app.DistrKeeper.GetFeePool(ctx) + scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valBz) + if err != nil { + panic(err) + } + feePool, err := app.DistrKeeper.FeePool.Get(ctx) + if err != nil { + panic(err) + } feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) - app.DistrKeeper.SetFeePool(ctx, feePool) + if err := app.DistrKeeper.FeePool.Set(ctx, feePool); err != nil { + panic(err) + } - err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) - if err != nil { + if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, valBz); err != nil { panic(err) } return false @@ -163,13 +185,13 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. store := ctx.KVStore(app.keys[stakingtypes.StoreKey]) - iter := sdk.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) + iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) counter := int16(0) for ; iter.Valid(); iter.Next() { addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) - validator, found := app.stakingKeeper.GetValidator(ctx, addr) - if !found { + validator, err := app.stakingKeeper.GetValidator(ctx, addr) + if err != nil { panic("expected validator, not found") } @@ -182,9 +204,12 @@ func (app *NibiruApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs counter++ } - iter.Close() + if err := iter.Close(); err != nil { + app.Logger().Error("error while closing the key-value store reverse prefix iterator: ", err) + return + } - _, err := app.stakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + _, err = app.stakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { log.Fatal(err) } From 31281c45addcf0d84762fd5c1f92d0b63519420a Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Mon, 27 May 2024 23:48:51 +0200 Subject: [PATCH 19/22] feat: upgrade app/keepers.go --- app/app.go | 1 + app/keepers.go | 121 ++++++++++++++++------- x/devgas/v1/module.go | 6 ++ x/devgas/v1/types/expected_keepers.go | 19 ++-- x/epochs/module.go | 6 ++ x/evm/deps.go | 31 +++--- x/evm/evmmodule/module.go | 6 ++ x/genmsg/module.go | 6 ++ x/inflation/keeper/params.go | 1 + x/inflation/module.go | 6 ++ x/inflation/types/interfaces.go | 35 +++---- x/oracle/integration/action/price.go | 1 + x/oracle/keeper/params.go | 2 + x/oracle/module.go | 6 ++ x/oracle/types/expected_keeper.go | 39 ++++---- x/oracle/types/msgs.go | 1 + x/sudo/module.go | 6 ++ x/tokenfactory/module.go | 6 ++ x/tokenfactory/types/expected_keepers.go | 37 +++---- 19 files changed, 224 insertions(+), 112 deletions(-) diff --git a/app/app.go b/app/app.go index 08224ff60..3d67a8563 100644 --- a/app/app.go +++ b/app/app.go @@ -78,6 +78,7 @@ type NibiruApp struct { *baseapp.BaseApp legacyAmino *codec.LegacyAmino appCodec codec.Codec + txConfig client.TxConfig interfaceRegistry codectypes.InterfaceRegistry // keys to access the substores diff --git a/app/keepers.go b/app/keepers.go index 86eb372d4..705624bbc 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -4,6 +4,12 @@ import ( "path/filepath" "strings" + "github.com/cosmos/cosmos-sdk/client" + sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" + ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" @@ -26,6 +32,7 @@ import ( wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -102,7 +109,6 @@ import ( // --------------------------------------------------------------- // Nibiru Custom Modules - "github.com/NibiruChain/nibiru/eth" "github.com/NibiruChain/nibiru/x/common" "github.com/NibiruChain/nibiru/x/devgas/v1" devgaskeeper "github.com/NibiruChain/nibiru/x/devgas/v1/keeper" @@ -141,8 +147,8 @@ type AppKeepers struct { /* DistrKeeper is the keeper of the distribution store */ DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper - crisisKeeper crisiskeeper.Keeper - upgradeKeeper upgradekeeper.Keeper + crisisKeeper *crisiskeeper.Keeper + upgradeKeeper *upgradekeeper.Keeper paramsKeeper paramskeeper.Keeper authzKeeper authzkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper @@ -253,8 +259,13 @@ func (app *NibiruApp) InitKeepers( ) // set the BaseApp's parameter store - app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(appCodec, keys[consensusparamtypes.StoreKey], govModuleAddr) - bApp.SetParamStore(&app.ConsensusParamsKeeper) + app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper( + appCodec, + runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]), + govModuleAddr, + runtime.EventService{}, + ) + bApp.SetParamStore(app.ConsensusParamsKeeper.ParamsStore) /* Add capabilityKeeper and ScopeToModule for the ibc module This allows authentication of object-capability permissions for each of @@ -282,29 +293,51 @@ func (app *NibiruApp) InitKeepers( // to ProtoBaseAccount replacement. app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, - keys[authtypes.StoreKey], - eth.ProtoBaseAccount, + runtime.NewKVStoreService(keys[authtypes.StoreKey]), + authtypes.ProtoBaseAccount, maccPerms, - sdk.GetConfig().GetBech32AccountAddrPrefix(), + authcodec.NewBech32Codec(sdk.Bech32MainPrefix), + sdk.Bech32MainPrefix, govModuleAddr, ) + app.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, - keys[banktypes.StoreKey], + runtime.NewKVStoreService(keys[banktypes.StoreKey]), app.AccountKeeper, BlockedAddresses(), govModuleAddr, + app.Logger().With("module", "x/bank"), ) + + // optional: enable sign mode textual by overwriting the default tx config (after setting the bank keeper) + enabledSignModes := append(tx.DefaultSignModes, sigtypes.SignMode_SIGN_MODE_TEXTUAL) + txConfigOpts := tx.ConfigOptions{ + EnabledSignModes: enabledSignModes, + TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), + } + txConfig, err := tx.NewTxConfigWithOptions( + appCodec, + txConfigOpts, + ) + if err != nil { + panic(err) + } + app.txConfig = txConfig + app.stakingKeeper = stakingkeeper.NewKeeper( appCodec, - keys[stakingtypes.StoreKey], + runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, govModuleAddr, + authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr), + authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr), ) + app.DistrKeeper = distrkeeper.NewKeeper( appCodec, - keys[distrtypes.StoreKey], + runtime.NewKVStoreService(keys[distrtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, app.stakingKeeper, @@ -313,16 +346,21 @@ func (app *NibiruApp) InitKeepers( ) invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) - app.crisisKeeper = *crisiskeeper.NewKeeper( + app.crisisKeeper = crisiskeeper.NewKeeper( appCodec, - keys[crisistypes.StoreKey], + runtime.NewKVStoreService(keys[crisistypes.StoreKey]), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, govModuleAddr, + app.AccountKeeper.AddressCodec(), ) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) + app.FeeGrantKeeper = feegrantkeeper.NewKeeper( + appCodec, + runtime.NewKVStoreService(keys[feegrant.StoreKey]), + app.AccountKeeper, + ) // get skipUpgradeHeights from the app options skipUpgradeHeights := map[int64]bool{} @@ -332,9 +370,9 @@ func (app *NibiruApp) InitKeepers( homePath := cast.ToString(appOpts.Get(flags.FlagHome)) /*upgradeKeeper must be created before ibcKeeper. */ - app.upgradeKeeper = *upgradekeeper.NewKeeper( + app.upgradeKeeper = upgradekeeper.NewKeeper( skipUpgradeHeights, - keys[upgradetypes.StoreKey], + runtime.NewKVStoreService(keys[upgradetypes.StoreKey]), appCodec, homePath, app.BaseApp, @@ -346,7 +384,7 @@ func (app *NibiruApp) InitKeepers( app.slashingKeeper = slashingkeeper.NewKeeper( appCodec, legacyAmino, - keys[slashingtypes.StoreKey], + runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), app.stakingKeeper, govModuleAddr, ) @@ -356,7 +394,7 @@ func (app *NibiruApp) InitKeepers( ) app.authzKeeper = authzkeeper.NewKeeper( - keys[authzkeeper.StoreKey], + runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), appCodec, app.BaseApp.MsgServiceRouter(), app.AccountKeeper, @@ -408,6 +446,7 @@ func (app *NibiruApp) InitKeepers( app.stakingKeeper, app.upgradeKeeper, app.ScopedIBCKeeper, + govModuleAddr, ) // IBC Fee Module keeper @@ -415,7 +454,7 @@ func (app *NibiruApp) InitKeepers( appCodec, keys[ibcfeetypes.StoreKey], app.ibcKeeper.ChannelKeeper, // may be replaced with IBC middleware app.ibcKeeper.ChannelKeeper, - &app.ibcKeeper.PortKeeper, + app.ibcKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, ) @@ -426,10 +465,11 @@ func (app *NibiruApp) InitKeepers( /* paramSubspace */ app.GetSubspace(ibctransfertypes.ModuleName), /* ibctransfertypes.ICS4Wrapper */ app.ibcFeeKeeper, /* ibctransfertypes.ChannelKeeper */ app.ibcKeeper.ChannelKeeper, - /* ibctransfertypes.PortKeeper */ &app.ibcKeeper.PortKeeper, + /* ibctransfertypes.PortKeeper */ app.ibcKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, app.ScopedTransferKeeper, + govModuleAddr, ) app.icaControllerKeeper = icacontrollerkeeper.NewKeeper( @@ -437,9 +477,10 @@ func (app *NibiruApp) InitKeepers( app.GetSubspace(icacontrollertypes.SubModuleName), app.ibcFeeKeeper, app.ibcKeeper.ChannelKeeper, - &app.ibcKeeper.PortKeeper, + app.ibcKeeper.PortKeeper, app.ScopedICAControllerKeeper, app.MsgServiceRouter(), + govModuleAddr, ) app.icaHostKeeper = icahostkeeper.NewKeeper( @@ -448,16 +489,17 @@ func (app *NibiruApp) InitKeepers( app.GetSubspace(icahosttypes.SubModuleName), app.ibcFeeKeeper, app.ibcKeeper.ChannelKeeper, - &app.ibcKeeper.PortKeeper, + app.ibcKeeper.PortKeeper, app.AccountKeeper, app.ScopedICAHostKeeper, app.MsgServiceRouter(), + govModuleAddr, ) app.ScopedWasmKeeper = app.capabilityKeeper.ScopeToModule(wasmtypes.ModuleName) wasmDir := filepath.Join(homePath, "data") - wasmConfig, err := wasm.ReadWasmConfig(appOpts) + wasmConfig, err = wasm.ReadWasmConfig(appOpts) if err != nil { panic("error while reading wasm config: " + err.Error()) } @@ -473,14 +515,14 @@ func (app *NibiruApp) InitKeepers( supportedFeatures := strings.Join(wasmdapp.AllCapabilities(), ",") app.WasmKeeper = wasmkeeper.NewKeeper( appCodec, - keys[wasmtypes.StoreKey], + runtime.NewKVStoreService(keys[wasmtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, app.stakingKeeper, distrkeeper.NewQuerier(app.DistrKeeper), app.ibcFeeKeeper, // ISC4 Wrapper: fee IBC middleware app.ibcKeeper.ChannelKeeper, - &app.ibcKeeper.PortKeeper, + app.ibcKeeper.PortKeeper, app.ScopedWasmKeeper, app.ibcTransferKeeper, app.MsgServiceRouter(), @@ -517,8 +559,12 @@ func (app *NibiruApp) InitKeepers( // Create evidence keeper. // This keeper automatically includes an evidence router. app.evidenceKeeper = *evidencekeeper.NewKeeper( - appCodec, keys[evidencetypes.StoreKey], app.stakingKeeper, + appCodec, + runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), + app.stakingKeeper, app.slashingKeeper, + app.AccountKeeper.AddressCodec(), + runtime.ProvideCometInfoService(), ) // Mock Module setup for testing IBC and also acts as the interchain accounts authentication module @@ -587,20 +633,22 @@ func (app *NibiruApp) InitKeepers( govRouter. AddRoute(govtypes.RouterKey, govv1beta1types.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.upgradeKeeper)). + // AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.upgradeKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)) govConfig := govtypes.DefaultConfig() govKeeper := govkeeper.NewKeeper( appCodec, - keys[govtypes.StoreKey], + runtime.NewKVStoreService(keys[govtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, app.stakingKeeper, + app.DistrKeeper, app.MsgServiceRouter(), govConfig, - govModuleAddr, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + govKeeper.SetLegacyRouter(govRouter) app.GovKeeper = *govKeeper.SetHooks( @@ -613,14 +661,15 @@ func (app *NibiruApp) InitKeepers( func (app *NibiruApp) initAppModules( encodingConfig EncodingConfig, skipGenesisInvariants bool, + txConfig client.TxConfig, ) []module.AppModule { appCodec := app.appCodec return []module.AppModule{ // core modules genutil.NewAppModule( - app.AccountKeeper, app.stakingKeeper, app.BaseApp.DeliverTx, - encodingConfig.TxConfig, + app.AccountKeeper, app.stakingKeeper, app, + txConfig, ), auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), @@ -628,10 +677,10 @@ func (app *NibiruApp) initAppModules( capability.NewAppModule(appCodec, *app.capabilityKeeper, false), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), - slashing.NewAppModule(appCodec, app.slashingKeeper, app.AccountKeeper, app.BankKeeper, app.stakingKeeper, app.GetSubspace(slashingtypes.ModuleName)), + slashing.NewAppModule(appCodec, app.slashingKeeper, app.AccountKeeper, app.BankKeeper, app.stakingKeeper, app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.stakingKeeper, app.GetSubspace(distrtypes.ModuleName)), staking.NewAppModule(appCodec, app.stakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), - upgrade.NewAppModule(&app.upgradeKeeper), + upgrade.NewAppModule(app.upgradeKeeper, app.AccountKeeper.AddressCodec()), params.NewAppModule(app.paramsKeeper), authzmodule.NewAppModule(appCodec, app.authzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), @@ -663,7 +712,7 @@ func (app *NibiruApp) initAppModules( app.TokenFactoryKeeper, app.AccountKeeper, ), - crisis.NewAppModule(&app.crisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), // always be last to make sure that it checks for all invariants and not only part of them + crisis.NewAppModule(app.crisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), // always be last to make sure that it checks for all invariants and not only part of them } } @@ -755,7 +804,7 @@ func (app *NibiruApp) initModuleManager( skipGenesisInvariants bool, ) { app.ModuleManager = module.NewManager( - app.initAppModules(encodingConfig, skipGenesisInvariants)..., + app.initAppModules(encodingConfig, skipGenesisInvariants, app.txConfig)..., ) orderedModules := orderedModuleNames() @@ -767,7 +816,7 @@ func (app *NibiruApp) initModuleManager( // Uncomment if you want to set a custom migration order here. // app.mm.SetOrderMigrations(custom order) - app.ModuleManager.RegisterInvariants(&app.crisisKeeper) + app.ModuleManager.RegisterInvariants(app.crisisKeeper) app.configurator = module.NewConfigurator( app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) app.ModuleManager.RegisterServices(app.configurator) diff --git a/x/devgas/v1/module.go b/x/devgas/v1/module.go index b76044225..51e06f6f1 100644 --- a/x/devgas/v1/module.go +++ b/x/devgas/v1/module.go @@ -124,6 +124,12 @@ func NewAppModule( } } +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + // Name returns the fees module's name. func (AppModule) Name() string { return types.ModuleName diff --git a/x/devgas/v1/types/expected_keepers.go b/x/devgas/v1/types/expected_keepers.go index 1592cf2bf..5c2ce656e 100644 --- a/x/devgas/v1/types/expected_keepers.go +++ b/x/devgas/v1/types/expected_keepers.go @@ -1,29 +1,30 @@ package types import ( + context "context" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" // "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" - acctypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) // AccountKeeper defines the expected interface needed to retrieve account info. type AccountKeeper interface { GetModuleAddress(moduleName string) sdk.AccAddress - GetModuleAccount(ctx sdk.Context, name string) acctypes.ModuleAccountI + GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI - HasAccount(ctx sdk.Context, addr sdk.AccAddress) bool - GetAccount(ctx sdk.Context, addr sdk.AccAddress) (account acctypes.AccountI) + HasAccount(ctx context.Context, addr sdk.AccAddress) bool + GetAccount(ctx context.Context, addr sdk.AccAddress) (account sdk.AccountI) } // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins } // WasmKeeper defines the expected interface needed to retrieve cosmwasm contracts. diff --git a/x/epochs/module.go b/x/epochs/module.go index 1bbd0a53b..b4f2f02ca 100644 --- a/x/epochs/module.go +++ b/x/epochs/module.go @@ -71,6 +71,12 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) //nolint:errcheck } +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + // GetTxCmd returns the capability module's root tx command. func (a AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd() diff --git a/x/evm/deps.go b/x/evm/deps.go index b76eb37ac..eba5ca5a6 100644 --- a/x/evm/deps.go +++ b/x/evm/deps.go @@ -2,6 +2,9 @@ package evm import ( + context "context" + + "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -9,28 +12,28 @@ import ( // AccountKeeper defines the expected account keeper interface type AccountKeeper interface { - NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI + NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) types.AccountI GetModuleAddress(moduleName string) sdk.AccAddress - GetAllAccounts(ctx sdk.Context) (accounts []authtypes.AccountI) - IterateAccounts(ctx sdk.Context, cb func(account authtypes.AccountI) bool) - GetSequence(sdk.Context, sdk.AccAddress) (uint64, error) - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI - SetAccount(ctx sdk.Context, account authtypes.AccountI) - RemoveAccount(ctx sdk.Context, account authtypes.AccountI) - GetParams(ctx sdk.Context) (params authtypes.Params) + GetAllAccounts(ctx context.Context) (accounts []types.AccountI) + IterateAccounts(ctx context.Context, cb func(account types.AccountI) bool) + GetSequence(context.Context, sdk.AccAddress) (uint64, error) + GetAccount(ctx context.Context, addr sdk.AccAddress) types.AccountI + SetAccount(ctx context.Context, account types.AccountI) + RemoveAccount(ctx context.Context, account types.AccountI) + GetParams(ctx context.Context) (params authtypes.Params) } // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { authtypes.BankKeeper - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error } // StakingKeeper returns the historical headers kept in store. type StakingKeeper interface { - GetHistoricalInfo(ctx sdk.Context, height int64) (stakingtypes.HistoricalInfo, bool) - GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) + GetHistoricalInfo(ctx context.Context, height int64) (stakingtypes.HistoricalInfo, bool) + GetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) } diff --git a/x/evm/evmmodule/module.go b/x/evm/evmmodule/module.go index e12366612..a5f55de15 100644 --- a/x/evm/evmmodule/module.go +++ b/x/evm/evmmodule/module.go @@ -69,6 +69,12 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingCo return genesisState.Validate() } +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + // RegisterRESTRoutes performs a no-op as the EVM module doesn't expose REST // endpoints func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) { diff --git a/x/genmsg/module.go b/x/genmsg/module.go index f20ae9b74..6a878d12d 100644 --- a/x/genmsg/module.go +++ b/x/genmsg/module.go @@ -32,6 +32,12 @@ func NewAppModule(h MessageRouter) AppModule { return AppModule{h} } +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + type AppModule struct { router MessageRouter } diff --git a/x/inflation/keeper/params.go b/x/inflation/keeper/params.go index 68c7a040b..9b7b0c9df 100644 --- a/x/inflation/keeper/params.go +++ b/x/inflation/keeper/params.go @@ -1,6 +1,7 @@ package keeper import ( + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/nibiru/x/inflation/types" diff --git a/x/inflation/module.go b/x/inflation/module.go index d0ab48ee3..95e4221d4 100644 --- a/x/inflation/module.go +++ b/x/inflation/module.go @@ -69,6 +69,12 @@ func (b AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncoding return genesisState.Validate() } +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the inflation module. func (b AppModuleBasic) RegisterGRPCGatewayRoutes(c client.Context, serveMux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), serveMux, types.NewQueryClient(c)); err != nil { diff --git a/x/inflation/types/interfaces.go b/x/inflation/types/interfaces.go index 1ab6ed971..577ab567d 100644 --- a/x/inflation/types/interfaces.go +++ b/x/inflation/types/interfaces.go @@ -1,46 +1,47 @@ package types // noalias import ( + context "context" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/types" ) // AccountKeeper defines the contract required for account APIs. type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress - GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI - GetAccount(sdk.Context, sdk.AccAddress) types.AccountI - SetAccount(sdk.Context, types.AccountI) + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI + GetAccount(context.Context, sdk.AccAddress) sdk.AccountI + SetAccount(context.Context, sdk.AccountI) } // BankKeeper defines the contract needed to be fulfilled for banking and supply // dependencies. type BankKeeper interface { - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error SendCoinsFromAccountToModule( - ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, + ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, ) error - MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error - HasSupply(ctx sdk.Context, denom string) bool - GetSupply(ctx sdk.Context, denom string) sdk.Coin + MintCoins(ctx context.Context, name string, amt sdk.Coins) error + BurnCoins(ctx context.Context, name string, amt sdk.Coins) error + HasSupply(ctx context.Context, denom string) bool + GetSupply(ctx context.Context, denom string) sdk.Coin } // DistrKeeper defines the contract needed to be fulfilled for distribution keeper type DistrKeeper interface { - FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error + FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error } // StakingKeeper expected staking keeper type StakingKeeper interface { // BondedRatio the fraction of the staking tokens which are currently bonded - BondedRatio(ctx sdk.Context) sdkmath.LegacyDec - StakingTokenSupply(ctx sdk.Context) sdkmath.Int - TotalBondedTokens(ctx sdk.Context) sdkmath.Int + BondedRatio(ctx context.Context) (sdkmath.LegacyDec, error) + StakingTokenSupply(ctx context.Context) (sdkmath.Int, error) + TotalBondedTokens(context.Context) (sdkmath.Int, error) // total bonded tokens within the validator set } type SudoKeeper interface { diff --git a/x/oracle/integration/action/price.go b/x/oracle/integration/action/price.go index 9fd5ebc37..80f1b9411 100644 --- a/x/oracle/integration/action/price.go +++ b/x/oracle/integration/action/price.go @@ -3,6 +3,7 @@ package action import ( "time" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/collections" diff --git a/x/oracle/keeper/params.go b/x/oracle/keeper/params.go index 0c67443c1..ad2dc4a03 100644 --- a/x/oracle/keeper/params.go +++ b/x/oracle/keeper/params.go @@ -1,6 +1,8 @@ package keeper import ( + "cosmossdk.io/math" + "github.com/NibiruChain/nibiru/x/common/asset" "github.com/NibiruChain/nibiru/x/oracle/types" diff --git a/x/oracle/module.go b/x/oracle/module.go index d69df8fdc..001a9dda2 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -70,6 +70,12 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) { } +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the oracle module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { _ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) diff --git a/x/oracle/types/expected_keeper.go b/x/oracle/types/expected_keeper.go index 60cf0a1ee..d9ca47df3 100644 --- a/x/oracle/types/expected_keeper.go +++ b/x/oracle/types/expected_keeper.go @@ -1,50 +1,53 @@ package types import ( + context "context" + + corestore "cosmossdk.io/core/store" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // StakingKeeper is expected keeper for staking module type StakingKeeper interface { - Validator(ctx sdk.Context, address sdk.ValAddress) stakingtypes.ValidatorI // get validator by operator address; nil when validator not found - TotalBondedTokens(sdk.Context) sdkmath.Int // total bonded tokens within the validator set - Slash(sdk.Context, sdk.ConsAddress, int64, int64, math.LegacyDec) sdkmath.Int // slash the validator and delegators of the validator, specifying offense height, offense power, and slash fraction - Jail(sdk.Context, sdk.ConsAddress) // jail a validator - ValidatorsPowerStoreIterator(ctx sdk.Context) sdk.Iterator // an iterator for the current validator power store - MaxValidators(sdk.Context) uint32 // MaxValidators returns the maximum amount of bonded validators - PowerReduction(ctx sdk.Context) (res sdkmath.Int) + Validator(ctx context.Context, address sdk.ValAddress) (stakingtypes.ValidatorI, error) // get validator by operator address; nil when validator not found + TotalBondedTokens(context.Context) (sdkmath.Int, error) // total bonded tokens within the validator set + Slash(context.Context, sdk.ConsAddress, int64, int64, sdkmath.LegacyDec) (sdkmath.Int, error) // slash the validator and delegators of the validator, specifying offense height, offense power, and slash fraction + Jail(context.Context, sdk.ConsAddress) error // jail a validator + ValidatorsPowerStoreIterator(ctx context.Context) (corestore.Iterator, error) + MaxValidators(context.Context) (uint32, error) // MaxValidators returns the maximum amount of bonded validators + PowerReduction(ctx context.Context) (res sdkmath.Int) } type SlashingKeeper interface { - Slash(ctx sdk.Context, consAddr sdk.ConsAddress, fraction math.LegacyDec, power int64, height int64) - Jail(sdk.Context, sdk.ConsAddress) + Slash(ctx context.Context, consAddr sdk.ConsAddress, fraction sdkmath.LegacyDec, power int64, height int64) error + Jail(context.Context, sdk.ConsAddress) error } // DistributionKeeper is expected keeper for distribution module type DistributionKeeper interface { - AllocateTokensToValidator(ctx sdk.Context, val stakingtypes.ValidatorI, tokens math.LegacyDecCoins) + AllocateTokensToValidator(ctx context.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins) error // only used for simulation - GetValidatorOutstandingRewardsCoins(ctx sdk.Context, val sdk.ValAddress) math.LegacyDecCoins + GetValidatorOutstandingRewardsCoins(ctx context.Context, val sdk.ValAddress) (sdk.DecCoins, error) } // AccountKeeper is expected keeper for auth module type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress - GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // only used for simulation + GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // only used for simulation } // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SendCoinsFromModuleToModule(ctx context.Context, senderModule string, recipientModule string, amt sdk.Coins) error // only used for simulation - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins } type SudoKeeper interface { diff --git a/x/oracle/types/msgs.go b/x/oracle/types/msgs.go index 3973554c2..213969fca 100644 --- a/x/oracle/types/msgs.go +++ b/x/oracle/types/msgs.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "cosmossdk.io/errors" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/sudo/module.go b/x/sudo/module.go index 18a42eb46..dc7789bd3 100644 --- a/x/sudo/module.go +++ b/x/sudo/module.go @@ -57,6 +57,12 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(DefaultGenesis()) } +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + // ValidateGenesis performs genesis state validation for the capability module. func (AppModuleBasic) ValidateGenesis( cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage, diff --git a/x/tokenfactory/module.go b/x/tokenfactory/module.go index 9cc05ec99..1e53a1a3e 100644 --- a/x/tokenfactory/module.go +++ b/x/tokenfactory/module.go @@ -129,6 +129,12 @@ func NewAppModule( } } +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + // Name returns the fees module's name. func (AppModule) Name() string { return types.ModuleName diff --git a/x/tokenfactory/types/expected_keepers.go b/x/tokenfactory/types/expected_keepers.go index c25e9a489..9de217b74 100644 --- a/x/tokenfactory/types/expected_keepers.go +++ b/x/tokenfactory/types/expected_keepers.go @@ -1,46 +1,47 @@ package types import ( + context "context" + sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) type BankKeeper interface { // Methods imported from bank should be defined here - GetDenomMetaData(ctx sdk.Context, denom string) (banktypes.Metadata, bool) - SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata) + GetDenomMetaData(ctx context.Context, denom string) (banktypes.Metadata, bool) + SetDenomMetaData(ctx context.Context, denomMetaData banktypes.Metadata) - GetSupply(ctx sdk.Context, denom string) sdk.Coin - HasSupply(ctx sdk.Context, denom string) bool - IterateTotalSupply(ctx sdk.Context, cb func(sdk.Coin) bool) + GetSupply(ctx context.Context, denom string) sdk.Coin + HasSupply(ctx context.Context, denom string) bool + IterateTotalSupply(ctx context.Context, cb func(sdk.Coin) bool) SendCoinsFromModuleToAccount( - ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins, + ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins, ) error SendCoinsFromAccountToModule( - ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, + ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, ) error - MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error SendCoins( - ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins, + ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins, ) error - HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin + HasBalance(ctx context.Context, addr sdk.AccAddress, amt sdk.Coin) bool + GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins + SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin BlockedAddr(addr sdk.AccAddress) bool } type AccountKeeper interface { - SetModuleAccount(ctx sdk.Context, macc authtypes.ModuleAccountI) - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI + SetModuleAccount(ctx context.Context, macc sdk.ModuleAccountI) + GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI } // CommunityPoolKeeper defines the contract needed to be fulfilled for community pool interactions. type CommunityPoolKeeper interface { - FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error + FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error } From 009f14a3fe208fcb417487a62f0fb9553b96aa18 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Mon, 27 May 2024 23:52:59 +0200 Subject: [PATCH 20/22] feat: update proto types for legacy dec --- proto/nibiru/devgas/v1/genesis.proto | 2 +- proto/nibiru/inflation/v1/genesis.proto | 2 +- proto/nibiru/inflation/v1/inflation.proto | 6 +- proto/nibiru/inflation/v1/query.proto | 2 +- proto/nibiru/inflation/v1/tx.proto | 2 +- proto/nibiru/oracle/v1/event.proto | 2 +- proto/nibiru/oracle/v1/oracle.proto | 14 +-- proto/nibiru/oracle/v1/query.proto | 2 +- proto/nibiru/oracle/v1/state.proto | 2 +- proto/nibiru/oracle/v1/tx.proto | 10 +- x/devgas/v1/types/genesis.pb.go | 52 ++++---- x/inflation/types/genesis.pb.go | 66 +++++----- x/inflation/types/inflation.pb.go | 46 +++---- x/inflation/types/query.pb.go | 93 +++++++------- x/inflation/types/tx.pb.go | 104 +++++++-------- x/oracle/types/event.pb.go | 75 +++++------ x/oracle/types/oracle.pb.go | 146 +++++++++++----------- x/oracle/types/query.pb.go | 142 ++++++++++----------- x/oracle/types/state.pb.go | 48 +++---- x/oracle/types/tx.pb.go | 140 +++++++++++---------- 20 files changed, 481 insertions(+), 475 deletions(-) diff --git a/proto/nibiru/devgas/v1/genesis.proto b/proto/nibiru/devgas/v1/genesis.proto index ed28cb9bd..1d9919768 100644 --- a/proto/nibiru/devgas/v1/genesis.proto +++ b/proto/nibiru/devgas/v1/genesis.proto @@ -21,7 +21,7 @@ message ModuleParams { // developer_shares defines the proportion of the transaction fees to be // distributed to the registered contract owner string developer_shares = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // allowed_denoms defines the list of denoms that are allowed to be paid to diff --git a/proto/nibiru/inflation/v1/genesis.proto b/proto/nibiru/inflation/v1/genesis.proto index 773bfaef5..8eb59b67f 100644 --- a/proto/nibiru/inflation/v1/genesis.proto +++ b/proto/nibiru/inflation/v1/genesis.proto @@ -26,7 +26,7 @@ message Params { // polynomial_factors takes in the variables to calculate polynomial // inflation repeated string polynomial_factors = 2[ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // inflation_distribution of the minted denom diff --git a/proto/nibiru/inflation/v1/inflation.proto b/proto/nibiru/inflation/v1/inflation.proto index cad921ede..101ea8d86 100644 --- a/proto/nibiru/inflation/v1/inflation.proto +++ b/proto/nibiru/inflation/v1/inflation.proto @@ -12,19 +12,19 @@ message InflationDistribution { // staking_rewards defines the proportion of the minted_denom that is // to be allocated as staking rewards string staking_rewards = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // community_pool defines the proportion of the minted_denom that is to // be allocated to the community pool string community_pool = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // strategic_reserves defines the proportion of the minted_denom that // is to be allocated to the strategic reserves module address string strategic_reserves = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } diff --git a/proto/nibiru/inflation/v1/query.proto b/proto/nibiru/inflation/v1/query.proto index e7b6ec57a..642607da4 100644 --- a/proto/nibiru/inflation/v1/query.proto +++ b/proto/nibiru/inflation/v1/query.proto @@ -104,7 +104,7 @@ message QueryInflationRateRequest {} message QueryInflationRateResponse { // inflation_rate by which the total supply increases within one period string inflation_rate = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } diff --git a/proto/nibiru/inflation/v1/tx.proto b/proto/nibiru/inflation/v1/tx.proto index 36626a3f9..2648bfe1f 100644 --- a/proto/nibiru/inflation/v1/tx.proto +++ b/proto/nibiru/inflation/v1/tx.proto @@ -37,7 +37,7 @@ message MsgEditInflationParams { string sender = 1; bool inflation_enabled = 2; repeated string polynomial_factors = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; InflationDistribution inflation_distribution = 4 diff --git a/proto/nibiru/oracle/v1/event.proto b/proto/nibiru/oracle/v1/event.proto index 82284e9b1..70059dc0a 100644 --- a/proto/nibiru/oracle/v1/event.proto +++ b/proto/nibiru/oracle/v1/event.proto @@ -12,7 +12,7 @@ option go_package = "github.com/NibiruChain/nibiru/x/oracle/types"; message EventPriceUpdate { string pair = 1; string price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; int64 timestamp_ms = 3; diff --git a/proto/nibiru/oracle/v1/oracle.proto b/proto/nibiru/oracle/v1/oracle.proto index e9f545623..1147a67cc 100644 --- a/proto/nibiru/oracle/v1/oracle.proto +++ b/proto/nibiru/oracle/v1/oracle.proto @@ -18,7 +18,7 @@ message Params { // received for a ballot to pass. string vote_threshold = 2 [ (gogoproto.moretags) = "yaml:\"vote_threshold\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // RewardBand defines a maxium divergence that a price vote can have from the @@ -31,7 +31,7 @@ message Params { // deviation, the band is taken to be 1 standard deviation.a price string reward_band = 3 [ (gogoproto.moretags) = "yaml:\"reward_band\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // The set of whitelisted markets, or asset pairs, for the module. @@ -45,7 +45,7 @@ message Params { // penalty for failing a voting period. string slash_fraction = 5 [ (gogoproto.moretags) = "yaml:\"slash_fraction\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; // SlashWindow returns the number of voting periods that specify a @@ -55,7 +55,7 @@ message Params { uint64 slash_window = 6 [ (gogoproto.moretags) = "yaml:\"slash_window\"" ]; string min_valid_per_window = 7 [ (gogoproto.moretags) = "yaml:\"min_valid_per_window\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; @@ -75,7 +75,7 @@ message Params { // The validator fee ratio that is given to validators every epoch. string validator_fee_ratio = 10 [ (gogoproto.moretags) = "yaml:\"validator_fee_ratio\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; @@ -125,7 +125,7 @@ message ExchangeRateTuple { string exchange_rate = 2 [ (gogoproto.moretags) = "yaml:\"exchange_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } @@ -133,7 +133,7 @@ message ExchangeRateTuple { message DatedPrice { string exchange_rate = 1 [ (gogoproto.moretags) = "yaml:\"exchange_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; diff --git a/proto/nibiru/oracle/v1/query.proto b/proto/nibiru/oracle/v1/query.proto index 993640b40..fb5a6a632 100644 --- a/proto/nibiru/oracle/v1/query.proto +++ b/proto/nibiru/oracle/v1/query.proto @@ -105,7 +105,7 @@ message QueryExchangeRateRequest { message QueryExchangeRateResponse { // exchange_rate defines the exchange rate of assets voted by validators string exchange_rate = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; } diff --git a/proto/nibiru/oracle/v1/state.proto b/proto/nibiru/oracle/v1/state.proto index 96d9bd959..3a4aab398 100644 --- a/proto/nibiru/oracle/v1/state.proto +++ b/proto/nibiru/oracle/v1/state.proto @@ -18,7 +18,7 @@ message PriceSnapshot { ]; string price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; diff --git a/proto/nibiru/oracle/v1/tx.proto b/proto/nibiru/oracle/v1/tx.proto index 299023008..882cf311f 100644 --- a/proto/nibiru/oracle/v1/tx.proto +++ b/proto/nibiru/oracle/v1/tx.proto @@ -103,13 +103,13 @@ message MsgEditOracleParams { // vote_threshold: [cosmossdk.io/math.LegacyDec] TODO: string vote_threshold = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; // reward_band: [cosmossdk.io/math.LegacyDec] TODO: string reward_band = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; @@ -117,7 +117,7 @@ message MsgEditOracleParams { // slash_fraction: [cosmossdk.io/math.LegacyDec] TODO: string slash_fraction = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; @@ -128,7 +128,7 @@ message MsgEditOracleParams { // min_valid_per_window: [cosmossdk.io/math.LegacyDec] TODO: string min_valid_per_window = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; @@ -144,7 +144,7 @@ message MsgEditOracleParams { // VoteThreshold: [cosmossdk.io/math.LegacyDec] TODO: string validator_fee_ratio = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = true ]; } diff --git a/x/devgas/v1/types/genesis.pb.go b/x/devgas/v1/types/genesis.pb.go index d31dd8b53..962871104 100644 --- a/x/devgas/v1/types/genesis.pb.go +++ b/x/devgas/v1/types/genesis.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -85,7 +85,7 @@ type ModuleParams struct { EnableFeeShare bool `protobuf:"varint,1,opt,name=enable_fee_share,json=enableFeeShare,proto3" json:"enable_fee_share,omitempty"` // developer_shares defines the proportion of the transaction fees to be // distributed to the registered contract owner - DeveloperShares github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=developer_shares,json=developerShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"developer_shares"` + DeveloperShares cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=developer_shares,json=developerShares,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"developer_shares"` // allowed_denoms defines the list of denoms that are allowed to be paid to // the contract withdraw addresses. If said denom is not in the list, the fees // will ONLY be sent to the community pool. @@ -148,30 +148,30 @@ func init() { func init() { proto.RegisterFile("nibiru/devgas/v1/genesis.proto", fileDescriptor_86a5066ce5bd7311) } var fileDescriptor_86a5066ce5bd7311 = []byte{ - // 358 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xb1, 0x6e, 0xe2, 0x40, - 0x10, 0x86, 0xbd, 0x70, 0x42, 0xb0, 0x70, 0x1c, 0xb2, 0xae, 0xb0, 0x90, 0x6e, 0xb1, 0x90, 0xee, - 0xe4, 0xe6, 0x76, 0x05, 0xd7, 0x5e, 0x1a, 0x82, 0x12, 0xa5, 0x48, 0x14, 0x99, 0x2a, 0x69, 0xd0, - 0x1a, 0x0f, 0xc6, 0x8a, 0xed, 0xb5, 0xbc, 0xc6, 0x49, 0x9e, 0x21, 0x4d, 0x9e, 0x27, 0x4f, 0x40, - 0x49, 0x19, 0xa5, 0x40, 0x11, 0xbc, 0x48, 0xe4, 0xb5, 0x93, 0xa0, 0x50, 0x79, 0xfc, 0xcf, 0xfc, - 0xdf, 0x8c, 0xf6, 0xc7, 0x24, 0xf2, 0x1d, 0x3f, 0x59, 0x32, 0x17, 0x32, 0x8f, 0x4b, 0x96, 0x0d, - 0x98, 0x07, 0x11, 0x48, 0x5f, 0xd2, 0x38, 0x11, 0xa9, 0xd0, 0x3b, 0x45, 0x9f, 0x16, 0x7d, 0x9a, - 0x0d, 0xba, 0xbf, 0x0e, 0x1c, 0x65, 0x4f, 0x19, 0xba, 0x3f, 0x3d, 0xe1, 0x09, 0x55, 0xb2, 0xbc, - 0x2a, 0xd4, 0xfe, 0x03, 0xc2, 0xad, 0xd3, 0x02, 0x3c, 0x49, 0x79, 0x0a, 0xfa, 0x7f, 0x5c, 0x8b, - 0x79, 0xc2, 0x43, 0x69, 0x20, 0x13, 0x59, 0xcd, 0x21, 0xa1, 0x5f, 0x17, 0xd1, 0x73, 0xe1, 0x2e, - 0x03, 0xb8, 0x54, 0x53, 0xa3, 0x6f, 0xab, 0x4d, 0x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, 0xf2, - 0x7e, 0x8d, 0x05, 0x02, 0x00, 0x00, + // 361 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xcd, 0x6e, 0xda, 0x40, + 0x14, 0x85, 0x3d, 0x50, 0x21, 0x18, 0x28, 0x45, 0x56, 0x17, 0x16, 0x55, 0x07, 0x8b, 0xaa, 0x92, + 0x57, 0x33, 0x82, 0x6e, 0xdb, 0x0d, 0x45, 0xad, 0x22, 0x25, 0x28, 0x32, 0xbb, 0x6c, 0xd0, 0xd8, + 0xbe, 0xd8, 0x56, 0x6c, 0x8f, 0xe5, 0x31, 0x4e, 0x78, 0x86, 0x6c, 0xf2, 0x26, 0x79, 0x0d, 0x96, + 0x2c, 0xa3, 0x2c, 0x50, 0x04, 0x2f, 0x12, 0xf9, 0x27, 0x09, 0x0a, 0xbb, 0xeb, 0x73, 0xcf, 0xf9, + 0xae, 0x35, 0x07, 0x93, 0xc8, 0xb7, 0xfc, 0x64, 0xc5, 0x1c, 0xc8, 0x5c, 0x2e, 0x59, 0x36, 0x62, + 0x2e, 0x44, 0x20, 0x7d, 0x49, 0xe3, 0x44, 0xa4, 0x42, 0xed, 0x95, 0x7b, 0x5a, 0xee, 0x69, 0x36, + 0xea, 0x7f, 0x3f, 0x49, 0x54, 0xbb, 0x22, 0xd0, 0xff, 0xea, 0x0a, 0x57, 0x14, 0x23, 0xcb, 0xa7, + 0x52, 0x1d, 0xde, 0x21, 0xdc, 0xf9, 0x5f, 0x82, 0xe7, 0x29, 0x4f, 0x41, 0xfd, 0x8d, 0x1b, 0x31, + 0x4f, 0x78, 0x28, 0x35, 0xa4, 0x23, 0xa3, 0x3d, 0x26, 0xf4, 0xe3, 0x21, 0x7a, 0x21, 0x9c, 0x55, + 0x00, 0x97, 0x85, 0x6b, 0xf2, 0x69, 0xb3, 0x1b, 0x28, 0x66, 0x95, 0x51, 0xff, 0xe0, 0xd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 0xfa, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/inflation/types/genesis.pb.go b/x/inflation/types/genesis.pb.go index 522028269..2801acdc3 100644 --- a/x/inflation/types/genesis.pb.go +++ b/x/inflation/types/genesis.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -96,7 +96,7 @@ type Params struct { InflationEnabled bool `protobuf:"varint,1,opt,name=inflation_enabled,json=inflationEnabled,proto3" json:"inflation_enabled,omitempty"` // polynomial_factors takes in the variables to calculate polynomial // inflation - PolynomialFactors []github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,rep,name=polynomial_factors,json=polynomialFactors,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"polynomial_factors"` + PolynomialFactors []cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,rep,name=polynomial_factors,json=polynomialFactors,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"polynomial_factors"` // inflation_distribution of the minted denom InflationDistribution InflationDistribution `protobuf:"bytes,3,opt,name=inflation_distribution,json=inflationDistribution,proto3" json:"inflation_distribution"` // epochs_per_period is the number of epochs that must pass before a new @@ -196,36 +196,36 @@ func init() { func init() { proto.RegisterFile("nibiru/inflation/v1/genesis.proto", fileDescriptor_2d00e2bb98c08f74) } var fileDescriptor_2d00e2bb98c08f74 = []byte{ - // 461 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xc1, 0x6e, 0x13, 0x31, - 0x10, 0xcd, 0x36, 0x61, 0xa1, 0x2e, 0x94, 0xc6, 0xa5, 0xd5, 0xaa, 0x88, 0x6d, 0x28, 0x02, 0x45, - 0x45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x55, 0xcb, 0x55, 0x2e, 0x2c, - 0xd4, 0x3f, 0xbf, 0x99, 0x85, 0xde, 0xed, 0x2c, 0xf4, 0xfe, 0xcf, 0x42, 0xef, 0xf7, 0x3c, 0x6c, - 0xdc, 0xce, 0xc3, 0xc6, 0xdf, 0x79, 0xd8, 0xf8, 0x41, 0xd6, 0x6c, 0xfe, 0x66, 0x5c, 0xf9, 0x5c, - 0x50, 0x56, 0x11, 0x77, 0x89, 0x93, 0xb5, 0x5b, 0x34, 0x9e, 0x27, 0xbe, 0xb9, 0xc2, 0x8f, 0xf7, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x43, 0x3a, 0xc4, 0xfa, 0x02, 0x00, 0x00, + // 462 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcf, 0x4e, 0xdb, 0x40, + 0x10, 0xc6, 0x63, 0x92, 0xba, 0x65, 0x69, 0x29, 0x59, 0x0a, 0xb2, 0x40, 0x35, 0x29, 0xa8, 0x52, + 0x44, 0x25, 0x5b, 0xa4, 0xa7, 0x5e, 0x53, 0x68, 0x85, 0x54, 0x55, 0x91, 0x39, 0xb5, 0x17, 0x6b, + 0x6c, 0x0f, 0xf6, 0x8a, 0xd8, 0xbb, 0xda, 0xdd, 0xa0, 0xe4, 0x0d, 0x7a, 0xec, 0xbd, 0x2f, 0xc4, + 0x91, 0x63, 0xd5, 0x03, 0xaa, 0x92, 0x17, 0x41, 0xd9, 0x35, 0x49, 0x0e, 0xb9, 0xed, 0xcc, 0xf7, + 0x9b, 0x3f, 0xfb, 0x69, 0xc8, 0xbb, 0x8a, 0x25, 0x4c, 0x8e, 0x42, 0x56, 0x5d, 0x0f, 0x41, 0x33, + 0x5e, 0x85, 0xb7, 0x67, 0x61, 0x8e, 0x15, 0x2a, 0xa6, 0x02, 0x21, 0xb9, 0xe6, 0x74, 0xd7, 0x22, + 0xc1, 0x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xd2, 0x92, 0x25, 0xa3, 0x79, 0x60, 0x56, 0xdf, 0xea, + 0x9d, 0xae, 0x75, 0xe5, 0xf2, 0x29, 0x38, 0x5f, 0xa9, 0xa8, 0x4d, 0xda, 0x63, 0xeb, 0x44, 0x7a, + 0x4a, 0xda, 0xd6, 0x93, 0x58, 0xa0, 0x8c, 0x6b, 0xfb, 0x5a, 0xc6, 0x9e, 0xd7, 0x56, 0x18, 0xa0, + 0x1c, 0x58, 0x1f, 0xbb, 0x64, 0xc7, 0x02, 0x16, 0x9e, 0x20, 0x48, 0xef, 0x99, 0x41, 0xb7, 0xeb, + 0xfc, 0x00, 0xe5, 0x0f, 0x04, 0x49, 0xdf, 0x12, 0x52, 0xc2, 0xf8, 0xa9, 0x9d, 0x6b, 0x98, 0xcd, + 0x12, 0xc6, 0x75, 0xa3, 0x1e, 0xd9, 0x2b, 0x40, 0xc5, 0xcb, 0x1f, 0x2a, 0x0d, 0x52, 0x63, 0xe6, + 0x3d, 0x37, 0x16, 0xef, 0x16, 0xa0, 0x16, 0x5f, 0xb9, 0xb2, 0x52, 0xff, 0xf2, 0x6e, 0xea, 0x3b, + 0xf7, 0x53, 0xdf, 0xf9, 0x3f, 0xf5, 0x9d, 0xdf, 0x33, 0xbf, 0x71, 0x3f, 0xf3, 0x1b, 0x7f, 0x67, + 0x7e, 0xe3, 0x67, 0x98, 0x33, 0x5d, 0x8c, 0x92, 0x20, 0xe5, 0x65, 0xf8, 0xdd, 0xb8, 0xf2, 0xb9, + 0x00, 0x56, 0x85, 0xf5, 0xf9, 0x8d, 0x57, 0x0e, 0x50, 0x4f, 0x04, 0xaa, 0xc4, 0x35, 0xa7, 0xf7, + 0xf1, 0x31, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xbd, 0xee, 0xca, 0xef, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -619,7 +619,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.PolynomialFactors = append(m.PolynomialFactors, v) if err := m.PolynomialFactors[len(m.PolynomialFactors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/inflation/types/inflation.pb.go b/x/inflation/types/inflation.pb.go index 632c86ebf..cb1c3626a 100644 --- a/x/inflation/types/inflation.pb.go +++ b/x/inflation/types/inflation.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -30,13 +30,13 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type InflationDistribution struct { // staking_rewards defines the proportion of the minted_denom that is // to be allocated as staking rewards - StakingRewards github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=staking_rewards,json=stakingRewards,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"staking_rewards"` + StakingRewards cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=staking_rewards,json=stakingRewards,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"staking_rewards"` // community_pool defines the proportion of the minted_denom that is to // be allocated to the community pool - CommunityPool github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=community_pool,json=communityPool,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"community_pool"` + CommunityPool cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=community_pool,json=communityPool,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"community_pool"` // strategic_reserves defines the proportion of the minted_denom that // is to be allocated to the strategic reserves module address - StrategicReserves github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=strategic_reserves,json=strategicReserves,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"strategic_reserves"` + StrategicReserves cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=strategic_reserves,json=strategicReserves,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"strategic_reserves"` } func (m *InflationDistribution) Reset() { *m = InflationDistribution{} } @@ -81,25 +81,25 @@ func init() { } var fileDescriptor_37da805e9a324a97 = []byte{ - // 284 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xce, 0xcb, 0x4c, 0xca, - 0x2c, 0x2a, 0xd5, 0xcf, 0xcc, 0x4b, 0xcb, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0x44, - 0x70, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x84, 0x21, 0x8a, 0xf4, 0x10, 0xe2, 0x65, 0x86, - 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x79, 0x7d, 0x10, 0x0b, 0xa2, 0x54, 0x69, 0x19, 0x13, - 0x97, 0xa8, 0x27, 0x4c, 0x99, 0x4b, 0x66, 0x71, 0x49, 0x51, 0x66, 0x52, 0x29, 0x88, 0x2d, 0x14, - 0xce, 0xc5, 0x5f, 0x5c, 0x92, 0x98, 0x9d, 0x99, 0x97, 0x1e, 0x5f, 0x94, 0x5a, 0x9e, 0x58, 0x94, - 0x52, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe9, 0xa4, 0x77, 0xe2, 0x9e, 0x3c, 0xc3, 0xad, 0x7b, - 0xf2, 0x6a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xc9, 0xf9, 0xc5, - 0xb9, 0xf9, 0xc5, 0x50, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0xbf, 0xa4, 0xb2, 0x20, 0xb5, 0x58, 0xcf, - 0x25, 0x35, 0x39, 0x88, 0x0f, 0x6a, 0x4c, 0x10, 0xc4, 0x14, 0xa1, 0x50, 0x2e, 0xbe, 0xe4, 0xfc, - 0xdc, 0xdc, 0xd2, 0xbc, 0xcc, 0x92, 0xca, 0xf8, 0x82, 0xfc, 0xfc, 0x1c, 0x09, 0x26, 0xb2, 0xcc, - 0xe5, 0x85, 0x9b, 0x12, 0x90, 0x9f, 0x9f, 0x23, 0x14, 0xcb, 0x25, 0x54, 0x5c, 0x52, 0x94, 0x58, - 0x92, 0x9a, 0x9e, 0x99, 0x1c, 0x5f, 0x94, 0x5a, 0x9c, 0x5a, 0x54, 0x96, 0x5a, 0x2c, 0xc1, 0x4c, - 0x96, 0xd1, 0x82, 0x70, 0x93, 0x82, 0xa0, 0x06, 0x39, 0x79, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, - 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, - 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x3e, 0x92, 0xa1, 0x7e, 0xe0, 0x80, 0x77, 0xce, 0x48, 0xcc, 0xcc, - 0xd3, 0x87, 0xc6, 0x54, 0x05, 0x52, 0x5c, 0x81, 0x6d, 0x48, 0x62, 0x03, 0x07, 0xbd, 0x31, 0x20, - 0x00, 0x00, 0xff, 0xff, 0x75, 0xbf, 0x6b, 0xae, 0xcc, 0x01, 0x00, 0x00, + // 288 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xc1, 0x4a, 0xf3, 0x40, + 0x14, 0x85, 0x93, 0xfe, 0xf0, 0x83, 0x01, 0x2b, 0x46, 0x85, 0xa2, 0x30, 0x15, 0xbb, 0x71, 0x95, + 0xa1, 0xf8, 0x06, 0xb5, 0x9b, 0x4a, 0x11, 0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c3, 0xc3, 0x96, + 0x1e, 0x4d, 0x56, 0x25, 0x71, 0xd7, 0x25, 0x71, 0xbf, 0x4b, 0xe2, 0x7e, 0x54, 0xc4, 0x59, 0x57, + 0xc4, 0xf9, 0xac, 0x88, 0xf3, 0x4c, 0x25, 0xd8, 0x45, 0x16, 0x05, 0x1c, 0x13, 0xfa, 0x58, 0xf7, + 0x7a, 0xbf, 0x60, 0xa0, 0x68, 0x3b, 0xc4, 0xdb, 0x9f, 0x29, 0x6c, 0x91, 0x0a, 0x13, 0xfd, 0xaf, + 0x9b, 0xbd, 0xfb, 0x09, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x62, 0x13, 0x24, 0xab, 0x01, 0x00, 0x00, } func (m *InflationDistribution) Marshal() (dAtA []byte, err error) { diff --git a/x/inflation/types/query.pb.go b/x/inflation/types/query.pb.go index 4b15226dc..7348237ff 100644 --- a/x/inflation/types/query.pb.go +++ b/x/inflation/types/query.pb.go @@ -5,8 +5,8 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -412,7 +412,7 @@ var xxx_messageInfo_QueryInflationRateRequest proto.InternalMessageInfo // RPC method. type QueryInflationRateResponse struct { // inflation_rate by which the total supply increases within one period - InflationRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation_rate,json=inflationRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_rate"` + InflationRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=inflation_rate,json=inflationRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation_rate"` } func (m *QueryInflationRateResponse) Reset() { *m = QueryInflationRateResponse{} } @@ -549,50 +549,51 @@ func init() { func init() { proto.RegisterFile("nibiru/inflation/v1/query.proto", fileDescriptor_9cef9ea5e4d20e5e) } var fileDescriptor_9cef9ea5e4d20e5e = []byte{ - // 686 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x4f, 0x4f, 0x14, 0x3d, - 0x1c, 0xc7, 0xb7, 0x4f, 0x78, 0xd6, 0x58, 0x03, 0x09, 0x85, 0x18, 0x1d, 0x60, 0x16, 0x97, 0x20, - 0x10, 0x42, 0x9b, 0x65, 0xbd, 0x78, 0x65, 0xf5, 0xc0, 0x41, 0x83, 0x43, 0xbc, 0x78, 0xd9, 0xcc, - 0x0e, 0x75, 0x68, 0x60, 0xdb, 0x32, 0x9d, 0xd9, 0xc8, 0xcd, 0xe8, 0x1b, 0x30, 0xf1, 0xec, 0xc9, - 0x83, 0x89, 0x89, 0x17, 0x5e, 0x05, 0x47, 0x12, 0x2f, 0xc6, 0x03, 0x1a, 0xf0, 0x85, 0x98, 0xe9, - 0x74, 0x96, 0x1d, 0xb6, 0xb3, 0xc0, 0xc1, 0xd3, 0xce, 0xf6, 0xf7, 0xef, 0xdb, 0x6f, 0xfb, 0x99, - 0x81, 0x35, 0xce, 0x3a, 0x2c, 0x4a, 0x08, 0xe3, 0xaf, 0xf7, 0xfd, 0x98, 0x09, 0x4e, 0x7a, 0x0d, - 0x72, 0x90, 0xd0, 0xe8, 0x10, 0xcb, 0x48, 0xc4, 0x02, 0x4d, 0x65, 0x09, 0xb8, 0x9f, 0x80, 0x7b, - 0x0d, 0xc7, 0x0d, 0x84, 0xea, 0x0a, 0x45, 0x3a, 0xbe, 0xa2, 0xa4, 0xd7, 0xe8, 0xd0, 0xd8, 0x6f, - 0x90, 0x40, 0x30, 0x9e, 0x15, 0x39, 0x0f, 0x6c, 0x5d, 0x43, 0xca, 0xa9, 0x62, 0xca, 0xa4, 0x4c, - 0x87, 0x22, 0x14, 0xfa, 0x91, 0xa4, 0x4f, 0x66, 0x75, 0x36, 0x14, 0x22, 0xdc, 0xa7, 0xc4, 0x97, - 0x8c, 0xf8, 0x9c, 0x8b, 0x58, 0x57, 0x9b, 0x9a, 0xfa, 0x34, 0x44, 0x2f, 0x52, 0x69, 0x5b, 0x34, - 0x62, 0x62, 0xc7, 0xa3, 0x07, 0x09, 0x55, 0x71, 0x7d, 0x0d, 0x4e, 0x15, 0x56, 0x95, 0x14, 0x5c, - 0x51, 0x74, 0x17, 0x56, 0xa5, 0x5e, 0xb9, 0x07, 0xe6, 0xc1, 0xf2, 0x98, 0x67, 0xfe, 0xd5, 0xe7, - 0xa1, 0xab, 0xd3, 0x9f, 0x4a, 0x11, 0xec, 0x3e, 0x63, 0x3c, 0xde, 0x8a, 0x44, 0x8f, 0x29, 0x26, - 0x78, 0xde, 0xf0, 0x0b, 0x80, 0xb5, 0xd2, 0x14, 0xd3, 0xfd, 0x3d, 0x80, 0xd3, 0x34, 0x0d, 0xb7, - 0xbb, 0x8c, 0xc7, 0x6d, 0x99, 0x27, 0xe8, 0x61, 0x77, 0xd6, 0x67, 0x71, 0xe6, 0x10, 0x4e, 0x1d, - 0xc2, 0xc6, 0x21, 0xfc, 0x84, 0x06, 0x2d, 0xc1, 0xf8, 0x46, 0xf3, 0xf8, 0xb4, 0x56, 0xf9, 0xfa, - 0xab, 0xb6, 0x1a, 0xb2, 0x78, 0x37, 0xe9, 0xe0, 0x40, 0x74, 0x89, 0x71, 0x34, 0xfb, 0x59, 0x53, - 0x3b, 0x7b, 0x24, 0x3e, 0x94, 0x54, 0xe5, 0x35, 0xca, 0x43, 0x74, 0x48, 0x4d, 0x7d, 0x06, 0xde, - 0xd7, 0x42, 0xb7, 0xf7, 0x98, 0x94, 0x74, 0x47, 0xeb, 0x55, 0xf9, 0x36, 0x5a, 0xd0, 0xb1, 0x05, - 0xcd, 0x06, 0x16, 0xe1, 0x84, 0xca, 0x02, 0x6d, 0xdd, 0x58, 0x19, 0x9b, 0xc6, 0xd5, 0x60, 0x7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62, 0x95, 0x69, 0x23, 0x1a, 0x7d, 0x02, 0x70, 0xbc, 0xc0, 0x10, 0xc2, - 0xe5, 0xa3, 0x6d, 0x24, 0x3a, 0xe4, 0xda, 0xf9, 0x46, 0xe5, 0xaa, 0x56, 0xb9, 0x88, 0x16, 0xac, - 0x2a, 0x8b, 0xdc, 0xa2, 0x6f, 0x00, 0x4e, 0x0e, 0xc1, 0x87, 0xd6, 0xcb, 0x67, 0x96, 0xb1, 0xec, - 0x34, 0x6f, 0x54, 0x63, 0xb4, 0x12, 0xad, 0x75, 0x05, 0x2d, 0x59, 0xb5, 0x0e, 0x73, 0xaf, 0xfd, - 0x2c, 0xa0, 0x36, 0xca, 0x4f, 0x1b, 0xb0, 0xa3, 0xfc, 0xb4, 0x32, 0x7c, 0x85, 0x9f, 0x45, 0xbc, - 0x33, 0x4e, 0x34, 0x3c, 0x23, 0x39, 0x19, 0xe4, 0x76, 0x24, 0x27, 0x05, 0x94, 0xaf, 0xe2, 0x24, - 0x43, 0x78, 0xf3, 0xf8, 0xcc, 0x05, 0x27, 0x67, 0x2e, 0xf8, 0x7d, 0xe6, 0x82, 0x0f, 0xe7, 0x6e, - 0xe5, 0xe4, 0xdc, 0xad, 0xfc, 0x38, 0x77, 0x2b, 0xaf, 0xc8, 0xc0, 0xdb, 0xe6, 0xb9, 0x6e, 0xd0, - 0xda, 0xf5, 0x19, 0xcf, 0x9b, 0xbd, 0x19, 0x68, 0xa7, 0x5f, 0x3d, 0x9d, 0xaa, 0xfe, 0x74, 0x36, - 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x40, 0x82, 0x21, 0x19, 0xe9, 0x07, 0x00, 0x00, + // 700 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x4f, 0x4f, 0x13, 0x4d, + 0x1c, 0xc7, 0xbb, 0x4f, 0x78, 0x6a, 0x1c, 0x03, 0x09, 0x03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0x54, 0x39, 0x0c, + 0x2b, 0xfc, 0xea, 0x81, 0xd9, 0x11, 0xe2, 0xe0, 0xd6, 0xf8, 0x9d, 0xe3, 0x00, 0xf6, 0x2b, 0x37, + 0xea, 0xb1, 0x5a, 0xb1, 0xd6, 0xba, 0x0e, 0x57, 0x9d, 0x5a, 0x47, 0x61, 0xd7, 0x7e, 0x0e, 0xf1, + 0x35, 0xc9, 0x4f, 0x17, 0xa5, 0x93, 0xfc, 0x74, 0x82, 0x7b, 0x8d, 0x9f, 0xc3, 0x4c, 0x1b, 0x4e, + 0x34, 0x3c, 0x13, 0x39, 0x19, 0xe4, 0x76, 0x22, 0x27, 0x43, 0x28, 0x5f, 0xc7, 0x89, 0x41, 0x78, + 0xf7, 0xe4, 0x3c, 0xf0, 0x4e, 0xcf, 0x03, 0xef, 0xd7, 0x79, 0xe0, 0xbd, 0xbf, 0x08, 0x72, 0xa7, + 0x17, 0x41, 0xee, 0xfb, 0x45, 0x90, 0x7b, 0x89, 0x07, 0xbe, 0x7e, 0xcf, 0xf5, 0x80, 0x6a, 0x2b, + 0xa4, 0x2c, 0x1b, 0xf6, 0x7a, 0x60, 0x9c, 0xfe, 0x14, 0x36, 0xf2, 0xfa, 0xf7, 0xb2, 0xf2, 0x27, + 0x00, 0x00, 0xff, 0xff, 0xa2, 0x94, 0x06, 0x83, 0xde, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/inflation/types/tx.pb.go b/x/inflation/types/tx.pb.go index ab332dea7..d75003ed1 100644 --- a/x/inflation/types/tx.pb.go +++ b/x/inflation/types/tx.pb.go @@ -5,6 +5,7 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -71,13 +72,13 @@ func (m *MsgToggleInflation) XXX_DiscardUnknown() { var xxx_messageInfo_MsgToggleInflation proto.InternalMessageInfo type MsgEditInflationParams struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - InflationEnabled bool `protobuf:"varint,2,opt,name=inflation_enabled,json=inflationEnabled,proto3" json:"inflation_enabled,omitempty"` - PolynomialFactors []github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,rep,name=polynomial_factors,json=polynomialFactors,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"polynomial_factors,omitempty"` - InflationDistribution *InflationDistribution `protobuf:"bytes,4,opt,name=inflation_distribution,json=inflationDistribution,proto3" json:"inflation_distribution,omitempty"` - EpochsPerPeriod *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=epochs_per_period,json=epochsPerPeriod,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"epochs_per_period,omitempty"` - PeriodsPerYear *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=periods_per_year,json=periodsPerYear,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"periods_per_year,omitempty"` - MaxPeriod *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=max_period,json=maxPeriod,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_period,omitempty"` + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + InflationEnabled bool `protobuf:"varint,2,opt,name=inflation_enabled,json=inflationEnabled,proto3" json:"inflation_enabled,omitempty"` + PolynomialFactors []cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,rep,name=polynomial_factors,json=polynomialFactors,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"polynomial_factors,omitempty"` + InflationDistribution *InflationDistribution `protobuf:"bytes,4,opt,name=inflation_distribution,json=inflationDistribution,proto3" json:"inflation_distribution,omitempty"` + EpochsPerPeriod *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=epochs_per_period,json=epochsPerPeriod,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"epochs_per_period,omitempty"` + PeriodsPerYear *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=periods_per_year,json=periodsPerYear,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"periods_per_year,omitempty"` + MaxPeriod *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=max_period,json=maxPeriod,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_period,omitempty"` } func (m *MsgEditInflationParams) Reset() { *m = MsgEditInflationParams{} } @@ -286,49 +287,50 @@ func init() { func init() { proto.RegisterFile("nibiru/inflation/v1/tx.proto", fileDescriptor_9f6843f876608d76) } var fileDescriptor_9f6843f876608d76 = []byte{ - // 660 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x31, 0x4f, 0xdb, 0x40, - 0x14, 0x8e, 0x21, 0x0d, 0x70, 0xa8, 0x85, 0x98, 0x16, 0xa5, 0x29, 0xb5, 0x23, 0x23, 0x95, 0x50, - 0x84, 0x4f, 0x81, 0x8d, 0xd1, 0x40, 0x25, 0x86, 0x54, 0x91, 0xd5, 0xa1, 0x45, 0xaa, 0xd0, 0x39, - 0x3e, 0xcc, 0xa9, 0xf6, 0x9d, 0x75, 0x77, 0x41, 0xc9, 0xda, 0xa9, 0x23, 0x52, 0xff, 0x00, 0x63, - 0x7f, 0x40, 0xff, 0x41, 0x17, 0x46, 0xa4, 0x2e, 0x55, 0x87, 0xa8, 0x82, 0x0e, 0x9d, 0xf9, 0x05, - 0x95, 0x7d, 0x8e, 0x89, 0x8a, 0x91, 0x0a, 0x83, 0x65, 0xdf, 0xbd, 0xef, 0x7d, 0xef, 0x7b, 0xe7, - 0xef, 0x1d, 0x58, 0xa2, 0xc4, 0x23, 0xbc, 0x07, 0x09, 0x3d, 0x0c, 0x91, 0x24, 0x8c, 0xc2, 0xe3, - 0x16, 0x94, 0x7d, 0x3b, 0xe6, 0x4c, 0x32, 0x7d, 0x41, 0x45, 0xed, 0x3c, 0x6a, 0x1f, 0xb7, 0xea, - 0x8f, 0x03, 0x16, 0xb0, 0x34, 0x0e, 0x93, 0x2f, 0x05, 0xad, 0x2f, 0x05, 0x8c, 0x05, 0x21, 0x86, - 0x28, 0x26, 0x10, 0x51, 0xca, 0x64, 0x8a, 0x17, 0x59, 0x74, 0xb9, 0xa8, 0xcc, 0x35, 0xab, 0x02, - 0x19, 0x5d, 0x26, 0x22, 0x26, 0xa0, 0x87, 0x04, 0x86, 0xc7, 0x2d, 0x0f, 0x4b, 0xd4, 0x82, 0x5d, - 0x46, 0xb2, 0xb8, 0x85, 0x80, 0xde, 0x16, 0xc1, 0x1b, 0x16, 0x04, 0x21, 0xde, 0x1b, 0xe5, 0xea, - 0x8b, 0xa0, 0x22, 0x30, 0xf5, 0x31, 0xaf, 0x69, 0x0d, 0xad, 0x39, 0xe3, 0x66, 0x2b, 0x7d, 0x15, - 0x54, 0x30, 0x45, 0x5e, 0x88, 0x6b, 0x13, 0x0d, 0xad, 0x39, 0xed, 0x54, 0xaf, 0x86, 0xe6, 0xc3, - 0x01, 0x8a, 0xc2, 0x2d, 0x4b, 0xed, 0x5b, 0x6e, 0x06, 0xd8, 0x9a, 0xfe, 0x74, 0x6a, 0x96, 0xfe, - 0x9c, 0x9a, 0x25, 0xeb, 0x6b, 0x19, 0x2c, 0xb6, 0x45, 0xb0, 0xeb, 0x13, 0x99, 0x57, 0xe8, 0x20, - 0x8e, 0x22, 0x71, 0x6b, 0x9d, 0x35, 0x50, 0xcd, 0x1b, 0x39, 0x50, 0x84, 0xbe, 0x2a, 0xe9, 0xce, - 0xe7, 0x81, 0x5d, 0xb5, 0xaf, 0xbf, 0x07, 0x7a, 0xcc, 0xc2, 0x01, 0x65, 0x11, 0x41, 0xe1, 0xc1, - 0x21, 0xea, 0x4a, 0xc6, 0x45, 0x6d, 0xb2, 0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, + // 676 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x31, 0x4f, 0xdb, 0x4e, + 0x1c, 0x8d, 0x21, 0xff, 0x00, 0x87, 0xfe, 0x85, 0x98, 0x16, 0xa5, 0x81, 0xda, 0x91, 0x91, 0x4a, + 0x28, 0xe2, 0x4e, 0x81, 0x8d, 0xd1, 0x40, 0x25, 0xa4, 0xa6, 0x8a, 0xac, 0x0e, 0x2d, 0x0b, 0x3a, + 0xdb, 0x87, 0x73, 0xc2, 0xf6, 0x59, 0xbe, 0x0b, 0x4a, 0xd6, 0x4e, 0x1d, 0x91, 0xfa, 0x05, 0x18, + 0xdb, 0xcf, 0xd1, 0x85, 0x11, 0xa9, 0x4b, 0xd5, 0x21, 0xaa, 0xa0, 0x43, 0x67, 0x3e, 0x41, 0x65, + 0x9f, 0x63, 0xa2, 0xc6, 0x48, 0x2d, 0x43, 0x14, 0xdf, 0xfd, 0xde, 0x7b, 0xbf, 0x77, 0xe7, 0xf7, + 0x33, 0x58, 0x0d, 0xa9, 0x4d, 0xe3, 0x1e, 0xa2, 0xe1, 0x89, 0x8f, 0x05, 0x65, 0x21, 0x3a, 0x6b, + 0x21, 0xd1, 0x87, 0x51, 0xcc, 0x04, 0x53, 0x97, 0x64, 0x15, 0xe6, 0x55, 0x78, 0xd6, 0xaa, 0x3f, + 0xf6, 0x98, 0xc7, 0xd2, 0x3a, 0x4a, 0x9e, 0x24, 0xb4, 0xbe, 0xea, 0x31, 0xe6, 0xf9, 0x04, 0xe1, + 0x88, 0x22, 0x1c, 0x86, 0x4c, 0xa4, 0x78, 0x9e, 0x55, 0xd7, 0x8a, 0xda, 0xdc, 0xa9, 0x4a, 0x90, + 0xe6, 0x30, 0x1e, 0x30, 0x8e, 0x6c, 0xcc, 0x09, 0x3a, 0x6b, 0xd9, 0x44, 0xe0, 0x16, 0x72, 0x18, + 0xcd, 0xea, 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x66, 0xb6, 0xbf, 0x4c, + 0x81, 0xe9, 0x36, 0xf7, 0xd4, 0x73, 0x05, 0x2c, 0xfc, 0x39, 0x61, 0xeb, 0x85, 0x01, 0x9a, 0x3c, + 0x7b, 0x1d, 0xfd, 0x25, 0x30, 0xbf, 0x82, 0xb5, 0xf7, 0x5f, 0x7f, 0x7e, 0x9c, 0x7a, 0x66, 0xac, + 0xa0, 0xc2, 0xcf, 0x50, 0xca, 0x52, 0x3f, 0x29, 0x60, 0xa9, 0x68, 0x20, 0x37, 0xef, 0xeb, 0x56, + 0x00, 0xae, 0xef, 0xfc, 0x03, 0x38, 0xb7, 0x87, 0x52, 0x7b, 0x1b, 0xc6, 0xfa, 0xa4, 0x3d, 0xe2, + 0x52, 0xb1, 0x95, 0x2f, 0xb7, 0xa2, 0x94, 0x68, 0x1e, 0x5e, 0x5e, 0x6b, 0xca, 0xd5, 0xb5, 0xa6, + 0xfc, 0xb8, 0xd6, 0x94, 0xf3, 0x1b, 0xad, 0x74, 0x75, 0xa3, 0x95, 0xbe, 0xdd, 0x68, 0xa5, 0x23, + 0x34, 0x96, 0xb4, 0xd7, 0xa9, 0xd8, 0x5e, 0x17, 0xd3, 0x70, 0x24, 0xdc, 0x1f, 0x93, 0x4e, 0x63, + 0x67, 0x57, 0xd2, 0x6f, 0xde, 0xce, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x48, 0x3c, 0x38, 0x48, + 0xa1, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1028,7 +1030,7 @@ func (m *MsgEditInflationParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.PolynomialFactors = append(m.PolynomialFactors, v) if err := m.PolynomialFactors[len(m.PolynomialFactors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/oracle/types/event.pb.go b/x/oracle/types/event.pb.go index fb48c177f..8fef316f8 100644 --- a/x/oracle/types/event.pb.go +++ b/x/oracle/types/event.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -27,9 +27,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Emitted when a price is posted type EventPriceUpdate struct { - Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` - Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"` - TimestampMs int64 `protobuf:"varint,3,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` + Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + TimestampMs int64 `protobuf:"varint,3,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` } func (m *EventPriceUpdate) Reset() { *m = EventPriceUpdate{} } @@ -358,39 +358,40 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/event.proto", fileDescriptor_94ec441b793fc0ea) } var fileDescriptor_94ec441b793fc0ea = []byte{ - // 510 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xdd, 0x6e, 0xd3, 0x30, - 0x14, 0x6e, 0xe8, 0x56, 0x51, 0xb7, 0x48, 0x93, 0x05, 0xa8, 0x94, 0x2e, 0xdd, 0x3a, 0x09, 0xf5, - 0x02, 0x12, 0x0d, 0x9e, 0x80, 0xb6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, 0x31, 0xfc, 0x14, 0x35, 0x4b, 0xc6, 0x67, 0xb1, 0x58, 0x72, 0xdd, 0xd9, - 0xb2, 0x82, 0xfb, 0x25, 0xe3, 0x63, 0x73, 0x36, 0x0e, 0x64, 0xae, 0x34, 0xb9, 0x11, 0x6c, 0x57, - 0x0e, 0x0e, 0xac, 0x44, 0xbb, 0x08, 0x65, 0x4c, 0x29, 0xa7, 0x68, 0x58, 0x45, 0xd3, 0x20, 0x96, - 0x1e, 0x1d, 0x5f, 0xae, 0x7c, 0xef, 0x6a, 0xe5, 0x7b, 0x3f, 0x57, 0xbe, 0xf7, 0x79, 0xed, 0xd7, - 0xae, 0xd6, 0x7e, 0xed, 0xdb, 0xda, 0xaf, 0xbd, 0x7f, 0xfe, 0xc7, 0x64, 0xbe, 0xb1, 0x0d, 0x1a, - 0x2f, 0x08, 0xe3, 0xa1, 0xdb, 0xa1, 0x8b, 0xcd, 0x16, 0xd9, 0x19, 0x9d, 0x37, 0xec, 0x3a, 0xbc, - 0xfa, 0x15, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xd7, 0x9a, 0x89, 0x93, 0x03, 0x00, 0x00, + // 514 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xc1, 0x6e, 0x13, 0x3d, + 0x14, 0x85, 0x33, 0x7f, 0xda, 0xe8, 0x8f, 0x13, 0xa4, 0xca, 0x02, 0x14, 0xd2, 0x74, 0xd2, 0x26, + 0x9b, 0x2c, 0xd0, 0x8c, 0x0a, 0x2b, 0x96, 0x24, 0x6d, 0x57, 0x14, 0x45, 0x23, 0x68, 0x25, 0x36, + 0x91, 0x33, 0xb9, 0x75, 0x2c, 0x32, 0xbe, 0x23, 0xdb, 0x99, 0x69, 0xf7, 0x3c, 0x00, 0xef, 0xc0, + 0x8e, 0x27, 0xe9, 0xb2, 0x4b, 0xc4, 0xa2, 0xa0, 0xe4, 0x45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 0x4b, 0x47, 0xcd, 0x39, 0xea, 0x96, 0x38, 0x79, 0x78, 0x72, + 0xbd, 0xf2, 0xbd, 0x9b, 0x95, 0xef, 0xfd, 0x5c, 0xf9, 0xde, 0xe7, 0xb5, 0x5f, 0xb9, 0x59, 0xfb, + 0x95, 0x6f, 0x6b, 0xbf, 0xf2, 0xe1, 0x39, 0x17, 0x66, 0xbe, 0x9c, 0x06, 0x31, 0x26, 0xe1, 0x5b, + 0x37, 0xa0, 0xd1, 0x9c, 0x09, 0x19, 0x96, 0x8b, 0x73, 0xb9, 0x59, 0x1d, 0x73, 0x95, 0x82, 0x9e, + 0xd6, 0xdc, 0x0e, 0xbc, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0x14, 0x1c, 0xae, 0x7e, 0x88, 0x03, + 0x00, 0x00, } func (m *EventPriceUpdate) Marshal() (dAtA []byte, err error) { diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index 65b124512..f956dc85a 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -4,9 +4,9 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_NibiruChain_nibiru_x_common_asset "github.com/NibiruChain/nibiru/x/common/asset" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -36,7 +36,7 @@ type Params struct { VotePeriod uint64 `protobuf:"varint,1,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty" yaml:"vote_period"` // VoteThreshold specifies the minimum proportion of votes that must be // received for a ballot to pass. - VoteThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=vote_threshold,json=voteThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"vote_threshold" yaml:"vote_threshold"` + VoteThreshold cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=vote_threshold,json=voteThreshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"vote_threshold" yaml:"vote_threshold"` // RewardBand defines a maxium divergence that a price vote can have from the // weighted median in the ballot. If a vote lies within the valid range // defined by: @@ -45,20 +45,20 @@ type Params struct { // then rewards are added to the validator performance. // Note that if the reward band is smaller than 1 standard // deviation, the band is taken to be 1 standard deviation.a price - RewardBand github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=reward_band,json=rewardBand,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"reward_band" yaml:"reward_band"` + RewardBand cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=reward_band,json=rewardBand,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"reward_band" yaml:"reward_band"` // The set of whitelisted markets, or asset pairs, for the module. // Ex. '["unibi:uusd","ubtc:uusd"]' Whitelist []github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,4,rep,name=whitelist,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"whitelist,omitempty" yaml:"whitelist"` // SlashFraction returns the proportion of an oracle's stake that gets // slashed in the event of slashing. `SlashFraction` specifies the exact // penalty for failing a voting period. - SlashFraction github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=slash_fraction,json=slashFraction,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction" yaml:"slash_fraction"` + SlashFraction cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=slash_fraction,json=slashFraction,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slash_fraction" yaml:"slash_fraction"` // SlashWindow returns the number of voting periods that specify a // "slash window". After each slash window, all oracles that have missed more // than the penalty threshold are slashed. Missing the penalty threshold is // synonymous with submitting fewer valid votes than `MinValidPerWindow`. - SlashWindow uint64 `protobuf:"varint,6,opt,name=slash_window,json=slashWindow,proto3" json:"slash_window,omitempty" yaml:"slash_window"` - MinValidPerWindow github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=min_valid_per_window,json=minValidPerWindow,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_valid_per_window" yaml:"min_valid_per_window"` + SlashWindow uint64 `protobuf:"varint,6,opt,name=slash_window,json=slashWindow,proto3" json:"slash_window,omitempty" yaml:"slash_window"` + MinValidPerWindow cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=min_valid_per_window,json=minValidPerWindow,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_valid_per_window" yaml:"min_valid_per_window"` // Amount of time to look back for TWAP calculations. // Ex: "900.000000069s" corresponds to 900 seconds and 69 nanoseconds in JSON. TwapLookbackWindow time.Duration `protobuf:"bytes,8,opt,name=twap_lookback_window,json=twapLookbackWindow,proto3,stdduration" json:"twap_lookback_window,omitempty" yaml:"twap_lookback_window"` @@ -66,8 +66,8 @@ type Params struct { // considered a passing ballot. Recommended at least 4. MinVoters uint64 `protobuf:"varint,9,opt,name=min_voters,json=minVoters,proto3" json:"min_voters,omitempty" yaml:"min_voters"` // The validator fee ratio that is given to validators every epoch. - ValidatorFeeRatio github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,10,opt,name=validator_fee_ratio,json=validatorFeeRatio,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"validator_fee_ratio" yaml:"validator_fee_ratio"` - ExpirationBlocks uint64 `protobuf:"varint,11,opt,name=expiration_blocks,json=expirationBlocks,proto3" json:"expiration_blocks,omitempty" yaml:"expiration_blocks"` + ValidatorFeeRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=validator_fee_ratio,json=validatorFeeRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"validator_fee_ratio" yaml:"validator_fee_ratio"` + ExpirationBlocks uint64 `protobuf:"varint,11,opt,name=expiration_blocks,json=expirationBlocks,proto3" json:"expiration_blocks,omitempty" yaml:"expiration_blocks"` } func (m *Params) Reset() { *m = Params{} } @@ -224,7 +224,7 @@ var xxx_messageInfo_AggregateExchangeRateVote proto.InternalMessageInfo // ExchangeRateTuple - struct to store interpreted exchange rates data to store type ExchangeRateTuple struct { Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair" yaml:"pair"` - ExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"exchange_rate" yaml:"exchange_rate"` + ExchangeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"exchange_rate" yaml:"exchange_rate"` } func (m *ExchangeRateTuple) Reset() { *m = ExchangeRateTuple{} } @@ -261,8 +261,8 @@ func (m *ExchangeRateTuple) XXX_DiscardUnknown() { var xxx_messageInfo_ExchangeRateTuple proto.InternalMessageInfo type DatedPrice struct { - ExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"exchange_rate" yaml:"exchange_rate"` - CreatedBlock uint64 `protobuf:"varint,2,opt,name=created_block,json=createdBlock,proto3" json:"created_block,omitempty" yaml:"created_block"` + ExchangeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"exchange_rate" yaml:"exchange_rate"` + CreatedBlock uint64 `protobuf:"varint,2,opt,name=created_block,json=createdBlock,proto3" json:"created_block,omitempty" yaml:"created_block"` } func (m *DatedPrice) Reset() { *m = DatedPrice{} } @@ -383,68 +383,68 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/oracle.proto", fileDescriptor_43d45df86ea09ed4) } var fileDescriptor_43d45df86ea09ed4 = []byte{ - // 976 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 0xc5, - 0x1b, 0xf6, 0x26, 0x4e, 0x1a, 0x8f, 0x93, 0xfe, 0x92, 0x69, 0xfa, 0x63, 0x13, 0x8a, 0x37, 0x4c, - 0xa5, 0xca, 0x87, 0xb2, 0xab, 0x14, 0x10, 0x22, 0x12, 0x07, 0xb6, 0x21, 0x10, 0xa9, 0x20, 0x6b, - 0x54, 0x81, 0x84, 0x90, 0xac, 0xd9, 0xdd, 0xc9, 0x7a, 0xe4, 0xdd, 0x1d, 0x6b, 0x66, 0x1d, 0x27, - 0x12, 0xe2, 0xcc, 0xb1, 0x27, 0xc4, 0x31, 0x67, 0x6e, 0xdc, 0xf8, 0x08, 0x95, 0xb8, 0xf4, 0x88, - 0x7a, 0xd8, 0x56, 0xc9, 0x25, 0xe2, 0xe8, 0x4f, 0x80, 0x66, 0x76, 0x1c, 0x6f, 0xb0, 0x25, 0x08, - 0x88, 0x93, 0xf7, 0x7d, 0x9f, 0x99, 0xe7, 0x7d, 0xde, 0x3f, 0x33, 0x63, 0xf0, 0x56, 0xc6, 0x02, - 0x26, 0x86, 0x1e, 0x17, 0x24, 0x4c, 0xa8, 0x77, 0xbc, 0x6b, 0xbe, 0xdc, 0x81, 0xe0, 0x39, 0x87, - 0xeb, 0x25, 0xec, 0x1a, 0xe7, 0xf1, 0xee, 0xf6, 0x66, 0xcc, 0x63, 0xae, 0x41, 0x4f, 0x7d, 0x95, - 0xeb, 0xb6, 0x5b, 0x31, 0xe7, 0x71, 0x42, 0x3d, 0x6d, 0x05, 0xc3, 0x23, 0x2f, 0x1a, 0x0a, 0x92, - 0x33, 0x9e, 0x4d, 0xf0, 0x90, 0xcb, 0x94, 0x4b, 0x2f, 0x20, 0x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 0x45, 0x3d, 0x98, 0x5b, 0x6e, 0x99, 0x88, 0xab, 0x1e, 0x7e, 0xd7, 0x3c, 0xfc, - 0xee, 0x63, 0xce, 0x32, 0xbf, 0xae, 0x92, 0xc7, 0xe5, 0x6a, 0xff, 0xe0, 0xf9, 0x79, 0xcb, 0x7a, - 0x71, 0xde, 0xb2, 0x5e, 0x9f, 0xb7, 0xac, 0x67, 0x17, 0xad, 0xda, 0x8b, 0x8b, 0x56, 0xed, 0xb7, - 0x8b, 0x56, 0xed, 0xeb, 0x87, 0x7f, 0x35, 0x08, 0xe6, 0x9f, 0x8b, 0xae, 0x52, 0xb0, 0xac, 0x2f, - 0xdc, 0x77, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x42, 0xc8, 0x75, 0xd7, 0x08, 0x00, 0x00, + // 972 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xdc, 0x44, + 0x18, 0x5e, 0x27, 0x9b, 0x34, 0x3b, 0x9b, 0x94, 0x64, 0x9a, 0x82, 0x93, 0x96, 0x75, 0x98, 0x4a, + 0x28, 0x87, 0xca, 0x56, 0x0a, 0x08, 0x11, 0xe0, 0xd0, 0x6d, 0x88, 0x88, 0x54, 0xa1, 0xd5, 0xa8, + 0x02, 0xa9, 0x42, 0x5a, 0xc6, 0xf6, 0xc4, 0x1e, 0xc5, 0xf6, 0x2c, 0x33, 0xb3, 0xf9, 0xf8, 0x07, + 0x1c, 0x7b, 0x40, 0x88, 0x63, 0xce, 0x48, 0x1c, 0xf8, 0x17, 0x3d, 0xf6, 0x88, 0x2a, 0xe1, 0x56, + 0xc9, 0xa5, 0xe2, 0xb8, 0xbf, 0x00, 0xcd, 0x78, 0x92, 0x75, 0xd8, 0x95, 0x88, 0x2a, 0x6e, 0xfb, + 0xbe, 0xcf, 0xcc, 0xf3, 0x7e, 0x3d, 0x9e,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xb4, + 0xf3, 0x3f, 0x87, 0x86, 0x5f, 0x82, 0xa5, 0x48, 0x50, 0x1d, 0xd1, 0x4a, 0x6f, 0xc6, 0x48, 0xcf, + 0x1d, 0x5f, 0xbf, 0x02, 0x23, 0xbc, 0x68, 0x6d, 0x23, 0x3e, 0x24, 0xc1, 0x0d, 0x6c, 0xd6, 0x88, + 0x84, 0x37, 0xc1, 0x0c, 0xb3, 0x4b, 0x13, 0xcf, 0xb0, 0x18, 0x7e, 0x00, 0x16, 0x6b, 0x0b, 0x53, + 0x56, 0xc4, 0xb8, 0x3d, 0x5e, 0x9b, 0x12, 0x7e, 0x02, 0xe6, 0xf4, 0x26, 0x96, 0xee, 0xac, 0x91, + 0xe0, 0x9a, 0x5f, 0xd5, 0xe3, 0xeb, 0x5d, 0xed, 0xdb, 0x5d, 0xed, 0x3f, 0xe2, 0xac, 0xe8, 0x36, + 0x75, 0xc5, 0xb8, 0x3a, 0xdd, 0xdd, 0x7d, 0x7e, 0xd6, 0x71, 0x5e, 0x9c, 0x75, 0x9c, 0xd7, 0x67, + 0x1d, 0xe7, 0xd9, 0x79, 0xa7, 0xf1, 0xe2, 0xbc, 0xd3, 0xf8, 0xf3, 0xbc, 0xd3, 0x78, 0x7a, 0xff, + 0xbf, 0x46, 0x6e, 0xff, 0x6c, 0xa8, 0x93, 0x01, 0x95, 0xe1, 0xbc, 0x79, 0x4f, 0x3f, 0xfa, 0x27, + 0x00, 0x00, 0xff, 0xff, 0x9b, 0xb4, 0x7f, 0xc5, 0x8a, 0x08, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index 3d82a1d37..71c335131 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -5,10 +5,10 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_NibiruChain_nibiru_x_common_asset "github.com/NibiruChain/nibiru/x/common/asset" _ "github.com/cosmos/cosmos-sdk/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -76,7 +76,7 @@ var xxx_messageInfo_QueryExchangeRateRequest proto.InternalMessageInfo // Query/ExchangeRate RPC method. type QueryExchangeRateResponse struct { // exchange_rate defines the exchange rate of assets voted by validators - ExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"exchange_rate"` + ExchangeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"exchange_rate"` } func (m *QueryExchangeRateResponse) Reset() { *m = QueryExchangeRateResponse{} } @@ -987,77 +987,77 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/query.proto", fileDescriptor_16aef2382d1249a8) } var fileDescriptor_16aef2382d1249a8 = []byte{ - // 1105 bytes of a gzipped FileDescriptorProto + // 1109 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x97, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0x3d, 0x50, 0x52, 0x18, 0xc7, 0xae, 0x33, 0x04, 0x91, 0x6e, 0x13, 0xbb, 0x2c, 0x4d, - 0xd4, 0x36, 0xc9, 0x2e, 0x4e, 0x50, 0x51, 0xf8, 0x21, 0x70, 0x12, 0x22, 0x81, 0x1a, 0x08, 0xa6, - 0x8a, 0x50, 0x85, 0x64, 0x8d, 0xd7, 0xd3, 0xcd, 0xaa, 0xf6, 0xce, 0x76, 0x67, 0x6d, 0x12, 0x01, + 0x14, 0xc7, 0x3d, 0x10, 0x52, 0x78, 0x8e, 0xd3, 0x64, 0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 0xc9, 0xa4, 0xef, + 0xe2, 0x4c, 0x2c, 0xd1, 0xa2, 0xaf, 0x65, 0xac, 0x96, 0xe8, 0x6b, 0x02, 0x7d, 0x15, 0x97, 0xff, + 0xcb, 0x96, 0xc3, 0x15, 0x7f, 0x04, 0xe3, 0xa1, 0xbd, 0xe2, 0x8b, 0x0a, 0xcd, 0x84, 0x8b, 0x6b, + 0x8b, 0x43, 0xaa, 0x24, 0xd1, 0xa2, 0x20, 0x2a, 0xe1, 0x05, 0xe5, 0x45, 0x26, 0x2c, 0x7d, 0xfb, + 0xfe, 0x71, 0x11, 0x3d, 0x38, 0x2e, 0xa2, 0xbf, 0x8e, 0x8b, 0xe8, 0x8b, 0x93, 0x62, 0xee, 0xc1, + 0x49, 0x31, 0xf7, 0xfb, 0x49, 0x31, 0x77, 0x73, 0x79, 0xd8, 0xef, 0x0f, 0xd9, 0xd0, 0x3f, 0x6a, + 0x51, 0x5e, 0x1b, 0x17, 0xbf, 0x86, 0x57, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x52, 0x3d, + 0x86, 0xb2, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/oracle/types/state.pb.go b/x/oracle/types/state.pb.go index 1569bbca1..a7fc5ebb5 100644 --- a/x/oracle/types/state.pb.go +++ b/x/oracle/types/state.pb.go @@ -4,10 +4,10 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_NibiruChain_nibiru_x_common_asset "github.com/NibiruChain/nibiru/x/common/asset" _ "github.com/cosmos/cosmos-sdk/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -30,7 +30,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // a snapshot of the prices at a given point in time type PriceSnapshot struct { Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair" yaml:"pair"` - Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` // milliseconds since unix epoch TimestampMs int64 `protobuf:"varint,3,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` } @@ -82,28 +82,28 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/state.proto", fileDescriptor_125e6c5a6e45c0d0) } var fileDescriptor_125e6c5a6e45c0d0 = []byte{ - // 329 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x41, 0x4b, 0xf3, 0x30, - 0x18, 0x80, 0xdb, 0x6f, 0x9f, 0x82, 0x9d, 0x82, 0x14, 0x0f, 0x63, 0xcc, 0x6c, 0xee, 0x20, 0x3b, - 0x68, 0x42, 0xf1, 0xe6, 0x71, 0x0e, 0xf1, 0xa2, 0x8c, 0x79, 0x13, 0x41, 0xde, 0xc6, 0xd0, 0x05, - 0x97, 0xbc, 0xa1, 0xc9, 0x86, 0xfb, 0x17, 0xfe, 0xac, 0x1d, 0x77, 0x12, 0xf1, 0x30, 0x64, 0xfb, - 0x07, 0xfe, 0x02, 0x69, 0x53, 0x44, 0xf0, 0xe0, 0xa9, 0x25, 0x4f, 0xf2, 0x3c, 0xc9, 0x1b, 0xb5, - 0xb4, 0x4c, 0x65, 0x3e, 0x65, 0x98, 0x03, 0x9f, 0x08, 0x36, 0x4b, 0x98, 0x75, 0xe0, 0x04, 0x35, - 0x39, 0x3a, 0x8c, 0xf7, 0x3d, 0xa5, 0x9e, 0xd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2, 0xe5, 0x9a, - 0x84, 0x1f, 0x6b, 0x12, 0xbe, 0x6c, 0x48, 0xb0, 0xdc, 0x90, 0xe0, 0x6d, 0x43, 0x82, 0xbb, 0x93, - 0xbf, 0x9e, 0x52, 0x8d, 0xb2, 0xac, 0xa6, 0xdb, 0xe5, 0x9c, 0xce, 0xbe, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x21, 0xeb, 0xd1, 0x23, 0xcc, 0x01, 0x00, 0x00, + // 333 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0xc1, 0x4a, 0x2b, 0x31, + 0x14, 0x40, 0x67, 0x5e, 0xdf, 0x7b, 0xf0, 0xa6, 0x4f, 0x90, 0xc1, 0x45, 0xa9, 0x35, 0xad, 0x75, + 0xd3, 0x85, 0x24, 0x0c, 0xae, 0x74, 0x59, 0x45, 0x5c, 0xa8, 0x94, 0xba, 0x13, 0x41, 0xee, 0xc4, + 0x30, 0x13, 0x6c, 0x72, 0xc3, 0x24, 0x2d, 0xf6, 0x2f, 0xfc, 0xac, 0x82, 0x9b, 0x2e, 0xc5, 0x45, + 0x91, 0xf6, 0x0f, 0xfc, 0x02, 0x99, 0xc9, 0xe0, 0xc6, 0x85, 0xbb, 0x90, 0x93, 0x9c, 0x73, 0xb9, + 0x51, 0x47, 0xcb, 0x54, 0x16, 0x53, 0x86, 0x05, 0xf0, 0x89, 0x60, 0xb3, 0x84, 0x59, 0x07, 0x4e, + 0x50, 0x53, 0xa0, 0xc3, 0x78, 0xdb, 0x53, 0xea, 0x29, 0x9d, 0x25, 0xed, 0x9d, 0x0c, 0x33, 0xac, + 0x20, 0x2b, 0x4f, 0xfe, 0x5d, 0xbb, 0x93, 0x21, 0x66, 0x13, 0xc1, 0xc0, 0x48, 0x06, 0x5a, 0xa3, + 0x03, 0x27, 0x51, 0xdb, 0x9a, 0xee, 0x7d, 0x6b, 0xd4, 0x3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0xfa, + 0x0c, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xf6, 0x16, 0xa1, 0xc1, 0x01, 0x00, 0x00, } func (m *PriceSnapshot) Marshal() (dAtA []byte, err error) { diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index 559b17c45..8ff48df9b 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -5,6 +5,7 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -283,19 +284,19 @@ type MsgEditOracleParams struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` VotePeriod *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=vote_period,json=votePeriod,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"vote_period,omitempty"` // vote_threshold: [cosmossdk.io/math.LegacyDec] TODO: - VoteThreshold *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=vote_threshold,json=voteThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"vote_threshold,omitempty"` + VoteThreshold *cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=vote_threshold,json=voteThreshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"vote_threshold,omitempty"` // reward_band: [cosmossdk.io/math.LegacyDec] TODO: - RewardBand *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=reward_band,json=rewardBand,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"reward_band,omitempty"` - Whitelist []string `protobuf:"bytes,5,rep,name=whitelist,proto3" json:"whitelist,omitempty"` + RewardBand *cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=reward_band,json=rewardBand,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"reward_band,omitempty"` + Whitelist []string `protobuf:"bytes,5,rep,name=whitelist,proto3" json:"whitelist,omitempty"` // slash_fraction: [cosmossdk.io/math.LegacyDec] TODO: - SlashFraction *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=slash_fraction,json=slashFraction,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction,omitempty"` + SlashFraction *cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=slash_fraction,json=slashFraction,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slash_fraction,omitempty"` SlashWindow *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=slash_window,json=slashWindow,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"slash_window,omitempty"` // min_valid_per_window: [cosmossdk.io/math.LegacyDec] TODO: - MinValidPerWindow *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=min_valid_per_window,json=minValidPerWindow,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_valid_per_window,omitempty"` + MinValidPerWindow *cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=min_valid_per_window,json=minValidPerWindow,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_valid_per_window,omitempty"` TwapLookbackWindow *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=twap_lookback_window,json=twapLookbackWindow,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"twap_lookback_window,omitempty"` MinVoters *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=min_voters,json=minVoters,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_voters,omitempty"` // VoteThreshold: [cosmossdk.io/math.LegacyDec] TODO: - ValidatorFeeRatio *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,11,opt,name=validator_fee_ratio,json=validatorFeeRatio,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"validator_fee_ratio,omitempty"` + ValidatorFeeRatio *cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=validator_fee_ratio,json=validatorFeeRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"validator_fee_ratio,omitempty"` } func (m *MsgEditOracleParams) Reset() { *m = MsgEditOracleParams{} } @@ -405,64 +406,65 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/tx.proto", fileDescriptor_11e362c65eb610f4) } var fileDescriptor_11e362c65eb610f4 = []byte{ - // 915 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0x41, 0x6f, 0xdc, 0x44, - 0x14, 0xc7, 0xd7, 0x4d, 0xba, 0x64, 0x67, 0x49, 0x9b, 0x7a, 0xd3, 0xc8, 0xd9, 0x06, 0x3b, 0xb8, - 0x10, 0x12, 0x89, 0xb5, 0x49, 0x90, 0x40, 0xf4, 0x04, 0x69, 0x1b, 0x09, 0x89, 0xa5, 0xc1, 0x82, - 0x20, 0x71, 0xc0, 0xcc, 0xae, 0x5f, 0x6c, 0x2b, 0x5e, 0x8f, 0x35, 0x33, 0xcd, 0xa6, 0x57, 0xc4, - 0x01, 0x6e, 0x48, 0x3d, 0x71, 0xcb, 0x07, 0x40, 0xe2, 0x6b, 0xf4, 0x58, 0x89, 0x0b, 0xe2, 0xb0, - 0x42, 0x09, 0x42, 0x9c, 0x38, 0xec, 0x27, 0x40, 0x33, 0x1e, 0xbb, 0xdb, 0xcd, 0xb6, 0xcd, 0xee, - 0x29, 0xce, 0xbc, 0xff, 0xfc, 0xde, 0xff, 0x3d, 0x7b, 0xde, 0x2c, 0x5a, 0x4d, 0xe3, 0x4e, 0x4c, - 0x1f, 0xba, 0x84, 0xe2, 0x6e, 0x02, 0xee, 0xf1, 0xb6, 0xcb, 0x4f, 0x9c, 0x8c, 0x12, 0x4e, 0xf4, - 0xa5, 0x3c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f, 0x42, 0xd7, 0x24, - 0x90, 0x47, 0x14, 0x58, 0x44, 0x92, 0x40, 0xbd, 0xc2, 0x69, 0x98, 0xf7, 0xa0, 0xeb, 0x2d, 0x0a, - 0xca, 0x97, 0x05, 0x44, 0xf8, 0xa4, 0xd0, 0xc7, 0x34, 0xf0, 0x3b, 0x38, 0x0d, 0xd4, 0x8b, 0x9e, - 0x96, 0x89, 0x72, 0xc4, 0x2e, 0x4e, 0x03, 0xdd, 0x46, 0xb5, 0x7e, 0x14, 0x73, 0x48, 0x62, 0xc6, - 0x8d, 0xab, 0xeb, 0x73, 0x9b, 0xb5, 0xdd, 0x79, 0x81, 0xf3, 0x9e, 0x2d, 0x8b, 0x5a, 0x58, 0x82, - 0x59, 0xe4, 0x1f, 0x52, 0xdc, 0x15, 0x33, 0xc2, 0xa8, 0xce, 0x56, 0x8b, 0xa4, 0xec, 0x29, 0x88, - 0xfe, 0x05, 0x7a, 0x3d, 0xc7, 0xf6, 0xe3, 0x34, 0x20, 0x7d, 0xe3, 0xb5, 0x99, 0x9a, 0x5e, 0x97, - 0x8c, 0xaf, 0x25, 0x42, 0xf7, 0xd1, 0x72, 0x2f, 0x4e, 0x7d, 0xf9, 0x89, 0x8b, 0x77, 0x59, 0xa0, - 0x17, 0x66, 0xf2, 0x7b, 0xa3, 0x17, 0xa7, 0x07, 0x02, 0xb5, 0x0f, 0x54, 0x25, 0xf8, 0x0e, 0x2d, - 0xf3, 0x3e, 0xce, 0xfc, 0x84, 0x90, 0xa3, 0x0e, 0xee, 0x1e, 0x15, 0x09, 0x6a, 0x33, 0x79, 0xd7, - 0x05, 0xeb, 0x33, 0x85, 0x52, 0x19, 0xda, 0x08, 0xc9, 0x12, 0x08, 0x07, 0xca, 0x0c, 0x34, 0x13, - 0xb7, 0x26, 0x8c, 0x4b, 0x80, 0xfe, 0x2d, 0x6a, 0x94, 0x07, 0xde, 0x3f, 0x04, 0x39, 0x69, 0x62, - 0x62, 0xd4, 0x67, 0x6b, 0x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4c, 0xed, 0xe9, 0x99, 0xa9, 0xfd, 0x75, 0x66, - 0x6a, 0x3f, 0x9f, 0x9b, 0x95, 0xa7, 0xe7, 0x66, 0xe5, 0x8f, 0x73, 0xb3, 0xf2, 0xcd, 0xbb, 0x23, - 0x07, 0xe7, 0x73, 0x89, 0xb9, 0x1b, 0xe1, 0x38, 0x2d, 0x90, 0x27, 0x05, 0x54, 0x1e, 0xa1, 0x4e, - 0x55, 0xfe, 0x74, 0x7a, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0xca, 0xa5, 0x9a, 0xbc, + // 931 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x36, 0xad, 0x89, 0xc7, 0xa4, 0x4d, 0xc7, 0x69, 0xb4, 0x71, 0x82, 0x37, 0x6c, 0x20, + 0x24, 0x12, 0xde, 0x25, 0x41, 0x02, 0xd1, 0x13, 0xa4, 0x69, 0x24, 0x50, 0x4d, 0xc3, 0x52, 0x05, + 0x89, 0x8b, 0x19, 0x7b, 0x5f, 0x76, 0x47, 0x59, 0xef, 0x58, 0x3b, 0xd3, 0x38, 0xb9, 0x22, 0x0e, + 0x70, 0x43, 0xea, 0x89, 0x5b, 0x7e, 0x00, 0x52, 0xff, 0x46, 0x8f, 0x95, 0xb8, 0x20, 0x0e, 0x16, + 0x4a, 0x38, 0x70, 0xe2, 0xe0, 0x5f, 0x80, 0x66, 0x76, 0x76, 0xeb, 0x3a, 0x6e, 0x6b, 0xe7, 0x94, + 0xcd, 0xbc, 0xef, 0xfb, 0xde, 0x37, 0x6f, 0xe6, 0xbd, 0x31, 0x5a, 0x8a, 0x69, 0x8b, 0x26, 0x8f, + 0x5d, 0x96, 0x90, 0x76, 0x04, 0xee, 0xf1, 0x96, 0x2b, 0x4e, 0x9c, 0x6e, 0xc2, 0x04,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b, 0x62, 0x09, 0x7c, 0x2a, 0xea, 0xe9, + 0x77, 0x3d, 0xbd, 0xb6, 0x3b, 0x7b, 0xcf, 0xce, 0x6b, 0xc6, 0xf3, 0xf3, 0x9a, 0xf1, 0xf7, 0x79, + 0xcd, 0xf8, 0xf5, 0xa2, 0x56, 0x78, 0x7e, 0x51, 0x2b, 0xfc, 0x79, 0x51, 0x2b, 0x7c, 0xff, 0xe1, + 0x50, 0x17, 0x7e, 0xad, 0x64, 0xee, 0x85, 0x84, 0xc6, 0x99, 0xe4, 0x49, 0x26, 0xaa, 0xfa, 0xb1, + 0x55, 0x54, 0xbf, 0x81, 0x3e, 0xfe, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x0d, 0x73, 0x17, 0x85, 0x09, 0x00, 0x00, } @@ -1941,7 +1943,7 @@ func (m *MsgEditOracleParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.VoteThreshold = &v if err := m.VoteThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1977,7 +1979,7 @@ func (m *MsgEditOracleParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.RewardBand = &v if err := m.RewardBand.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2045,7 +2047,7 @@ func (m *MsgEditOracleParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.SlashFraction = &v if err := m.SlashFraction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2117,7 +2119,7 @@ func (m *MsgEditOracleParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.MinValidPerWindow = &v if err := m.MinValidPerWindow.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2225,7 +2227,7 @@ func (m *MsgEditOracleParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.ValidatorFeeRatio = &v if err := m.ValidatorFeeRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err From d69f565491bc3993679a3fb99992000c61b55c99 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Tue, 28 May 2024 14:23:09 +0200 Subject: [PATCH 21/22] feat: upgrade cmd folder --- app/server/util.go | 42 +++++++++++++++++++++++++++++ cmd/nibid/cmd/decode_base64_test.go | 2 +- cmd/nibid/cmd/genaccounts.go | 5 +++- cmd/nibid/cmd/genaccounts_test.go | 2 +- cmd/nibid/cmd/init.go | 7 +++-- cmd/nibid/cmd/root.go | 19 +++++++------ cmd/nibid/cmd/testnet.go | 15 ++++++++--- cmd/nibid/cmd/testnet_test.go | 2 +- cmd/nibid/main.go | 9 +------ go.mod | 3 +++ go.sum | 8 ++++++ simapp/sim_test.go | 2 +- x/common/testutil/client_ctx.go | 2 +- 13 files changed, 86 insertions(+), 32 deletions(-) diff --git a/app/server/util.go b/app/server/util.go index 6ac9a7308..6fec64e06 100644 --- a/app/server/util.go +++ b/app/server/util.go @@ -1,14 +1,17 @@ package server import ( + "context" "net" "time" + cmtjson "github.com/cometbft/cometbft/libs/json" "github.com/spf13/cobra" "golang.org/x/net/netutil" srvconfig "github.com/NibiruChain/nibiru/app/server/config" + "github.com/cosmos/cosmos-sdk/client" sdkserver "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/version" @@ -16,6 +19,8 @@ import ( "cosmossdk.io/log" tmcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" rpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" ) // AddCommands adds server commands @@ -55,6 +60,43 @@ func AddCommands( ) } +// StatusCommand returns the command to return the status of the network. +func StatusCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "status", + Short: "Query remote node for status", + RunE: func(cmd *cobra.Command, _ []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + status, err := cmtservice.GetNodeStatus(context.Background(), clientCtx) + if err != nil { + return err + } + + output, err := cmtjson.Marshal(status) + if err != nil { + return err + } + + // In order to maintain backwards compatibility, the default json format output + outputFormat, _ := cmd.Flags().GetString(flags.FlagOutput) + if outputFormat == flags.OutputFormatJSON { + clientCtx = clientCtx.WithOutputFormat(flags.OutputFormatJSON) + } + + return clientCtx.PrintRaw(output) + }, + } + + cmd.Flags().StringP(flags.FlagNode, "n", "tcp://localhost:26657", "Node to connect to") + cmd.Flags().StringP(flags.FlagOutput, "o", "json", "Output format (text|json)") + + return cmd +} + func ConnectTmWS(tmRPCAddr, tmEndpoint string, logger log.Logger) *rpcclient.WSClient { tmWsClient, err := rpcclient.NewWS(tmRPCAddr, tmEndpoint, rpcclient.MaxReconnectAttempts(256), diff --git a/cmd/nibid/cmd/decode_base64_test.go b/cmd/nibid/cmd/decode_base64_test.go index c452dfbd9..3c1383cf9 100644 --- a/cmd/nibid/cmd/decode_base64_test.go +++ b/cmd/nibid/cmd/decode_base64_test.go @@ -28,7 +28,7 @@ func TestBase64Decode(t *testing.T) { t.Run(tc.name, func(t *testing.T) { home := t.TempDir() logger := log.NewNopLogger() - cfg, err := genutiltest.CreateDefaultTendermintConfig(home) + cfg, err := genutiltest.CreateDefaultCometConfig(home) require.NoError(t, err) appCodec := app.MakeEncodingConfig().Codec diff --git a/cmd/nibid/cmd/genaccounts.go b/cmd/nibid/cmd/genaccounts.go index 6b79b1d87..0a42afe65 100644 --- a/cmd/nibid/cmd/genaccounts.go +++ b/cmd/nibid/cmd/genaccounts.go @@ -90,7 +90,10 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa baseAccount := authtypes.NewBaseAccount(addr, nil, 0, 0) if !vestingAmt.IsZero() { - baseVestingAccount := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) + baseVestingAccount, err := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) + if err != nil { + return err + } if (balances.Coins.IsZero() && !baseVestingAccount.OriginalVesting.IsZero()) || baseVestingAccount.OriginalVesting.IsAnyGT(balances.Coins) { diff --git a/cmd/nibid/cmd/genaccounts_test.go b/cmd/nibid/cmd/genaccounts_test.go index a68f741e9..191489361 100644 --- a/cmd/nibid/cmd/genaccounts_test.go +++ b/cmd/nibid/cmd/genaccounts_test.go @@ -38,7 +38,7 @@ func TestAddGenesisAccountCmd(t *testing.T) { t.Run(tc.name, func(t *testing.T) { home := t.TempDir() logger := log.NewNopLogger() - cfg, err := genutiltest.CreateDefaultTendermintConfig(home) + cfg, err := genutiltest.CreateDefaultCometConfig(home) require.NoError(t, err) appCodec := app.MakeEncodingConfig().Codec diff --git a/cmd/nibid/cmd/init.go b/cmd/nibid/cmd/init.go index 534ee07c5..2c7e2c865 100644 --- a/cmd/nibid/cmd/init.go +++ b/cmd/nibid/cmd/init.go @@ -10,10 +10,10 @@ import ( db "github.com/cometbft/cometbft-db" tmcfg "github.com/cometbft/cometbft/config" + gentypes "github.com/cosmos/cosmos-sdk/x/genutil/types" tmcli "github.com/cometbft/cometbft/libs/cli" tmrand "github.com/cometbft/cometbft/libs/rand" - tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/go-bip39" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -153,20 +153,19 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { return errors.Wrap(err, "Failed to marshal default genesis state") } - genDoc := &tmtypes.GenesisDoc{} + genDoc := &gentypes.AppGenesis{} if _, err := os.Stat(genFile); err != nil { if !os.IsNotExist(err) { return err } } else { - genDoc, err = tmtypes.GenesisDocFromFile(genFile) + genDoc, err = gentypes.AppGenesisFromFile(genFile) if err != nil { return errors.Wrap(err, "Failed to read genesis doc from file") } } genDoc.ChainID = chainID - genDoc.Validators = nil genDoc.AppState = appState genDoc.InitialHeight = initHeight diff --git a/cmd/nibid/cmd/root.go b/cmd/nibid/cmd/root.go index 44390d718..2ddc4f701 100644 --- a/cmd/nibid/cmd/root.go +++ b/cmd/nibid/cmd/root.go @@ -8,12 +8,10 @@ import ( "github.com/NibiruChain/nibiru/app/server" srvconfig "github.com/NibiruChain/nibiru/app/server/config" - "github.com/NibiruChain/nibiru/app/appconst" - "github.com/NibiruChain/nibiru/x/sudo/cli" - "cosmossdk.io/log" - dbm "github.com/cometbft/cometbft-db" + confixcmd "cosmossdk.io/tools/confix/cmd" tmcli "github.com/cometbft/cometbft/libs/cli" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" @@ -30,6 +28,9 @@ import ( genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" "github.com/spf13/cobra" + "github.com/NibiruChain/nibiru/app/appconst" + "github.com/NibiruChain/nibiru/x/sudo/cli" + "github.com/NibiruChain/nibiru/app" oraclecli "github.com/NibiruChain/nibiru/x/oracle/client/cli" ) @@ -114,8 +115,8 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig app.EncodingConfig) { tmcli.NewCompletionCmd(rootCmd, true), testnetCmd(app.ModuleBasics, banktypes.GenesisBalancesIterator{}), debug.Cmd(), - config.Cmd(), - pruning.PruningCmd(a.newApp), + confixcmd.ConfigCommand(), + pruning.Cmd(a.newApp, app.DefaultNodeHome), ) server.AddCommands( @@ -127,7 +128,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig app.EncodingConfig) { // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( - rpc.StatusCommand(), + server.StatusCommand(), genesisCommand( encodingConfig, oraclecli.AddGenesisPricefeederDelegationCmd(app.DefaultNodeHome), @@ -135,7 +136,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig app.EncodingConfig) { ), queryCommand(), txCommand(), - keys.Commands(app.DefaultNodeHome), + keys.Commands(), ) // TODO add rosettaj @@ -171,9 +172,7 @@ func queryCommand() *cobra.Command { } rootQueryCmd.AddCommand( - authcmd.GetAccountCmd(), rpc.ValidatorCommand(), - rpc.BlockCommand(), authcmd.QueryTxsByEventsCmd(), authcmd.QueryTxCmd(), ) diff --git a/cmd/nibid/cmd/testnet.go b/cmd/nibid/cmd/testnet.go index 106babf8a..940c83ae7 100644 --- a/cmd/nibid/cmd/testnet.go +++ b/cmd/nibid/cmd/testnet.go @@ -210,9 +210,14 @@ func InitTestnet( genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()}) genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) + valAddrCodec := clientCtx.TxConfig.SigningContext().ValidatorAddressCodec() + valStr, err := valAddrCodec.BytesToString(sdk.ValAddress(addr)) + if err != nil { + return err + } valTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) createValMsg, err := stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(addr), + valStr, valPubKeys[i], sdk.NewCoin(denoms.NIBI, valTokens), stakingtypes.NewDescription(nodeDirName, "", "", "", ""), @@ -237,7 +242,7 @@ func InitTestnet( WithKeybase(kb). WithTxConfig(clientCtx.TxConfig) - if err := tx.Sign(txFactory, nodeDirName, txBuilder, true); err != nil { + if err := tx.Sign(cmd.Context(), txFactory, nodeDirName, txBuilder, true); err != nil { return err } @@ -337,19 +342,21 @@ func collectGenFiles( nodeID, valPubKey := nodeIDs[i], valPubKeys[i] initCfg := genutiltypes.NewInitConfig(chainID, gentxsDir, nodeID, valPubKey) - genDoc, err := types.GenesisDocFromFile(nodeConfig.GenesisFile()) + appGenesis, err := genutiltypes.AppGenesisFromFile(nodeConfig.GenesisFile()) if err != nil { return err } + valAddrCodec := clientCtx.TxConfig.SigningContext().ValidatorAddressCodec() nodeAppState, err := genutil.GenAppStateFromConfig( clientCtx.Codec, clientCtx.TxConfig, nodeConfig, initCfg, - *genDoc, + appGenesis, genBalIterator, genutiltypes.DefaultMessageValidator, + valAddrCodec, ) if err != nil { return err diff --git a/cmd/nibid/cmd/testnet_test.go b/cmd/nibid/cmd/testnet_test.go index db8c5ac45..08d112850 100644 --- a/cmd/nibid/cmd/testnet_test.go +++ b/cmd/nibid/cmd/testnet_test.go @@ -22,7 +22,7 @@ func Test_TestnetCmd(t *testing.T) { home := t.TempDir() encodingConfig := app.MakeEncodingConfig() logger := log.NewNopLogger() - cfg, err := genutiltest.CreateDefaultTendermintConfig(home) + cfg, err := genutiltest.CreateDefaultCometConfig(home) require.NoError(t, err) err = genutiltest.ExecInitCmd(app.ModuleBasics, home, encodingConfig.Codec) diff --git a/cmd/nibid/main.go b/cmd/nibid/main.go index b34315c2f..1c5dffd4c 100644 --- a/cmd/nibid/main.go +++ b/cmd/nibid/main.go @@ -3,7 +3,6 @@ package main import ( "os" - "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/NibiruChain/nibiru/app" @@ -14,12 +13,6 @@ func main() { rootCmd, _ := cmd.NewRootCmd() if err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome); err != nil { - switch e := err.(type) { - case server.ErrorCode: - os.Exit(e.Code) - - default: - os.Exit(1) - } + os.Exit(1) } } diff --git a/go.mod b/go.mod index 443303d2a..f6cddc734 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.3.1 cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc + cosmossdk.io/tools/confix v0.1.1 cosmossdk.io/x/circuit v0.1.0 // indirect cosmossdk.io/x/evidence v0.1.0 cosmossdk.io/x/feegrant v0.1.0 @@ -120,6 +121,8 @@ require ( github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect + github.com/creachadair/atomicfile v0.3.4 // indirect + github.com/creachadair/tomledit v0.0.26 // indirect github.com/danieljoos/wincred v1.2.1 // indirect github.com/deckarep/golang-set v1.8.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect diff --git a/go.sum b/go.sum index bca80d041..fa311d91a 100644 --- a/go.sum +++ b/go.sum @@ -210,6 +210,8 @@ cosmossdk.io/simapp v0.0.0-20240522060652-a1ae4c3e0337 h1:7juhrs+IZ2ZsfpNaVuI2ZA cosmossdk.io/simapp v0.0.0-20240522060652-a1ae4c3e0337/go.mod h1:HGidcqY4qtfjEKzliLol/BQNXEXjpP7LpVRvVvrpJxM= cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc h1:R9O9d75e0qZYUsVV0zzi+D7cNLnX2JrUOQNoIPaF0Bg= cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc/go.mod h1:amTTatOUV3u1PsKmNb87z6/galCxrRbz9kRdJkL0DyU= +cosmossdk.io/tools/confix v0.1.1 h1:aexyRv9+y15veH3Qw16lxQwo+ki7r2I+g0yNTEFEQM8= +cosmossdk.io/tools/confix v0.1.1/go.mod h1:nQVvP1tHsGXS83PonPVWJtSbddIqyjEw99L4M3rPJyQ= cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= cosmossdk.io/x/evidence v0.1.0 h1:J6OEyDl1rbykksdGynzPKG5R/zm6TacwW2fbLTW4nCk= @@ -473,6 +475,12 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creachadair/atomicfile v0.3.4 h1:AjNK7To+S1p+nk7uJXJMZFpcV9XHOyAaULyDeU6LEqM= +github.com/creachadair/atomicfile v0.3.4/go.mod h1:ByEUbfQyms+tRtE7Wk7WdS6PZeyMzfSFlNX1VoKEh6E= +github.com/creachadair/mds v0.13.3 h1:OqXNRorXKsuvfjor+0ixtrpA4IINApH8zgm23XLlngk= +github.com/creachadair/mds v0.13.3/go.mod h1:4vrFYUzTXMJpMBU+OA292I6IUxKWCCfZkgXg+/kBZMo= +github.com/creachadair/tomledit v0.0.26 h1:MoDdgHIHZ5PctBVsAZDjxdxreWUEa9ObPKTRkk5PPwA= +github.com/creachadair/tomledit v0.0.26/go.mod h1:SJi1OxKpMyR141tq1lzsbPtIg3j8TeVPM/ZftfieD7o= 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/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= diff --git a/simapp/sim_test.go b/simapp/sim_test.go index b4f9ce164..f5f168fe4 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -12,9 +12,9 @@ import ( "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" evidencetypes "cosmossdk.io/x/evidence/types" - dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" tmproto "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" diff --git a/x/common/testutil/client_ctx.go b/x/common/testutil/client_ctx.go index 3c6e09f98..8536b9685 100644 --- a/x/common/testutil/client_ctx.go +++ b/x/common/testutil/client_ctx.go @@ -21,7 +21,7 @@ import ( func SetupClientCtx(t *testing.T) context.Context { home := t.TempDir() logger := log.NewNopLogger() - cfg, err := genutiltest.CreateDefaultTendermintConfig(home) + cfg, err := genutiltest.CreateDefaultCometConfig(home) require.NoError(t, err) appCodec := moduletestutil.MakeTestEncodingConfig().Codec From e5f966e858a71abdb7f555390a7ae6624bf97dbc Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Tue, 28 May 2024 14:58:07 +0200 Subject: [PATCH 22/22] feat: upgrade simapp --- simapp/sim_test.go | 10 ++++------ simapp/state_test.go | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/simapp/sim_test.go b/simapp/sim_test.go index f5f168fe4..cf91bd54c 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -13,13 +13,11 @@ import ( storetypes "cosmossdk.io/store/types" evidencetypes "cosmossdk.io/x/evidence/types" abci "github.com/cometbft/cometbft/abci/types" - tmproto "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" @@ -251,8 +249,8 @@ func TestAppImportExport(t *testing.T) { } }() - ctxA := oldApp.NewContext(true, tmproto.Header{Height: oldApp.LastBlockHeight()}) - ctxB := newApp.NewContext(true, tmproto.Header{Height: oldApp.LastBlockHeight()}) + ctxA := oldApp.NewContext(true) + ctxB := newApp.NewContext(true) newApp.ModuleManager.InitGenesis(ctxB, oldApp.AppCodec(), genesisState) newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) @@ -288,7 +286,7 @@ func TestAppImportExport(t *testing.T) { storeA := ctxA.KVStore(skp.A) storeB := ctxB.KVStore(skp.B) - failedKVAs, failedKVBs := sdk.DiffKVStores(storeA, storeB, skp.Prefixes) + failedKVAs, failedKVBs := simtestutil.DiffKVStores(storeA, storeB, skp.Prefixes) require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare") fmt.Printf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), skp.A, skp.B) @@ -365,7 +363,7 @@ func TestAppSimulationAfterImport(t *testing.T) { newApp := app.NewNibiruApp(log.NewNopLogger(), newDB, nil, true, encoding, appOptions, baseapp.SetChainID(SimAppChainID)) require.Equal(t, "Nibiru", newApp.Name()) - newApp.InitChain(abci.RequestInitChain{ + newApp.InitChain(&abci.RequestInitChain{ ChainId: SimAppChainID, AppStateBytes: exported.AppState, }) diff --git a/simapp/state_test.go b/simapp/state_test.go index bd7dde960..dd832a9d9 100644 --- a/simapp/state_test.go +++ b/simapp/state_test.go @@ -151,11 +151,11 @@ func AppStateRandomizedFn( // number of bonded accounts var initialStake, numInitiallyBonded int64 appParams.GetOrGenerate( - cdc, sims.StakePerAccount, &initialStake, r, + sims.StakePerAccount, &initialStake, r, func(r *rand.Rand) { initialStake = r.Int63n(1e12) }, ) appParams.GetOrGenerate( - cdc, sims.InitiallyBondedValidators, &numInitiallyBonded, r, + sims.InitiallyBondedValidators, &numInitiallyBonded, r, func(r *rand.Rand) { numInitiallyBonded = int64(r.Intn(300)) }, )