Commit Graph

491 Commits

Author SHA1 Message Date
colin axnér cd29fd642a
Fix connection path validation and remove unused PathValidator function (#7930)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-16 09:30:57 +00:00
Callum Waters 6b62d266bb
use verifycommitlight (#7936) 2020-11-16 09:14:21 +00:00
colin axnér 7e6978ae55
ibc: tendermint misbehaviour should use block hash for equality check (#7928)
* check block hash equality

* update err msg

* valid commit now uses block id hash

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-13 19:01:33 +00:00
colin axnér 0b1a3eed39
add docs and make prefix a const (#7926)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-13 14:32:33 +00:00
colin axnér ddc777cf6f
remove chainid from ibc tm misbehaviour (#7932)
* remove chainid from misbehaviour

* update err msg

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-13 14:16:51 +00:00
Federico Kunze e77c9506c8
ibc: packet fixes (#7810)
* ibc: msg validation fields

* msg tests

* rename proof

* rename proofs

* check seq ≠ 0

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-11-13 13:58:13 +00:00
Aditya 4b529a41cf
Capability Fixes (#7918)
* add cap and name checks

* Update x/capability/keeper/keeper.go

* address reviews

* fix missing trim

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-13 11:13:59 +00:00
Ethan Buchman 15103b63a1
x/ibc/24-host: fix some comments (#7923)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-13 10:33:33 +00:00
colin axnér c0d7233141
Minor fixes for ibc tendermint (#7916)
* remove nil checks in getter functions for ibc tm header

* remove redundant registration

* add upgrade height version height check

* fix err msg

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-12 19:01:22 +00:00
colin axnér 956e1cf68f
move sdk denom validation to top of validateibcdenom (#7917) 2020-11-12 18:44:02 +00:00
colin axnér 96f239db1c
remove timestamp check from solomachine misbehaviour (#7915)
* remove timestamp check from solomachine misbehaviour

* add more documentation
2020-11-12 16:15:33 +00:00
colin axnér c8afb2cbe7
Remove consensus params from IBC tm client (#7891)
* remove consensus params

* fix build

* fix build

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-12 10:08:04 +00:00
colin axnér e9f19225a9
IBC Upgrades function interface return client/consensus (#7895)
* return client and consensus state on upgrades

* fix build
2020-11-11 18:06:37 +00:00
colin axnér 76ffdccb03
IBC Fraction for trust level changed to uints (#7892)
* fraction uses uint now

* Update proto/ibc/lightclients/tendermint/v1/tendermint.proto

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-11 15:52:11 +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
colin axnér 116d0460fc
solo machine GetPubKey returns an error instead of panicing (#7883)
* solo machine public key now returns an error instead of panicing

* apply @fedekunze review suggestions

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-11 10:09:57 +00:00
colin axnér 0bd46574f4
fix mismatched solomachine signature data type verification (#7882)
* fix mismatched signature data type verification

* update godoc

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-10 20:37:10 +00:00
Federico Kunze bcdd6ee15c
ibc: fix grpc gateway routes (#7881) 2020-11-10 17:50:53 +00:00
colin axnér 300b7393ad
Update IBC host keys + cleanup (#7873)
* init changes

* cleanup keys and remove redunancdy

* revert unintentional changes

* KeyChannel -> ChannelKey
2020-11-10 17:05:21 +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
colin axnér 55772aec8c
update err to match others (#7857)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-09 17:12:00 +00:00
Marie Gauthier 90e9370bd8
Replace tmcrypto.PubKey by our own cryptotypes.PubKey (#7419)
* WIP on removing tm pub/privkey

* Fix part of crypto tests

* Add PrivKeyLedgerSecp256K1 proto type

* Use BasePrivKey for ledger priv key type

* Refacto continued

* First round

* x/staking

* Continue porting

* x/* done

* Make build pass

* More conversion

* Remove IntoTmPubKey

* Fix test

* Remove crypto.PubKey in some other places

* Revert ledger changes

* Fix comment

* Remove useless function

* Add To/FromTmPublicKey

* Add migrate tests

* Fix test

* Fix another test

* Rename tm conversion functions

* Less code

* Rename BasePrivKey to LedgerPrivKey

* Add changelog

* Rename functions

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-11-09 16:01:43 +00:00
Federico Kunze 70fa17b55a
ibc: spec overview (#7853) 2020-11-09 12:44:20 +01:00
Federico Kunze f294db9ccf
x/ibc: transfer specs (#7580)
* x/ibc: transfer specs

* update titles and list todos

* denom trace and client UX

* add UX recommendations and locked funds section

* metrics

* state transitions

* Apply suggestions from code review

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

* address comments from review

* jack suggestions

* add example

* fix

* address comments from call with @zakimanian

* Update x/ibc/applications/transfer/spec/01_concepts.md

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

* add comment about verification

* address comments from review

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-11-09 08:49:16 +00:00
Aditya 03a46181c6
Merge Packet Functions (#7813)
* start implementation and debugging tests

* fix some issues, continue debugging

* fix IBC tests

* remove print statement and fix docs

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-05 14:07:15 +00:00
Federico Kunze 97963c71df
ibc: remove GetClientConsensusStateLTE (#7812) 2020-11-05 14:46:00 +01:00
Aditya 432afb274b
ibc: minor fixes from audit (#7807) 2020-11-04 13:16:20 +01:00
Aditya 30efa5ab16
Host Key changes (#7783)
* change host keys on sequences

* fix prefix names

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-03 14:35:54 +00:00
Federico Kunze 72ab03b3ef
ibc: validate signer address (#7781)
* ibc: validate signer address

* comment

* validate channel handshakes and transfer signers
2020-11-03 10:07:32 +00:00
Aditya 6559e19764
Remove BatchProofs implementation (#7784)
* remove batch proofs

* Apply suggestions from code review

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-03 09:37:55 +00:00
Federico Kunze 4420fe2d52
ibc: remove root from verification funcs (#7780)
* ibc: remove root from verification funcs

* fix VerifyClientConsensusState

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-02 17:16:22 +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
Aditya 88e4acac6b
Don't claim channel capability on crossing hellos (#7763)
* don't claim capability on crossing hellos

* clarify comment
2020-11-02 14:32:32 +00:00
Jack Zampolin b2bc32f3c9
Add function to query ack proofs (#7732)
* Add function to query ack proofs

* Fix compilation issue

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-29 22:19:01 +00:00
colin axnér 1a15713289
remove proof path from IBC queries (#7725)
* remove proof path

* make proto-all with old install

* fix build
2020-10-29 12:42:12 +00:00
Amaury Martiny 82f15f306e
RegisterInterfaces registers service Msg type_urls (#7671)
* Add RegisterMsgServiceDesc

* Refactor newSendTxMsgServiceCmd

* Add test

* Register in all modules

* Remove RegisterMsgServiceDesc from baseapp

* Add explicit error message

* Add comment

* Update comment

* Add test

* Update comment

* Remove duplicate import

* Fix lint

* Forgot vesting

* Fix lint

* Fix test

* Put in types/module

* Put in types/msgservice

* Add comment about panic

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Add comment

* Add better test

* Update baseapp/msg_service_router.go

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

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-28 19:20:45 +00:00
Federico Kunze 1b0d6540d8
ibc: internal audit part 1 (#7704)
* ibc: internal audit part 1

* Update x/ibc/core/02-client/keeper/client.go

* gofmt

* fix tests

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
2020-10-28 15:57:48 +00:00
Anil Kumar Kammari 51ac6f876b
Rename RegisterGRPCRoutes (#7696)
* Rename

* Fix missing

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-28 11:39:49 +00:00
Federico Kunze 426d195387
ibc: Connection Version changed from string to proto definition (#7644)
* ibc: Version to proto Any

* change version string to struct

* various version fixes

* fix build

* reorder code

* update spec

* rename to ProtoVersionsToExported and ExportedVersionsToProto

Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-28 09:41:54 +00:00
colin axnér e306a852ff
update core IBC docs (#7560)
* update state

* add empty concept fields, update callbacks and messages

* update client creation, update and upgrade section

* add packet lifecycle concepts

* add host and proof section

* add connection handshake section

* add channel handshakes

* state transitions

* self review fixes

* Apply suggestions from code review

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

* apply @fedekunze review suggestions

* packet data section

* Apply suggestions from code review

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

* add @cwgoes and @fedekunze review suggestions

* fix typos

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-27 14:51:47 +00:00
colin axnér 3d46c672f6
Fix Optimistic Channel Handshake bugs (#7678)
* fix optimistic handshake bugs and add crossing hello test

* fix tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-27 14:34:25 +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
Jack Zampolin 9befc6ced8
Wrap ProtoCodec in interface (#7637)
* WIP encoding change

* Add test that describes issue

* WIP debugging

* remove extra code

* Update codec/proto_codec.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-10-27 13:53:54 +00:00
Aditya 48c72230f0
Create separate Write-Ack Event (#7683)
* use separate type for write ack

* change event-type

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-27 11:48:28 +00: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
colin axnér e4378e747d
IBC: panic on GetSignBytes and remove SubModuleCdc (#7645)
* panic on GetSignBytes and remove SubModuleCdc where possible

* fix build

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-10-23 17:14:12 +00:00
colin axnér c6cbe3a3db
Fix IBC Query cmds (#7648)
* fix query

* update comment
2020-10-23 16:31:32 +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
atheeshp 155a6ad7fd
Refactor x/ibc to ADR 031 (#7576)
* WIP: Refactor x/ibc to ADR 031

* updated handler

* removed unsued

* fix

* Add proto service for ibc/transfer

* lint

* remove old upgrade handler

* added doc

* review changes

* fix tests

* formatter

* Add MsgServer wiring in RegisterServices

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-19 18:21:53 +00:00
Jun Kimura ba2799ec6d
fix sequence checks in solomachine (#7586)
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-10-19 13:35:52 +00:00