Commit Graph

56 Commits

Author SHA1 Message Date
Draco
614d4e40fe
Update cosmos-sdk to v0.47.7 (#1811)
* Update cometbft, cosmos, ethermint, and ibc-go

* Replace github.com/tendermint/tendermint by github.com/cometbft/cometbft

* Replace github.com/tendermint/tm-db by github.com/cometbft/cometbft-db

* Replace gogo/protobuf with cosmos/gogoproto & simapp replacement

* Replace cosmos-sdk/simapp/helpers with cosmos-sdk/testutil/sims

* Remove no longer used simulations

* Replace ibchost with ibcexported
See https://github.com/cosmos/ibc-go/blob/v7.2.2/docs/migrations/v6-to-v7.md#ibc-module-constants

* Add new consensus params keeper

* Add consensus keeper to blockers

* Fix keeper and module issues in app.go

* Add IsSendEnabledCoins and update SetParams interface changes

* Fix protobuf build for cosmos 47 (#1800)

* fix cp errors by using -f; fix lint by only linting our proto dir;
and use proofs.proto directly from ics23 for ibc-go v7

* run proto-all; commit updated third party deps and swagger changes

* regenerate proto files

* use correct gocosmos build plugin for buf

* re-gen all protobuf files to update paths for new gocosmos plugin

* update protoc and buf to latest versions

* fix staking keeper issues in app.go

* update tally handler for gov changes

* chain id fix and flag fixes

* update deps for cometbft 47.7 upgrade

* remove all module legacy queriers

* update stakingKeeper to pointer

* Replace ModuleCdc from govv1beta1 to govcodec

* remove simulations

* abci.LastCommitInfo → abci.CommitInfo

* Remove unused code in keys.go

* simapp.MakeTestEncodingConfig -> moduletestutil.MakeTestEncodingConfi

* Fix chain id issues in tests

* Fix remaining unit test issues

* Update changelog for upgrade

* Fix e2e tests using updated kvtool

* Update protonet to v47 compatible genesis

* Bump cometbft-db to v0.9.1-kava.1

* Update kvtool

* Remove extra changelog

* Fix merged rocksdb issues

* go mod cleanup

* Bump cometbft-db to v9 and go to 1.21

* Bump rocksdb version to v8.10.0

* Update kvtool to latest version

* Update gin to v1.9.0

* Use ibctm.ModuleName in app_test

* Fallback to genesis chain id instead of client toml

* Remove all simulations

* Fix cdp migrations issue with v47

* Update dependencies to correct tags

---------

Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
2024-02-06 17:54:10 -05:00
drklee3
23e054e402
feat: re-add validator-vesting legacy rest endpoints (#1542)
* Re-add validator-vesting legacy rest endpoints

* Add changelog entry

* Re-add /vesting swagger config
2023-04-06 15:51:34 -07:00
drklee3
3375484f79
Update deprecated Cosmos methods (#1530)
* Use cosmossdk.io/errors for deprecated error methods

* Update error registration with cosmossdk.io/errors

* Use cosmossdk.io/math for deprecated sdk.Int alias

* Fix modified proto file

* Update sdk.Int usage in swap hooks

* Update e2e test deprecated method usage
2023-04-05 16:21:59 -07:00
drklee3
f757d7ab15
feat: upgrade to Cosmos v0.46 (#1477)
* Update cosmos-sdk to v0.45.10-kava

* Add RegisterNodeService to app

* Update cosmos proto files

* Update cosmos proto files

* Use tagged v0.45.10-kava-v0.19-0.21 cosmos version

* update x/auth/legacy to x/auth/migrations

* Delete rest packages and registration

* Remove rest from proposal handlers

* Remove legacy types referencing removed sdk types

* Remove legacy tx broadcast handler

* Update incentive staking hooks to return error

* Remove grpc replace directive, use new grpc version

* Fix storetypes import

* Update tally_handler with updated gov types

* Delete legacy types

* Use new gov default config

* Update RegisterTendermintService params

Signed-off-by: drklee3 <derrick@dlee.dev>

* Replace sdk.StoreKey with storetypes.StoreKey

* Replace sdk.Int#ToDec with sdk.NewDecFromInt

* Replace sdk.NewUintFromBigInt with sdkmath.NewUintFromBigInt

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update most intances of govtypes to govv1beta1

* Unpack coin slice for Coins#Sub and Coins#SafeSub

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update committee gov codec registration

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update migrate utils period_vesting Coins#Sub

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update Coin#Sub in community proposal handler

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update Coin#Sub, FundModuleAccount/FundAccount in banktestutil

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update community, earn, kavadist proposal gov registration

* Update evm cli client EthSecp256k1Type check

* AccAddressFromHex to AccAddressFromHexUnsafe

* Add mint DefaultInflationCalculationFn to earn test

* Update use of removed staking.NewHandler

* Rename FlagIAVLFastNode -> FlagDisableIAVLFastNode

* cmd: Update new snapshot app option

Signed-off-by: drklee3 <derrick@dlee.dev>

* cmd: Add tendermint default config, use cosmos rpc status command

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update ethermint import path

github.com/tharsis/ethermint -> github.com/evmos/ethermint

* Upgrade ibc-go to v6

* Update proto dependencies

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update Tally handler test with new gov types

* Update helpers.GenTx -> helpers.GenSignedMockTx

* Update evmkeeper.NewKeeper params

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update ante authz, tests

* Add feemarket transient key, pass subspaces to evm/feemarket keepers

* Update new ante decorators

* Add new addModuleInitFlags to server commands

* Pass codec to keyring.New in genaccounts

* Pass codec to client keys add

* Add SendCoins to evmutil bank_keeper

* Use github.com/cosmos/iavl@v0.19.5

* Add ante HandlerOptions

* Add unimplemented SendCoins to evmutil bank keeper

Ethermint x/evm does not use this method

* Update init-new-chain script to disable post-london blocks

* Modify test genesis states to append 1 validator

* Update tally handler test to use string values

* Prevent querying balance for empty sdk.AccAddress in auction bidding test

* Set default bond denom to ukava

* Remove overwritten bank genesis total supply in committee proposal test

Signed-off-by: drklee3 <derrick@dlee.dev>

* Use ukava for testing staked balance

* Disable minting in community proposal handler test

Previously stake denom is used, which resulted in 0 minted coins

* Update hard APYToSPY test expected value

Increased iterations in sdk.ApproxRoot, updated closer to real value

* Fix NewDecCoinsFromCoins bug in incentive collectDerivativeStakingRewards

* Allow bkava earn incentive test values to match within small margin for rounding

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update invalid denom in issuance message coin validation

Colons are now valid in denoms

Signed-off-by: drklee3 <derrick@dlee.dev>

* Remove genesis validator in incentive delegation tests

* Update pricefeed market test for invalid denom

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update incentive delegator rewards test without genesis validator

Signed-off-by: drklee3 <derrick@dlee.dev>

* Add validator to export test

* Clear bank state in minting tests

Signed-off-by: drklee3 <derrick@dlee.dev>

* Remove validator for no stake tally test

Signed-off-by: drklee3 <derrick@dlee.dev>

* Clear incentive state before InitGenesis in incentive genesis export test

* Update swagger

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update ethermint version to match replaced version

* Remove legacy swagger

* Add NewEthEmitEventDecorator

* Remove redundant func for AddModuleInitFlags

* Remove unused addBankBalanceForAddress func

* Add SetIAVLLazyLoading option to app cmd

* Use legacy.RegisterAminoMsg for committee msg concrete registration

* Remove unnecessary Amino field

* Add evm_util bankkeeper SendCoins comment

* Update test method ResetBankState to DeleteGenesisValidatorCoins to be more clear

* Validate incentive params.RewardsPerSecond to be non-zero

* Validate swap pools to disallow colons in token denoms

* Register all legacy amino types on gov modulecdc

* Remove redundant Comittee interface registration

* Pin goleveldb to v1.0.1-0.20210819022825-2ae1ddf74ef7

Causes failed to load state at height errors

* Update ethermint to new pinned version with minGasPrices parse error fix

* Update cosmos fork dependcy commit to include reverted account constructor patch

* Update Cosmos v0.46.11 and cometbft v0.34.27

* Bump minimum go version to 1.19

* Update tendermint proto

* Update internal testnet genesis

* Move NewCanTransferDecorator before NewEthGasConsumeDecorator

* Add hard borrow store tests (#1514)

* add store tests for Borrow type

* refactor Deposit tests to match

* Fix old bep3 tests (#1515)

* Update Ethermint to 1b17445 to fix duplicate proto registration

* Add custom status command to use snake_case and stdout

* Add SetInflation helper

* Reduce ambiguity with evm CanSignEthTx error

* Remove init genesis validator claim in test

* Add disabled evmante.NewMinGasPriceDecorator with x/feemarket note

* chore: use tagged versions for Cosmos and Ethermint forks

* update kvtool & increase wait for ibc transfer test

---------

Signed-off-by: drklee3 <derrick@dlee.dev>
Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com>
Co-authored-by: Robert Pirtle <astropirtle@gmail.com>
2023-04-03 20:08:45 -04:00
Jacob Gadikian
09ddb3e367
gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
Ruaridh
ffef832d45
Upgrade to sdk v0.44.5 and add IBC (#1106)
- Upgrade cosmos-sdk to v0.44.5 from v0.39.2
- Add Legacy Tx Endpoint for backwards compatibility
- Add IBC v1.2.3 Support

Co-authored-by: DracoLi <draco@dracoli.com>
Co-authored-by: drklee3 <derrick@dlee.dev>
Co-authored-by: denalimarsh <denalimarsh@gmail.com>
Co-authored-by: Draco Li <draco@kava.io>
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: Denali Marsh <denali@kava.io>
2022-01-07 17:39:27 -07:00
Kevin Davis
d0e9c2531c
fix: update circulating supply (#1061)
* fix: update circulating supply to accurately reflect inflationary KAVA supply

* revert lp claims subtraction

* fix: use total supply after all vesting complete
2021-11-18 11:10:50 -06:00
Derrick Lee
b2aae00301
Add circulating supply endpoint for SWP (#1015)
* Add circulating supply endpoint for SWP

* Fix team SWP amount
2021-09-01 09:21:31 -06:00
Denali Marsh
6bcc843c2e
Add SAFU fund to circulating supply (#980)
* add safu fund to circulating supply

* add parentheses
2021-08-04 13:36:03 +02:00
Kevin Davis
e21a04ca57
fix: set previous block time correctly on block one (#868)
* fix: set previous block time correctly on block one

* fix failing tests
2021-03-10 10:56:23 -07:00
Kevin Davis
176c1973d3
fix: valid default genesis state (#805) 2021-02-08 08:00:37 -07:00
Kevin Davis
dd3470260d
add v0.13 legacy types for kava-5 (#784) 2021-02-02 15:10:57 -07:00
Kevin Davis
37be34b4d6
fix: replace is zero time check (#787) 2021-02-02 14:42:51 -07:00
Denali Marsh
fba4860331
Add custom HARD, USDX circulating supply endpoints (#718)
* HARD circulating supply query

* USDX circulating supply query

* add rest endpoints

* drop trailing newlines

* HARD, USDX total supply queries
2020-11-12 22:48:20 +01:00
Kevin Davis
495898170c
Auth migration (#667)
* draft auth migration from kava-3 to kava-4

* add harvest module accounts to auth state

* check account state equality

* add supply reconciliation to auth migration

* add gov migration

* add exact json test (#674)

Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>

* fix: check err variable

* correct import path

* feat: add hard accounts

Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
2020-09-30 19:14:07 -04:00
Kevin Davis
641d946ae7
[R4R] address potential panic in validator vesting (#645)
* emit event instead of panic on undelegation errors
2020-09-16 20:44:15 -04:00
Ruaridh
64aa61d285
Update to sdk v0.39.x (#625)
* fix cli tests
- add pruning config
- add the new build path

* bump sdk version, make changes to get kvd running

* add draft multi-tx test

* add multiple txs per block test

* remove unused file

* sync VV account json format with sdk account types

* add another jsons test

* refactor coin creation in tests

* add missed file

* update changelog
2020-09-16 15:16:14 -04:00
Ruaridh
2ffb1edd1f
Simulation fixes (#527)
* fix go version in dockerfile

* mix frequently occuring errors

* add missed import

* fix minor validator vesting sim bug

* fix auction sim bug

* fix docker build

* add todo from sim failure

* tidy up dockerfile

* update docs, add dockerignore to speed up builds

* Update simulations/README.md

Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>

* add stack traces to logs for easier debugging

* replace root func with sdk version

Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: karzak <kjydavis3@gmail.com>
2020-09-01 11:33:12 -04:00
Federico Kunze
bfb9f7e20a
cleanup begin/end block (#553)
* cleanup begin/end block

* update cdp BeginBlocker

* update dist mint

* fix tests

* typo

* add comment on CloseExpiredAuctions

* fix tests
2020-06-17 05:09:44 -04:00
Kevin Davis
db2b237e1d
[R4R] Restore supply endpoints (#586)
* feat: restore supply endpoints

* use complete circulating supply schedule

* standardize query path
2020-06-15 12:01:58 -04:00
Federico Kunze
b2a4369d4e
ValidatorVestingAccount validation (#552) 2020-06-05 08:59:16 -04:00
Ruaridh
4a8b5696cb
v0.8 Migration Scripts (#518)
* initial sketch

* add module migrations

* add migrations for all accout types

* test account migration

* add tendermint migration and migrate cmd

* remove need for errors pkg dependency

* add bech32 decoding fork

* add suggested params and cmd to write them

* add basic upgrade instructions

* fix tests

* address some migration todos

* tidy contrib folder

* finalize params values

* align cdp init genesis with other modules

* add tendermint and distribution test
add custom distribution migration to patch bug

* add staking migration test

* add slashing, evidence tests, refactor auth tests

* add full migration test

* remove go-amino dependency from go.mod
also tidy up unused indirect dependencies

* address remaining TODOs

* remove commented out code from legacy types

* add spot/liquidation markets ids to kava-3 params

* Apply suggestions from code review

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* address code review suggestions

* add validate genesis to migrate test

* refactor add params func

* remove commented out code from old types

* fix add params

* add deputy address

* add tests using exported kava-2 state

* incorporate new cdp params from master

* update params from review

Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>

* add deputy account

* add committee permissions for new params

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
2020-06-03 15:35:00 -04:00
Denali Marsh
2d7f5c4080
[R4R] Better docs (#541)
* update sidebar order

* update event backticks

* fix broken links

* fix spelling
2020-06-03 14:54:31 -04:00
Federico Kunze
e3ce6a7c9f
x/auction: types validation (#500)
x/auction: types validation
2020-05-21 10:25:47 -04:00
Kevin Davis
c556bd8c6c
fix: remove vesting client (#516) 2020-05-21 00:49:42 -04:00
Federico Kunze
e3aad2306b
other validations 2020-05-11 19:10:14 -04:00
Kevin Davis
18b6a8ce25 remove extra newline 2020-05-07 17:52:21 -04:00
Kevin Davis
e60bf54b32 clean up validator vesting spec 2020-05-07 17:52:07 -04:00
Federico Kunze
1a04ffe396
fix some lint bugs 2020-04-30 11:33:10 -04:00
Federico Kunze
fe72a24aa0
update format 2020-04-30 10:23:41 -04:00
Federico Kunze
8853e8d3d1
linters and format 2020-04-30 10:13:31 -04:00
Kevin Davis
c175e9e856
Add kava modules to TestAppImportExport (#472)
* add kava modules to TestAppImportExport
2020-04-29 10:10:41 -04:00
Federico Kunze
a573625df8
[R4R] bump SDK version to v0.38.3 (#421)
* bump SDK version to v0.38.3

Co-authored-by: Denali Marsh <denali@kava.io>
Co-authored-by: Kevin Davis <kjydavis3@gmail.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: denalimarsh <denalimarsh@gmail.com>
Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
2020-04-23 12:35:58 -04:00
Federico Kunze
66c73362c8
address comments from review 2020-04-06 18:43:43 -04:00
Federico Kunze
f827d896ba
Merge branch 'master' of github.com:Kava-Labs/kava into sim-store-decoder 2020-04-06 18:35:41 -04:00
Federico Kunze
4e3dfdf707
x/validator-vesting: remove internal pkg 2020-04-04 20:26:15 -03:00
Federico Kunze
9817a10ca6
validator-vesting: decoder_test 2020-04-01 15:36:46 -03:00
Kevin Davis
fb7dcd7d36 feat: calculate circulating supply with respect to vesting 2020-02-25 18:05:05 -05:00
Kevin Davis
ac8787b6ed Merge branch 'master' into develop 2020-02-25 10:32:20 -05:00
John Maheswaran
51fc70b5ac
[R4R] This is the implementation of the total circulating supply (#376)
* adding empty query files where we will implement the cli and rest interfaces

* adding querier file

* adding aliases, querier, expected keepers, types, module updates

* starting to work on query

* adding alias for QueryCirculatingSupply

* adding TotalCirculatingSupply type

* adding alias for TotalCirculatingSupply type

* adding QueryCirculatingSupplyCmd to clieng query file

* adding register routes function

* adding rest query handling function, register endpoint

* fix types include statement

* remove unused mux include

* another import fix

* remove unused variable

* adding rest to module

* fix missing variable names

* another missing variable fix

* remove dead code comment

* fix typo in circulating-supply

* fix import

* fix querierroute return to return the module name instead of empty string

* rename function, fix build issue

* return error instead of nil if there is an error

* import types from cosmos sdk, fix return type

* set querier route to module name in key.go

* adding query and rest updates

* aliasing new querying circulating supply function

* directly write output

* fix routes

* adding total supply functionality

* converting from microkava to kava

* Update x/validator-vesting/client/cli/query.go

typo fix

Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com>

Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
2020-02-25 10:29:54 -05:00
Ruaridh
c7b1331f4d
Fix simulations (#377)
* stub out simulation integration for cdp, pricefeed

* stub out simulation integration for auction

* fix cdp export

* update pricefeed to match

* update validator-vesting to match
2020-02-25 10:11:09 -05:00
Kevin Davis
a5c642a644 fix: json formatting of genesis state 2019-10-14 17:04:21 -04:00
Kevin Davis
37bd179c8e fix: get vesting status return values 2019-10-10 10:59:05 -04:00
Kevin Davis
3908870761 rebase, handle first block 2019-10-09 18:42:23 -04:00
Kevin Davis
49279a3ce5 follow getter setter pattern on keeper 2019-10-07 16:21:24 -04:00
Kevin Davis
8058f4b13a fix simulation initialization 2019-10-04 15:46:41 -04:00
Kevin Davis
ad82e971ae address review comments 2019-10-04 13:55:49 -04:00
Kevin Davis
54b9cf167f rebase, add account command 2019-10-03 15:13:38 -04:00
Kevin Davis
cadb7baf2b fix genesis state and sims 2019-10-02 09:10:28 -04:00
Kevin Davis
f6aec46343 add simulation to validator vesting 2019-09-30 22:53:14 -04:00