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

IBC content update prior to IDA cohort 3 #1274

Merged
merged 13 commits into from
Nov 30, 2022
Merged

IBC content update prior to IDA cohort 3 #1274

merged 13 commits into from
Nov 30, 2022

Conversation

tmsdkeys
Copy link
Collaborator

Documentation content update for Cosmos Concepts: IBC

This PR runs through the existing IBC content prior to the launch of IDA C3 and updates where necessary to accommodate for:

  • changes due to upgrades of ibc-go version
  • addition of video embeds
  • stylistic changes improving the readability
  • small improvements based on feedback from academy participants or product manager

Further notes for reviewers: none as of now.

Change scope

The changes in this Pull Request include (please tick all that apply):

  • Small language/grammar fixes
  • Small content fixes
  • Addition of new content
  • Sample code/command updates
  • Platform fixes
  • Other

Copy link

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for keeping the content up to date 🙏

Changes look good to me. Left mostly nits.

In the future, I would highly recommend splitting changes into multiple pr's when possible. I know as a developer it doesn't make much sense, but as a reviewer less diffs makes reviewing changes exponentially easier. Even pulling out all the * -> -, makes reviewing easier as my mind can separate changes which don't need extra consideration from changes that do (it makes the process smoother/faster)

academy/3-ibc/4-clients.md Outdated Show resolved Hide resolved
academy/3-ibc/4-clients.md Outdated Show resolved Hide resolved
Comment on lines 145 to 147
- The proof format that all implementations must produce and verify is defined in the [ICS-23 implementation documentation](https://github.com/cosmos/ibc/blob/master/spec/core/ics-023-vector-commitments/README.md).
<!-- Is this still up-to-date after dragonberry? -->

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these taken from ibc-go docs? The proof format comment can be removed (it isn't useful/correct information). I think the ics23 spec itself isn't the easy to obtain information from

Light clients may decide on their own proof format (solo machine for example uses signatures)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked and this was indeed taken from ibc-go docs. Will create an issue in the ibc-go repo for it

academy/3-ibc/2-connections.md Outdated Show resolved Hide resolved
academy/3-ibc/2-connections.md Outdated Show resolved Hide resolved
academy/3-ibc/2-connections.md Outdated Show resolved Hide resolved

### Acknowledging or timing out packets

The reader is invited to try to find and analyze the code corresponding to this (remember that the place to start is the packet callbacks, usually defined in a file like `module_ibc.go` or `ibc_module.go`).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, are people using module_ibc.go? ibc_module.go should be recommend for consistency

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignite CLI uses module_ibc.go

Copy link

@chatton chatton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great so far thanks for all the effort you've put in to keep things up to date! I left a few comments / suggestions

academy/3-ibc/3-channels.md Outdated Show resolved Hide resolved
academy/3-ibc/4-clients.md Outdated Show resolved Hide resolved
academy/3-ibc/5-token-transfer.md Outdated Show resolved Hide resolved
@CitMC CitMC added this to the New content - Q4 milestone Nov 28, 2022
Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @tmsdkeys.

I couldn't comment on the corresponding lines, but I noticed that you could change UpdateClient for MsgUpdateClient.

I am also not sure the word initiation is the best one to use in sentences like The initiation of this handshake.... Would success maybe be better?

academy/3-ibc/2-connections.md Outdated Show resolved Hide resolved
academy/3-ibc/2-connections.md Outdated Show resolved Hide resolved
academy/3-ibc/2-connections.md Outdated Show resolved Hide resolved
@@ -175,7 +173,13 @@ The next validator set is used for verifying subsequent submitted headers or upd

The root is the **AppHash**, or the hash of the application state of the counterparty blockchain that this client is representing. This root hash is particularly important because it is the root hash used on a receiving chain when verifying [Merkle](https://en.wikipedia.org/wiki/Merkle_tree) proofs associated with a packet coming over IBC, to determine whether or not the relevant transaction has been actually been executed on the sending chain. If the Merkle proof associated with a packet commitment delivered by a relayer successfully hashes up to this `ConsensusState` root hash, it is certain that the transaction was actually executed on the sending chain and included in the state of the sending blockchain.

The following is an example of how the Tendermint client handles this Merkle [proof verification](https://github.com/cosmos/ibc-go/blob/main/modules/core/23-commitment/types/merkle.go). The [ICS-23 spec](https://github.com/cosmos/ibc/tree/master/spec/core/ics-023-vector-commitments) addresses how to construct membership proofs, and the [ICS-23 implementation](https://github.com/confio/ics23) currently supports Tendermint IAVL and simple Merkle proofs out of the box. Note that non-Tendermint client types may choose to handle proof verification differently:
The following is an example of how the Tendermint client handles this Merkle [proof verification](https://github.com/cosmos/ibc-go/blob/main/modules/core/23-commitment/types/merkle.go). The [ICS-23 spec](https://github.com/cosmos/ibc/tree/master/spec/core/ics-023-vector-commitments) addresses how to construct membership proofs, and the [ICS-23 implementation](https://github.com/confio/ics23) currently supports Tendermint IAVL and simple Merkle proofs out of the box.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think IAVL is independent from Tendermint (see here) and simple Merkle proofs is the one that is Tendermint specific, I think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this, but when you check out the ICS-23 implementation lists:

  • tendermint/iavl
  • tendermint - SimpleMerkleProofs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see... But if you click on the link for tendermint/iavl then it goes to cosmos/iavl. Maybe the readme hasn't been updated for a long time and the IAVL repo was originally in the tendermint GitHub organization?

academy/3-ibc/3-channels.md Outdated Show resolved Hide resolved
academy/3-ibc/5-token-transfer.md Outdated Show resolved Hide resolved
hands-on-exercise/4-ibc-adv/6-ibc-app-steps.md Outdated Show resolved Hide resolved
academy/3-ibc/5-token-transfer.md Show resolved Hide resolved
@tmsdkeys
Copy link
Collaborator Author

Thanks for the reviews @colin-axner @chatton @crodriguezvega !

Implemented most of your nits/suggestions.

I am also not sure the word initiation is the best one to use in sentences like The initiation of this handshake.... Would success maybe be better?

Success would imply that the handshake runs through all steps right? Whereas the initiation is simply the trigger, the success or failure depending on the situation, no? @crodriguezvega

@crodriguezvega
Copy link
Contributor

Success would imply that the handshake runs through all steps right? Whereas the initiation is simply the trigger, the success or failure depending on the situation, no? @crodriguezvega

Ah, I see what you mean then. Ok, then let's not change it. 👍

Copy link
Contributor

@AndrewB9lab AndrewB9lab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Language review complete, ready for QA review from @CitMC.

Minor edits
@coldice coldice marked this pull request as ready for review November 30, 2022 11:50
@coldice coldice merged commit f028b40 into master Nov 30, 2022
@coldice coldice deleted the td-c3-ibc-update branch November 30, 2022 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants