Commit Graph

56 Commits

Author SHA1 Message Date
Csongor Kiss e980b6880c Move IsGuardian to validator.go
Previously we put it in a generated file, which was not a good idea.
2022-07-19 22:19:55 +00:00
Csongor Kiss 0700b0b1bb Proof of Authority for tendermint consensus
allows validators to have 0 delegated tokens
2022-07-19 22:19:55 +00:00
Amaury 5cd741a878
revert: Turn staking power reduction into an on-chain param (#9495)
<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Closes: #9447

This PR partially reverts #8505. Namely:
- it removes PowerReduction as a staking on-chain param
- however, it keeps #8505's API changes regarding adding a `powerReduction` function argument to staking functions. This allows us to rely less on global variables in said functions.

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
2021-06-14 14:45:15 +00:00
Sunny Aggarwal 05e2e45010 merged in master 2021-04-06 19:19:59 -04: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
Sunny Aggarwal be27ec1d29 started fixing merge conflicts 2021-03-21 18:33:14 -04:00
Sunny Aggarwal 1f99aa3fb2 merged in master 2021-03-21 16:37:06 -04:00
Jonathan Gimeno 09f9a5573e
fix make protoc error (#8799) 2021-03-05 15:23:01 +00:00
MD Aleem 7df79b55f0
x/authz: Add DelegateAuthorization, UndelegateAuthorization (#8472)
* add proto msgs

* add delegate authorization

* add delegate authorization tests

* add delegate authorization to cli

* fix lint

* add cli tests

* made max_tokens optional

* add tests

* add table tests

* resolve conflicts

* add undelegate authorization

* proto-gen

* fix errors

* fix lint

* resolve conflicts

* fix imports

* add allow & deny lists to delegate authorization

* refactor authorizations

* proto-docs

* fix lint

* review changes

* golint

* proto lint

* review changes

* add staking authorization

* review changes

* fix protos

* review changes

* review changes

* clean docs

* proto-docs

* proto-gen

* proto-docs
2021-02-20 06:57:57 +00:00
psaradev 71305449d6 regen staking.pb.go 2021-02-03 22:43:27 +10:00
psaradev 0e6b9a613a
Merge branch 'master' into issue#8365/staking_power_reduction_chain_param 2021-02-03 22:40:05 +10:00
psaradev cc4ef50d2a Merge cosmos-sdk master 2021-02-03 22:36:29 +10:00
Amaury 896eee213a
docs: Update x/staking spec (#8395)
* Finish updating state

* Add messages

* Update events

* proto-gen

* Update proto/cosmos/staking/v1beta1/staking.proto

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

* progo-gen

* Update Msg with slash

* Rerun proto docs

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-01 12:35:18 +00:00
psaradev fec543d4f8 power reduction as on-chain param 2021-01-26 23:28:34 +10:00
Aaron Craelius 2521964d50
Update gogo proto deps with v1.3.2 security fixes (#8350)
* Update gogo proto deps with v1.3.2 security fixes

* Regenerate proto files
2021-01-15 19:45:34 +00:00
Marko 104a2031ab
docker: proto (#7893)
* migrate fully to buf

* run protoc-gen-cosmos in script

* migrate to docker container

* Update Makefile

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

* Update scripts/protocgen.sh

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-11-12 09:49:46 +00:00
Federico Kunze 136f3ade88
ibc: client params allowlist (#7855)
* ibc: client params allowlist

* genesis and gRPC

* client

* lint

* spec

* fixes

* validate localhost client

* move client types back to exported

* update genesis

* sort clients by id
2020-11-11 11:07:29 +00:00
Aditya fdcb028636
ibc: proof fixes (#7869)
* change proof proto def

* progress fixing tests

* complete proof restructure

* remove use of KeyPath

* improve error msgs

* docs and lint

* Apply suggestions from code review

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

* address code review

* fix string tests

* add ConvertProofs tests

* Apply suggestions from code review

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-11-10 15:39:09 +01:00
Cory 56c08d1117
Bump to tendermint v0.34-rc6 (#7828)
* bump to tendermint v0.34-rc6

* update go.mod

* tendermint version is now accessible as tmversion.TMCoreSemVer

* add changelog entry

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-11-06 10:13:52 +00:00
Aditya e9801edb99
Async Ack Fixes (#7735)
* Add function to query ack proofs

* fix bugs

* fix swagger

* fix final queries

* docs and add test case

* Rename QueryUnrelayedAcks to more accurate QueryUnreceivedAcks

* Apply suggestions from code review

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

* address rest of reviews

* consistent spelling

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-11-02 15:13:48 +00:00
Robert Zaremba bd9af94174
Use embedded lib key type in sdk pub keys instead of bytes. (#7672)
* Remove duplicate print message on keys add command (#7654)

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

* ed25519: use stdlib/crypto types

* use standard package testing

* use crypto/ed25519 instead of golang.org/x/crypto/ed25519

In Go 1.13 the new crypto/ed25519 package implements the Ed25519 signature scheme.
This functionality was previously provided by the golang.org/x/crypto/ed25519 package,
which becomes a wrapper for crypto/ed25519 when used with Go 1.13+.

* use standard package testing for secp256k1 tests

* secp256k1: add cross packages signature checks

* ed25519: rollback the _test package name

* rename underlyingSecp256k1 to btcSecp256k1

* package update

Co-authored-by: Denis Fadeev <denis@fadeev.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-28 10:24:41 +00:00
Federico Kunze 7ccd2675d7
ibc: refactor proto files (#7689)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-27 14:14:07 +00:00
Robert Zaremba 6bc8ff2dfe
Use any as validator pubkey (#7597)
* protobuf pubkey type update

* wip2

* wip3

* solving types.NewValidator issues

* remove bech32 from validator type assignment

* update Validator interface

* Changelog update

* wip4

* update genutil

* fix simapp & x/ibc/testing tests

* update staking

* changelog update

* fix import cycle in tests

* fix amino panic on TestValidatorMarshalUnmarshalJSON

* fix TestValidatorMarshalUnmarshalJSON consensus_pubkey check

* Add UnpackInterfaces to HistoricalInfo

* fix TestHistoricalInfo

* update todos

* fix: Expecting ed25519.PubKey to implement proto.Message

* fix linter issues

* Fix migrate test

* Update CHANGELOG.md

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

* review comments

* cosmetic changes

* add UnpackInterfaces got GenesisRandomized test

* Validator.Equal reuses Validator.MinEqual

* fix test

* use Validator.Equal in tests

* Fix staking simulation TestRandomizedGenState

* Remove TODO

* use HistoricalInfo.Equal

* use proto.Equal

* rename Validator.GetConsPubKey to TmConsPubKey

* prefer require.Equal over reflect.DeepEqual

* SetHistoricalInfo using a pointer

* Fix TestQueryDelegation test

* Fix TestQueryValidators test

* Fix TestSimulateMsgUnjail test

* experiement with LegacyAmino instances

* Register codecs in all simapp tests

* Fix cli_test compilation problems

* fix typo sdk -> std

* fix typo

* fix TestPlanStringer

* Rename to MakeEncodingConfig

* Remove RegisterCodecsTests

* Use gRPC in GetCmdQueryValidators

* Empty status

* fix info log check

* linter fixes

* rename simapparams to simappparams

* Update simapp/test_helpers.go

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

* comments updates

* use valAddr1 instead of sdk.ValAddress(pk1.Address().Bytes())

Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2020-10-23 12:07:52 +00:00
Marie Gauthier c59a04d70f
[x/slashing] Implement Protobuf Msg Services (#7557)
* Update x/slashing to use proto msg service

* Fix proto-gen

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-15 14:38:15 +00:00
Amaury Martiny 33e7297c79
Use enum instead of int32 for BondStatus (#7499)
* 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

* Change staking bondStatus to enum

* Fix test

* Fix another test

* Remove staking exported

* fix references

* Better constants

* Fix build

* Fix lint

* Remove buf version

* Fix tests

* Fix test

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-10-12 13:56:02 +00:00
Aditya 31ab35ad72
UpgradeClient Followup #1 (#7457)
* require old chain halts before upgrade

* Update proto/ibc/core/client/v1/client.proto

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

* start address reviews

* Apply suggestions from code review

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

* address reviews

* rework upgrade to ensure there is never more than one upgrade client in store

* fix tests

* fix conditional

* make proto-gen

* remove if statement skipping tests in upgrade keeper test

* address reviews

* correctly escape and unescape merkle keys

* add small conditional check

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
2020-10-08 09:22:22 +00:00
Federico Kunze 53f8aec857
ibc: protobuf v1 (#7432)
* ibc: protobuf v1

* update codec
2020-10-01 19:23:29 +00:00
Aditya 01fd22d244
ibc: upgrade client (#7367)
* implement upgrade module changes

* implement client changes

* implement core tendermint logic

* remove assumption that new client state has same structure as old

* fix light client builds

* fix rest of build

* fix tendermint tests

* fix all tests except MarshalJSON

* fix, marshalUpgrade fails

* Apply suggestions from code review

* minor updates

* update proto and validate path

* fix MarshalJSON panic

* hack my way to first passing test case

* add rest of upgrade test cases

* fix plan tests

* add keeper tests

* fix upgrade tests

* add more tests

* add upgrade path validation to ValidateSelfClient

* validate upgradedClient

* fix upgrade handler tests

* appease linter

* Apply suggestions from code review

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

* change signer to string in proto

* lint

* start address @colin-axner review

* improve test coverage

* fix abci stringer test

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-10-01 03:21:57 -03:00
Marie Gauthier 489599b70f
Remove the old message PublicKey proto oneof (#7390)
* Remove unused PublicKey type and update docs

* Update wording

* Update proto/cosmos/base/crypto/v1beta1/crypto.proto

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>

* Edit docs

* Move crypto.proto to multisig

* Proto linting

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

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>

* Update wording for Public Key Encoding

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2020-09-29 10:01:54 +00:00
Anil Kumar Kammari d55c1a2665
Change `address` from bytes to bech32 strings (#7242)
* init

* Fix bank proto messages

* missing conversions

* remove casttype for addresses

* Fix tests

* Fix consaddress

* more test fixes

* Fix tests

* fixed tests

* migrate missing proto declarations

* format

* Fix format

* Fix alignment

* Fix more tests

* Fix ibc merge issue

* Fix fmt

* Fix more tests

* Fix missing address declarations

* Fix staking tests

* Fix more tests

* Fix config

* fixed tests

* Fix more tests

* Update staking grpc tests

* Fix merge issue

* fixed failing tests in x/distr

* fixed sim tests

* fixed failing tests

* Fix bugs

* Add logs

* fixed slashing issue

* Fix staking grpc tests

* Fix all bank tests :)

* Fix tests in distribution

* Fix more tests in distr

* Fix slashing tests

* Fix statking tests

* Fix evidence tests

* Fix gov tests

* Fix bug in create vesting account

* Fix test

* remove fmt

* fixed gov tests

* fixed x/ibc tests

* fixed x/ibc-transfer tests

* fixed staking tests

* fixed staking tests

* fixed test

* fixed distribution issue

* fix pagination test

* fmt

* lint

* fix build

* fix format

* revert tally tests

* revert tally tests

* lint

* Fix sim test

* revert

* revert

* fixed tally issue

* fix tests

* revert

* fmt

* refactor

* remove `GetAddress()`

* remove fmt

* revert fmt.Striger usage

* Fix tests

* Fix rest test

* disable interfacer lint check

* make proto-format

* add nolint rule

* remove stray println

Co-authored-by: aleem1314 <aleem.md789@gmail.com>
Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 10:25:37 +00:00
Aditya 7b1efcb8ae
Fix QueryUnreceivedPackets/Acks (#7320)
* fix queries

* proto stuff

* rebuild proto-tools off old makefile

* rm buf-stamp

* fix godoc

* rename and fix implementation of UnreceivedAcks

* lint

* Update proto/ibc/channel/query.proto

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

* Update x/ibc/04-channel/client/cli/query.go

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

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-18 09:56:20 +00:00
Marie 320a852ee2
PubKey proto types (#7147)
* WIP on protobuf keys

* Use Type() and Bytes() in sr25519 pub key Equals

* Add tests

* Add few more tests

* Update other pub/priv key types Equals

* Fix PrivKey's Sign method

* Rename variables in tests

* Fix infinite recursive calls

* Use tm ed25519 keys

* Add Sign and VerifySignature tests

* Remove ed25519 and sr25519 references

* proto linting

* Add proto crypto file

* Implement some of the new multisig proto type methods

* Add tests for MultisigThresholdPubKey

* Add tests for pubkey pb/amino conversion functions

* Move crypto types.go and register new proto pubkeys

* Add missing pointer ref

* Address review comments

* panic in MultisigThresholdPubKey VerifySignature

* Use internal crypto.PubKey in multisig

* Add tests for MultisigThresholdPubKey VerifyMultisignature

* Only keep LegacyAminoMultisigThresholdPubKey and move to proto keys to v1

* Remove conversion functions and introduce internal PubKey type

* Remove old secp256k1 PubKey and PrivKey

* Uncomment test case

* Fix linting issues

* More linting

* Revert tests keys values

* Add Amino overrides to proto keys

* Add pubkey test

* Fix tests

* Use threshold isntead of K

* Standardize Type

* Revert standardize types commit

* Add comment

* Simplify proto names

* Add comment about multisig codec

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-16 11:08:55 +00:00
colin axnér ec74416276
x/ibc: move solo machine sequence to client state (#7271)
* update proto

* move solo machine sequence to client state

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-09-09 12:14:11 -03:00
Anil Kumar Kammari ebfb616d88
Migrate missing `x/distribution` CLI queries to proto (#7244)
* migrate CommunityPoolSpendProposalJSON to proto

* migrate NewWithdrawAllRewardsCmd to proto

* fix ineffectual issue

* refactor

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-07 13:14:00 +00:00
Aditya d208d2bed8
Make clients use proto Height (#7184)
* start using Height in TM client

* fix client tests

* fix client tests

* fix connection tests

* fix rest of tests

* Apply suggestions from code review

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

* fix simple issues

* add and use LTE and GTE methods

* remove TM-specific height semantics from 02-client

* fix lint and build

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-08-31 17:57:08 +00:00
atheeshp d02cd16219
Add swagger for gRPC REST (#7075)
* swagger gen command added

* proto file changed

* Add filter for swagger files

* Remove loop

* Add go-swagger installation

* Add swagger mixer command

* add swagger options

* remove files

* Fix swagger-combine

* Fix description

* remove unnecessary config option

* remove go-swagger dependency

* refactor

* Add proto-gen-swagger installation tool

* fix tool

* refactor

* don't push individual swagger files to repo

* refactor

* Fix doc

* move proto-swagger-gen to a separate target

* Fix permissions

* Add ibc swagger gen

* Update swagger generation doc

* cleanup

* gofmt

* refactor

* update Makefile

Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-08-28 18:49:08 +00:00
Cory f02b0b5745
Protobuf audit: base package, module packages, tx/Msg's (#7059)
* proto audits auth, bank, crisis, distribution

* audit module proto files

* audit base proto package

* make protogen

* golint

* fix gov genesis test

* Update proto/cosmos/bank/v1beta1/tx.proto

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

* update coin metadata protos & documentation

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-08-19 07:36:41 +00:00
Alexander Bezobchuk 7d2062b674
x/bank: gRPC Params Route (#7070)
* update x/bank proto gRPC query service

* fix path

* update keeper

* add godoc

* add test

* lint++
2020-08-17 13:55:04 +00:00
Marko 8de96d16f9
tendermint: update to rc3 (#6892)
* modify light imports

* change abci.header to tmproto.header

* use rc

* rc

* fix import

* Merge PR #6893: fix key imports

* fix rc2

* tendermint: update 3 (#6899)

* tendermint: update 4 (#6919)

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* tendermint: update 5 (#6923)

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

* bump to latest master

* tendermint: update (#6972)

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>

* Update x/ibc/07-tendermint/types/test_utils.go

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

* address comment

* go mod

* bring back things

* fix test

* update tm proto files

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-08-14 13:58:53 -04:00
Amaury Martiny 134e1dcecd
Protobuf Audit: Genesis states (#6978)
* Remove some casttypes

* Add more comments

* Finish remaining modules

* Fix lint

* Revert customname

* Revert evidence

* Review nits

* Consistent doc for genesis state

* Make proto-gen

* Update docs for capability

* Remove useless customtype

* Update proto/cosmos/auth/v1beta1/genesis.proto

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

* Add godoc

* Update proto/cosmos/evidence/v1beta1/genesis.proto

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Marie <marie.gauthier63@gmail.com>
2020-08-12 15:48:22 +00:00
Aaron Craelius 20c5ee3624
Enable proto JSON for genesis (#7000)
* Enable proto JSON for genesis

* Test fixes

* Cleanup

* Cleanup

* Cleanup

* Update CHANGELOG.md

* Protogen

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-08-11 14:22:30 +00:00
Cory 61a97ef347
Audit / Refactor proto packages layout (#6905)
* create base proto package, move ValAddresses to staking

* move tx, crypto, query proto packages into base; mark module level packages as beta

* new cosmos/base/abci.proto file, refactor some message names

* add comments to TxResponse

* refactor RegisterInterface calls to new proto package names

* fix bug in merge commit

* move missing module proto packages to beta, move cosmos.kv to cosmos.base.kv

* add tx.proto files, holding proto messages for module Msgs

* rm old generated pb.go files

* cosmos/base/base.proto -> cosmos/base/coin.proto

* mark genutil proto package as beta

* Fix conflicts

* Restructure proto files

* Re put signing

* Fix test

* Update slashing genesis

* Ignore confio proto files

* Fix interface register

* Make proto-gen

* Fix lint

* Put tx service into tx.v1beta1

* Use v1beta1 in interface registry

* Remove to cosmos.base.store

* Remove extra confio in buf

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-11 11:49:45 +00:00
Aaron Craelius 0faf545221
Add simulation gRPC service definition (#6872)
* WIP on TxService

* WIP on TxService

* Update docs

* WIP on simulation service

* WIP on simulate service

* Simplify interface

* Simplify interface

* proto-gen

* Update docs

* Update docs

* Simplify

* proto-gen

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-11 07:33:35 +00:00
Amaury Martiny 6e3c268a72
Protobuf audit: Queries (#6967)
* Add required fields for queries, p1

* Add comments

* Remove required

* More modules

* 2 to go

* Finish all modules

* Fix typo

* Fix test

* Make proto-gen

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-10 08:12:59 +00:00
Alexander Bezobchuk 9ae17669d6
Tx Height Timeout (#6089)
* Implement TxHeightTimeoutDecorator

* Update error message

* rename type

* set height timeout

* update tests

* update *SignDoc)

* rename

* remove dup

* fix build

* cli updates

* rest updates

* cl++

* Update x/auth/ante/basic.go

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

* Update x/auth/ante/basic.go

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

* Update x/auth/ante/basic.go

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

* Update x/auth/ante/basic.go

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

* rename

* rename

* remove TimeoutHeight from SignDoc

* updates

* fix tests

* update IBC cmd flags

* use omitempty

* update godoc

* add test case to TestStdSignBytes

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-07 23:32:22 +00:00
atheeshp 662aa7fa01
Slashing genesis types proto migration (#6881)
* slashing genesis types migrated to proto

* review changes

* fixed lint

* review change

* review change

* review changes

* Update proto messgaes

* Add test for ExportGenesis

* Address naming suggestions

* Update genesis

* Fix genesis test

* Add GetMissedBlocks

* Update genesis test

* Address review suggestions

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-08-04 12:58:36 +00:00
Aaron Craelius 6d937443b2
Reject unknown fields in TxDecoder and sign mode handlers (#6883)
* WIP on unknown field rejection in TxDecoder

* WIP on unknown field rejection in TxDecoder

* WIP

* WIP

* WIP

* WIP

* Fix bugs with RejectUnknownFields

* Fix tests

* Fix bug and update docs

* Lint

* Add tests

* Add unknown field tests

* Lint

* Address review comments
2020-08-03 19:47:25 +00:00
Marko 617b822efa
types: add kv type (#6897)
* add kv type

* add changelog entry

* fix build

* replace sdkkv with kv

* revert change

* fix some tests

* proto-gen

* fix tests

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-30 14:53:02 +00:00
Marie 2da954ff61
x/evidence genesis protobuf migration (#6864)
* Migrate evidence genesis state to proto

* Fix lint error

* Remove commented code

* Clean up

* Add UnpackInterfaces to evidence GenesisState

* Add cosmos_proto.accepts_interface to evidence any and fix lint error

* Add test for x/evidence ExportGenesis and use table tests

* Update x/evidence/types/genesis.go

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

* Update proto/cosmos/evidence/evidence.proto

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* Keep []Evidence as return type in GenEvidences

* Add GenesisState Validate tests

* Add test case for NewGenesisState

* Add tests for GenesisState UnpackInterfaces

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-29 18:22:51 +00:00
Emmanuel T Odeke b0c73ae994
codec: implement protobuf unknown fields checker (#6557) 2020-07-29 11:31:23 -04:00