* 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>
* rename provedID
rename provedID to counterpartyChosenID for connection and channel. Update if statement in handshake and tests. Ref: https://github.com/cosmos/cosmos-sdk/pull/7439#discussion_r498858944
* update docs
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
* 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 fee payer to protobuf definition
* Compile new tx type
* Use FeePayer from Tx, add it to required signers
* Add unit tests on proper handling of FeePayer field
* Use string address for fee payer field
* Update logic for string feePayer
* 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>
* remove UNINITALIZED connection state
* remove uninit channel state
* add back uninitalized def in proto file
* fix typo
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* remove height from tm consensus state
* various updates to removing dep on GetHeight
* inital addition of wrapper around consensus state with height
* fix tests
* remove GetHeight interface func
* wip test
* add test
* apply @AdityaSripal comments
* apply @fedekunze suggestions
Co-authored-by: Aditya <adityasripal@gmail.com>
* gen ack proto type
* remove transfer ack
* change ics20 ack to use standard type
* update commented tests
* small typo fix
* revert back to module cdc
* update docs
* fix lint
* nit
* update ack event emission
* Update x/ibc-transfer/spec/01_concepts.md
* add comment for onacknowledgement
* Update proto/ibc/channel/channel.proto
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
* Add proto format option
* Add clang format options
* Fix proto format
* Fix fmt
* Fix SpacesInSquareBrackets to match with SpacesInSquareBrackets setting
* Add state sync support
* fix incorrect test tempdir
* proto: move and update Protobuf schemas
* proto: lint fixes
* comment tweaks
* don't use type aliasing
* don't call .Error() when logging errors
* use create terminology instead of take for snapshots
* reuse chunk hasher
* simplify key encoding code
* track chunk index in Manager
* add restoreDone message for Manager
* add a ready channel to Snapshotter.Restore()
* add comment on streaming IO API
* use sdkerrors for error handling
* fix incorrect error
* tweak changelog
* syntax fix
* update test code after merge
* migrate CommunityPoolSpendProposalJSON to proto
* migrate NewWithdrawAllRewardsCmd to proto
* fix ineffectual issue
* refactor
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>