* 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>
* 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>