Commit Graph

12 Commits

Author SHA1 Message Date
Amaury 30f58b5662
Weighted votes migrate in-place migrations (#8663)
* Weighted votes migrate in-place migrations

* Rename to pb.go

* Fix some lint

* Fix lint

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-02 22:22:02 +00:00
colin axnér 1c6e267964
Remove IBC logic from x/upgrade (#8673)
* add zeroed custom fields check to tm client

* remove custom fields function from x/upgrade and fix tests

* use []byte in x/upgrade, move abci to 02-client

* remove x/ibc from types

* whoops, delete testing files

* fix upgrade tests

* fix tm tests

* fix tests

* update CHANGELOG

* revert proto breakage, use reserved field cc @amaurym

* add IBC Upgrade Proposal type

* remove IBC from upgrade types

* add IBC upgrade logic to 02-client

* fix all tests for x/upgrade

* Add CLI for IBC Upgrade Proposal

* Update x/ibc/core/02-client/types/proposal_test.go

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

* add gRPC for upgraded client state

* test fixes

* add HandleUpgradeProposal tests

* update docs and remove unnecessary code

* self review bug and test fixes

* neatness

* construct empty rest handler

* fix tests

* fix stringer tests

* Update docs/core/proto-docs.md

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>

* add key in ibc store tracking ibc upgrade heights

Add a new Key to the IBC client store to track the IBC Upgrade Height. This allows IBC upgrades to correctly remove old IBC upgrade states

* update abci and tests

* revert key storage after discussion with @AdityaSripal

Revert using a key to track IBC upgrades. By clearing any IBC state using an old plan in ScheduleUpgrade, IBC upgrades do not need to be tracked by IBC. This reduces code complexity and reduces potential for bugs.

* clear IBC states on cancelled upgrades

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2021-03-01 16:28:54 +00:00
Amaury ba74a7c737
x{stake,slash,gov,distrib} In-place Store Migrations (#8504)
* Add 1st version of migrate

* Put migration logic into Configurator

* add test to bank store migration

* add test for configurator

* Error if no migration found

* Remove RunMigrations from Configurator interface

* Update spec

* Rename folders

* copy-paste from keys.go

* Fix nil map

* rename function

* Update simapp/app.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Update simapp/app_test.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Adderss reviews

* Fix tests

* Update testutil/context.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Update docs for ConsensusVersion

* Rename to forVersion

* Fix tests

* Check error early

* Return 1 for intiial version

* Use MigrationKeeper

* Fix test

* Revert adding marshaler to Configurator

* Godoc updates

* Update docs

* Add distrib legacy folder

* Add tests for distrib migration

* Add gov migrations

* Copy paste whole keys file

* Add gov migrations

* Add staking

* Fix staking tests

* Update spec and module.go

* Update to latest changes

* Update migration scripts

* capability to 1

* Fix tests

* Add package godoc

* Remove whitespace

* Remove global

* Use Migrator

* Remove 042 keys files

* Fix build

* Unlambda

* Rename to Migrate1to2

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-02-25 10:43:31 +00:00
Sunny Aggarwal 9635a99e2f
Merge branch 'master' into gov_split_vote_weighted_vote 2020-11-26 13:54:24 -05:00
Amaury 1b3ce2c1d1
CLI `migrate` command for x/{upgrade,params} proposals (#7875)
* Add v038 upgrade types

* Add migrate x/upgrade

* remove nolint

* Add ParameterChangeProposal

* Revert change

* Don't register crypto twice

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-24 23:32:32 +00:00
antstalepresh eb992a4490 Merge branch 'master' of https://github.com/sikkatech/cosmos-sdk into gov_split_vote 2020-11-03 22:27:58 +10:00
antstalepresh 73c757dc4f refactor SubVote to WeightedVoteOption && add utility for NewNonSplitVoteOption 2020-10-30 23:14:39 +10:00
antstalepresh c504784489 Fix build errors and tests after struct modification 2020-10-28 22:05:35 +10:00
antstalepresh 09a282dda3 basic migration for SubVote type 2020-10-27 21:50:11 +10:00
Robert Zaremba 9bd42ace6b
simapp: rename MakeEncodingConfig to MakeTestEncodingConfig (#7681)
* simapp: rename MakeEncodingConfig to MakeTestEncodingConfig

* Updating the Changelog

+ Adding DEPRECATED attribute.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-27 11:33:48 +00:00
Amaury Martiny 3c43370d0c
Add CommunitySpendProposals in migration (#7607)
* Add CommunitySpendProposals in migration

* Fix lint

* Avoid double registration

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-20 13:19:04 +00:00
Amaury Martiny c14a3a7cb2
CLI `migrate` command follow-up: decode & re-encode (#7464)
* Migrate staking module

* Add gov legacy

* Add comments

* Add x/distrib

* x/crisis

* x/mint

* Fix test

* migrate x/genutil

* Fix lint

* Fix staking constants

* Fix test

* Update x/genutil/legacy/v040/migrate.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Add migrate script instead of change BondStatus constants

* Fix test

* Fix another test

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
2020-10-09 19:09:43 +00:00