Commit Graph

8496 Commits

Author SHA1 Message Date
Amaury b4fc48ca71
Add comment on x/auth hacky migration script (#9132)
* Add comment on x/auth hacky migration script

* QueryServer -> QueryRouter
2021-04-16 18:00:08 -04:00
Dev Ojha 82dc0081fd
Minor docs update to sdk.Int (#9126)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2021-04-16 08:43:49 +00:00
Cyrus Goh 89cb9b0f8c
docs: uml hotfix (#9124)
* comment out ungenerated uml .svg in the md files

* generate svgs to docs/uml
* create docs/uml/svg
* move .punl to docs/uml/puml
* update uml path in md files

* docs: update relative path of uml svg in `x` md files

* docs: remove plantuml script from pre.sh

Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-16 07:59:21 +00:00
Cyrus Goh 0bcd7c6862
ci: check docs build (#9125)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-04-16 07:46:05 +00:00
Robert Zaremba e43edc4749
ADR-28 derive address functions (#9088)
* update Derive functions

* update adr-028

* changelog update

* Apply suggestions from code review

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

* review updates

* remove DeriveMulti and rollback some changes in CHANGELOG

* add noop error check

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2021-04-15 21:32:45 +00:00
Marko 261c7ebd89
dont generate uml docs (#9121) 2021-04-15 14:17:36 +00:00
technicallyty bc4c3be15c
add docs for gas consumption (#9118)
Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-04-15 09:09:01 +00:00
Cuong Manh Le ef69863f46
x/bank/types: fix AddressFromBalancesStore address length overflow (#9112)
addrLen is encoded in a byte, so it's an uint8. The code in
AddressFromBalancesStore cast it to int for bound checking, but wrongly uses "addrLen+1", which can be overflow.

To fix this, just cast addrLen once and use it in all places.

Found by fuzzing added in #9060.

Fixes #9111
2021-04-15 00:13:55 -07:00
dependabot[bot] a4a6e05bab
build(deps): bump github.com/tendermint/tendermint (#9119)
Bumps [github.com/tendermint/tendermint](https://github.com/tendermint/tendermint) from 0.34.9 to 0.34.10.
- [Release notes](https://github.com/tendermint/tendermint/releases)
- [Changelog](https://github.com/tendermint/tendermint/blob/v0.34.10/CHANGELOG.md)
- [Commits](https://github.com/tendermint/tendermint/compare/v0.34.9...v0.34.10)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-15 02:07:35 -04:00
technicallyty 849fab120b
documentation for in-place migrations with x/upgrade module (#8967)
* upgrade draft docs

* upgrade draft docs2

* change to generic id

* Update docs/building-modules/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/building-modules/README.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/building-modules/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/building-modules/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/building-modules/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/building-modules/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/building-modules/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/building-modules/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/README.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* added lines for version map and consensus versions

* fix headers, add synopsis tag

* docs for new modules

* fix

* remove line

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/building-modules/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* SetUpgradeHandler example snippet

* -general clean up of docs
-include PR #9007 information

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Update docs/core/upgrade.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* fix self-reference

* clearer definitions for overwriting genesis functions

* add sync section

* forgot to save this

* update description of initgenesis modules

* specify upgrade method

* Update docs/core/upgrade.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-04-14 08:49:17 +00:00
dependabot[bot] b100f0a3a5
build(deps): bump actions/cache from v2.1.4 to v2.1.5 (#9101)
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.4 to v2.1.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.4...1a9e2138d905efd099035b49d8b7a3888c653ca8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-14 07:23:37 +00:00
technicallyty 3ebf06ce0d
module/types code hygiene - utilize map access 2nd return value (#9098)
* update docs/code to utilize map access return values

* remove mock module in fromVM to simulate truly non-existent module

* update test docs to refelect change

Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-04-13 19:00:04 +00:00
Andrei Ivasko a465ae182c
Add env variable to cmd flags (#9040)
* first draft

* add tests in config_test package

* refactored, all tests pass, r4r

* ready for review

* add envPrefix

* Update simapp/simd/cmd/root.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* fix linter issues

* minor fixes

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-04-13 17:32:08 +00:00
Hanjun Kim cf7b03efcd
add AddAmount/SubAmount methods to sdk.Coin (#9091)
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-04-13 15:01:21 +00:00
Cyrus Goh 56cea8c148
bump vuepress-theme-cosmos (#9099)
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-13 12:18:47 +00:00
Shahan Khatchadourian ea7947c3d2
Adding disclosure process to security.md (#9086)
* Adding disclosure process to security.md

* Apply suggestions from code review

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
2021-04-13 07:21:51 +00:00
Andrei Ivasko d5f5fe68d0
Keyring migrate command doc (#8979)
* draft

* update

* address comments, ready for review

* delete thr last line

* Update docs/migrations/keyring.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* Update docs/migrations/keyring.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* Update docs/migrations/keyring.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* Update docs/migrations/keyring.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* Update docs/migrations/keyring.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* Update docs/migrations/keyring.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* Update docs/migrations/keyring.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* ready for review

* Update docs/migrations/keyring.md

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-04-12 10:18:07 +00:00
dependabot[bot] 81583624b3
build(deps): bump styfle/cancel-workflow-action from 0.8.0 to 0.9.0 (#9096)
Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/styfle/cancel-workflow-action/releases)
- [Commits](https://github.com/styfle/cancel-workflow-action/compare/0.8.0...89f242ee29e10c53a841bfe71cc0ce7b2f065abc)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-12 09:25:07 +00:00
Marko 8ac983fb28
remove unneeded exported files (#9097)
Co-authored-by: Marko Baricevic <markobaricevic@Fergalicious.fritz.box>
2021-04-12 08:17:02 +00:00
Amaury 47c399fc16
Update chain migration docs to use v0.42 (#9090)
* Update docs

* Tweak

Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-12 08:08:53 +00:00
Sunny Aggarwal a4c7fd7002
Merge pull request #8505 from sikkatech/powerreduction_param
Turn staking power reduction into an on-chain param
2021-04-10 19:50:18 -04:00
Sunny Aggarwal 4b778abf91 merged master 2021-04-10 19:23:58 -04:00
Sunny Aggarwal 10b2b08ece Merge branch 'master' into powerreduction_param 2021-04-10 16:26:50 -04:00
Leo Pang 04ab271e9a
cosmovisor: move binrary to UpgradeBin from directory (fix #8494) (#8497) 2021-04-10 16:20:33 +00:00
Sunny Aggarwal cd8186e8e4 fix rosetta-test 2021-04-09 13:32:14 -04:00
atheeshp 7a3a156b4f
feegrant filtered msgs (#8604)
* WIP: add filtered message

* updated `Accept` interface method

* fix tests

* add cli tests for filtered fee allowance

* fix tests

* review changes

* rename `filteredFeeAllowance` message

* review changes

* review changes

* review changes

* review changes

* review changes

* update errors

* remove validation

* fix conflicts

* add `ctx` to `Accept` method

* fix test

* add gas consumption

* review changes

* review changes

* revert

* review changes

* improve error handling

* fix test

* Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/feegrant-filtered-msgs

* review changes

* update gas

* update type

* review changes

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-04-09 16:49:24 +00:00
dependabot[bot] bb7b2a62cf
build(deps): bump github.com/otiai10/copy from 1.5.0 to 1.5.1 (#9077)
* build(deps): bump github.com/otiai10/copy from 1.5.0 to 1.5.1

Bumps [github.com/otiai10/copy](https://github.com/otiai10/copy) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/otiai10/copy/releases)
- [Commits](https://github.com/otiai10/copy/compare/v1.5.0...v1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

* fix lint

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
2021-04-09 14:09:25 +00:00
MD Aleem 8a376a41c9
x/authz charge gas for expensive authorizations (#8995)
* WIP

* Add consume gas

* update authz.go

* add build flag

* Update x/staking/types/authz.go

* Update x/staking/types/authz.go

* add tests docs

* review changes

* fix operations

* Update x/authz/types/msgs.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

* review changes

* update gas cost

* review changes

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-04-09 12:33:27 +00:00
Cory 338e9a4277
update changelog with v0.42.3 & v0.42.4 stanzas (#9084) 2021-04-08 22:57:27 +01:00
Alessio Treglia 6e26ee9805
bump tendermint core (#9081) 2021-04-08 20:22:00 +01:00
Gianguido Sora 93965e0bcc
Write back account changes after tracking delegation/undelegation for vesting accounts (#8865)
Delegations and undelegations calculations performed during
accounting operations for vesting accounts were correct but
were not written back to the account store.

closes: #8601
closes: #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>
2021-04-08 16:20:29 +01:00
Sunny Aggarwal 8cf5fe0b9b add nolint to pb.go files 2021-04-07 20:07:52 -04:00
Sunny Aggarwal 04e483dd69 fixed migrations 2021-04-07 19:56:39 -04:00
Sunny Aggarwal 61b608f4bc Merge branch 'master' into powerreduction_param 2021-04-07 13:59:49 -04:00
Sunny Aggarwal aee3ca8c20 fix merge conflict 2021-04-07 13:59:42 -04:00
Cuong Manh Le 3a5550a938
x/bank/types: fix AddressFromBalancesStore panics with invalid keys (#9061)
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
2021-04-07 16:20:38 +00:00
SaReN a3b3a670aa
Refactor auth cli tests (#9018)
* refactor cli tests

* add norace

* fix typos

* update docs

* go imports

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-04-07 10:50:16 +00:00
Hanjun Kim 9b41ba7fb5
Use Docker to generate swagger files (#9064)
* use docker for proto-swagger-gen

fixes #7933

* fix deprecated commands and flags

see https://docs.buf.build/faq/ for detail

* run proto-gen and proto-swagger-gen

* add changelog entry
2021-04-07 10:31:39 +00:00
Sunny Aggarwal ca34808fdc merged master 2021-04-06 20:18:20 -04:00
Frojdi Dymylja 29ff333007
cosmos-reflection: extend to support writing by reflection clients (#8965)
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-04-07 00:33:54 +01:00
Sunny Aggarwal 05e2e45010 merged in master 2021-04-06 19:19:59 -04:00
Marko 7f9bc057e1
remove plantuml install in docker (#9059) 2021-04-06 19:04:00 +00:00
Calvin Lau cad3987bd0
Update overview.md (#9044)
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2021-04-06 15:33:39 +00:00
SaReN 0effd3a9d3
Paginate supply queries (#8798)
* paginate grpc query

* fix lint

* update tests

* remove GetTotalSupply

* fix test

* remove GetTotalSupply

* add changelog

* update changelog

* update rosetta data

* update limit

* update genesis

* add max limit to query

* fix lint

* go imports

* Update types/query/pagination.go

* update supply

Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-06 14:43:08 +00:00
SaReN 4b2fc3bd43
Store supply as Int bytes rather than string bytes (#9051)
* store supply as int bytes

* update migrate

* update migrate tests

* add error context

* fix lint

* update spec

* add changelog

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
2021-04-06 14:01:57 +00:00
colin axnér 5247a557d5
revert 8909 (#8960)
* revert 8909

* remove entry from CHANGELOG

* fix test
2021-04-06 11:40:17 +00:00
dependabot[bot] b102a723a3
build(deps): bump JamesIves/github-pages-deploy-action (#9048)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/4.1.0...164583b9e44b4fc5910e78feb607ea7c98d3c7b9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-06 11:14:03 +00:00
atheeshp 2ebf79fa6d
update legacy rest swagger (#9049)
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-04-06 10:34:36 +00:00
Rikard Hjort c41baa9bc8
PlantUML diagrams (#8712)
* 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>
2021-04-06 09:50:56 +00:00
dependabot[bot] ed7bca8984
build(deps): bump codecov/codecov-action from v1.3.1 to v1.3.2 (#9052)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.3.1 to v1.3.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.3.1...9b0b9bbe2c64e9ed41413180dd7398450dfeee14)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-06 09:39:05 +00:00