Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: solomachine generic verification methods and signbytes simplification #1687

Merged
merged 16 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (transfer) [\#1250](https://github.com/cosmos/ibc-go/pull/1250) Deprecate `GetTransferAccount` since the `transfer` module account is never used.
* (06-solomachine) [\#1679](https://github.com/cosmos/ibc-go/pull/1679) Remove `types` sub-package from `06-solomachine` lightclient directory.
* (07-tendermint) [\#1677](https://github.com/cosmos/ibc-go/pull/1677) Remove `types` sub-package from `07-tendermint` lightclient directory.
* (06-solomachine) [\#1687](https://github.com/cosmos/ibc-go/pull/1687) Bump `06-solomachine` protobuf version from `v2` to `v3`.
* (06-solomachine) [\#1687](https://github.com/cosmos/ibc-go/pull/1687) Removed `DataType` enum and associated message types from `06-solomachine`. `DataType` has been removed from `SignBytes` and `SignatureAndData` in favour of `path`.

### State Machine Breaking

Expand Down Expand Up @@ -79,6 +81,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Bug Fixes

* (light-clients/solomachine) [#1839](https://github.com/cosmos/ibc-go/issues/1839) Fixed usage of the new diversifier in validation of changing diversifiers for the solo machine. The current diversifier must sign over the new diversifier.
* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output
* (apps/29-fee) [\#1278](https://github.com/cosmos/ibc-go/pull/1278) The URI path for the query to get all incentivized packets for a specifc channel did not follow the same format as the rest of queries.
* (07-tendermint) [\#1674](https://github.com/cosmos/ibc-go/pull/1674) Submitted ClientState is zeroed out before checking the proof in order to prevent the proposal from containing information governance is not actually voting on.
Expand Down
175 changes: 174 additions & 1 deletion docs/ibc/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,16 @@

- [DataType](#ibc.lightclients.solomachine.v2.DataType)

- [ibc/lightclients/solomachine/v3/solomachine.proto](#ibc/lightclients/solomachine/v3/solomachine.proto)
- [ClientState](#ibc.lightclients.solomachine.v3.ClientState)
- [ConsensusState](#ibc.lightclients.solomachine.v3.ConsensusState)
- [Header](#ibc.lightclients.solomachine.v3.Header)
- [HeaderData](#ibc.lightclients.solomachine.v3.HeaderData)
- [Misbehaviour](#ibc.lightclients.solomachine.v3.Misbehaviour)
- [SignBytes](#ibc.lightclients.solomachine.v3.SignBytes)
- [SignatureAndData](#ibc.lightclients.solomachine.v3.SignatureAndData)
- [TimestampedSignatureData](#ibc.lightclients.solomachine.v3.TimestampedSignatureData)

- [ibc/lightclients/tendermint/v1/tendermint.proto](#ibc/lightclients/tendermint/v1/tendermint.proto)
- [ClientState](#ibc.lightclients.tendermint.v1.ClientState)
- [ConsensusState](#ibc.lightclients.tendermint.v1.ConsensusState)
Expand Down Expand Up @@ -4641,7 +4651,7 @@ of a sequence and two signatures over different messages at that sequence.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `client_id` | [string](#string) | | **Deprecated.** ClientID is deprecated |
| `client_id` | [string](#string) | | |
| `sequence` | [uint64](#uint64) | | |
| `signature_one` | [SignatureAndData](#ibc.lightclients.solomachine.v2.SignatureAndData) | | |
| `signature_two` | [SignatureAndData](#ibc.lightclients.solomachine.v2.SignatureAndData) | | |
Expand Down Expand Up @@ -4803,6 +4813,169 @@ to preserve uniqueness of different data sign byte encodings.



<a name="ibc/lightclients/solomachine/v3/solomachine.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## ibc/lightclients/solomachine/v3/solomachine.proto



<a name="ibc.lightclients.solomachine.v3.ClientState"></a>

### ClientState
ClientState defines a solo machine client that tracks the current consensus
state and if the client is frozen.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sequence` | [uint64](#uint64) | | latest sequence of the client state |
| `is_frozen` | [bool](#bool) | | frozen sequence of the solo machine |
| `consensus_state` | [ConsensusState](#ibc.lightclients.solomachine.v3.ConsensusState) | | |
| `allow_update_after_proposal` | [bool](#bool) | | when set to true, will allow governance to update a solo machine client. The client will be unfrozen if it is frozen. |






<a name="ibc.lightclients.solomachine.v3.ConsensusState"></a>

### ConsensusState
ConsensusState defines a solo machine consensus state. The sequence of a
consensus state is contained in the "height" key used in storing the
consensus state.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `public_key` | [google.protobuf.Any](#google.protobuf.Any) | | public key of the solo machine |
| `diversifier` | [string](#string) | | diversifier allows the same public key to be re-used across different solo machine clients (potentially on different chains) without being considered misbehaviour. |
| `timestamp` | [uint64](#uint64) | | |






<a name="ibc.lightclients.solomachine.v3.Header"></a>

### Header
Header defines a solo machine consensus header


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sequence` | [uint64](#uint64) | | sequence to update solo machine public key at |
| `timestamp` | [uint64](#uint64) | | |
| `signature` | [bytes](#bytes) | | |
| `new_public_key` | [google.protobuf.Any](#google.protobuf.Any) | | |
| `new_diversifier` | [string](#string) | | |






<a name="ibc.lightclients.solomachine.v3.HeaderData"></a>

### HeaderData
HeaderData returns the SignBytes data for update verification.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `new_pub_key` | [google.protobuf.Any](#google.protobuf.Any) | | header public key |
| `new_diversifier` | [string](#string) | | header diversifier |






<a name="ibc.lightclients.solomachine.v3.Misbehaviour"></a>

### Misbehaviour
Misbehaviour defines misbehaviour for a solo machine which consists
of a sequence and two signatures over different messages at that sequence.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `client_id` | [string](#string) | | **Deprecated.** ClientID is deprecated |
| `sequence` | [uint64](#uint64) | | |
| `signature_one` | [SignatureAndData](#ibc.lightclients.solomachine.v3.SignatureAndData) | | |
| `signature_two` | [SignatureAndData](#ibc.lightclients.solomachine.v3.SignatureAndData) | | |






<a name="ibc.lightclients.solomachine.v3.SignBytes"></a>

### SignBytes
SignBytes defines the signed bytes used for signature verification.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sequence` | [uint64](#uint64) | | the sequence number |
| `timestamp` | [uint64](#uint64) | | the proof timestamp |
| `diversifier` | [string](#string) | | the public key diversifier |
| `path` | [bytes](#bytes) | | the standardised path bytes |
| `data` | [bytes](#bytes) | | the marshaled data bytes |






<a name="ibc.lightclients.solomachine.v3.SignatureAndData"></a>

### SignatureAndData
SignatureAndData contains a signature and the data signed over to create that
signature.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `signature` | [bytes](#bytes) | | |
| `path` | [bytes](#bytes) | | |
| `data` | [bytes](#bytes) | | |
| `timestamp` | [uint64](#uint64) | | |






<a name="ibc.lightclients.solomachine.v3.TimestampedSignatureData"></a>

### TimestampedSignatureData
TimestampedSignatureData contains the signature data and the timestamp of the
signature.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `signature_data` | [bytes](#bytes) | | |
| `timestamp` | [uint64](#uint64) | | |





<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->

<!-- end services -->



<a name="ibc/lightclients/tendermint/v1/tendermint.proto"></a>
<p align="right"><a href="#top">Top</a></p>

Expand Down
Loading