* 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>
* update channel handshake
Add ProvedID to ChanOpenTry which allows for flexible handshake identifier selection. Add CounterpartyChannelID to OpenAck. Update and add to handshake tests. Modify msgs_test. Counterparty ValidateBasic will return nil on an empty channel identifier to allow for flexible handshake identifier selection to succeed.
* Update x/ibc/core/04-channel/keeper/handshake.go
* add conn open init docs
* update docs for conn open try and conn open ack
* update channel docs
* update connopeninit
Update ConnOpenInit to reflect changes in https://github.com/cosmos/ics/pull/482. An additional version field is added to the connection handshake and connection open init message to take in an optional field. If this field is empty, then the default versions are used for connection handshake version negotiation.
* add version compatibility check in open init
* implement partial changes to conn open try
* partial implementation of conn open ack changes
* fix tests
* add handshake tests
* make proto
* fix conflicts
* fix lint
* fix lint
* increase code cov
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
* update solo machine proto types to use enum for uniqueness
* move data type to SignatureAndData
Adjusts SignatureAndData proto definition to take in a DataType. Updates misbehaviour basic validation to do checks on the data type. Adds unmarshaling tests.
* split signature bytes creation to allow for function reusing. Stuck on strange error on testing codec.go
* fix test bug
* update UnmarshalByType and refactor misbehaviour handle
Rename CanUnmarshalDataByType -> UnmarshalDataByType. Return a new interface and error. Refactor tests to work. Refactor misbehaviour_handle.go to check unmarshaling of the data and DRY code by separating signature and data checks into its own function. Update godoc.
* add tests to codec_test.go
* self review + lint
* update spec
* fix lint
* Update x/ibc/light-clients/solomachine/spec/01_concepts.md
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* increase code cov, update spec
apply most of @fedekunze comments.
* format spec
* make proto
* fix merge conflicts
* make proto
* fix conflicts
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
* add multisig support to testing pkg
Adds single and multisig public key support to the testing package. Fix build associated with changes.
* update clientstate tests to use singlesig and multsig
* add singlesig and multisig tests for consensus state, header, and misbehaviour
* add singlesig and multisig for solomachine handlers
* add spec
* fix lgtm
* fixes from self review
* fix lint?
* fix build
* increase code cov
* Update x/ibc/light-clients/solomachine/types/client_state.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* apply @fedekunze review suggestions
Add comment to VerifyMultisignature explaining why it uses the nested function. Switch panic to require. Add comment for secp256k1 key usage. Ref: https://github.com/cosmos/cosmos-sdk/pull/7383#pullrequestreview-496591518
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>
* Update tendermint version
* update testing pkg to use latest versioned block protocol for tendermint headers
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>
Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
* remove client type struct
Remove the client type struct, remove ClientType interface function from Header and Misbehaviour.
ClientState and ConsensusState return the ClientType as a string.
All uses of client type in testing are now pointing at the testing package so changing the location of the client type const will be painless.
* update godoc and add back client type interface func
Add godoc to client type constant for solo machine, tendermint, and localhost as per @fedekunze review suggestion.
Add back the ClientType interface function for misbehaviour and header for solo machine and tendermint and add back the one liner unit tests as per @AdityaSripal suggestion.
* remove client state from return
remove client state from the return of CreateClient, UpdateClient, and CheckMisbehaviourAndUpdateState as well as update tests to reflect this change.
* fix build error introduced by latest merge
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Add allow_governance_override_after_expiry flag to tendermint NewCreateClientCmd
* 1) Add LatestTimestamp to ClientState struct by adding a new attribute latest_timestamp to the message ClientState in proto/ibc/tendermint/tendermint.proto
2) Autogenerate x/ibc/07-tendermint/types/tendermint.pb.go by running 'make proto-gen'. Strangely, as a side effect x/distribution/types/genesis.pb.go, x/evidence/types/genesis.pb.go were also modified by the command 'make proto-gen'
3) Add Expired() function
* Fix tests
* 1) Add allow_governance_override_after_expiry flag to tendemint clientStatus
2) Add allow_governance_override_after_misbehaviour flag to tendermint ClientStatus
* Cosmetic changes
* Fix tests
* Add Unfreeze function
* Add new ClientUpdateProposal type
* Add minor fixes
* Add NewClientUpdateProposalHandler unit tests
* Fix proto-lint-docker
* Delete x/ibc/07-tendermint/tendermint_test.go
* Follow convention to put signer last in msg function signature
* 1) Add GetLatestTimestamp function to ClientStatus interface
2) Change Expired() signature to Expired(now time.Time)
* 1) Add override flag to UpdateClient function
2) Fix tests
* Refactor HandleClientUpdateProposal
* 1) Extend exported Header interface with MarshalBinaryBare and UnmarshalBinaryBare methods
2) Move ClientUpdateProposal message to from ibc.proto to client.proto
3) Refactoring code
4) Add override flag to UpdateClient method
5) Fix tests
* 1) Uncomment tests and clean up code
2) Add basic validation of the header (ValidateBasic) when the override flag is true
* Cosmetic changes
* Add TODO comments
* Fix header MarshalBinaryBare, UnmarshalBinaryBare by using protobuf encoding/decoding
* Fix proto comments
* Fix override logic
* undo gettimestamp for solo machine and localhost
* add update after proposal func, some major refactoring in progress, various issues addressed
* fix tendermint proposal update handling
* run make proto-gen
* remove timestamp from tendemint client
* fix build issue for tm types
* apply various review comments
* add tests for 02-client functionality
* self review fixes
* typo
* update tests slightly
* update tendermint proposal handling tests
* Update x/ibc/02-client/keeper/proposal.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Update x/ibc/07-tendermint/types/proposal_handle.go
Co-authored-by: Aditya <adityasripal@gmail.com>
* Update x/ibc/07-tendermint/types/proposal_handle.go
Co-authored-by: Aditya <adityasripal@gmail.com>
* apply most of @fedekunze and some of @AdityaSripal suggestions
* convert test to bools
* update docs and increase code cov
* fix build
* fix typo, remove omitempty
* add switch
* apply @fedekunze latest suggestions
* fix lint
* Update x/ibc/02-client/keeper/proposal_test.go
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* pause work until client refactor resolved
* continued scaffolding
* add msgs and evidence
* add update and misbehaviour functionality
* implement cli
* various types compile issues
* add sig proof and various bug fixes
* added rest routes
* verification funcs now update sequence number
* add sm suite and header test
* msgcreateclient and msgupdateclient tests
* add basic evidence test
* evidence validate basic test
* consensus state tests
* rm accidental file
* add verify con state and channel state, pause work for counterparty commitment type
* client state tests added
* update clienttype numbers
* update test added
* add misbehaviour tests
* update alias
* update cli tx
* update import alias
* cleanup code
* remove todo, tested by evidence tests
* add info to err msg
* wrapf
* Update x/ibc/06-solomachine/client/cli/tx.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Update x/ibc/06-solomachine/client/cli/tx.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Update x/ibc/06-solomachine/client/cli/tx.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Update x/ibc/06-solomachine/client/cli/tx.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Update x/ibc/06-solomachine/update.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Update x/ibc/23-commitment/types/signature.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Update x/ibc/06-solomachine/types/header.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* apply most of the review suggestions from @fedekunze
* remove alias.go
* update cli context with master changes
* merge selective downstream changes from colin/solomachine
* fix build issues
* remove signature proof
* try to migrate to proto
* rm go structs for consensus state and header
* address @fedekunze review and continue proto migration
* fix proto issues
* fix compile bugs in types, proto panics on getpubkey currently
* add timestamp
* update pubkey to be type sdkcrypto.PublicKey
* update timestamp handling
* begin removing amino, migrate to proto
* fix various build issues
* fix most test in types
* change sanitize to produce, fix bug, types test passing
* begin updating cli
* move solomachine into light-clients/
* fix merge issue
* update proto and fix cli
* more fixes and update proto again
* update pubkey to be any
* fix string func issue
* update tests to use testing pkg
* update from tm crypto keys ref to sdk
* fix tests 🎉
* increase codecov
* address TODOs
* address most of @fedekunze comments
* add test case for misbehaviour frozen client
* fix lint
* fix proto lint?
* rename Signature to TimestampedSignature
* remove chainID
* rename FrozenHeight to FrozenSequence
* apply verify consensus state changes requested by @AdityaSripal
* remove dup check
* fix typo in proto file comment
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
* x/ibc-transfer: use ibc testing package
* coin denom failure
* update handler tests
* refactor first test in relay
* update onrecvtest, failing tests expected due to existing bug
* update on acknowledgement test, failing test is expected
* refactor timeout test
* revert coin validation changed, comment out tests
* minor fix
* update coordinator.go
* update coordinator.go
* add comment to fix handler test
* add link to issue in handler test
* fix test
Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>