Delegations and undelegations calculations performed during
accounting operations for vesting accounts were correct but
were not written back to the account store.
closes: #8601closes: #8812
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Frojdi Dymylja <frojdi.dymylja@gmail.com>
Co-authored-by: Adam Bozanich <adam.boz@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Currently, AddressFromBalancesStore uses the input key without any
validation, so an empty key or an invalid key length cause it panics.
This commit fixes the problem, by returning an error in case of invalid
key was passed.
Found by fuzzing added in #9060.
Fixed#9062
* Overview of keepers in object capability model (OCM)
* Updates to the spec, making clarifications
* Create a sequence diagram of a (fresh) delegation
* Misc notes, not yet decided where to put them
* Description of the shares abstraction in validators
* Model all keeper dependencies and move the UML file to docs
* Move and rename delegation sequence diagram
* Move shares description
* Remove TODO
* Diagram touch-ups
* Add how consensus power is calculated
* remove temp file
* Diagram improvements
* Describe slashing in more detail
* Describe redelegation
* Describe unbonding
* Delegation updates
* Delegation updates
* Make a diagram describing overall transaction flow
* Add delegation flows for the events of tokens being bonded/unbonding/etc.
* Grammar fix
* Diagram updates: distinguish alts, remove numbering.
* Use groups instead of "func:" participants
* Remove unused keepers from dependency diagram
* Add title to unbonding diagram
* Move keeper dependencies
* small doc updates
* remove numbers on sequence diagram
* !!!WIP EndBlock
* Explain "Last"-prefix in storage
* Remove `panic` step (they are supposed to never happen)
* EndBlock sequence diagram (with TODOs)
* Add TODO
* More visible TODOs
* Remove numbering
* Complete EndBlock
* Remove numbering
* Remove TODOs and update title
* add title back
* remove endblock seq-diagram
* Make power index update conditional on not being jailed
* update title
* Move files to /docs
* Install PlantUML and compile images to png and txt
* Use transaction flow in documentation
* Use staking UML in staking docs
* Clarify uml with inline doc
* Add keeper deps diagram to docs
* Only produce SVG images
Co-authored-by: hjort <>
Co-authored-by: Marko <marbar3778@yahoo.com>
* -added consensus version tracking to x/upgrade
* -added interface to module manager -added e2e test for migrations using consensus version store in x/upgrade -cleaned up x/upgrade Keeper -handler in apply upgrade now handles errors and setting consensus versions -cleaned up migration map keys -removed init chainer method -simapp now implements GetConsensusVersions to assist with testing
* protocol version p1
* add protocol version to baseapp
* rebase against master
* add test
* added test case
* cleanup
* docs and change to bigendian
* changelog
* cleanup keeper
* swap appVersion and version
* cleanup
* change interface id
* update keeper field name to versionSetter
* reorder keys and docs
* -move interface into exported folder
* typo
* typo2
* docs on keeper fields
* docs for upgrade NewKeeper
* cleanup
* NewKeeper docs
Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
* Make clearer that the distribution iterates over all active validators, not just ones that voted
* Update x/distribution/keeper/allocation.go
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
* Move comment to docstring
* Change variable name
* Fix: remove git conflict markers
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
* First run
* Remove dead code
* Make test pass
* Proto gen
* Fix lint
* Add changelog
* Fix tests
* Fix test
* Update x/auth/tx/service.go
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
* Remove protoTxProvider
* Add grpc-gateway test
* Add comment
* move to api breaking
* lesser diff
* remove conflict
* empty commit to rerun CI
* empty commit to rerun CI
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* update MsgCreateValidator ValidateBasic to enforce self delegation minimum
MsgCreateValidator ValidateBasic requires a self delegation of at least one consensus power, this prevents a common, but hard to debug error
* add changelog
* Update CHANGELOG.md
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* fix simulation tests
Construct successfuly MsgCreateValidator to use a self delegation which is greater than the PowerReduction
* fix cli tests
* fix cli tests
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* -added consensus version tracking to x/upgrade
* -added interface to module manager -added e2e test for migrations using consensus version store in x/upgrade -cleaned up x/upgrade Keeper -handler in apply upgrade now handles errors and setting consensus versions -cleaned up migration map keys -removed init chainer method -simapp now implements GetConsensusVersions to assist with testing
* Changed MigrationMap identifier to VersionMap
removed module_test
* updated docs
* forgot this
* added line to changelog for this PR
* Change set consensus version function to match adr 041 spec
* add documentation
* remove newline from changelog
unnecessary newline removed
* updated example in simapp for RunMigrations, SetCurrentConsensusVersions now returns an error
* switch TestMigrations to use Require instead of t.Fatal
* Update CHANGELOG.md
Co-authored-by: Aaron Craelius <aaron@regen.network>
* docs for SetVersionManager
* -init genesis method added -removed panics/fails from setting consensus versions
* update identifiers to be more go-like
* update docs and UpgradeHandler fnc sig
* Upgrade Keeper now takes a VersionMap instead of a VersionManager interface
* upgrade keeper transition to Version Map
* cleanup, added versionmap return to RunMigrations
* quick fix
* Update docs/architecture/adr-041-in-place-store-migrations.md
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
* remove support for versionmap field on upgrade keeper
* cleanup
* rename get/set version map keeper functions
* update adr doc to match name changes
* remove redudant line
Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Overview of keepers in object capability model (OCM)
* Updates to the spec, making clarifications
* Create a sequence diagram of a (fresh) delegation
* Misc notes, not yet decided where to put them
* Description of the shares abstraction in validators
* Model all keeper dependencies and move the UML file to docs
* Move and rename delegation sequence diagram
* Move shares description
* Remove TODO
* Diagram touch-ups
* Add how consensus power is calculated
* remove temp file
* Diagram improvements
* Describe slashing in more detail
* Describe redelegation
* Describe unbonding
* Delegation updates
* Delegation updates
* Make a diagram describing overall transaction flow
* Add delegation flows for the events of tokens being bonded/unbonding/etc.
* Grammar fix
* Diagram updates: distinguish alts, remove numbering.
* Use groups instead of "func:" participants
* Remove unused keepers from dependency diagram
* Add title to unbonding diagram
* Move keeper dependencies
* small doc updates
* remove numbers on sequence diagram
* !!!WIP EndBlock
* Explain "Last"-prefix in storage
* Remove `panic` step (they are supposed to never happen)
* EndBlock sequence diagram (with TODOs)
* Add TODO
* More visible TODOs
* Remove numbering
* Complete EndBlock
* Remove numbering
* Remove TODOs and update title
* add title back
* remove endblock seq-diagram
* spec updates
* Make power index update conditional on not being jailed
* update title
* Delete sequnce diagrams
* Fix tokens to consensus power ratio
* Fix type
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: hjort <>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>