Commit Graph

1416 Commits

Author SHA1 Message Date
Calvin Lau cad3987bd0
Update overview.md (#9044)
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2021-04-06 15:33:39 +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
Ian Norden feed37dc56
ADR-038 Part 1: WriteListener, listen.KVStore, MultiStore and KVStore updates (#8551)
* StoreKVPair protobuf message definition and generated go types

* store WriteListener

* update MultiStore, CacheWrap, CacheWrapper interfaces

* adjust KVStores to fit new CacheWrapper interface

* new ListenKVStore

* adjust multistores to fit new MultiStore interface and enable wrapping returned KVStores with the new ListenKVStore

* typo fixes in adr

* ListenKV Store test

* update server mock KVStore and MultiStore

* multistore unit test; fix multistore constructor

* update changelog

* fix bug identified in CI

* improve codecov, minor fixes/adjustments

* review fixes

* review updates; flip set to delete in KVStorePair, updated proto-docs from running 'make proto-gen'
2021-03-30 16:13:51 -04:00
Robert Zaremba ce2163ce79
docs: added deprecation notes (#9021)
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-30 09:19:31 +00:00
Barrie Byron de0e288a85
docs: IBC overview edits and rewrites for clarity (#9001)
* went to fix a broken link and then got caught up in an editorial quick sweep to address style, typos, and clarity issues

* typo

* removed the commented out link to use cases, can replace with link to website when the site has the use cases.

* get corrected links from #9005

* Update docs/ibc/overview.md

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* Apply Colin's suggestions from code review

thank you for your careful review, I appreciate you

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* resolve merge conflict with link fixes, I hope these are correct

* is like (was analogous)

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2021-03-30 08:08:33 +00:00
Robert Zaremba 823620c231
docs: update bech32 account docs (#9006)
* docs: update bech32 account docs

* docs: update other places for bech32 and pubkeys

Co-authored-by: Marko <marbar3778@yahoo.com>
2021-03-29 11:22:30 +00:00
colin axnér a5bd6b3f61
fix IBC links (#9005)
* fix ibc links

* remove hyphen in prerequisites to Update docs/ibc/relayer.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
2021-03-27 01:09:59 +00:00
Amaury 1fa2c22d8a
Prefer sending tx_bytes to Simulate gRPC endpoint (#8926)
* 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>
2021-03-25 10:52:54 +00:00
Tim Lind 5a142db6f0
Fix broken ICS links on ADR001 (#8971)
Docs have moved to IBC repo

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>
2021-03-25 07:20:28 +00:00
Tim Lind 5b10af48c6
Fix broken relative link in ADR033 (#8977)
* Fix broken relative link in ADR033

Replaced with absolute URL

* Update docs/architecture/adr-033-protobuf-inter-module-comm.md

Co-authored-by: Marko <marko@baricevic.me>

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
Co-authored-by: Marko <marko@baricevic.me>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2021-03-25 07:12:42 +00:00
Tim Lind 863d7d033f
Fix broken links to ICS specs (#8972)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-03-24 10:23:31 +00:00
Tim Lind c0d306ba50
Fix link to ICS007 on ADR026 (#8976)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-03-24 10:16:10 +00:00
dependabot[bot] f637f54369
build(deps): bump vuepress-theme-cosmos from 1.0.180 to 1.0.181 in /docs (#8955)
Bumps [vuepress-theme-cosmos](https://github.com/cosmos/vuepress-theme-cosmos) from 1.0.180 to 1.0.181.
- [Release notes](https://github.com/cosmos/vuepress-theme-cosmos/releases)
- [Commits](https://github.com/cosmos/vuepress-theme-cosmos/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-24 09:32:46 +00:00
Tim Lind 4a93db78dc
Fix broken links to ICS26 in ADR015 (#8974)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-03-24 09:23:00 +00:00
Tim Lind c45775475a
Fix link to ICS2 on ADR017 (#8975)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-24 08:30:00 +00:00
MD Aleem a78f777ea8
add reverse iteration to pagination (#8875)
* WIP

* add tests

* add tests

* fix lint

* fix pagination

* add proto message doc

* fix filtered_pagination

* fix test

* cleanup

* add reverse flag to pagination

* changelog

* Update client/flags/flags.go

* Update CHANGELOG.md

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2021-03-23 09:28:20 +00:00
Frojdi Dymylja ac48ffe748
gRPC: fix server reflection (#8945)
* add: gogoreflection

* fix: server reflection

* fix: make tests resolve imports in a transitive way

* chore: cleanup getMessageType

* chore: lint

* add: extensions reflection

* chore: update interact-node.md docs

* chore: update CHANGELOG.md

* Update server/grpc/gogoreflection/fix_registration.go

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

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-03-22 19:40:34 +00:00
technicallyty 5bd93bfe7b
x/upgrade: added consensus version tracking (part of ADR-041) (#8743)
* -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>
2021-03-19 22:01:29 +00:00
Robert Zaremba cc1db18df5
doc secp256r1 (#8899)
* Update docs for things related to secp256r1

* docs: update accounts and pubkey documentation

* update table formatting

* Apply suggestions from code review

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* Apply suggestions from code review

Awesome grammar fixes and style improvements

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

* Apply suggestions from code review

Awesome grammar and style improvements.

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

* hd wallet docs update

* Apply suggestions from code review

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

* Update docs/basics/accounts.md

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

* Update docs/architecture/adr-020-protobuf-transaction-encoding.md

I agree, let's use "and"

* update code snippet links

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-03-19 14:22:59 +00:00
dependabot[bot] 0c2d4a86fd
build(deps): bump elliptic from 6.5.3 to 6.5.4 in /docs (#8824)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-17 14:07:28 +00:00
Amaury 1a4418b32b
Docs: Anys Usage, Events & small cleanups (#8895)
Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-03-17 12:15:20 +00:00
Cory a9b73e6452
add newline at end of docs/versions file (#8900)
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-03-17 08:53:51 +00:00
Pavel Voronin 864a07290e
ascii scheme didn't fit view area (#8892)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-17 08:46:00 +00:00
Pash 36f68eb9e0
Update docs (#8751)
* docs/basics/app-anatomy.md: update code snippets

* Update outdated code snippets

* docs/basics/accounts.md: update code snippets

* Update outdated code snippets

* docs/core/baseapp.md: update code snippets

* Update outdated code snippets

* docs/core/node.md: update code snippets

* Update outdated code snippets

* docs/core/store.md: fixed typos

* docs/core/grpc_rest.md: fix typos

* docs/core/cli.md: fix typos

* docs/core/ocap.md: fix code snippet

* docs/building-modules/msg-services.md: fix snippet

* Update stale code snippets

* docs/building-modules/simulator.md: snippets fix

* Update outdated code snippet

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-16 12:14:54 +00:00
Pavel Voronin 2bce1a7bae
fix typo (#8891)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-16 11:32:43 +00:00
Pavel Voronin 1f50a54cf9
fix typo (#8893) 2021-03-16 11:28:37 +00:00
Cyrus Goh e66c4e6f9c
docs: update dropdown 0.41 → 0.42 (#8884)
* redirect /0.41 → /0.42
2021-03-15 19:21:08 +00:00
technicallyty c6af0ed87e
x/upgrade: remove support for time based upgrades (#8849)
* remove time based upgrades

* cleanup

* cleanup evidence of time based upgrades

* cleanup docs referring to time based upgrades

* forgot one

* added line to changelog deprecated section

* Update proto/cosmos/upgrade/v1beta1/upgrade.proto

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

* update changelog line to correct section

* update buf config to allow reserved fields

Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2021-03-14 01:03:01 +00:00
MD Aleem adf5f625c1
add orderBy parameter to TxsByEvents (#8815)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
2021-03-12 18:47:10 +00:00
Alessio Treglia 3954c244b6
keyring: update documentation (#8839)
* keyring: update documentation

* Update docs/run-node/keyring.md

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

* Update docs/run-node/keyring.md

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

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-11 15:17:43 +00:00
Charly 55fc465dce
fixes: permalinks for docs (#8838)
* fixed broken links, typos

* Update docs/ibc/overview.md

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

* Update docs/intro/sdk-app-architecture.md

Co-authored-by: Marko <markobaricevic3778@gmail.com>

* Update docs/building-modules/simulator.md

Co-authored-by: Marko <markobaricevic3778@gmail.com>

* build(deps): bump JamesIves/github-pages-deploy-action from 4.0.0 to 4.1.0 (#8792)

Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/4.0.0...3dbacc7e69578703f91f077118b3475862cb09b8)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix multisig account pubkeys migration (#8794)

closes: #8776

* Update mergify (#8784)

* Update mergify

Prep for the v0.42 release series.

* retire v0.41, the hub can upgrade to v0.42 smoothly

* perf change (#8796)

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Supply by denom Migrations (#8780)

* Add back supply proto

* Add migration for supply

* Fix lint

* Update x/bank/spec/01_state.md

* Fix test

* Proto gen

* Update x/bank/spec/01_state.md

* Make proto gen

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>

* fix make protoc error (#8799)

* reduce gas costs by 10x for transient store operations (#8790)

* reduce gas costs by 10x for transient store operations

* fix TestTransientGasConfig for ReadCostFlat

* added changelog entry

* fix changelog

* fix changelog

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* x/gov: fix NormalizeProposalType() return values (#8808)

Closes: #8806

* store/cachekv: use typed types/kv.List instead of container/list.List (#8811)

Reduces CPU burn by using a typed List to avoid the expensive type
assertions from using an interface. This is the only option for now
until Go makes generics generally available.

The change brings time spent on the time assertion cummulatively to:
    580ms down from 6.88s

Explanation:
The type assertions were showing up heavily in profiles:
* Before this commit
```shell
Total: 42.18s
ROUTINE ======================== github.com/cosmos/cosmos-sdk/store/cachekv.newMemIterator
in /Users/emmanuelodeke/go/src/github.com/cosmos/cosmos-sdk/store/cachekv/memiterator.go
    14.01s     18.87s (flat, cum) 44.74% of Total
         .          .     17:	items      []*kv.Pair
         .          .     18:	ascending  bool
         .          .     19:}
         .          .     20:
         .          .     21:func newMemIterator(start, end []byte, items *list.List, ascending bool) *memIterator {
         .      620ms     22:	itemsInDomain := make([]*kv.Pair, 0, items.Len())
         .          .     23:
         .          .     24:	var entered bool
         .          .     25:
     510ms      870ms     26:	for e := items.Front(); e != nil; e = e.Next() {
     6.85s      6.88s     27:		item := e.Value.(*kv.Pair)
     5.71s      8.19s     28:		if !dbm.IsKeyInDomain(item.Key, start, end) {
     120ms      120ms     29:			if entered {
         .          .     30:				break
         .          .     31:			}
         .          .     32:
         .          .     33:			continue
         .          .     34:		}
         .          .     35:
     820ms      980ms     36:		itemsInDomain = append(itemsInDomain, item)
         .          .     37:		entered = true
         .          .     38:	}
         .          .     39:
         .      1.21s     40:	return &memIterator{
         .          .     41:		start:     start,
         .          .     42:		end:       end,
         .          .     43:		items:     itemsInDomain,
         .          .     44:		ascending: ascending,
         .          .     45:	}
```

and given that the list only uses that type, it is only right to lift the
code from container/list.List, and only modify Element.Value's type.

For emphasis, the code is basically just a retrofit of
container/list/list.go but with a typing, and we'll keep it as is
until perhaps Go1.17 or Go1.18 or when everyone uses Go1.17+ after
generics have landed.

* After this commit
```shell
Total: 45.25s
ROUTINE ======================== github.com/cosmos/cosmos-sdk/store/cachekv.newMemIterator
in /Users/emmanuelodeke/go/src/github.com/cosmos/cosmos-sdk/store/cachekv/memiterator.go
     4.84s      6.77s (flat, cum) 14.96% of Total
         .          .     16:	items      []*kv.Pair
         .          .     17:	ascending  bool
         .          .     18:}
         .          .     19:
         .          .     20:func newMemIterator(start, end []byte, items *kv.List, ascending bool) *memIterator {
         .      330ms     21:	itemsInDomain := make([]*kv.Pair, 0, items.Len())
         .          .     22:
         .          .     23:	var entered bool
         .          .     24:
      60ms      160ms     25:	for e := items.Front(); e != nil; e = e.Next() {
     580ms      580ms     26:		item := e.Value
     3.68s      4.78s     27:		if !dbm.IsKeyInDomain(item.Key, start, end) {
      80ms       80ms     28:			if entered {
         .          .     29:				break
         .          .     30:			}
         .          .     31:
         .          .     32:			continue
         .          .     33:		}
         .          .     34:
     440ms      580ms     35:		itemsInDomain = append(itemsInDomain, item)
         .          .     36:		entered = true
         .          .     37:	}
         .          .     38:
         .      260ms     39:	return &memIterator{
         .          .     40:		start:     start,
         .          .     41:		end:       end,
         .          .     42:		items:     itemsInDomain,
         .          .     43:		ascending: ascending,
         .          .     44:	}
```

Fixes #8810

* Move all migration scripts to v043 (#8814)

* Move all migration scripts to v043

* Fix permaling

* Fix test

* Fix test again

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* permalinks

Co-authored-by: chrly <chrly@chrlys-MacBook-Pro.local>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Marko <markobaricevic3778@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Akhil Kumar P <36399231+akhilkumarpilli@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>
Co-authored-by: Albert Chon <albert@injectiveprotocol.com>
Co-authored-by: Emmanuel T Odeke <emmanuel@orijtech.com>
2021-03-10 19:14:12 +00:00
Charly 24ed401c81
fixed broken links, typos (#8783)
* fixed broken links, typos

* Update docs/ibc/overview.md

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

* Update docs/intro/sdk-app-architecture.md

Co-authored-by: Marko <markobaricevic3778@gmail.com>

* Update docs/building-modules/simulator.md

Co-authored-by: Marko <markobaricevic3778@gmail.com>

Co-authored-by: chrly <chrly@chrlys-MacBook-Pro.local>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Marko <markobaricevic3778@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-09 09:51:52 +00:00
Amaury 6ac8898fec
Move all migration scripts to v043 (#8814)
* Move all migration scripts to v043

* Fix permaling

* Fix test

* Fix test again

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-08 22:36:06 +00:00
Amaury 6520997668
Supply by denom Migrations (#8780)
* Add back supply proto

* Add migration for supply

* Fix lint

* Update x/bank/spec/01_state.md

* Fix test

* Proto gen

* Update x/bank/spec/01_state.md

* Make proto gen

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
2021-03-05 14:11:19 +00:00
Robert Zaremba a18f0b111a
Enable secp256r1 (#8786)
* enable secp256r1 in antehandlers

* Add sig verification benchamrk to find a sigverify fee

* adjust the gas fee

* enable secp256r1 in antehandlers

* Add sig verification benchamrk to find a sigverify fee

* adjust the gas fee

* Update the secp256r1 fee factor

* Update changelog

* regenerate docs
2021-03-04 21:31:42 +00:00
Amaury 95fa768671
ADR 041: In-Place Store Migrations (#8646)
* Initial draft

* Draft

* Add x/upgrade stuff

* Tweaks

* Update docs/architecture/adr-041-in-place-store-migrations.md

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>

* Reviews

* Use migrator

* Update docs/architecture/adr-041-in-place-store-migrations.md

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

* Update docs/architecture/adr-041-in-place-store-migrations.md

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Update docs/architecture/adr-041-in-place-store-migrations.md

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

* Update docs/architecture/adr-041-in-place-store-migrations.md

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

* Update docs/architecture/adr-041-in-place-store-migrations.md

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

* Update docs/architecture/adr-041-in-place-store-migrations.md

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

* Update docs/architecture/adr-041-in-place-store-migrations.md

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

* Update docs/architecture/adr-041-in-place-store-migrations.md

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

* More fixes

* Add grpc, use functions

* Add special case with 0 version

* Update docs/architecture/adr-041-in-place-store-migrations.md

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Update docs/architecture/adr-041-in-place-store-migrations.md

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Update docs/architecture/adr-041-in-place-store-migrations.md

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Remove useless err return

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-04 17:28:35 +00:00
colin axnér da064e13d5
Remove IBC from the SDK (#8735) 2021-03-04 13:11:34 +00:00
Robert Zaremba c66f1f7efe
crypto: add secp256r1 (#8559)
* Optimize secp256k1 hashing

* Add ADR-028 related functions

* Update ed25519

* fix errors/handle

* fix build

* fix build

* Add tests and update function names

* wip

* Use LengthPrefix for composed addresses

* add tests for NewComposed

* add module hash function

* fix append

* rollback ed25519 ADR-28 update

* rollback ed25519 ADR-28 test

* Adding Module tests and convert tests to test suite

* convert store_key_test.go to test suite

* rollback test check comment

* any.pb.go update

* generated proto files

* wip

* renames

* wip2

* add String method to PBBytes

* wip3

* add pubkey tests

* adding cryptotypes.PrivKey methods

* re-enable test

* fix equals test

* fix ecdsa object receiver

* add ProtoMarshaler implementation and tests

* move code to init and add interface registry

* add bytes tests

* merge Unmarshal with UnmarshalAmino

* implement ProtoMarshaler to ecdsaSK

* remove bytes.go

* add private key marshaling tests

* break tests into 2 suites

* add signature tests

* remove TODO

* remove bytes.proto

* adding changelog

* Update CHANGELOG.md

* Update crypto/keys/ecdsa/ecdsa_privkey.go

* Update crypto/keys/ecdsa/ecdsa_pubkey.go

* comments: add dot (.) at the end

* update comments

* update commented code

* rename files

* remove Amino methods

* use 2 spaces in protocgen.sh

* rollback changes in protocgen.sh

* add MessageName

* rework ecdsa proto structure

* move ecdsa to internal package

* add secp256r1 proto

* refactore proto definition for secp256r1

* fix err check

* update comments

* create const for fieldSize+1

* simplify the PubKey.String test

* Apply suggestions from code review

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>

* Update doc comments: SDK Interface -> sdk.Interface

* rename init.go to doc.go

* Add PubKey.Type() test

* Revert "Update doc comments: SDK Interface -> sdk.Interface"

This reverts commit 01f2b4f5efcd79a452483bcda152db54a8fbfee2.

* Use cryptotypes.Address instead of tmcrypto

* Revert "Use cryptotypes.Address instead of tmcrypto"

This reverts commit 15b866ae67bdb7ca4872f4089fcab19f9e2e3608.
This issue will be solved in https://github.com/cosmos/cosmos-sdk/issues/8775

* add link to ANSI X9.62

* move init.go -> doc.go

* use proto.MessageName()

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
2021-03-04 12:29:48 +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
Dev Ojha c0fd863ef1
Merge branch 'master' into adr-epoched-staking 2021-02-25 21:48:57 -06:00
Amaury 19e79e00d6
ADR-019/020 cleanups: HybridCodec, Pubkey (#8683)
* wip adr019

* Remove hybrid codec

* Change date

* Update docs/architecture/adr-019-protobuf-state-encoding.md

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

* Update pubkey interface

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-25 15:40:04 +00:00
Amaury eeb3eabdc6
docs: Add mention to use gRPC v1.33.2 (#8658)
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-02-25 07:57:06 +00:00
Kimura Yu 115096b09d
change dir '.appd' to '.app' (#8695) 2021-02-25 07:52:17 +00:00
Federico Kunze 149bed48fd
bank: name and symbol metadata fields (#8677)
* bank: name and symbol metadata fields

* cli test

* changelog
2021-02-24 20:06:04 -03:00
MD Aleem 897f20b1d1
fix REST endpoints in migration docs (#8648)
* fix endpoints

* update docs

* fix routes

* update docs

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2021-02-24 15:03:27 +00:00
Robert Zaremba 06ababdf36
ADR-033 cosmetic updates (#8676)
* ADR-033 cosmetic updates

* Apply suggestions from code review

Co-authored-by: Aaron Craelius <aaron@regen.network>

* remove invoker middleware framing

* Update NewFooMsgServer

* Update docs/architecture/adr-033-protobuf-inter-module-comm.md

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Update docs/architecture/adr-033-protobuf-inter-module-comm.md

Co-authored-by: Cory <cjlevinson@gmail.com>

* Update docs/architecture/adr-033-protobuf-inter-module-comm.md

Co-authored-by: Cory <cjlevinson@gmail.com>

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-24 11:45:21 +00:00
Cyrus Goh 4c70268c9b
docs: update master docs (#8353)
* bump docs theme to 1.0.180

* add v0.40 to config.js versions

* Fix code snippet link

* reorganize order of versions
* 0.39, 0.41, master
* defaulting to 0.41

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-23 10:57:04 +00:00
ValarDragon d880d74498 Fix accidentally committed files 2021-02-22 17:39:50 -06:00
ValarDragon 649a4e603a Add section for parameterizing the epoch length 2021-02-22 15:37:53 -06:00
ValarDragon e858c51799 Missed a comment 2021-02-22 14:38:08 -06:00