Commit Graph

70 Commits

Author SHA1 Message Date
Solovyov1796
7991406367 fix test 2024-05-01 16:07:32 +08:00
Solovyov1796
5d11dcab48 rename kava 2024-05-01 13:53:58 +08:00
Solovyov1796
c2af9df57f revise proto files 2024-05-01 11:56:00 +08:00
Solovyov1796
55dee00b2c remove useless modules 2024-05-01 11:46:33 +08:00
Solovyov1796
916f251143 rename go mod path 2024-05-01 11:17:24 +08:00
Robert Pirtle
8b6bbd36f4
feat(metrics): add timing metrics to abci methods (#1669)
* feat(metrics): add timing metrics to abci methods

* update changelog
2023-08-25 15:14:35 -07:00
Ruaridh
5b3162c563
Cosmos v0.46 upgrade follow ups (#1522)
* ensure RewardIndexes.Mul method is called in test

* remove deprecated line breaks,
add new v0.46 keys cmd

* register kava msg types on authz ModuleCdc
2023-04-06 12:59:02 +01: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
Nick DeLuca
d5dcfe73b2
Refactor Buf Usage (#1399)
* start makefile refactor to smaller units; break out proto-dep updating;
add check-proto-deps target for use in CI in order to determine if
depdencies have diverged

* add proto check workflow

* download go modules before checking proto deps

* clean up -- hide output and add error message for check target

* add error message for check-rsync

* update any type, and ibc-go protos for v3.4.0

* add buf generate files for gogo, docs, and swagger

* update swagger dirs and run with latest swagger gen

* ignore new build directories

* refactor proto makefile logic -- use buf instead of scripts

* remove old protobuf scripts

* run all proto checks on push

* remove moved file

* set default value for protoc machine

* install build deps seperately

* fetch master for buf check breaking

* checkout from https url in CI for buf breaking

* fix rsync file permissions on darwin

* ignore build dirs

* fix issue with apple provided make; clean up build deps; switch to buf
format

* remove clang format file -- using buf format now

* run make proto-format (buf format changes)

* update generated files for proto format changes
2022-11-22 16:22:07 -07:00
Nick DeLuca
5110fea008
Update Protos (#1362)
* Update third party protos for tendermint, cosmos updates

* fix proto gen scripts for go 1.18

* update ibc go swagger for v3.3.0

* update generated files

* update swagger

* update grpc and protobuf deps
2022-10-24 11:06:39 -07:00
Jacob Gadikian
09ddb3e367
gofumpt - apply format changes for readability and consistency (#1248) 2022-05-09 11:37:36 -07:00
Denali Marsh
03ab76bb2d
Pricefeed query fix (#1149)
* filter prices in querier

* filter prices in grpc querier

* test grpc querier
2022-01-25 15:56:51 +01:00
Derrick Lee
1a51d1fb00
Add IBC markets to pricefeed migration (#1131)
* Add ibc markets to pricefeed

* Default empty oracles if no markets

* Update pricefeed migration tests

* Add ibc markets to testdata genesis pricefeed

* Add existing pricefeed markets and new ibc markets to committee permissions

* Remove stray empty branch

* Panic on committee migration if pricefeed app state is missing

* Remove redundant import
2022-01-14 14:24:57 -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
2611d48b77
fix: return nil instead of empty byte slice (#878) 2021-03-15 08:41:36 -06: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
Kevin Davis
92afaf6ca0
add query for all current prices (#768) 2021-01-21 10:36:51 -07:00
Ruaridh
9c69ee2fbf
merge release v0.12.1 updates (#724)
* use kava antehandler

* add authenticated mempool decorator

* add get authorised address methods

* hook antehandler into app

* refactor address fetcher interface

* tidy up args to NewApp

* remove unused function

* tidy up after removing address fetcher interface

* read authorized addresses from config

* fix error message, and minor tidy

* update cosmos-sdk and tendermint

* clarify function name

* add flags for mempool options
2020-12-02 10:37:11 -07:00
Denali Marsh
1442deb3dc
Harvest basic borrow functionality (#702)
* basic borrow types

* borrow keeper scaffolding

* borrow limits param

* integrate pricefeed keeper

* msg handling and querier

* borrow user validation

* update migration scripts for compile

* borrows querier, fixes

* add money market param

* add spot market ID to params, refactor pricefeed

* working bnb -> ukava borrows

* refactor to getAssetPrice

* conversion_factor param, refactor validateBorrow()

* address misc revisions

* remove validation code

* add borrow test

* update test params

* single borrow with sdk.Coins per user

* fix harvest test

* removed legacy commented out code

* address minor revisions
2020-10-30 10:59:47 +01:00
Kevin Davis
04946493ae
kava-3 to kava-4 migration (#676)
* feat: kava-3 to kava-4 migration function

* update migrate command
2020-10-03 13:48:57 -04:00
Kevin Davis
d577711056
kava-3 to kava-4 pricefeed migration (#664) 2020-09-30 14:33:48 -04:00
Denali Marsh
8966329643
add example to cli cmd (#648) 2020-09-11 14:58:22 +02: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
Kevin Davis
f2643e40e2
bump tendermint and cosmos-sdk versions (#608) 2020-07-02 19:48:43 -04:00
Nick DeLuca
70e8f95f02
Pricefeed price simulation refactor (#585)
* refactor price generation to use determistic sequence up to each block
height and reset for each simulation

* remove extra whitespace

* improve comment

* move PriceGenerator to simulation/types to keep logic clean
2020-06-17 21:03:47 -05: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
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
Alexander Bezobchuk
90681abcc9
Merge PR #532: Fix expiry parsing 2020-05-29 16:07:34 -04:00
Federico Kunze
ad7c08cfc3
x/pricefeed: GenesisState validation (#514)
* x/pricefeed: GenesisState validation
2020-05-21 00:49:27 -04:00
Kevin Davis
70b0f02e6d fix: use correct abci method in pricefeed spec 2020-05-07 13:44:43 -04:00
Kevin Davis
c6d287a5b3 feat: add pricefeed spec 2020-05-07 11:11:10 -04:00
Kevin Davis
471565e360
fix: add new event manager to ctx in handlers (#485) 2020-05-02 18:52:49 -04:00
Kevin Davis
8f3858509a
fix: various errors from linter (#481) 2020-05-01 14:13:29 -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
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
a0c2e4773b
pricefeed cleanup #428
[R4R] Pricefeed cleanup
2020-04-17 23:31:55 -04:00
jmahess
55747ed0b8
[R4R] Fix pricefeed sims so does not always go to zero (#434)
* Generate pricefeed prices using a random walk at the beginning of sims

Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
Co-authored-by: John Maheswaran <john@kava.io>
Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com>
Co-authored-by: John Maheswaran <john@noreply>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: Kevin Davis <kjydavis3@gmail.com>
Co-authored-by: Denali Marsh <denali@kava.io>
2020-04-17 18:29:54 -04:00
Kevin Davis
28a2ec6996 Merge branch 'master' into kd-pricefeed-cleanup 2020-04-13 21:30:33 -04:00
Kevin Davis
1fab788fd5
[R4R] Add cdp simulations (#422)
feat: cdp sims
Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
Co-authored-by: John Maheswaran <john@kava.io>
2020-04-13 21:29:46 -04:00
Kevin Davis
8f9aece875 address review comments 2020-04-13 14:08:14 -04:00
Kevin Davis
09597cce27 Merge branch 'master' into kd-pricefeed-cleanup 2020-04-12 13:05:53 -04:00
jmahess
8d199746cd
[R4R] Pricefeed simulations (#420)
Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
Co-authored-by: John Maheswaran <john@kava.io>
Co-authored-by: Kevin Davis <kjydavis3@gmail.com>
2020-04-12 12:34:01 -04:00
Federico Kunze
66c73362c8
address comments from review 2020-04-06 18:43:43 -04:00
Kevin Davis
174af29582 Merge remote-tracking branch 'origin/sim-store-decoder' into kd-pricefeed-cleanup 2020-04-06 10:00:00 -04:00
Kevin Davis
a6031172a1 feat: clean up pricefeed code 2020-04-06 09:56:59 -04:00
Federico Kunze
3f4aba1c7f
decoder tests 2020-04-04 19:42:35 -03:00
Federico Kunze
11ed343dea
simulation decoders for kava modules 2020-04-01 12:27:38 -03:00