Revert "(feat) update x/cdp to run every X blocks based off params" (#1816)

This commit is contained in:
Nick DeLuca 2024-01-25 09:35:56 -07:00 committed by GitHub
parent 7b5de0a12a
commit 2bccb6deaf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 306 additions and 466 deletions

View File

@ -39,7 +39,6 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Features
- (cli) [#1785] Add `shard` CLI command to support creating partitions of data for standalone nodes
- (cdp) [#1814] Add module param and logic for running x/cdp begin blocker every `n` blocks
- (cli) [#1804] Add `rocksdb compact` command for manual DB compaction of state or blockstore.
## [v0.25.0]
@ -70,7 +69,6 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [v0.24.3]
### Bug Fixes
- (deps) [#1770] Bump ledger-cosmos-go to v0.13.1 to resolve signing error with
- (rocksdb) [#1767] Fix resolution of rocksdb database path introduced in v0.24.2
@ -326,6 +324,7 @@ the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.38.4/CHANGELOG.md).
[#1804]: https://github.com/Kava-Labs/kava/pull/1804
[#1785]: https://github.com/Kava-Labs/kava/pull/1785
[#1784]: https://github.com/Kava-Labs/kava/pull/1784
[#1776]: https://github.com/Kava-Labs/kava/pull/1776
[#1770]: https://github.com/Kava-Labs/kava/pull/1770
[#1755]: https://github.com/Kava-Labs/kava/pull/1755
[#1761]: https://github.com/Kava-Labs/kava/pull/1761
@ -385,6 +384,7 @@ the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.38.4/CHANGELOG.md).
[v0.24.1]: https://github.com/Kava-Labs/kava/compare/v0.24.1...v0.24.0
[v0.24.0]: https://github.com/Kava-Labs/kava/compare/v0.24.0...v0.23.2
[v0.23.2]: https://github.com/Kava-Labs/kava/compare/v0.23.1...v0.23.2
[v0.23.1]: https://github.com/Kava-Labs/kava/compare/v0.23.0...v0.23.1
[v0.23.0]: https://github.com/Kava-Labs/kava/compare/v0.21.1...v0.23.0
[v0.16.1]: https://github.com/Kava-Labs/kava/compare/v0.16.0...v0.16.1
[v0.16.0]: https://github.com/Kava-Labs/kava/compare/v0.15.2...v0.16.0

View File

@ -330,7 +330,6 @@ start-remote-sims:
-—container-override environment=[{SIM_NAME=master-$(VERSION)}]
update-kvtool:
git submodule init || true
git submodule update
cd tests/e2e/kvtool && make install

View File

@ -837,7 +837,6 @@
"gov_denom": "ukava",
"params": {
"circuit_breaker": false,
"begin_blocker_execution_block_interval": 500,
"collateral_params": [
{
"auction_size": "50000000000",

View File

@ -3505,9 +3505,6 @@ paths:
type: string
circuit_breaker:
type: boolean
begin_blocker_execution_block_interval:
type: string
format: int64
description: Params defines the parameters for the cdp module.
description: >-
QueryParamsResponse defines the response type for the Query/Params
@ -51631,9 +51628,6 @@ definitions:
type: string
circuit_breaker:
type: boolean
begin_blocker_execution_block_interval:
type: string
format: int64
description: Params defines the parameters for the cdp module.
kava.cdp.v1beta1.QueryAccountsResponse:
type: object
@ -52167,9 +52161,6 @@ definitions:
type: string
circuit_breaker:
type: boolean
begin_blocker_execution_block_interval:
type: string
format: int64
description: Params defines the parameters for the cdp module.
description: >-
QueryParamsResponse defines the response type for the Query/Params RPC

View File

@ -38,10 +38,10 @@ Then restart the service with the updated settings
## Running local prometheus collector and grafana services
To collect app metrics and visualize them locally, you can run the prometheus collector and grafana services with docker compose from the repo root directory (after updating `config.toml` and `app.toml` as detailed above)
To collect app metrics and visualize them locally, you can run the prometheus collector and grafana services with docker compose from the repo root directory
```bash
docker compose -f prometheus.docker-compose.yml up
docker compose -f prometheus.docker-compose.yml
```
Navigate to localhost:3000 to view the grafana unix
@ -54,13 +54,13 @@ See [grafana docs](https://grafana.com/docs/grafana/latest/dashboards/) for info
### Collecting from local host
Update [prometheus config](../prometheus.yml) to collect metrics from your local source, where the port matches the value set for `config.toml/instrumentation.prometheus_listen_addr`
Update [prometheus config](../prometheus.yml) to collect metrics from your local source
```yaml
metrics_path: /
static_configs:
- targets:
- docker-host:8888
- localhost:8888
```
### Collecting from remote host

View File

@ -1681,7 +1681,6 @@ Params defines the parameters for the cdp module.
| `debt_auction_threshold` | [string](#string) | | |
| `debt_auction_lot` | [string](#string) | | |
| `circuit_breaker` | [bool](#bool) | | |
| `begin_blocker_execution_block_interval` | [int64](#int64) | | |

View File

@ -34,10 +34,3 @@ services:
- 9090
networks:
- monitoring
docker-host:
image: qoomon/docker-host
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
mem_limit: 8M
restart: on-failure
networks:
- monitoring

View File

@ -3,7 +3,8 @@ global:
evaluation_interval: 15s
scrape_configs:
- job_name: proxy
scheme: https
metrics_path: /
static_configs:
- targets:
- docker-host:8888
- 4efb-18-207-102-158.ngrok-free.app

View File

@ -66,8 +66,6 @@ message Params {
(gogoproto.nullable) = false
];
bool circuit_breaker = 8;
int64 begin_blocker_execution_block_interval = 9;
}
// DebtParam defines governance params for debt assets

@ -1 +1 @@
Subproject commit b9669f6a5d16658ffe8ea667b688fb174e656f43
Subproject commit e1085562d203fd81c5dd8576170b29715b2de9ef

View File

@ -20,16 +20,6 @@ func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper)
params := k.GetParams(ctx)
// only run CDP Begin Blocker every `BeginBlockerExecutionBlockInterval` blocks
blockHeight := ctx.BlockHeight()
if blockHeight%params.BeginBlockerExecutionBlockInterval != 0 {
ctx.Logger().Info("skipping x/cdp begin blocker")
return
}
ctx.Logger().Debug("running x/cdp begin blocker")
for _, cp := range params.CollateralParams {
ok := k.UpdatePricefeedStatus(ctx, cp.SpotMarketID)
if !ok {

View File

@ -205,12 +205,11 @@ func (suite *GenesisTestSuite) Test_InitExportGenesis() {
cdpGenesis := types.GenesisState{
Params: types.Params{
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 1000000000000),
SurplusAuctionThreshold: types.DefaultSurplusThreshold,
SurplusAuctionLot: types.DefaultSurplusLot,
DebtAuctionThreshold: types.DefaultDebtThreshold,
DebtAuctionLot: types.DefaultDebtLot,
BeginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 1000000000000),
SurplusAuctionThreshold: types.DefaultSurplusThreshold,
SurplusAuctionLot: types.DefaultSurplusLot,
DebtAuctionThreshold: types.DefaultDebtThreshold,
DebtAuctionLot: types.DefaultDebtLot,
CollateralParams: types.CollateralParams{
{
Denom: "xrp",

View File

@ -113,12 +113,11 @@ func NewPricefeedGenStateMulti(cdc codec.JSONCodec) app.GenesisState {
func NewCDPGenStateMulti(cdc codec.JSONCodec) app.GenesisState {
cdpGenesis := types.GenesisState{
Params: types.Params{
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 1000000000000),
SurplusAuctionThreshold: types.DefaultSurplusThreshold,
SurplusAuctionLot: types.DefaultSurplusLot,
DebtAuctionThreshold: types.DefaultDebtThreshold,
DebtAuctionLot: types.DefaultDebtLot,
BeginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 1000000000000),
SurplusAuctionThreshold: types.DefaultSurplusThreshold,
SurplusAuctionLot: types.DefaultSurplusLot,
DebtAuctionThreshold: types.DefaultDebtThreshold,
DebtAuctionLot: types.DefaultDebtLot,
CollateralParams: types.CollateralParams{
{
Denom: "xrp",

View File

@ -47,7 +47,6 @@ func NewCDPGenState(cdc codec.JSONCodec, asset string, liquidationRatio sdk.Dec)
SurplusAuctionLot: types.DefaultSurplusLot,
DebtAuctionThreshold: types.DefaultDebtThreshold,
DebtAuctionLot: types.DefaultDebtLot,
BeginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
CollateralParams: types.CollateralParams{
{
Denom: asset,
@ -156,12 +155,11 @@ func NewPricefeedGenStateMulti(cdc codec.JSONCodec) app.GenesisState {
func NewCDPGenStateMulti(cdc codec.JSONCodec) app.GenesisState {
cdpGenesis := types.GenesisState{
Params: types.Params{
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 2000000000000),
SurplusAuctionThreshold: types.DefaultSurplusThreshold,
SurplusAuctionLot: types.DefaultSurplusLot,
DebtAuctionThreshold: types.DefaultDebtThreshold,
DebtAuctionLot: types.DefaultDebtLot,
BeginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 2000000000000),
SurplusAuctionThreshold: types.DefaultSurplusThreshold,
SurplusAuctionLot: types.DefaultSurplusLot,
DebtAuctionThreshold: types.DefaultDebtThreshold,
DebtAuctionLot: types.DefaultDebtLot,
CollateralParams: types.CollateralParams{
{
Denom: "xrp",
@ -255,7 +253,6 @@ func NewCDPGenStateHighDebtLimit(cdc codec.JSONCodec) app.GenesisState {
SurplusAuctionLot: types.DefaultSurplusLot,
DebtAuctionThreshold: types.DefaultDebtThreshold,
DebtAuctionLot: types.DefaultDebtLot,
BeginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
CollateralParams: types.CollateralParams{
{
Denom: "xrp",

View File

@ -33,13 +33,12 @@ func migrateParams(params v015cdp.Params) v016cdp.Params {
ConversionFactor: params.DebtParam.ConversionFactor,
DebtFloor: params.DebtParam.DebtFloor,
},
GlobalDebtLimit: params.GlobalDebtLimit,
SurplusAuctionThreshold: params.SurplusAuctionThreshold,
SurplusAuctionLot: params.SurplusAuctionLot,
DebtAuctionThreshold: params.DebtAuctionThreshold,
DebtAuctionLot: params.DebtAuctionLot,
CircuitBreaker: params.CircuitBreaker,
BeginBlockerExecutionBlockInterval: v016cdp.DefaultBeginBlockerExecutionBlockInterval,
GlobalDebtLimit: params.GlobalDebtLimit,
SurplusAuctionThreshold: params.SurplusAuctionThreshold,
SurplusAuctionLot: params.SurplusAuctionLot,
DebtAuctionThreshold: params.DebtAuctionThreshold,
DebtAuctionLot: params.DebtAuctionLot,
CircuitBreaker: params.CircuitBreaker,
}
}

View File

@ -163,12 +163,11 @@ func (s *migrateTestSuite) TestMigrate_GenState() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(100),
},
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 1000000000000),
SurplusAuctionThreshold: sdkmath.NewInt(6),
SurplusAuctionLot: sdkmath.NewInt(7),
DebtAuctionThreshold: sdkmath.NewInt(8),
DebtAuctionLot: sdkmath.NewInt(9),
BeginBlockerExecutionBlockInterval: v016cdp.DefaultBeginBlockerExecutionBlockInterval,
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 1000000000000),
SurplusAuctionThreshold: sdkmath.NewInt(6),
SurplusAuctionLot: sdkmath.NewInt(7),
DebtAuctionThreshold: sdkmath.NewInt(8),
DebtAuctionLot: sdkmath.NewInt(9),
},
CDPs: v016cdp.CDPs{
{

View File

@ -5,10 +5,7 @@
"denom": "bnb",
"type": "bnb-a",
"liquidation_ratio": "1.500000000000000000",
"debt_limit": {
"denom": "usdx",
"amount": "20000000000000"
},
"debt_limit": { "denom": "usdx", "amount": "20000000000000" },
"stability_fee": "1.000000000782997700",
"auction_size": "50000000000",
"liquidation_penalty": "0.050000000000000000",
@ -22,10 +19,7 @@
"denom": "hbtc",
"type": "hbtc-a",
"liquidation_ratio": "1.500000000000000000",
"debt_limit": {
"denom": "usdx",
"amount": "10000000000000"
},
"debt_limit": { "denom": "usdx", "amount": "10000000000000" },
"stability_fee": "1.000000001547125958",
"auction_size": "1000000000000",
"liquidation_penalty": "0.075000000000000000",
@ -42,34 +36,21 @@
"conversion_factor": "6",
"debt_floor": "10000000"
},
"global_debt_limit": {
"denom": "usdx",
"amount": "43000000000000"
},
"global_debt_limit": { "denom": "usdx", "amount": "43000000000000" },
"surplus_auction_threshold": "500000000000",
"surplus_auction_lot": "10000000000",
"debt_auction_threshold": "100000000000",
"debt_auction_lot": "10000000000",
"circuit_breaker": false,
"begin_blocker_execution_block_interval": "1"
"circuit_breaker": false
},
"cdps": [
{
"id": "19",
"owner": "kava1u4p6a2yse66ewfndw4j7ppsa777vdcex3m4n9s",
"type": "bnb-a",
"collateral": {
"denom": "bnb",
"amount": "40911876"
},
"principal": {
"denom": "usdx",
"amount": "10016831"
},
"accumulated_fees": {
"denom": "usdx",
"amount": "36088"
},
"collateral": { "denom": "bnb", "amount": "40911876" },
"principal": { "denom": "usdx", "amount": "10016831" },
"accumulated_fees": { "denom": "usdx", "amount": "36088" },
"fees_updated": "2021-11-05T21:13:12.856088470Z",
"interest_factor": "1.002881426571765716"
},
@ -77,18 +58,9 @@
"id": "22",
"owner": "kava1e8xjfylam4nvugcmkxwvuxh22uvvad5vknu4yh",
"type": "bnb-a",
"collateral": {
"denom": "bnb",
"amount": "88268546"
},
"principal": {
"denom": "usdx",
"amount": "10000000"
},
"accumulated_fees": {
"denom": "usdx",
"amount": "156662"
},
"collateral": { "denom": "bnb", "amount": "88268546" },
"principal": { "denom": "usdx", "amount": "10000000" },
"accumulated_fees": { "denom": "usdx", "amount": "156662" },
"fees_updated": "2021-11-05T21:13:12.856088470Z",
"interest_factor": "1.002881426571765716"
}
@ -97,18 +69,12 @@
{
"cdp_id": "19",
"depositor": "kava1u4p6a2yse66ewfndw4j7ppsa777vdcex3m4n9s",
"amount": {
"denom": "bnb",
"amount": "40911876"
}
"amount": { "denom": "bnb", "amount": "40911876" }
},
{
"cdp_id": "22",
"depositor": "kava1e8xjfylam4nvugcmkxwvuxh22uvvad5vknu4yh",
"amount": {
"denom": "bnb",
"amount": "88268546"
}
"amount": { "denom": "bnb", "amount": "88268546" }
}
],
"starting_cdp_id": "1",
@ -122,9 +88,6 @@
}
],
"total_principals": [
{
"collateral_type": "bnb-a",
"total_principal": "9285009581820"
}
{ "collateral_type": "bnb-a", "total_principal": "9285009581820" }
]
}

View File

@ -134,15 +134,14 @@ func (m *GenesisState) GetTotalPrincipals() GenesisTotalPrincipals {
// Params defines the parameters for the cdp module.
type Params struct {
CollateralParams CollateralParams `protobuf:"bytes,1,rep,name=collateral_params,json=collateralParams,proto3,castrepeated=CollateralParams" json:"collateral_params"`
DebtParam DebtParam `protobuf:"bytes,2,opt,name=debt_param,json=debtParam,proto3" json:"debt_param"`
GlobalDebtLimit types.Coin `protobuf:"bytes,3,opt,name=global_debt_limit,json=globalDebtLimit,proto3" json:"global_debt_limit"`
SurplusAuctionThreshold github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=surplus_auction_threshold,json=surplusAuctionThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"surplus_auction_threshold"`
SurplusAuctionLot github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=surplus_auction_lot,json=surplusAuctionLot,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"surplus_auction_lot"`
DebtAuctionThreshold github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=debt_auction_threshold,json=debtAuctionThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"debt_auction_threshold"`
DebtAuctionLot github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=debt_auction_lot,json=debtAuctionLot,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"debt_auction_lot"`
CircuitBreaker bool `protobuf:"varint,8,opt,name=circuit_breaker,json=circuitBreaker,proto3" json:"circuit_breaker,omitempty"`
BeginBlockerExecutionBlockInterval int64 `protobuf:"varint,9,opt,name=begin_blocker_execution_block_interval,json=beginBlockerExecutionBlockInterval,proto3" json:"begin_blocker_execution_block_interval,omitempty"`
CollateralParams CollateralParams `protobuf:"bytes,1,rep,name=collateral_params,json=collateralParams,proto3,castrepeated=CollateralParams" json:"collateral_params"`
DebtParam DebtParam `protobuf:"bytes,2,opt,name=debt_param,json=debtParam,proto3" json:"debt_param"`
GlobalDebtLimit types.Coin `protobuf:"bytes,3,opt,name=global_debt_limit,json=globalDebtLimit,proto3" json:"global_debt_limit"`
SurplusAuctionThreshold github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=surplus_auction_threshold,json=surplusAuctionThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"surplus_auction_threshold"`
SurplusAuctionLot github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=surplus_auction_lot,json=surplusAuctionLot,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"surplus_auction_lot"`
DebtAuctionThreshold github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=debt_auction_threshold,json=debtAuctionThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"debt_auction_threshold"`
DebtAuctionLot github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=debt_auction_lot,json=debtAuctionLot,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"debt_auction_lot"`
CircuitBreaker bool `protobuf:"varint,8,opt,name=circuit_breaker,json=circuitBreaker,proto3" json:"circuit_breaker,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
@ -206,13 +205,6 @@ func (m *Params) GetCircuitBreaker() bool {
return false
}
func (m *Params) GetBeginBlockerExecutionBlockInterval() int64 {
if m != nil {
return m.BeginBlockerExecutionBlockInterval
}
return 0
}
// DebtParam defines governance params for debt assets
type DebtParam struct {
Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
@ -464,84 +456,81 @@ func init() {
func init() { proto.RegisterFile("kava/cdp/v1beta1/genesis.proto", fileDescriptor_e4494a90aaab0034) }
var fileDescriptor_e4494a90aaab0034 = []byte{
// 1223 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45,
0x14, 0xcf, 0x26, 0x6e, 0x6a, 0x4f, 0xd2, 0xd8, 0x99, 0xa6, 0xed, 0x26, 0x15, 0xb6, 0x09, 0xa2,
0x0d, 0x87, 0xda, 0x6a, 0x91, 0x2a, 0x21, 0x21, 0x4a, 0x1d, 0xd3, 0x2a, 0x6a, 0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4, 0xa2, 0xaf, 0xeb, 0xc9, 0x35, 0xb1, 0xf5, 0xe8, 0xcd, 0xa0, 0xea, 0xbd, 0x1d, 0x54,
0xbd, 0x7f, 0x07, 0x55, 0xef, 0xd5, 0xfb, 0xea, 0xdc, 0xdb, 0xf7, 0xd5, 0xb9, 0xbf, 0xdf, 0x57,
0xe7, 0xbe, 0xfb, 0x74, 0x02, 0x5f, 0x2f, 0x70, 0xf7, 0x52, 0x12, 0x49, 0xf3, 0xd5, 0x3c, 0x32,
0xff, 0xbe, 0x18, 0x13, 0xd1, 0xa2, 0xb9, 0x89, 0xcf, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x25,
0x77, 0x77, 0x4d, 0x7b, 0x0d, 0x00, 0x00,
// 1179 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6e, 0x1b, 0x37,
0x10, 0xf6, 0x3a, 0x8a, 0x23, 0xd1, 0x8a, 0x24, 0x33, 0x4e, 0xb2, 0x76, 0x50, 0x49, 0x75, 0xd1,
0xc6, 0x3d, 0x58, 0x42, 0x52, 0x20, 0x40, 0x81, 0xa2, 0xa9, 0x65, 0xc1, 0x81, 0x11, 0x17, 0x10,
0xd6, 0x3e, 0xb5, 0x87, 0x05, 0x97, 0x4b, 0xc9, 0x84, 0x56, 0xcb, 0x2d, 0x49, 0xa9, 0xb6, 0x5f,
0xa1, 0x28, 0x1a, 0xf4, 0x25, 0x0a, 0xe4, 0xdc, 0x87, 0x48, 0x6f, 0x41, 0x4f, 0x45, 0x0f, 0x72,
0x21, 0xdf, 0xfb, 0x0c, 0x05, 0x7f, 0xf4, 0x63, 0xc9, 0x02, 0x02, 0x5b, 0xbd, 0x58, 0xcb, 0x19,
0xce, 0xf7, 0xcd, 0x90, 0x33, 0xc3, 0x31, 0x28, 0xb6, 0x51, 0x0f, 0x55, 0x71, 0x98, 0x54, 0x7b,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, 0x30, 0x3d, 0x22, 0x37, 0x16,
0x1f, 0xab, 0xc6, 0x10, 0x80, 0xcd, 0xf9, 0xd3, 0x95, 0x7d, 0xf7, 0x37, 0x2b, 0x66, 0x14, 0xae,
0x0c, 0x47, 0xe1, 0xca, 0xf1, 0x70, 0x14, 0xae, 0xa5, 0x55, 0x50, 0x6f, 0x2e, 0x4a, 0x8e, 0xe7,
0xce, 0x9b, 0x9a, 0x20, 0x01, 0x79, 0x1a, 0x4b, 0xc2, 0x89, 0x90, 0x37, 0x6f, 0xc0, 0xb3, 0x09,
0x91, 0x1b, 0x82, 0xda, 0xf3, 0xf8, 0xcd, 0x01, 0x0f, 0xaf, 0x9d, 0xa9, 0x3e, 0xfc, 0x34, 0x08,
0xc8, 0x4f, 0x8d, 0x77, 0xa6, 0x8b, 0xde, 0xf6, 0x25, 0xbc, 0x3a, 0xd2, 0xd5, 0x5e, 0xbe, 0x1b,
0x14, 0x9d, 0xf7, 0x83, 0xa2, 0xf3, 0xcf, 0xa0, 0xe8, 0xbc, 0xb9, 0x2c, 0x2e, 0xbd, 0xbf, 0x2c,
0x2e, 0xfd, 0x75, 0x59, 0x5c, 0xfa, 0xee, 0xd3, 0x09, 0x7c, 0x35, 0x6c, 0xed, 0x44, 0x28, 0x10,
0xfa, 0xab, 0x7a, 0xaa, 0xff, 0xd5, 0xd0, 0x14, 0xc1, 0x8a, 0xbe, 0x89, 0x2f, 0xfe, 0x0b, 0x00,
0x00, 0xff, 0xff, 0xe6, 0x31, 0x9b, 0x4e, 0x27, 0x0d, 0x00, 0x00,
}
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
@ -672,11 +661,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.BeginBlockerExecutionBlockInterval != 0 {
i = encodeVarintGenesis(dAtA, i, uint64(m.BeginBlockerExecutionBlockInterval))
i--
dAtA[i] = 0x48
}
if m.CircuitBreaker {
i--
if m.CircuitBreaker {
@ -1124,9 +1108,6 @@ func (m *Params) Size() (n int) {
if m.CircuitBreaker {
n += 2
}
if m.BeginBlockerExecutionBlockInterval != 0 {
n += 1 + sovGenesis(uint64(m.BeginBlockerExecutionBlockInterval))
}
return n
}
@ -1817,25 +1798,6 @@ func (m *Params) Unmarshal(dAtA []byte) error {
}
}
m.CircuitBreaker = bool(v != 0)
case 9:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field BeginBlockerExecutionBlockInterval", wireType)
}
m.BeginBlockerExecutionBlockInterval = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.BeginBlockerExecutionBlockInterval |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipGenesis(dAtA[iNdEx:])

View File

@ -13,19 +13,18 @@ import (
// Parameter keys
var (
KeyGlobalDebtLimit = []byte("GlobalDebtLimit")
KeyCollateralParams = []byte("CollateralParams")
KeyDebtParam = []byte("DebtParam")
KeyCircuitBreaker = []byte("CircuitBreaker")
KeyDebtThreshold = []byte("DebtThreshold")
KeyDebtLot = []byte("DebtLot")
KeySurplusThreshold = []byte("SurplusThreshold")
KeySurplusLot = []byte("SurplusLot")
KeyBeginBlockerExecutionBlockInterval = []byte("BeginBlockerExecutionBlockInterval")
DefaultGlobalDebt = sdk.NewCoin(DefaultStableDenom, sdk.ZeroInt())
DefaultCircuitBreaker = false
DefaultCollateralParams = CollateralParams{}
DefaultDebtParam = DebtParam{
KeyGlobalDebtLimit = []byte("GlobalDebtLimit")
KeyCollateralParams = []byte("CollateralParams")
KeyDebtParam = []byte("DebtParam")
KeyCircuitBreaker = []byte("CircuitBreaker")
KeyDebtThreshold = []byte("DebtThreshold")
KeyDebtLot = []byte("DebtLot")
KeySurplusThreshold = []byte("SurplusThreshold")
KeySurplusLot = []byte("SurplusLot")
DefaultGlobalDebt = sdk.NewCoin(DefaultStableDenom, sdk.ZeroInt())
DefaultCircuitBreaker = false
DefaultCollateralParams = CollateralParams{}
DefaultDebtParam = DebtParam{
Denom: "usdx",
ReferenceAsset: "usd",
ConversionFactor: sdkmath.NewInt(6),
@ -40,25 +39,22 @@ var (
DefaultSurplusLot = sdkmath.NewInt(10000000000)
DefaultDebtLot = sdkmath.NewInt(10000000000)
stabilityFeeMax = sdk.MustNewDecFromStr("1.000000051034942716") // 500% APR
// Run every block
DefaultBeginBlockerExecutionBlockInterval = int64(1)
)
// NewParams returns a new params object
func NewParams(
debtLimit sdk.Coin, collateralParams CollateralParams, debtParam DebtParam, surplusThreshold,
surplusLot, debtThreshold, debtLot sdkmath.Int, breaker bool, beginBlockerExecutionBlockInterval int64,
surplusLot, debtThreshold, debtLot sdkmath.Int, breaker bool,
) Params {
return Params{
GlobalDebtLimit: debtLimit,
CollateralParams: collateralParams,
DebtParam: debtParam,
SurplusAuctionThreshold: surplusThreshold,
SurplusAuctionLot: surplusLot,
DebtAuctionThreshold: debtThreshold,
DebtAuctionLot: debtLot,
CircuitBreaker: breaker,
BeginBlockerExecutionBlockInterval: beginBlockerExecutionBlockInterval,
GlobalDebtLimit: debtLimit,
CollateralParams: collateralParams,
DebtParam: debtParam,
SurplusAuctionThreshold: surplusThreshold,
SurplusAuctionLot: surplusLot,
DebtAuctionThreshold: debtThreshold,
DebtAuctionLot: debtLot,
CircuitBreaker: breaker,
}
}
@ -67,7 +63,7 @@ func DefaultParams() Params {
return NewParams(
DefaultGlobalDebt, DefaultCollateralParams, DefaultDebtParam, DefaultSurplusThreshold,
DefaultSurplusLot, DefaultDebtThreshold, DefaultDebtLot,
DefaultCircuitBreaker, DefaultBeginBlockerExecutionBlockInterval,
DefaultCircuitBreaker,
)
}
@ -126,7 +122,6 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
paramtypes.NewParamSetPair(KeySurplusLot, &p.SurplusAuctionLot, validateSurplusAuctionLotParam),
paramtypes.NewParamSetPair(KeyDebtThreshold, &p.DebtAuctionThreshold, validateDebtAuctionThresholdParam),
paramtypes.NewParamSetPair(KeyDebtLot, &p.DebtAuctionLot, validateDebtAuctionLotParam),
paramtypes.NewParamSetPair(KeyBeginBlockerExecutionBlockInterval, &p.BeginBlockerExecutionBlockInterval, validateBeginBlockerExecutionBlockIntervalParam),
}
}
@ -205,10 +200,6 @@ func (p Params) Validate() error {
collateralParamsDebtLimit, p.GlobalDebtLimit)
}
if err := validateBeginBlockerExecutionBlockIntervalParam(p.BeginBlockerExecutionBlockInterval); err != nil {
return err
}
return nil
}
@ -355,16 +346,3 @@ func validateDebtAuctionLotParam(i interface{}) error {
return nil
}
func validateBeginBlockerExecutionBlockIntervalParam(i interface{}) error {
bbebi, ok := i.(int64)
if !ok {
return fmt.Errorf("invalid parameter type: %T", i)
}
if bbebi <= 0 {
return fmt.Errorf("begin blocker execution block interval param should be positive: %d", bbebi)
}
return nil
}

View File

@ -20,15 +20,14 @@ func (suite *ParamsTestSuite) SetupTest() {
func (suite *ParamsTestSuite) TestParamValidation() {
type args struct {
globalDebtLimit sdk.Coin
collateralParams types.CollateralParams
debtParam types.DebtParam
surplusThreshold sdkmath.Int
surplusLot sdkmath.Int
debtThreshold sdkmath.Int
debtLot sdkmath.Int
breaker bool
beginBlockerExecutionBlockInterval int64
globalDebtLimit sdk.Coin
collateralParams types.CollateralParams
debtParam types.DebtParam
surplusThreshold sdkmath.Int
surplusLot sdkmath.Int
debtThreshold sdkmath.Int
debtLot sdkmath.Int
breaker bool
}
type errArgs struct {
expectPass bool
@ -43,15 +42,14 @@ func (suite *ParamsTestSuite) TestParamValidation() {
{
name: "default",
args: args{
globalDebtLimit: types.DefaultGlobalDebt,
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
globalDebtLimit: types.DefaultGlobalDebt,
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: true,
@ -84,12 +82,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: true,
@ -122,12 +119,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -160,12 +156,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -212,12 +207,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: true,
@ -264,12 +258,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -316,12 +309,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -353,12 +345,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -391,12 +382,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -443,12 +433,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -495,12 +484,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: true,
@ -533,12 +521,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -571,12 +558,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -609,12 +595,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -647,12 +632,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -679,13 +663,12 @@ func (suite *ParamsTestSuite) TestParamValidation() {
CheckCollateralizationIndexCount: sdkmath.NewInt(10),
},
},
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -718,12 +701,11 @@ func (suite *ParamsTestSuite) TestParamValidation() {
ConversionFactor: sdkmath.NewInt(6),
DebtFloor: sdkmath.NewInt(10000000),
},
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -733,15 +715,14 @@ func (suite *ParamsTestSuite) TestParamValidation() {
{
name: "nil debt limit",
args: args{
globalDebtLimit: sdk.Coin{},
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
globalDebtLimit: sdk.Coin{},
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -751,15 +732,14 @@ func (suite *ParamsTestSuite) TestParamValidation() {
{
name: "zero surplus auction threshold",
args: args{
globalDebtLimit: types.DefaultGlobalDebt,
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: sdk.ZeroInt(),
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
globalDebtLimit: types.DefaultGlobalDebt,
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: sdk.ZeroInt(),
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -769,15 +749,14 @@ func (suite *ParamsTestSuite) TestParamValidation() {
{
name: "zero debt auction threshold",
args: args{
globalDebtLimit: types.DefaultGlobalDebt,
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: sdk.ZeroInt(),
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
globalDebtLimit: types.DefaultGlobalDebt,
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: sdk.ZeroInt(),
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -787,15 +766,14 @@ func (suite *ParamsTestSuite) TestParamValidation() {
{
name: "zero surplus auction lot",
args: args{
globalDebtLimit: types.DefaultGlobalDebt,
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: sdk.ZeroInt(),
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
globalDebtLimit: types.DefaultGlobalDebt,
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: sdk.ZeroInt(),
debtThreshold: types.DefaultDebtThreshold,
debtLot: types.DefaultDebtLot,
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -805,15 +783,14 @@ func (suite *ParamsTestSuite) TestParamValidation() {
{
name: "zero debt auction lot",
args: args{
globalDebtLimit: types.DefaultGlobalDebt,
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: sdk.ZeroInt(),
breaker: types.DefaultCircuitBreaker,
beginBlockerExecutionBlockInterval: types.DefaultBeginBlockerExecutionBlockInterval,
globalDebtLimit: types.DefaultGlobalDebt,
collateralParams: types.DefaultCollateralParams,
debtParam: types.DefaultDebtParam,
surplusThreshold: types.DefaultSurplusThreshold,
surplusLot: types.DefaultSurplusLot,
debtThreshold: types.DefaultDebtThreshold,
debtLot: sdk.ZeroInt(),
breaker: types.DefaultCircuitBreaker,
},
errArgs: errArgs{
expectPass: false,
@ -823,7 +800,7 @@ func (suite *ParamsTestSuite) TestParamValidation() {
}
for _, tc := range testCases {
suite.Run(tc.name, func() {
params := types.NewParams(tc.args.globalDebtLimit, tc.args.collateralParams, tc.args.debtParam, tc.args.surplusThreshold, tc.args.surplusLot, tc.args.debtThreshold, tc.args.debtLot, tc.args.breaker, tc.args.beginBlockerExecutionBlockInterval)
params := types.NewParams(tc.args.globalDebtLimit, tc.args.collateralParams, tc.args.debtParam, tc.args.surplusThreshold, tc.args.surplusLot, tc.args.debtThreshold, tc.args.debtLot, tc.args.breaker)
err := params.Validate()
if tc.errArgs.expectPass {
suite.Require().NoError(err)

View File

@ -13,12 +13,11 @@ import (
func NewCDPGenState(cdc codec.JSONCodec, denom, asset string, liquidationRatio sdk.Dec) app.GenesisState {
cdpGenesis := cdptypes.GenesisState{
Params: cdptypes.Params{
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 1000000000000),
SurplusAuctionThreshold: cdptypes.DefaultSurplusThreshold,
SurplusAuctionLot: cdptypes.DefaultSurplusLot,
DebtAuctionThreshold: cdptypes.DefaultDebtThreshold,
DebtAuctionLot: cdptypes.DefaultDebtLot,
BeginBlockerExecutionBlockInterval: cdptypes.DefaultBeginBlockerExecutionBlockInterval,
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 1000000000000),
SurplusAuctionThreshold: cdptypes.DefaultSurplusThreshold,
SurplusAuctionLot: cdptypes.DefaultSurplusLot,
DebtAuctionThreshold: cdptypes.DefaultDebtThreshold,
DebtAuctionLot: cdptypes.DefaultDebtLot,
CollateralParams: cdptypes.CollateralParams{
{
Denom: denom,

View File

@ -23,12 +23,11 @@ func c(denom string, amount int64) sdk.Coin { return sdk.NewInt64Coin(denom, amo
func NewCDPGenStateMulti(cdc codec.JSONCodec) app.GenesisState {
cdpGenesis := cdptypes.GenesisState{
Params: cdptypes.Params{
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 2000000000000),
SurplusAuctionThreshold: cdptypes.DefaultSurplusThreshold,
SurplusAuctionLot: cdptypes.DefaultSurplusLot,
DebtAuctionThreshold: cdptypes.DefaultDebtThreshold,
DebtAuctionLot: cdptypes.DefaultDebtLot,
BeginBlockerExecutionBlockInterval: cdptypes.DefaultBeginBlockerExecutionBlockInterval,
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 2000000000000),
SurplusAuctionThreshold: cdptypes.DefaultSurplusThreshold,
SurplusAuctionLot: cdptypes.DefaultSurplusLot,
DebtAuctionThreshold: cdptypes.DefaultDebtThreshold,
DebtAuctionLot: cdptypes.DefaultDebtLot,
CollateralParams: cdptypes.CollateralParams{
{
Denom: "xrp",

View File

@ -29,12 +29,11 @@ func dcs(coins ...sdk.DecCoin) sdk.DecCoins { return sdk.NewDecCoins(coins...) }
func NewCDPGenStateMulti(cdc codec.JSONCodec) app.GenesisState {
cdpGenesis := cdptypes.GenesisState{
Params: cdptypes.Params{
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 2000000000000),
SurplusAuctionThreshold: cdptypes.DefaultSurplusThreshold,
SurplusAuctionLot: cdptypes.DefaultSurplusLot,
DebtAuctionThreshold: cdptypes.DefaultDebtThreshold,
DebtAuctionLot: cdptypes.DefaultDebtLot,
BeginBlockerExecutionBlockInterval: cdptypes.DefaultBeginBlockerExecutionBlockInterval,
GlobalDebtLimit: sdk.NewInt64Coin("usdx", 2000000000000),
SurplusAuctionThreshold: cdptypes.DefaultSurplusThreshold,
SurplusAuctionLot: cdptypes.DefaultSurplusLot,
DebtAuctionThreshold: cdptypes.DefaultDebtThreshold,
DebtAuctionLot: cdptypes.DefaultDebtLot,
CollateralParams: cdptypes.CollateralParams{
{
Denom: "xrp",