Commit Graph

51 Commits

Author SHA1 Message Date
Ruaridh
fefcb48a80
Reset bep3 swaps for zero height (#1228)
* copy over swap height reset from v016 upgrade

* remove unneeded old bep3 migrations

* hook migration cmd into app

* add bep3 migration integration test

* update old docs
2022-04-27 16:27:10 +01:00
Ruaridh
e9a28cefd8
Reset bep3 swaps for zero height in migration (#1135)
* reinstate and expand export test

* format testdata json

* sort bep3 testdata json for easier diffing

* add more bep3 swap examples to test data

* reset swaps for zero height

* update top level migration testdata
2022-01-14 20:17:49 -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
da5a852a6c
Misc simulation fixes (#963)
* fix: catch min swap edge case in bep3 sims

* fix: check repayment is above min in cdp sims

* remove print statement
2021-07-15 10:46:56 -05: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
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
Ruaridh
35a82acbd0
Module account permissions fix (#701)
* initial draft

* fix log msg formatting

* fix mod account type

* sync permissions at a block time

* update the update time
2020-10-27 21:06:44 -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
Kevin Davis
5fc85f10a6
Add rate limiting to bep3 assets (#623)
* feat: use only module account for bep3 txs

* wip: add time-based supply limits

* add tests and sims

* update genesis tests

* fix migration, committee tests

* update migrations

* fix: set previous block time in begin block

* update store decoder

* add additional bep3 params to committee

* revert incorrect rebase changes

* add migration test

* address review comments
2020-08-26 22:05:27 -04:00
Kevin Davis
790753f156
BEP3: support multiple assets (#616)
* wip: refactor to allow multiple bep3 assets

* update tests

* sims: validate asset before claiming

* move asset supply to params

* update tests

* fix sims

* fix tests

* wip: add migration from v0.9 -> v0.10 bep3

* fix build and migration tests

* nit: rename file

* move asset supply out of params

* update committee tests

* fix sims

* address review comments

* address review comments

* address review comments
2020-08-17 11:06:59 -04:00
Kevin Davis
e9e038a2c4
fix: use correct recipient for bep3 tests (#613) 2020-07-21 17:48:31 -04:00
Ruaridh
9ae99ade27
fix bep3 calc-swapid address parsing (#611) 2020-07-21 16:23:40 -04:00
Kevin Davis
79e9a2c67a
add bep3 patch activation date (#607) 2020-07-02 13:37:53 -04:00
Kevin Davis
8001cbbfd7
Update asset supply when params change (#604)
* fix: check asset supply

* update begin blocker

* add activation height and tests

* fix: verify outgoing swap recipient

* validate recipient address for outgoing swaps

* update activation time

* remove unused files

Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
2020-06-29 17:38:26 -04:00
Nick DeLuca
2ea75458ff
Update BEB3 CLI Client to Support JSON (#597)
* add initial augmented swaps to bring cli & rest api's under same schema

* use an array type

* update to not cause breaking changes in REST API -- don't embed swap
fields
2020-06-22 19:34:51 -04:00
Nick DeLuca
687c39be82
Update kvcli tx bep3 create -h with valid height span (#594)
* 360 is an invalid height, update to 270

* update changelog

* remove changelog entry so we don't overdo it and keep changelog clean
2020-06-18 19:54:06 -05:00
Denali Marsh
3784b4971b
update bep3 docs for mainnet (#587)
* update bep3 docs for mainnet

* update make link-check
2020-06-15 04:37:28 -04:00
Denali Marsh
978efbcc49
Fix bep3 sims determinism (#555)
* fix bep3 sims

* remove newline
2020-06-05 14:24:08 -04:00
Denali Marsh
ba3b353ee9
[R4R] add bep3 module param to committee (#547)
* update committee test

* update committee params

* update default deputy address to expected mainnet address

* spelling in comment

* fix bep3 sim values to 1

* bep3 sims:generate 32 length random number
2020-06-04 18:27:54 -07:00
Denali Marsh
09a75bd7c6
[R4R] optional bep3 config params (#546)
* add minAmount, maxAmount

* update kava-3 params for compile

* fix migration script

* update to mainnet params

* remove height span validation for incoming swaps

* update to sdk.Int, set lock to 220

* update lock range to [220, 270]

* update bep3 module docs

* update MsgClaim's ValidateBasic

* update test comments
2020-06-04 16:03:14 -07: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
Denali Marsh
2ea06e4c80
[R4R] Basic docs tidying (#534)
* fix bep3 spec title, cdp collateral params

* display mod readme first

* fix link test

* update license year
2020-05-29 15:53:57 -07:00
Denali Marsh
b2edeb8549
[R4R] Add flags to auction queries (#522)
* cli auction query flags

* update bep3 filter method name

* rest auction query flags

* add constants for auction type, phase

* fix test

* revisions
2020-05-24 19:27:11 -07:00
Denali Marsh
67b89c2b9c
[R4R] Blacklist module accounts (#517)
* implement module account blacklist

* update cdp getModuleAccountCoins method
2020-05-21 00:50:12 -04:00
Denali Marsh
00508b61fe
Change !GTE to LT (#512) 2020-05-15 15:43:52 -07:00
Denali Marsh
dd1d248be2
[R4R] Add BnbDeputyFixedFee param to BEP3 module (#511)
* generate length 32 random bytes

* fix test

* implement BnbDeputyFixedFee param

* clean up for PR

* update deputy address

* remove impossible check

* move comment
2020-05-13 16:39:29 -07:00
Denali Marsh
fa8ae9647a
[R4R] Update secure RNG to generate bytes directly (#509)
* generate length 32 random bytes

* fix test
2020-05-13 16:38:34 -07:00
Federico Kunze
12fe0c60a3
x/bep3: fix swap validation (#507) 2020-05-13 08:41:54 -04:00
Denali Marsh
6c68e41758
[R4R] bep3 module audit revisions (#505)
* most audit revisions

* remove expected income

* update begin block spec

* filter queryAtomicSwaps, add queryAssetSupplies

* update old address

* update test

* Remove legacy method

* remove legacy comment

* address PR comments

* IsValid for SwapDirection, SwapStatus

* fix rng logging

* query asset supplies

* return [64]byte from rng

* remove cross chain field from MsgCreateAtomicSwap

* move swap filtering to querier

* rename Limit field to SupplyLimit
2020-05-12 13:15:38 -07:00
Federico Kunze
04cb414593
x/bep3: genesis validation (#488)
* validate asset supply

* validate swap

* genesis tests

* swap and supply unit tests

* use Require() for suite

* fix tests

* Apply suggestions from code review


Co-authored-by: Denali Marsh <denali@kava.io>
2020-05-11 12:55:09 -04:00
Denali Marsh
8ef03e4181
[HOTFIX] Fix outgoing swaps in BEP3 sims (#490)
* check available asset supply on outgoing swaps

* switch maximum, current
2020-05-06 17:29:59 -07:00
Denali Marsh
611eff93cf
[R4R] Update bep3 module account permissions (#483)
* incoming swaps trigger acc registration

* move supply increment after recipient acc validation

* use expected keepers pattern

* remove expected keepers from alias

* update bep3 macc permissions

* clean supply keeper interface

* add module account check to genesis

* remove duplicated accountkeeper
2020-05-06 13:23:13 -07:00
Denali Marsh
7a904ddd6c
[R4R] Add outgoing swaps to bep3 sims (#484)
* incoming swaps trigger acc registration

* move supply increment after recipient acc validation

* use expected keepers pattern

* remove expected keepers from alias

* add outgoing swaps to sims
2020-05-06 12:30:27 -07:00
Denali Marsh
d56ad961c0
[R4R] Enable bep3 claim txs from new addresses (#482)
* incoming swaps trigger acc registration

* move supply increment after recipient acc validation

* use expected keepers pattern

* remove expected keepers from alias

* update comment
2020-05-06 10:56:43 -07:00
Federico Kunze
d8bbde78cc
build 2020-04-30 12:15:40 -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
1ef9bd331b
USDX incentives implementation (#399)
* USDX incentives implementation (#399)
* feat: upgrade to cosmos-sdk v0.38

Co-authored-by: Denali Marsh <denali@kava.io>
Co-authored-by: John Maheswaran <jmaheswaran@users.noreply.github.com>
Co-authored-by: John Maheswaran <john@kava.io>
2020-04-24 11:20:34 -04:00
Denali Marsh
a4c5a13822
[R4R] BEP3 module spec and clean up (#450)
* bump SDK version to v0.38.2

* fix module.go and remove codespaces

* fix coins Add()

* fixes to handlers

* migrate errors

* more fixes

* fixes fixes fixes

* build

* check for paramstore keytable

* empty param validation function (TODO)

* param validations

* fix some tests

* fix all tests

* simulation fixes (WIP)

* auction and bep3 sim refactor

* fixes

* bep3 sims fixes

* auction and pricefeed fix

* cdp sims fixes

* fix tests

* Update x/auction/keeper/auctions.go

Co-Authored-By: Denali Marsh <denali@kava.io>

* Update x/bep3/types/params.go

Co-Authored-By: Denali Marsh <denali@kava.io>

* Apply suggestions from code review

Co-Authored-By: Denali Marsh <denali@kava.io>

* Update x/bep3/keeper/swap.go

Co-Authored-By: Denali Marsh <denali@kava.io>

* address comments from review

* address comments from review

* fix: run sims

* fix: implement marshal/unmarshal JSON for validator vesting account

* fix: don't call set on sealed config

* remove swap interface

* add concepts spec

* add state spec

* add messages spec

* update event names

* implement swap expired event

* add events spec

* add params spec

* add begin block spec

* add module readme

* update alias

* revisions

* aggregate expired swap ids for event emisison

* markdown-link-check-disable for circleci

* exclude api-endpoint links in Makefile

Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Kevin Davis <kjydavis3@gmail.com>
2020-04-23 13:57:25 -07: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
Kevin Davis
5ae0b76e0c
[R4R] Bep3 sim changes (#442)
* fix: choose claim amount as percentage

* fix: lower asset supply to avoid overwhelming auctions
2020-04-17 14:05:36 -04:00
Kevin Davis
004837d7fc
Remove non-determinism from bep3 sims (#427)
* feat: remove non-determism from bep3 sims
2020-04-13 13:06:59 -04:00
Denali Marsh
3da4657102
[R4R] BEP3 simulations (#423)
* implement randomized genesis, params

* implement operations: MsgCreateAtomicSwap

* implement claim, refund future ops

* remove dynamic block locks

* refactor BondedAddresses

* add consistent supported assets
2020-04-11 20:54:45 -07:00
Federico Kunze
71d862300d
remove pointer from AtomicSwap 2020-04-06 18:45:46 -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
Ruaridh
f3e2e7e585
add simulation stubs to make tests pass (#408) 2020-03-30 11:02:43 -04:00
Denali Marsh
2721ba3889
R4R: bep3 msgs [HOTFIX] (#406)
* implement hotfix

* add interface compliance check
2020-03-29 14:37:28 -04:00