Commit Graph

1529 Commits

Author SHA1 Message Date
Ruaridh
4b8e224f6a
Revert incentive refactor commits (#1433)
* Revert "Add incentive migrations for earn rewards (#1406)"

This reverts commit 937e5f339f.

* Revert "Use different accumulator for earn (#1395)"

This reverts commit cf009647e6.

* Revert "Add base earn incentive accumulator (#1393)"

This reverts commit 44a90a8ef9.

* Revert "Add generic incentive `AccumulateRewards` method (#1392)"

This reverts commit dce631d3de.

* Revert "Add GetSynchronizedClaim and swap adapter (#1386)"

This reverts commit f52a581ea9.

* Revert "Add Initialize/Synchronize Claim methods (#1383)"

This reverts commit c2061f626e.

* Revert "Add source adapter interface definition (#1377)"

This reverts commit 2abb2ce606.

* Revert "Add incentive RewardIndexes types and state methods (#1381)"

This reverts commit 4a3002b09c.

* Revert "Add AccrualTime type and state methods (#1379)"

This reverts commit df1c2ffc34.

* Revert "Add incentive claim state methods (#1375)"

This reverts commit 90735e29ed.

* Revert "Add generic Claim type (#1371)"

This reverts commit 45fc1a7643.

* Regerate protos and minor revert fixes
2022-12-22 01:08:16 +00:00
Robert Pirtle
e4b4a7c62e
explicitly enumerate internal testnet validators (#1443) 2022-12-21 13:06:02 -08:00
Robert Pirtle
66a60fa6d8
seed dev-wallet power on internal testnet (#1442)
the seed script will issue & delegate enough KAVA to the genesis
validators to have enough power to pass gov proposals by itself.
2022-12-21 11:51:14 -08:00
Levi Schoen
67e1938190 metric workflow status based on overall result 2022-12-20 13:06:05 -08:00
Ruaridh
d0f83dc529
Add hard params to internal testnet (#1437)
* add hard params

* add unexpired prices

* remove old liquid module params
2022-12-20 18:38:55 +00:00
Ruaridh
b8d3c19e0f
Use default account type for genesis cmd (#1438) 2022-12-20 18:38:22 +00:00
Robert Pirtle
1f6a7d7ae1
update docker hub username in ci (#1439) 2022-12-20 09:28:08 -08:00
Robert Pirtle
8eb9e1d4a1
Add LegacyCommunityPool query to x/community (#1432)
* add proto for LegacyCommunityPool query

* add distribution keeper to community keeper

* implement LegacyCommunityPool query

* add cli cmd for legacy-community-pool
2022-12-19 13:56:46 -08:00
Robert Pirtle
ad0d1f80c8
Override original community-pool query service (#1430)
* initial version

* override x/distribution community-pool query

* test subset of original x/distribution queries

Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
2022-12-19 13:50:43 -08:00
Robert Pirtle
4c1524d7bc
Refactor community & inflation enhancements (#1428)
* refactor begin blocker to single func

* remove unused inflation keeper methods

* refactor to private keeper methods

* add testcase for failed mint due to invalid param

* add testcase for GetStakingApy()

* check for zero instead of empty

* actually test super long block time

* skip fund account for earn community proposals

* test x/community keeper GetModuleAccountBalance

* update x/kavamint begin block spec
2022-12-19 13:50:11 -08:00
Robert Pirtle
dd856bb288
inherit secrets for ci-docker workflow (#1436) 2022-12-16 12:14:04 -08:00
Robert Pirtle
01f507fc1e
add ci action for build & publish to docker hub (#1435) 2022-12-16 12:07:43 -08:00
Levi Schoen
c46d70de46 post metrics for cd run 2022-12-15 14:52:18 -08:00
Levi Schoen
51cdc91782 post metrics for ci runs 2022-12-15 14:52:18 -08:00
Levi Schoen
ebd4571ac8 switch cd pipelines to operate on internal testnet 2022-12-14 13:26:33 -08:00
Levi Schoen
7fb8e3005d
run CD on any push to the development branch 2022-12-14 15:43:04 -05:00
Robert Pirtle
f0731ceb0e
Setup CLI for x/community lend proposals (#1427)
* add tx for CommunityPoolLendDepositProposal

* add cli cmd for CommunityPoolWithdrawProposal
2022-12-12 17:10:36 -08:00
Robert Pirtle
7c58fb5303
Add x/community Lend proposals (#1425)
* implement & register x/community lend proposals

* register proposals in x/community codec

* allow x/community macc to receive funds

* init lend from genesis in proposal tests

* test CommunityLendWithdrawProposal

* helpful comment on x/community keeper deps

* use RouteKey in module.go
2022-12-12 16:38:27 -08:00
Levi Schoen
a7f3b7732b
use primary branch ref for kava-bridge cd workflow 2022-12-12 19:14:48 -05:00
Levi Schoen
8d713873d7 implement seed-chain cd job for internal testnet 2022-12-12 15:40:22 -08:00
Levi Schoen
06b434eaff
run cd pipeline on every push to feature branch
only run pipeline if ci was successful
2022-12-12 14:12:26 -05:00
Ruaridh
0bc4547d3c
Improve incentive sync documentation (#1417) 2022-12-10 02:09:58 +00:00
Robert Pirtle
1555c99f1b
Proto & types for x/community lend proposals (#1423)
* add proto for x/community lend proposals

* add proposal type validation w/ tests
2022-12-09 15:07:49 -08:00
Robert Pirtle
0ad5a5932d
add x/mint QueryServer for backwards compatibility (#1420) 2022-12-09 14:39:19 -08:00
Robert Pirtle
016eecfcc0
remove x/mint (#1416)
* use kavamint in incentive to calculate staking apy

* use kavamint minting: rewards_earn_staking_integration_test

* update incentive tests to mint only with kavamint

* remove x/mint from incentive tests

* remove x/mint from kava app

* fix minting in x/auction tests

* replace simapp fund calls with test helper

* remove mint state from genesis.json
2022-12-09 14:31:31 -08:00
Robert Pirtle
f37321839b
add x/kavamint & x/community modules (#1400)
* add `x/kavamint` module (#1376)

* stub out the x/kavamint module

* mint staking rewards in x/kavamint BeginBlocker

* calculate cumulative inflation from x/kavamint

* cleanup, abstract bond denom, grpc query tests

* store & use previous block time to calculate mints

* move test suite to testutil

* add test of x/kavamint BeginBlocker

* cleanup & comments from @DracoLi review

* fix x/incentive integration test

* remove rest client grpc test

* add x/kavamint module spec

* track previous block time in genesis

* suggested cleanup from PR review

* bugfix incorrect module account check

* add x/community module (#1388)

* add x/community module

* refactor and setup fund-community-pool tx

* remove unused features (params, genesis state)

* test x/community query and message

* update with master branch deps

* updates from review

* indicate deprecated methods on module (still needed to fulfill interface)
* remove legacy querier
* derive msg Route() and Type() from sdk.MsgTypeURL(&msg)

* use module name for message Route()

* mint community pool inflation in x/kavamint (#1389)

* mint community pool inflation in x/kavamint

* refactor x/kavamint abci inflation test

* test inflation from x/kavamint

* default kavamint rates to 0%

* rename kavamint account name variables

* panic if genesis kavamint previous block time not set

* emit event on kavamint begin blocker

* add kavamint year of inflation sanity check test

* update fund_community_pool message event

* add x/community spec

* refactor inflation accumulation into single func

* use new comm pool in kavadist multispend proposal (#1403)

the x/community module houses the new community pool. this commit
points the CommunityPoolMultiSpendProposal at the new community pool
so that multispend proposals can continue to be processed once original
fee pool funds are move to x/community

* updates from proto lint changes

* update earn proposals to use new community pool

originally the CommunityPoolDepositProposal & CommunityPoolWithdrawProposal
used the vanilla community pool fee pool. this commit updates them both
to use the new x/community module account.

* spec formatting update

* add x/community & x/kavamint to internal testnet genesis

* increase test coverage of x/kavamint

* increase test coverage of x/community

* use string type for sdk.Dec proto fields; disable generation of getters
for genesis and params (and other store objects)

* follow sdk conventions for params endpoint naming

* add kavamint to swagger; update swagger & proto docs

* remove legacy querier; touch up module to match others

* reduce max minting rate; refactor genesis to allow nil/zero block time;
repace proto stringers and remove getters; keep sdk.Dec values strings
in protos; increase validation of sdk.Dec values in params; increase
coverage; add module account permission checks; ensure import and export
of genesis does not change state

* fix scaling of rate values -- should be yearly rates

* revert key change

* fix typo in test name

* fix regression in running tests -- rename method

Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
2022-12-09 13:24:35 -08:00
Levi Schoen
aa5e9f6382
add prototype workflows for internal testnet CD (#1415)
* add prototype workflows for internal testnet CD

* implement reset-chain-state cd job

* implement start-chain cd workflow
2022-12-08 12:30:12 -05:00
Derrick Lee
937e5f339f
Add incentive migrations for earn rewards (#1406)
* Add initial earn claim migrations

* Use existing types for migrations, add accural time migrations

* Add MigrateRewardIndexes

* Delete old state after migration

* Update store test with multiple entries

* Move key methods to keys.go

* Update incentive consensus version to 3

* Call MigrateRewardIndexes in main migration, remove debugging statements

* Fix migration version to v3

* Update module versions

* Update outdated v1 comment
2022-12-05 16:54:18 -08:00
Levi Schoen
35041fd909
add skeleton workflow for cd to internal testnet (#1413)
* add skeleton workflow for cd to internal testnet

* double quote workflow name to prevent splatting / expansion

* allow for manually running internal testnet cd workflow
2022-11-30 18:52:03 -05:00
Levi Schoen
f167c4b562 checkout sources and install golang in ci publish job 2022-11-30 14:50:04 -08:00
Levi Schoen
99fe50219d fix ci workflow order 2022-11-30 14:35:33 -08:00
Levi Schoen
644bd0acec template and re-use ci workflows 2022-11-30 14:20:38 -08:00
Levi Schoen
1d95af8c9a remove deprecated circleci config 2022-11-30 14:20:38 -08:00
Nick DeLuca
252fafa53a
Fix remote check proto breaking when not branching from master (#1409)
* fix check remote breaking when not branching from master -- always use
current git branch when ref'ing

* fix remote command when overridden
2022-11-30 11:48:00 -07:00
Nick DeLuca
a4de1b7fb7
Update proto breaking CI check to pass on release branches (#1407)
* modify proto check breaking to check against the previous commit by
default

* add additional proto breaking check for pull requests to master

* always check proto breaking against target branch when making a pull
request
2022-11-30 11:02:16 -07:00
Derrick Lee
cf009647e6
Use different accumulator for earn (#1395)
* Add accumulators

* Move accumulator back to keeper package

* Add earn specific accumulators

* Move store methods to sub-package

* Move earn accumulator

* Rename accumulator files

* Add store doc comment

* Add earn accumulator tests, panic if accumulator not used with earn claim type

* Update earn accumulator tests to use new methods

* Add staking test for earn accumulator

* Add test for accumulator proportional rewards

* Remove old copy of GetProportionalRewardsPerSecond

* Add test for basic accumulator

* Fix AddIncentiveMultiRewardPeriod replacement

* Deduplicate base earn reward accumulator

* Check errors in tests

* Validate RewardPeriods in Params.Validate()

* Use adapter to fetch earn total shares
2022-11-29 14:23:33 -08:00
Derrick Lee
44a90a8ef9
Add base earn incentive accumulator (#1393)
* Add earn adapter

* Add earn adapter to list

* Update test var
2022-11-29 14:12:08 -08:00
Derrick Lee
dce631d3de
Add generic incentive AccumulateRewards method (#1392)
* Add generic accumulator

* Add MultiRewardPeriodOfClaimType type to params

* Add adapters wrapper

* Add MultiRewardPeriodsOfClaimType to params

* Add multireward period to genesis test

* Rename MultiRewardPeriodOfClaimType to TypedMultiRewardPeriod

* Use source adapters wrapper
2022-11-29 13:59:11 -08:00
Levi Schoen
3a766030a3
github action for ci (#1398)
* add workflow for CI on PRs to master or release branch, and every push to master

* sprint demo
2022-11-29 15:22:48 -05:00
Nick DeLuca
0e41374baf
update to tendermint 0.34.24 -- json rpc optimizations (#1402) 2022-11-23 11:28:17 -07:00
Nick DeLuca
94763d9091
include build directory for dockder images; move build artifacts to out (#1401) 2022-11-23 09:39:10 -07: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
Reece Williams
9b18154027
Bump tendermint to v0.34.23 (#1394)
- improved p2p send/receive metrics
- default cache-control headers for json rpc endpoints
2022-11-21 10:04:33 -07:00
Derrick Lee
30eb83d896
Capture multiple path segments for earn /vaults/{denom=**} query (#1391) 2022-11-18 10:53:59 -08:00
Derrick Lee
f52a581ea9
Add GetSynchronizedClaim and swap adapter (#1386)
* Add source adapters to keeper, implement GetSynchronizedClaim

* Iterate acc shares sorted

* Add swap adapter, update tests to use swap claimtype

* Add swap adapter test

* Add tests for non-empty pools

* Iterate over source ids instead of sorted keys
2022-11-14 17:55:10 -08:00
Derrick Lee
c2061f626e
Add Initialize/Synchronize Claim methods (#1383)
* Add init/sync claim methods

* Add todo

* Make GetSynchronizedClaim method todo

* Remove GetSynchronizedClaim

Work moved to different task

* Update GetRewardIndexesOfClaimType method
2022-11-10 11:05:11 -08:00
Reece Williams
4b6f1e6b57
Upgrade IBC to v3.4.0 (Adds memo support to fungible token transfers) (#1387) 2022-11-09 11:57:03 -07:00
Levi Schoen
ca9b6d084a bundle internal testnet genesis for use in ci pipeline 2022-11-08 14:14:38 -08:00
Robert Pirtle
fcfcd36740
add total supply queries for earn, savings, liquid (#1384)
* add total supply endpoint to x/liquid

* add test of x/liquid total supply query

* refactor x/savings test

* add total supply endpoint for x/savings (w/ test)

* add total supply endpoint for x/earn

* handle converting bkava to underlying staked amount

* aggregate bkava underlying values in x/earn

* aggregate underlying value of bkava in x/savings
2022-11-08 12:43:26 -05:00
Ruaridh
2abb2ce606
Add source adapter interface definition (#1377)
* add source adapter interface definition

* add more context to method names

* return a map to reduce chance of wrong order
2022-11-07 22:07:19 +00:00