Add upgrade handler
Migrates from x/evmutil to x/precisebank:
- Fractional balances
- Reserve funds
- Mints or burns coins to ensure fractional balances are fully backed.
Initialize remainder if necessary to ensure valid state.
E2E test with fixed kvtool
* chore(lint): Update local make lint to match CI
This updates the `make lint` behavior to match the command being
run in CI.
In addition, we refactor the make lint command to use docker in order to
to ease cross platform install, use a local build cache that integrates
with make clean, use the same version file, and encapsulate the logic in
its own make include.
We also remove the old lint logic as to not introduce a duplicate target
and avoid confusion from a difference in behavior.
While solutions like act for running github actions locally work, it is
not as straightfoward, is slower, and uses the local git repository
instead of a clone (though I am not sure how the checkout step works
within act).
* fix(lint): Use shared timeout with .golangci.yml
Instead of using a local and different timeout in the lint makefile
target we can rely on golangci to load this configuration from
.golangci.yml instead and share this setting with CI.
* fix(lint): Fix golangci-lint cache mount path
This uses the correct cache dir default of ~/.cache enabling use
of cache between lint calls.
* fix(lint): Fix lint caching
This includes a couple fixes - 1) It adds support for full caching of go
mod and go build, speeding up the lint process quite a bit. And 2) does
not mix lint cache with make clean files -- the docker container creates
root owned files that cause make clean to error and we choose not to
require make clean to run with higher permissions. The cache must be
deleted manually.
* setup interchaintest IBC test
* e2e test of packet forwarding middleware
* rename interchain -> e2e-ibc & add make cmd
* add CI step that runs e2e-ibc tests
* use current branch for docker image in e2e-ibc
* 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>
* (feat) update x/cdp to run every X blocks based off params (#1814)
* add new cdp module param to protonet genesis
* update cdp / cdp related tests for new module param
* update telemetry docs and setup for collecting against local node
* update kvool commit for new cdp param
(cherry picked from commit 4d62f47773)
* add tests for configurable x/cdp begin blocker interval param
add migration for default value of param
* make adjustments based off pr feedback
* fix proto back compat check
* add new cdp module param to protonet genesis
* update cdp / cdp related tests for new module param
* update telemetry docs and setup for collecting against local node
* update kvool commit for new cdp param
* Make rocksdb configurable
* Make sure rocksdb tests are running in CI
* Updating ci-rocksdb-build workflow
* Remove test.sh
* Update tm-db dependency
* add NodeRunner impl for connecting to live network
* refactor out node runner setups
* remove hardcoded denom for DeployedErc20
* further specify restrictions on DeployedErc20
* don't override .env funded account mnemonic
* lower amounts for convert to coin e2e tests
* lower fund values used by e2e tests
* add doc comments for all e2e functions & types
* update kvtool
* add env vars for e2e automated upgrades
* run kvtool with upgrade flags when enabled
* add e2e test placeholder for upgrade handler tests
* allow override of kvtool's kava.configTemplate
* use the correct image tag when running e2e tests
* update kvtool
* always docker-build when running make test-e2e
* refactor skip shutdown to always skip shutdown
* add CtxAtHeight grpc helper
* add Community & Earn queriers
* expose UpgradeHeight in suite
* document e2e chain upgrades
* add reference to example branch
* rename cosmos-sdk specific signers
* add evm_signer util
* add utilities for converting between addresses
* rename signers
* dont include e2e tests in docker image
* add evmsigner to e2e SigningAccount
* add new whale account that is an EthAccount
* use ethsecp256k1 for e2e SigningAccounts
* wait for evm tx to be committed to block
also add example evm tx tests! 🎉
* check remainined balance is expected
* check balance via evm
* setup e2e test that starts kava chain
* refactor into a testify suite
* setup ethClient
* add example test checking chain id
* cleanup
* refactor & support funded accounts with txs
* ignore e2e tests in CI & consolidate makefiles
* remove circular go.mod dependency
vendors `signing` and `grpc` packages from `kava-labs/go-tools` to
refrain from a circular dep and fix pulled in dep versions
* add min fee for evm side
* prune nothing in e2e node
* use tag for kava version if we are in a detached HEAD state; add
print-git-info target for displaying git data
* refactor to ignore any detached head state; rely on checkout of exact
tag
* 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
* 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
* add initial auction migration from Levi's work
* reserve bid_duration field name as well
* refactor auction specifc migration code to legacy v0_17 pkg
* Add auction migration specific test. Delete v016 migration files. Add makefile target for running migration tests.
Co-authored-by: galxy25 <levismschoen@gmail.com>
* ibc v3 upgrade
* ibc no longer uses confio
* add proofs proto for ibc/v3
* wip add ethermint module
* update cosmos to 0.45.0
* add ethermint proto & bug fixes
* remove todo
* update docs
* fix a number of bugs
* minor comments update
* fix breaking tests
* Wrap bank keeper for EVM to convert decimals (#1154)
* Add bankkeeper wrapper for evm
* Remove agas from init-new-chain.sh, use ukava for evm_denom
* Fix sdk.Coins conversion, require min 1 coin amount
* Remove gas from init script
idk how this happened lol
* Remove debug logging stmt
* Restore original init ukava amounts
* Fix inplace coins conversion
* Use evmtypes.BankKeeper interface insteadof banktypes
* Add TestGetBalance
* Add doc comments, remove temp actualAmt vars
actualAmt vars replaced with inline calls to make it more clear that the
converted value is being used, as opposed to accidentally reusing the
raw EVM amt.
* Add TestSetBalance
* Add TestIdempotentConversion
* Panic if converted coin from EVM is 0
This happens if a value is less than 1ukava
* Deep copy coins instead of in place modification
* Update test coins amount
* Add panic tests for small EVM amounts
* Use evmtypes.BankKeeper as NewEVMBankKeeper param
* Tidy test setup
* ensure sdk config is set when creating new apps
* Respond EVM bank keeper GetBalance with SpendableCoins
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
* further speed up docker builds
* feat: restore previous keys add defaults, add eth flag (#1172)
* feat: restore previous keys add defaults, add eth flag
* remove outdated comment
* fix: remove redundant flag default
* evm bank keeper with akava handling
* fix issues
* add remaining tests
* add emv module to app
* add missing imports
* clean up comments
* wip akava keeper
* evm keeper
* fix genesis import
* reduce module permissions
* add bank keeper tests
* cleanup tests
* genesis tests
* change defaults
* add eth faucet key & fix issues
* switch to kava ethermint
* add a lot of tests
* add balances invariant
* add evm tests
* Remove panic if Swagger disabled in config (#1155) (#1183)
Co-authored-by: Derrick Lee <derrick@dlee.dev>
* add invariant to catch any akava balance > 1 ukava
* clarify name of balances invariant
* connect invariants to app
* fix evmbankkeeper akava issues
* add spec for evmutil
* remove zero balance accounts from state
* minor adustments
* update to ethermint 0.10.0
* fix eth ante
* add missing godoc comment
* Update x/evmutil/spec/01_concepts.md
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
* Update x/evmutil/spec/01_concepts.md
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
* Update ethermint to v0.12 (#1203)
* update to ethermint v0.12.2
* use app.Options for new evm options
* fix missed references to app.Options
* use ethermint branch while waiting on upstream fix
* evm migrations for tesnet alpha 2 (#1206)
* update to ethermint v0.12.2
* use app.Options for new evm options
* fix missed references to app.Options
* use ethermint branch while waiting on upstream fix
* add upgrade handler for evm-alpha testnet 2
* v17 migration setup + evm modules
* refactor migrate states
* x/feemarket migration
* v17 migrations setup + evm modules migration (#1210)
* v17 migration setup + evm modules
* refactor migrate states
* update gen time
* fix: update genesis time in test output
Co-authored-by: karzak <kjydavis3@gmail.com>
* add savings module to app blockers
Co-authored-by: Derrick Lee <derrick@dlee.dev>
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com>
Co-authored-by: karzak <kjydavis3@gmail.com>
* add back proto docs template
* ignore all third party packages from proto lint
* generate missing proto docs/linting
* update old branch name for proto-check-breaking
* remove dependency changes from proto generation
* remove no longer needed docs cmds from makefile
* use v0.3 dev image w/ go 1.17; add go mod tidy back
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
* Add ibc swagger fetch in Makefile proto-update-deps
* Update third_party proto files
* Update swagger to include all Kava modules and IBC
* Add api url to swagger config
* Remove old swagger-ui directory
* Add cleaned legacy-swagger.yml
* Remove cosmos endpoints from legacy swagger
* Remove invalid values, add legacy-swagger to merge config
* Remove unused definitions
* Fix legacy swagger type errors
* Clean up mismatch names, deprecate legacy endpoints
* Remove separate incentive-legacy-swagger.yml
* Update title
* Include legacy in title
* Re-build swagger conf with updated title
* initial feature scaffolding
* implement interest keeper logic
* basic AccrueInterest
* accrue interest on borrow
* update borrow index formula
* update sample reserve factor
* move AccrueInterest to begin blocker
* refactor interest rate updates for accrue interest
* use interest rate model from store
* refactor begin blocker state machine
* add reserve factor to interest model params
* update comment
* store money market instead of interest rate models
* update test suite
* use BorrowedCoins store key
* update public functions and alias
* unit tests, keeper test scaffolding
* demo panic
* address revisions
* add 'normal no jump' test case
* spy = 1 + borrow rate
* update comment
* APYToSPY unit test
* per user borrow index list
* interest keeper test
* test: interest applied on successive borrows
* varied snapshot times
* test: multiple, varied snapshots
* address revisions
* add pending interest before validating new borrow
* update makefile
* address revisions
* fix test
* kava-3 migration guide
* update readme for mainnet
* fix broken link
* build against new cache
* remove link, deploy, then reinstate it
* add it back in...
* revert to original
* add ipfs to link-check ignore regex