From b9fd49180926636a9adb6a37f0d4cbccc46af31f Mon Sep 17 00:00:00 2001 From: Matthew Witkowski Date: Fri, 8 Sep 2023 11:45:39 -0400 Subject: [PATCH] Deprecate MaxTotalSupply and add MaxSupply as a BigInt to replace it. --- docs/proto-docs.md | 3 +- proto/provenance/marker/v1/marker.proto | 10 +- x/marker/client/cli/cli_test.go | 3 +- x/marker/keeper/marker.go | 2 +- x/marker/keeper/params.go | 14 +- x/marker/simulation/genesis.go | 17 +- x/marker/simulation/genesis_test.go | 3 +- x/marker/simulation/operations.go | 6 +- x/marker/simulation/params.go | 6 + x/marker/simulation/params_test.go | 7 +- x/marker/simulation/proposals.go | 6 +- x/marker/spec/03_messages.md | 3 +- x/marker/spec/09_params.md | 3 +- x/marker/spec/10_governance.md | 3 +- x/marker/types/marker.pb.go | 254 ++++++++++++++---------- x/marker/types/params.go | 25 ++- x/marker/types/params_test.go | 21 +- 17 files changed, 260 insertions(+), 126 deletions(-) diff --git a/docs/proto-docs.md b/docs/proto-docs.md index 0e4869f02d..f94d123ffd 100644 --- a/docs/proto-docs.md +++ b/docs/proto-docs.md @@ -1968,9 +1968,10 @@ Params defines the set of params for the account module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `max_total_supply` | [uint64](#uint64) | | maximum amount of supply to allow a marker to be created with | +| `max_total_supply` | [uint64](#uint64) | | **Deprecated.** Deprecated: Prefer to use `max_supply` instead. Maximum amount of supply to allow a marker to be created with | | `enable_governance` | [bool](#bool) | | indicates if governance based controls of markers is allowed. | | `unrestricted_denom_regex` | [string](#string) | | a regular expression used to validate marker denom values from normal create requests (governance requests are only subject to platform coin validation denom expression) | +| `max_supply` | [string](#string) | | maximum amount of supply to allow a marker to be created with | diff --git a/proto/provenance/marker/v1/marker.proto b/proto/provenance/marker/v1/marker.proto index ed5b4023a8..ee96e0e000 100644 --- a/proto/provenance/marker/v1/marker.proto +++ b/proto/provenance/marker/v1/marker.proto @@ -16,13 +16,19 @@ message Params { option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; - // maximum amount of supply to allow a marker to be created with - uint64 max_total_supply = 1 [(gogoproto.customtype) = "uint64", (gogoproto.nullable) = false]; + // Deprecated: Prefer to use `max_supply` instead. Maximum amount of supply to allow a marker to be created with + uint64 max_total_supply = 1 [(gogoproto.customtype) = "uint64", (gogoproto.nullable) = false, deprecated = true]; // indicates if governance based controls of markers is allowed. bool enable_governance = 2; // a regular expression used to validate marker denom values from normal create requests (governance // requests are only subject to platform coin validation denom expression) string unrestricted_denom_regex = 3; + // maximum amount of supply to allow a marker to be created with + string max_supply = 4 [ + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "json:\"max_supply\" yaml:\"max_supply\"" + ]; } // MarkerAccount holds the marker configuration information in addition to a base account structure. diff --git a/x/marker/client/cli/cli_test.go b/x/marker/client/cli/cli_test.go index ef3135897c..c407ec461c 100644 --- a/x/marker/client/cli/cli_test.go +++ b/x/marker/client/cli/cli_test.go @@ -155,6 +155,7 @@ func (s *IntegrationTestSuite) SetupSuite() { var markerData markertypes.GenesisState markerData.Params.EnableGovernance = true markerData.Params.MaxTotalSupply = 1000000 + markerData.Params.MaxSupply = sdk.NewInt(1000000) // Note: These account numbers get ignored. markerData.Markers = []markertypes.MarkerAccount{ { @@ -455,7 +456,7 @@ func (s *IntegrationTestSuite) TestMarkerQueryCommands() { []string{ fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, - `{"max_total_supply":"1000000","enable_governance":true,"unrestricted_denom_regex":""}`, + `{"max_total_supply":"1000000","enable_governance":true,"unrestricted_denom_regex":"","max_supply":"1000000"}`, }, { "get testcoin marker json", diff --git a/x/marker/keeper/marker.go b/x/marker/keeper/marker.go index bc4594ea40..e1a9484f33 100644 --- a/x/marker/keeper/marker.go +++ b/x/marker/keeper/marker.go @@ -354,7 +354,7 @@ func (k Keeper) IncreaseSupply(ctx sdk.Context, marker types.MarkerAccountI, coi inCirculation := sdk.NewCoin(marker.GetDenom(), k.bankKeeper.GetSupply(ctx, marker.GetDenom()).Amount) total := inCirculation.Add(coin) - maxAllowed := sdk.NewCoin(marker.GetDenom(), sdk.NewIntFromUint64(k.GetParams(ctx).MaxTotalSupply)) + maxAllowed := sdk.NewCoin(marker.GetDenom(), k.GetParams(ctx).MaxSupply) if total.Amount.GT(maxAllowed.Amount) { return fmt.Errorf( "requested supply %d exceeds maximum allowed value %d", total.Amount, maxAllowed.Amount) diff --git a/x/marker/keeper/params.go b/x/marker/keeper/params.go index 2a84159f30..aecf29cb6f 100644 --- a/x/marker/keeper/params.go +++ b/x/marker/keeper/params.go @@ -4,6 +4,7 @@ import ( "fmt" "regexp" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/provenance-io/provenance/x/marker/types" @@ -15,6 +16,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { MaxTotalSupply: k.GetMaxTotalSupply(ctx), EnableGovernance: k.GetEnableGovernance(ctx), UnrestrictedDenomRegex: k.GetUnrestrictedDenomRegex(ctx), + MaxSupply: k.GetMaxSupply(ctx), } } @@ -23,7 +25,8 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { k.paramSpace.SetParamSet(ctx, ¶ms) } -// GetMaxTotalSupply return the current parameter value for the max allowed total supply (or default if unset) +// GetMaxTotalSupply is deprecated. +// Deprecated: GetMaxTotalSupply is kept for backwards compability. func (k Keeper) GetMaxTotalSupply(ctx sdk.Context) (max uint64) { max = types.DefaultMaxTotalSupply if k.paramSpace.Has(ctx, types.ParamStoreKeyMaxTotalSupply) { @@ -32,6 +35,15 @@ func (k Keeper) GetMaxTotalSupply(ctx sdk.Context) (max uint64) { return } +// GetMaxSupply return the current parameter value for the max allowed supply (or default if unset) +func (k Keeper) GetMaxSupply(ctx sdk.Context) (max math.Int) { + max = math.NewIntFromUint64(types.DefaultMaxSupply) + if k.paramSpace.Has(ctx, types.ParamStoreKeyMaxSupply) { + k.paramSpace.Get(ctx, types.ParamStoreKeyMaxSupply, &max) + } + return +} + // GetEnableGovernance returns the current parameter value for enabling governance control (or default if unset) func (k Keeper) GetEnableGovernance(ctx sdk.Context) (enabled bool) { enabled = types.DefaultEnableGovernance diff --git a/x/marker/simulation/genesis.go b/x/marker/simulation/genesis.go index 00aefe5729..9746930a92 100644 --- a/x/marker/simulation/genesis.go +++ b/x/marker/simulation/genesis.go @@ -7,6 +7,7 @@ import ( "fmt" "math/rand" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -17,15 +18,22 @@ import ( // Simulation parameter constants const ( MaxTotalSupply = "max_total_supply" + MaxSupply = "max_supply" EnableGovernance = "enable_governance" UnrestrictedDenomRegex = "unresticted_denom_regex" ) -// GenMaxTotalSupply randomized Maximum amount of supply to allow for markers +// GenMaxTotalSupply is deprecated. +// Deprecated: GenMaxTotalSupply is kept for backwards compatability. func GenMaxTotalSupply(r *rand.Rand) uint64 { return r.Uint64() } +// GenMaxSupply randomized Maximum amount of supply to allow for markers +func GenMaxSupply(r *rand.Rand) math.Int { + return math.NewIntFromUint64(r.Uint64()) +} + // GenEnableGovernance returns a randomized EnableGovernance parameter. func GenEnableGovernance(r *rand.Rand) bool { return r.Int63n(100) < 50 // 50% chance of unrestricted names being enabled @@ -46,6 +54,12 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { maxTotalSupply = GenMaxTotalSupply(r) }, ) + var maxSupply math.Int + simState.AppParams.GetOrGenerate( + simState.Cdc, MaxSupply, &maxSupply, simState.Rand, + func(r *rand.Rand) { maxSupply = GenMaxSupply(r) }, + ) + var enableGovernance bool simState.AppParams.GetOrGenerate( simState.Cdc, EnableGovernance, &enableGovernance, simState.Rand, @@ -61,6 +75,7 @@ func RandomizedGenState(simState *module.SimulationState) { markerGenesis := types.GenesisState{ Params: types.Params{ MaxTotalSupply: maxTotalSupply, + MaxSupply: maxSupply, EnableGovernance: enableGovernance, UnrestrictedDenomRegex: unrestrictedDenomRegex, }, diff --git a/x/marker/simulation/genesis_test.go b/x/marker/simulation/genesis_test.go index 64d96c9470..a0fbdcf06e 100644 --- a/x/marker/simulation/genesis_test.go +++ b/x/marker/simulation/genesis_test.go @@ -43,7 +43,8 @@ func TestRandomizedGenState(t *testing.T) { require.Equal(t, true, markerGenesis.Params.EnableGovernance) require.Equal(t, uint64(0x9408d2ac22c4d294), markerGenesis.Params.MaxTotalSupply) - require.Equal(t, `[a-zA-Z][a-zA-Z0-9\\-\\.]{7,60}`, markerGenesis.Params.UnrestrictedDenomRegex) + require.Equal(t, uint64(0xc697f48392907a0), markerGenesis.Params.MaxSupply.Uint64()) + require.Equal(t, `[a-zA-Z][a-zA-Z0-9\\-\\.]{9,20}`, markerGenesis.Params.UnrestrictedDenomRegex) } // TestRandomizedGenState tests abnormal scenarios of applying RandomizedGenState. diff --git a/x/marker/simulation/operations.go b/x/marker/simulation/operations.go index 1722c08692..63d1845399 100644 --- a/x/marker/simulation/operations.go +++ b/x/marker/simulation/operations.go @@ -151,7 +151,7 @@ func SimulateMsgAddMarker(k keeper.Keeper, ak authkeeper.AccountKeeperI, bk bank denom := randomUnrestrictedDenom(r, k.GetUnrestrictedDenomRegex(ctx)) msg := types.NewMsgAddMarkerRequest( denom, - sdk.NewIntFromUint64(randomUint64(r, k.GetMaxTotalSupply(ctx))), + sdk.NewIntFromUint64(randomUint64(r, k.GetMaxSupply(ctx).Uint64())), simAccount.Address, mgrAccount.Address, types.MarkerType(r.Intn(2)+1), // coin or restricted_coin @@ -249,7 +249,7 @@ func SimulateMsgAddFinalizeActivateMarker(k keeper.Keeper, ak authkeeper.Account grants := randomAccessGrants(r, accs, 100, markerType) msg := types.NewMsgAddFinalizeActivateMarkerRequest( denom, - sdk.NewIntFromUint64(randomUint64(r, k.GetMaxTotalSupply(ctx))), + sdk.NewIntFromUint64(randomUint64(r, k.GetMaxSupply(ctx).Uint64())), simAccount.Address, mgrAccount.Address, markerType, @@ -283,7 +283,7 @@ func SimulateMsgAddMarkerProposal(k keeper.Keeper, args *WeightedOpsArgs) simtyp msg := &types.MsgAddMarkerRequest{ Amount: sdk.Coin{ Denom: denom, - Amount: sdk.NewIntFromUint64(randomUint64(r, k.GetMaxTotalSupply(ctx))), + Amount: sdk.NewIntFromUint64(randomUint64(r, k.GetMaxSupply(ctx).Uint64())), }, Manager: simAccount.Address.String(), FromAddress: k.GetAuthority(), diff --git a/x/marker/simulation/params.go b/x/marker/simulation/params.go index 7ce733b542..ddeb272494 100644 --- a/x/marker/simulation/params.go +++ b/x/marker/simulation/params.go @@ -14,6 +14,7 @@ import ( const ( keyMaxTotalSupply = "MaxTotalSupply" + keyMaxSupply = "MaxSupply" keyEnableGovernance = "EnableGovernance" keyUnrestrictedDenomRegex = "UnrestrictedDenomRegex" ) @@ -27,6 +28,11 @@ func ParamChanges(_ *rand.Rand) []simtypes.ParamChange { return fmt.Sprintf("\"%d\"", GenMaxTotalSupply(r)) }, ), + simulation.NewSimParamChange(types.ModuleName, keyMaxSupply, + func(r *rand.Rand) string { + return fmt.Sprintf("\"%d\"", GenMaxSupply(r).Uint64()) + }, + ), simulation.NewSimParamChange(types.ModuleName, keyEnableGovernance, func(r *rand.Rand) string { return fmt.Sprintf("%v", GenEnableGovernance(r)) diff --git a/x/marker/simulation/params_test.go b/x/marker/simulation/params_test.go index bedb6016ab..821c5129ec 100644 --- a/x/marker/simulation/params_test.go +++ b/x/marker/simulation/params_test.go @@ -24,6 +24,11 @@ func TestParamChanges(t *testing.T) { key: "MaxTotalSupply", subspace: markertypes.ModuleName, }, + { + composedKey: "marker/MaxSupply", + key: "MaxSupply", + subspace: markertypes.ModuleName, + }, { composedKey: "marker/EnableGovernance", key: "EnableGovernance", @@ -38,7 +43,7 @@ func TestParamChanges(t *testing.T) { paramChanges := simulation.ParamChanges(r) - require.Len(t, paramChanges, 3) + require.Len(t, paramChanges, 4) for i, p := range paramChanges { require.Equal(t, expected[i].composedKey, p.ComposedKey()) diff --git a/x/marker/simulation/proposals.go b/x/marker/simulation/proposals.go index 94f20d2307..11d9a152eb 100644 --- a/x/marker/simulation/proposals.go +++ b/x/marker/simulation/proposals.go @@ -79,10 +79,10 @@ func SimulateCreateSupplyIncreaseProposalContent(k keeper.Keeper) simtypes.Conte return nil } - newSupply := randomUint64(r, k.GetMaxTotalSupply(ctx)-k.CurrentCirculation(ctx, m).Uint64()) + newSupply := randomUint64(r, k.GetMaxSupply(ctx).Uint64()-k.CurrentCirculation(ctx, m).Uint64()) // TODO: When the simulation tests are fixed to stop breaking supply invariants through incorrect minting, the following check should be removed. - if newSupply > k.GetMaxTotalSupply(ctx) { + if newSupply > k.GetMaxSupply(ctx).Uint64() { println("!!!! WARNING, TOKEN SUPPLY IS INVALID, ABORTING NEW PROPOSAL !!!!") return nil } @@ -90,7 +90,7 @@ func SimulateCreateSupplyIncreaseProposalContent(k keeper.Keeper) simtypes.Conte return types.NewSupplyIncreaseProposal( simtypes.RandStringOfLength(r, 10), simtypes.RandStringOfLength(r, 100), - // sdk.NewCoin(m.GetDenom(), sdk.NewIntFromUint64(randomUint64(r, k.GetMaxTotalSupply(ctx)-k.CurrentCirculation(ctx, m).Uint64()))), + // sdk.NewCoin(m.GetDenom(), sdk.NewIntFromUint64(randomUint64(r, k.GetMaxSupply(ctx).Uint64()-k.CurrentCirculation(ctx, m).Uint64()))), sdk.NewCoin(m.GetDenom(), sdk.NewIntFromUint64(newSupply)), dest, ) diff --git a/x/marker/spec/03_messages.md b/x/marker/spec/03_messages.md index 88e377c929..049cbf1ccc 100644 --- a/x/marker/spec/03_messages.md +++ b/x/marker/spec/03_messages.md @@ -5,6 +5,7 @@ All created/modified state objects specified by each message are defined within [state](./02_state_transitions.md) section. +- [Messages](#messages) - [Msg/AddMarkerRequest](#msgaddmarkerrequest) - [Msg/AddAccessRequest](#msgaddaccessrequest) - [Msg/DeleteAccessRequest](#msgdeleteaccessrequest) @@ -340,7 +341,7 @@ This service message is expected to fail if: - The authority is not the address of the governance module's account. - The governance proposal format (title, description, etc) is invalid -- The requested supply exceeds the configuration parameter for `MaxTotalSupply` +- The requested supply exceeds the configuration parameter for `MaxSupply` See also: [Governance: Supply Increase Proposal](./10_governance.md#supply-increase-proposal) diff --git a/x/marker/spec/09_params.md b/x/marker/spec/09_params.md index 30db5f1052..067eb731b3 100644 --- a/x/marker/spec/09_params.md +++ b/x/marker/spec/09_params.md @@ -6,8 +6,9 @@ Param module and available for control via Governance proposal to change paramet ## Params | Key | Type | Example | -|------------------------|----------|-----------------------------------| +| ---------------------- | -------- | --------------------------------- | | MaxTotalSupply | `uint64` | `"259200000000000"` | +| MaxSupply | `BigInt` | `"259200000000000"` | | EnableGovernance | `bool` | `true` | | UnrestrictedDenomRegex | `string` | `"[a-zA-Z][a-zA-Z0-9\-\.]{7,83}"` | diff --git a/x/marker/spec/10_governance.md b/x/marker/spec/10_governance.md index 076a7095eb..11085ae468 100644 --- a/x/marker/spec/10_governance.md +++ b/x/marker/spec/10_governance.md @@ -5,6 +5,7 @@ marker to be defined where no single account is allowed to make modifications an issue change requests through passing a governance proposal. +- [Governance Proposal Control](#governance-proposal-control) - [Add Marker Proposal](#add-marker-proposal) - [Supply Increase Proposal](#supply-increase-proposal) - [Supply Decrease Proposal](#supply-decrease-proposal) @@ -48,7 +49,7 @@ through minting coin and placing it within the marker or assigning it directly t This request is expected to fail if: - The governance proposal format (title, description, etc) is invalid -- The requested supply exceeds the configuration parameter for `MaxTotalSupply` +- The requested supply exceeds the configuration parameter for `MaxSupply` ## Supply Decrease Proposal diff --git a/x/marker/types/marker.pb.go b/x/marker/types/marker.pb.go index 26f1b26244..119a55fea1 100644 --- a/x/marker/types/marker.pb.go +++ b/x/marker/types/marker.pb.go @@ -4,6 +4,7 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -102,13 +103,15 @@ func (MarkerStatus) EnumDescriptor() ([]byte, []int) { // Params defines the set of params for the account module. type Params struct { - // maximum amount of supply to allow a marker to be created with - MaxTotalSupply uint64 `protobuf:"varint,1,opt,name=max_total_supply,json=maxTotalSupply,proto3,customtype=uint64" json:"max_total_supply"` + // Deprecated: Prefer to use `max_supply` instead. Maximum amount of supply to allow a marker to be created with + MaxTotalSupply uint64 `protobuf:"varint,1,opt,name=max_total_supply,json=maxTotalSupply,proto3,customtype=uint64" json:"max_total_supply"` // Deprecated: Do not use. // indicates if governance based controls of markers is allowed. EnableGovernance bool `protobuf:"varint,2,opt,name=enable_governance,json=enableGovernance,proto3" json:"enable_governance,omitempty"` // a regular expression used to validate marker denom values from normal create requests (governance // requests are only subject to platform coin validation denom expression) UnrestrictedDenomRegex string `protobuf:"bytes,3,opt,name=unrestricted_denom_regex,json=unrestrictedDenomRegex,proto3" json:"unrestricted_denom_regex,omitempty"` + // maximum amount of supply to allow a marker to be created with + MaxSupply cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=max_supply,json=maxSupply,proto3,customtype=cosmossdk.io/math.Int" json:"max_supply" json:"max_supply" yaml:"max_supply"` } func (m *Params) Reset() { *m = Params{} } @@ -1271,105 +1274,108 @@ func init() { func init() { proto.RegisterFile("provenance/marker/v1/marker.proto", fileDescriptor_f7e2c25c71db7f99) } var fileDescriptor_f7e2c25c71db7f99 = []byte{ - // 1563 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x1b, 0x4f, - 0x15, 0xf7, 0x26, 0x8e, 0x93, 0x8c, 0x13, 0xd7, 0xdf, 0x89, 0xbf, 0xa9, 0xeb, 0x16, 0x7b, 0x6b, - 0x4a, 0x1b, 0x0a, 0xb5, 0x9b, 0x00, 0x55, 0x95, 0x9b, 0x7f, 0xa5, 0x58, 0x34, 0x3f, 0x58, 0x3b,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 0x5e, 0x8f, 0x0d, 0x8b, - 0xc6, 0x48, 0x18, 0xee, 0x80, 0x94, 0x2c, 0xbb, 0x69, 0x11, 0x9f, 0x05, 0xc4, 0xcd, 0xce, 0xea, - 0xb3, 0x6b, 0xc9, 0x8d, 0x9b, 0xa5, 0x69, 0x48, 0x29, 0x55, 0x84, 0xec, 0x23, 0x7e, 0x45, 0xd5, - 0x38, 0xaf, 0xbb, 0xb1, 0x2c, 0xd5, 0x6b, 0x52, 0x1b, 0x6e, 0x82, 0x04, 0x65, 0x88, 0xf5, 0x69, - 0x36, 0xae, 0x6b, 0x6b, 0xa9, 0x8d, 0xe2, 0x74, 0x3b, 0xb2, 0x3c, 0x2d, 0x21, 0x69, 0x28, 0x0d, - 0x98, 0x01, 0x73, 0xa2, 0xdc, 0xd9, 0x39, 0x51, 0x68, 0x79, 0x80, 0xcf, 0x41, 0x42, 0x5d, 0x77, - 0x42, 0x24, 0xf6, 0x54, 0x5d, 0xf7, 0xed, 0xae, 0xc3, 0x0e, 0xfb, 0x9d, 0x92, 0x45, 0x3c, 0x05, - 0x3e, 0xf5, 0x73, 0x8f, 0xda, 0x47, 0x65, 0x36, 0xec, 0x61, 0x5a, 0x6a, 0xfa, 0xec, 0xfc, 0xac, - 0x70, 0x47, 0x96, 0x21, 0x0a, 0x9d, 0xa2, 0x2e, 0x2b, 0x3a, 0x41, 0x33, 0x94, 0x23, 0x68, 0x81, - 0xa4, 0x0c, 0xd5, 0xe4, 0x66, 0xb2, 0xf3, 0x22, 0x13, 0xfd, 0x73, 0x99, 0xb4, 0x87, 0x3d, 0x5c, - 0xd5, 0xcf, 0xcf, 0x0a, 0x37, 0x46, 0x25, 0x0f, 0xd5, 0xa3, 0x65, 0x07, 0x5e, 0x28, 0x0d, 0x6f, - 0x82, 0x25, 0xe9, 0xce, 0x3c, 0x70, 0x8e, 0xb1, 0x9d, 0x5d, 0x10, 0x88, 0x4c, 0x4a, 0xda, 0x16, - 0x27, 0x71, 0x30, 0x22, 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, 0x5b, 0x05, 0x09, 0xe4, 0x89, - 0x3e, 0x15, 0xad, 0x64, 0xa8, 0x13, 0xa7, 0x2b, 0x6c, 0xcb, 0x97, 0x60, 0x84, 0xdb, 0xec, 0xb8, - 0xf7, 0xe2, 0x82, 0x11, 0x76, 0x57, 0x61, 0x12, 0x48, 0x12, 0xd7, 0x51, 0x10, 0x64, 0xc1, 0x3c, - 0xb2, 0xed, 0x00, 0x53, 0x2a, 0xd1, 0x6d, 0x8c, 0x8e, 0xc5, 0x3f, 0x68, 0x20, 0x33, 0x19, 0xad, - 0xec, 0x3d, 0xd8, 0x00, 0x09, 0xd9, 0x72, 0xaa, 0x90, 0x77, 0xa6, 0xe3, 0x32, 0xaa, 0x2b, 0xc4, - 0x55, 0x59, 0x95, 0xf2, 0x38, 0xf5, 0x99, 0x68, 0xea, 0xb7, 0xc0, 0x32, 0xb2, 0x3d, 0xc7, 0x77, - 0x28, 0x0b, 0x10, 0x23, 0x81, 0xca, 0x74, 0x92, 0x58, 0xdc, 0x05, 0xdf, 0x5c, 0x30, 0x1f, 0x4d, - 0x45, 0x9b, 0x48, 0x05, 0xea, 0x20, 0xd9, 0xc3, 0x81, 0xe7, 0x50, 0xea, 0x10, 0x9f, 0x66, 0x67, - 0x04, 0xa0, 0xa2, 0xa4, 0xe2, 0x6f, 0xc1, 0xd5, 0x88, 0xc1, 0x3a, 0x76, 0x31, 0xc3, 0xca, 0xec, - 0xf7, 0x40, 0x2a, 0xc0, 0x1e, 0x19, 0x60, 0x73, 0xd2, 0xfa, 0xb2, 0xa4, 0x56, 0x94, 0x8f, 0xcb, - 0xa4, 0xf3, 0x73, 0xb0, 0x12, 0xf1, 0xbe, 0xe5, 0xf8, 0xc8, 0x75, 0x7e, 0x83, 0x3f, 0x01, 0x8e, - 0x0b, 0x26, 0x67, 0xbe, 0x6c, 0xb2, 0x62, 0x31, 0x67, 0x80, 0xd8, 0xe5, 0x4c, 0x4e, 0x16, 0xbd, - 0xc6, 0xaf, 0xd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 0xf2, 0xb1, 0x77, 0x1f, 0xf2, 0xb1, 0x7f, 0x7e, 0xc8, 0xc7, 0xc0, 0x55, 0x87, - 0x4c, 0x6d, 0xb3, 0x3d, 0xed, 0xd9, 0x46, 0x64, 0xaf, 0x1f, 0x8b, 0xdc, 0x73, 0x48, 0xe4, 0x54, - 0x3e, 0x1e, 0xfd, 0x6d, 0x14, 0x7b, 0x7e, 0x27, 0x21, 0xfe, 0x2e, 0xfe, 0xe8, 0x7f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xa3, 0x28, 0x60, 0x2c, 0x02, 0x0f, 0x00, 0x00, + // 1602 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcb, 0x6f, 0x1b, 0x4f, + 0x1d, 0xf7, 0x3a, 0x89, 0x93, 0x8c, 0x13, 0xd7, 0xbf, 0x89, 0x9b, 0xba, 0xfe, 0x15, 0xdb, 0x75, + 0x4b, 0x1b, 0x0a, 0xb5, 0x9b, 0x00, 0x15, 0xca, 0xcd, 0xaf, 0x14, 0x8b, 0xe6, 0xc1, 0xda, 0x29, + 0x6a, 0x85, 0xb4, 0x8c, 0x77, 0x27, 0xce, 0x92, 0xdd, 0x1d, 0x77, 0x67, 0xec, 0xc6, 0x88, 0x0b, + 0x97, 0xaa, 0xca, 0xa9, 0x47, 0x40, 0x8a, 0x54, 0x09, 0x0e, 0x48, 0x5c, 0x39, 0x73, 0xae, 0x38, + 0xf5, 0x88, 0x38, 0x44, 0xa8, 0xbd, 0x70, 0xe0, 0x94, 0xbf, 0x00, 0xcd, 0x63, 0xd7, 0xeb, 0xc6, + 0x6d, 0x0f, 0xa1, 0x27, 0x7b, 0xbe, 0xef, 0xc7, 0xe7, 0xfb, 0x9d, 0x59, 0x70, 0xb3, 0xef, 0x93, + 0x21, 0xf6, 0x90, 0x67, 0xe2, 0x8a, 0x8b, 0xfc, 0x23, 0xec, 0x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0xad, 0x2d, 0xea, 0xab, 0x51, 0x7e, 0x83, 0xb3, 0x75, 0xce, 0x85, 0x26, 0x00, 0x3c, 0x44, 0x15, + 0xdc, 0x2c, 0x97, 0xad, 0x35, 0x54, 0x70, 0x57, 0x65, 0x45, 0xa8, 0x75, 0x54, 0xb6, 0x49, 0xc5, + 0x45, 0xec, 0xb0, 0xdc, 0xf2, 0xd8, 0xf9, 0x59, 0xe1, 0xd6, 0xaf, 0x29, 0xf1, 0x36, 0x4b, 0x63, + 0xc5, 0x52, 0x71, 0x84, 0x5c, 0x67, 0x82, 0xa2, 0x2f, 0xba, 0xe8, 0x58, 0xe6, 0xb2, 0xb9, 0xf0, + 0xfb, 0x37, 0x85, 0xd8, 0x7f, 0xde, 0x14, 0x62, 0xa5, 0xdf, 0x25, 0xc0, 0xf2, 0xb6, 0x28, 0x5e, + 0xd5, 0x34, 0xc9, 0xc0, 0x63, 0xf0, 0x57, 0x60, 0x89, 0x57, 0xdc, 0x40, 0xf2, 0x2c, 0xea, 0x93, + 0xdc, 0x28, 0x96, 0x55, 0x6f, 0x44, 0xef, 0x54, 0x37, 0xca, 0x35, 0x44, 0xb1, 0xd2, 0xab, 0x7d, + 0xfb, 0xee, 0xac, 0xa0, 0x9d, 0x9f, 0x15, 0x56, 0xa4, 0xe7, 0xa8, 0x8d, 0x92, 0x9e, 0xec, 0x8e, + 0x25, 0xe1, 0x43, 0x30, 0xef, 0x22, 0x0f, 0xf5, 0xb0, 0x2f, 0xea, 0xb7, 0x58, 0xbb, 0x71, 0x7e, + 0x56, 0xc8, 0x06, 0x29, 0x08, 0xc6, 0x0f, 0x88, 0x6b, 0x33, 0xec, 0xf6, 0xd9, 0xa8, 0xa4, 0x07, + 0xc2, 0x70, 0x07, 0xa4, 0x64, 0x77, 0x0d, 0x93, 0x78, 0xcc, 0x27, 0x4e, 0x76, 0xa6, 0x38, 0xb3, + 0x96, 0xdc, 0xb8, 0x59, 0x9e, 0x06, 0xc8, 0x72, 0x55, 0x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, 0x98, 0x47, 0x96, 0xe5, 0x63, 0x4a, 0x25, 0xba, 0xf5, 0xe0, 0x58, + 0xfa, 0x83, 0x06, 0x32, 0x93, 0xd1, 0xca, 0xd9, 0x83, 0x4d, 0x90, 0x90, 0x23, 0xa7, 0x0a, 0x79, + 0x77, 0x3a, 0x2e, 0xa3, 0xba, 0x42, 0x5c, 0x95, 0x55, 0x29, 0x8f, 0x53, 0x8f, 0x47, 0x53, 0xbf, + 0x0d, 0x96, 0x91, 0xe5, 0xda, 0x9e, 0x4d, 0x99, 0x8f, 0x18, 0xf1, 0x55, 0xa6, 0x93, 0xc4, 0xd2, + 0x2e, 0xf8, 0xe6, 0x82, 0xf9, 0x68, 0x2a, 0xda, 0x44, 0x2a, 0xb0, 0x08, 0x92, 0x7d, 0xec, 0xbb, + 0x36, 0xa5, 0x36, 0xf1, 0x68, 0x36, 0x2e, 0x00, 0x15, 0x25, 0x95, 0x7e, 0x0b, 0xae, 0x45, 0x0c, + 0x36, 0xb0, 0x83, 0x19, 0x56, 0x66, 0xbf, 0x0b, 0x52, 0x3e, 0x76, 0xc9, 0x10, 0x1b, 0x93, 0xd6, + 0x97, 0x25, 0xb5, 0xaa, 0x7c, 0x5c, 0x26, 0x9d, 0x9f, 0x83, 0x95, 0x88, 0xf7, 0x2d, 0xdb, 0x43, + 0x8e, 0xfd, 0x1b, 0xfc, 0x09, 0x70, 0x5c, 0x30, 0x19, 0xff, 0xb2, 0xc9, 0xaa, 0xc9, 0xec, 0x21, + 0x62, 0x97, 0x33, 0x39, 0x59, 0xf4, 0x3a, 0x6f, 0xb7, 0xf3, 0x7f, 0x34, 0x28, 0x8b, 0x7e, 0x29, + 0x83, 0x18, 0x5c, 0x89, 0x18, 0xdc, 0xb6, 0xe5, 0xc8, 0xa8, 0x51, 0xd2, 0x26, 0x46, 0xe9, 0x32, + 0xed, 0x9a, 0x74, 0x53, 0x1b, 0xf8, 0xde, 0x57, 0x71, 0xf3, 0x52, 0x9b, 0xe8, 0xe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x75, 0x2a, 0xde, 0xf9, 0xdd, 0x84, + 0xf8, 0x2a, 0xfd, 0xe1, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4f, 0xc1, 0x20, 0xf9, 0x69, 0x0f, + 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -1392,6 +1398,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.MaxSupply.Size() + i -= size + if _, err := m.MaxSupply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMarker(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 if len(m.UnrestrictedDenomRegex) > 0 { i -= len(m.UnrestrictedDenomRegex) copy(dAtA[i:], m.UnrestrictedDenomRegex) @@ -2325,6 +2341,8 @@ func (m *Params) Size() (n int) { if l > 0 { n += 1 + l + sovMarker(uint64(l)) } + l = m.MaxSupply.Size() + n += 1 + l + sovMarker(uint64(l)) return n } @@ -2844,6 +2862,40 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.UnrestrictedDenomRegex = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxSupply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMarker + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMarker + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMarker + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMarker(dAtA[iNdEx:]) diff --git a/x/marker/types/params.go b/x/marker/types/params.go index 3803620430..97bb193b55 100644 --- a/x/marker/types/params.go +++ b/x/marker/types/params.go @@ -4,6 +4,7 @@ import ( "fmt" "regexp" + "cosmossdk.io/math" yaml "gopkg.in/yaml.v2" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -12,8 +13,10 @@ import ( const ( // DefaultEnableGovernance (true) indicates that governance proposals are allowed for managing markers DefaultEnableGovernance = true - // DefaultMaxTotalSupply is the upper bound to enforce on supply for markers. + // DefaultMaxTotalSupply is deprecated. DefaultMaxTotalSupply = uint64(100000000000) + // DefaultMaxSupply is the upper bound to enforce on supply for markers. + DefaultMaxSupply = uint64(100000000000) // DefaultUnrestrictedDenomRegex is a regex that denoms created by normal requests must pass. DefaultUnrestrictedDenomRegex = `[a-zA-Z][a-zA-Z0-9\-\.]{2,83}` ) @@ -21,8 +24,10 @@ const ( var ( // ParamStoreKeyEnableGovernance indicates if governance proposal management of markers is enabled ParamStoreKeyEnableGovernance = []byte("EnableGovernance") - // ParamStoreKeyMaxTotalSupply is maximum supply to allow a marker to create + // ParamStoreKeyMaxTotalSupply is deprecated. ParamStoreKeyMaxTotalSupply = []byte("MaxTotalSupply") + // ParamStoreKeyMaxSupply is maximum supply to allow a marker to create + ParamStoreKeyMaxSupply = []byte("MaxSupply") // ParamStoreKeyUnrestrictedDenomRegex is the validation regex for validating denoms supplied by users. ParamStoreKeyUnrestrictedDenomRegex = []byte("UnrestrictedDenomRegex") ) @@ -37,11 +42,13 @@ func NewParams( maxTotalSupply uint64, enableGovernance bool, unrestrictedDenomRegex string, + maxSupply math.Int, ) Params { return Params{ EnableGovernance: enableGovernance, MaxTotalSupply: maxTotalSupply, UnrestrictedDenomRegex: unrestrictedDenomRegex, + MaxSupply: maxSupply, } } @@ -51,6 +58,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(ParamStoreKeyEnableGovernance, &p.EnableGovernance, validateEnableGovernance), paramtypes.NewParamSetPair(ParamStoreKeyMaxTotalSupply, &p.MaxTotalSupply, validateIntParam), paramtypes.NewParamSetPair(ParamStoreKeyUnrestrictedDenomRegex, &p.UnrestrictedDenomRegex, validateRegexParam), + paramtypes.NewParamSetPair(ParamStoreKeyMaxSupply, &p.MaxSupply, validateBigIntParam), } } @@ -60,6 +68,7 @@ func DefaultParams() Params { DefaultMaxTotalSupply, DefaultEnableGovernance, DefaultUnrestrictedDenomRegex, + math.NewIntFromUint64(DefaultMaxSupply), ) } @@ -92,6 +101,9 @@ func (p *Params) Equal(that interface{}) bool { if p.MaxTotalSupply != that1.MaxTotalSupply { return false } + if !p.MaxSupply.Equal(that1.MaxSupply) { + return false + } if p.EnableGovernance != that1.EnableGovernance { return false } @@ -110,6 +122,15 @@ func validateIntParam(i interface{}) error { return nil } +func validateBigIntParam(i interface{}) error { + _, ok := i.(math.Int) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + return nil +} + func validateEnableGovernance(i interface{}) error { _, ok := i.(bool) if !ok { diff --git a/x/marker/types/params_test.go b/x/marker/types/params_test.go index 06f4b491ed..a0f28fa551 100644 --- a/x/marker/types/params_test.go +++ b/x/marker/types/params_test.go @@ -4,6 +4,7 @@ import ( "regexp" "testing" + "cosmossdk.io/math" "github.com/stretchr/testify/require" ) @@ -16,11 +17,13 @@ func TestDefaultParams(t *testing.T) { require.Equal(t, DefaultUnrestrictedDenomRegex, p.UnrestrictedDenomRegex) require.Equal(t, DefaultEnableGovernance, p.EnableGovernance) require.Equal(t, uint64(DefaultMaxTotalSupply), p.MaxTotalSupply) + require.Equal(t, DefaultMaxSupply, p.MaxSupply.Uint64()) - require.True(t, p.Equal(NewParams(DefaultMaxTotalSupply, DefaultEnableGovernance, DefaultUnrestrictedDenomRegex))) - require.False(t, p.Equal(NewParams(1000, DefaultEnableGovernance, DefaultUnrestrictedDenomRegex))) - require.False(t, p.Equal(NewParams(DefaultMaxTotalSupply, false, DefaultUnrestrictedDenomRegex))) - require.False(t, p.Equal(NewParams(DefaultMaxTotalSupply, DefaultEnableGovernance, "a-z"))) + require.True(t, p.Equal(NewParams(DefaultMaxTotalSupply, DefaultEnableGovernance, DefaultUnrestrictedDenomRegex, math.NewIntFromUint64(DefaultMaxSupply)))) + require.False(t, p.Equal(NewParams(1000, DefaultEnableGovernance, DefaultUnrestrictedDenomRegex, math.NewIntFromUint64(DefaultMaxSupply)))) + require.False(t, p.Equal(NewParams(DefaultMaxTotalSupply, false, DefaultUnrestrictedDenomRegex, math.NewIntFromUint64(DefaultMaxSupply)))) + require.False(t, p.Equal(NewParams(DefaultMaxTotalSupply, DefaultEnableGovernance, "a-z", math.NewIntFromUint64(DefaultMaxSupply)))) + require.False(t, p.Equal(NewParams(DefaultMaxTotalSupply, DefaultEnableGovernance, DefaultUnrestrictedDenomRegex, math.NewIntFromUint64(1000)))) require.False(t, p.Equal(nil)) var p2 *Params @@ -39,13 +42,14 @@ func TestParamString(t *testing.T) { require.Equal(t, `maxtotalsupply: 100000000000 enablegovernance: true unrestricteddenomregex: '[a-zA-Z][a-zA-Z0-9\-\.]{2,83}' +max_supply: "100000000000" `, p.String()) } func TestParamSetPairs(t *testing.T) { p := DefaultParams() pairs := p.ParamSetPairs() - require.Equal(t, 3, len(pairs)) + require.Equal(t, 4, len(pairs)) for i := range pairs { switch string(pairs[i].Key) { @@ -56,6 +60,13 @@ func TestParamSetPairs(t *testing.T) { require.Error(t, pairs[i].ValidatorFn("foo")) require.Error(t, pairs[i].ValidatorFn(-1000)) require.NoError(t, pairs[i].ValidatorFn(uint64(1000))) + case string(ParamStoreKeyMaxSupply): + require.Error(t, pairs[i].ValidatorFn("foo")) + require.Error(t, pairs[i].ValidatorFn(-1000)) + require.Error(t, pairs[i].ValidatorFn(1000)) + bigint, _ := math.NewIntFromString("1944674407370955516150") + require.NoError(t, pairs[i].ValidatorFn(bigint)) + require.NoError(t, pairs[i].ValidatorFn(math.NewInt(1000))) case string(ParamStoreKeyUnrestrictedDenomRegex): require.Error(t, pairs[i].ValidatorFn(1)) require.Error(t, pairs[i].ValidatorFn("\\!(")) // invalid regex