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

feat: refactor ICQ module documentation [NTRN-349] #219

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b40035e
redesign the ICQ module documentation
sotnikov-s Jul 31, 2024
40cf0c3
remove target chain page
sotnikov-s Sep 2, 2024
5e05801
Merge branch 'main' of github.com:neutron-org/neutron-docs into feat/…
sotnikov-s Sep 2, 2024
7424e0f
Merge branch 'main' of github.com:neutron-org/neutron-docs into feat/…
sotnikov-s Oct 11, 2024
cf493d9
add a HowTo for chosing of connection ID for ICQ
sotnikov-s Oct 14, 2024
11e0065
fix ICQs known bugs sidebar element path
sotnikov-s Oct 14, 2024
4b29a30
add more explanations (IBC connection role, entry points, sudo calls,…
sotnikov-s Oct 14, 2024
d9bd882
add missing keywords highlighting
sotnikov-s Oct 14, 2024
b39ce02
fix misprints
sotnikov-s Oct 16, 2024
0111af7
add tx filter determination howto section, add pruning mention in pri…
sotnikov-s Oct 16, 2024
902e649
make steps in howtos headers
sotnikov-s Oct 16, 2024
5ddbce1
add explanation section for TX query submitted results verification
sotnikov-s Oct 18, 2024
de05b73
rm interchainqueries TODO file
sotnikov-s Oct 18, 2024
df5fc29
remove -typed suffix for ICQ types
sotnikov-s Oct 18, 2024
cbfeb42
add a howto section for simple ICQ registration with contract code sn…
sotnikov-s Oct 30, 2024
cbdc0fa
refine KV ICQ registration howtos
sotnikov-s Nov 4, 2024
c0b24e7
move code snippets into details in interchainqueries howto
sotnikov-s Nov 5, 2024
c7666f6
add a how to section for TX ICQ
sotnikov-s Nov 11, 2024
a9995ab
update code links and polish KV and custom KV ICQ howtos
sotnikov-s Nov 11, 2024
0dabdb7
add ToC and more Might be interesting links for ICQ docs
sotnikov-s Nov 13, 2024
b5e86bb
Merge branch 'main' of github.com:neutron-org/neutron-docs into feat/…
sotnikov-s Nov 13, 2024
51ca9e3
fox links to ICQ module
sotnikov-s Nov 13, 2024
feb7f06
update msg type names
sotnikov-s Nov 14, 2024
0ec51b7
update example of ICQ module params
sotnikov-s Nov 14, 2024
4cfc026
minor fixes to ICQ module docs
sotnikov-s Nov 14, 2024
3b32fa0
Merge branch 'main' of github.com:neutron-org/neutron-docs into feat/…
sotnikov-s Nov 14, 2024
9983744
fix links to ICQ module for v4.0
sotnikov-s Nov 14, 2024
46d7e03
update ICQ howto contract links
sotnikov-s Nov 15, 2024
50d6f64
move link to RPC node configuration to a note for better visibility
sotnikov-s Nov 18, 2024
3b2e8ed
apply ChatGPT for improving writing style and fixing grammar
sotnikov-s Nov 25, 2024
70529f9
fix wording in ICS32 team mention
sotnikov-s Nov 25, 2024
327d36a
put link to ICQ relayer explanation in ICQs explanation sections inst…
sotnikov-s Nov 25, 2024
98d7214
add alternative way of finding events for transactions filter
sotnikov-s Nov 25, 2024
bbfa169
add links to neutron ICQ relayer implementation
sotnikov-s Nov 25, 2024
ad236dc
refactor how to find tx filter for gaia v21.0.0
sotnikov-s Nov 27, 2024
a7e13b2
add explanation section that highlights reliance of KV ICQ on target …
sotnikov-s Nov 27, 2024
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
24 changes: 24 additions & 0 deletions docs/neutron/modules/interchain-queries/explanation.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Typical Flow of KV Interchain Queries Usage:
8. Steps 5-7 are repeated periodically until the query is removed.

**Might be interesting:**
- [The dependency of KV Interchain Queries on remote chain storage layout](/neutron/modules/interchain-queries/explanation#the-dependency-of-kv-interchain-queries-on-remote-chain-storage-layout)
- [How to register and handle a KV Interchain Query](/neutron/modules/interchain-queries/how-to#how-to-register-and-handle-a-kv-interchain-query)
- [How to register and handle a KV Interchain Query with custom keys](/neutron/modules/interchain-queries/how-to#how-to-register-and-handle-a-kv-interchain-query-with-custom-keys)

Expand Down Expand Up @@ -74,6 +75,29 @@ An Interchain Query relayer is an off-chain application that facilitates the fun
- [Neutron implementation of an Interchain Query relayer](/relaying/icq-relayer)
- [Limited gas for sudo calls](/neutron/modules/interchain-queries/explanation#limited-gas-for-sudo-calls)

## The dependency of KV Interchain Queries on remote chain storage layout

KV Interchain Queries rely heavily on the storage layout of the remote chain, including the paths to IAVL leaf nodes and the data models used to represent the stored information. The accuracy and functionality of KV Interchain Queries depend entirely on the correctness of the paths and the consistency of the data models. This tight coupling introduces several considerations and potential challenges for dApp developers. The [neutron-sdk interchain queries related package](https://docs.rs/neutron-sdk/0.11.0/neutron_sdk/interchain_queries/index.html#) includes target chain version separation precisely for this reasoning.

- Each KV Interchain Query requires the exact path to the desired entry in the IAVL tree of the remote chain. These paths are specific to the version and implementation of the modules on the remote chain. If a path is incorrect or becomes outdated, the query will fail.
Copy link
Collaborator

@pr0n00gler pr0n00gler Nov 29, 2024

Choose a reason for hiding this comment

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

If a path is incorrect or becomes outdated, the query will fail.

I think it would be more proper to say, that not a query itself will fail but you will either empty, broken or invalid data. Which is more dangerous than just a query failure.

Copy link
Collaborator

@pr0n00gler pr0n00gler Nov 29, 2024

Choose a reason for hiding this comment

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

Ah, you are saying that below, my bad 🤦

- The structure of the data retrieved from the IAVL tree must match the expected model in the dApp. Changes in the data model due to updates or modifications in the remote chain's code can lead to errors in decoding or interpreting the retrieved data.

Recomendations for dApp developers:

1. **Follow and communicate**:
- Regularly monitor release notes, upgrade announcements, and repository updates of the target chains.
- Participate in the target chain’s community discussions to stay informed about upcoming changes.
- Work closely with remote chain developers to understand their module design and planned upgrades.
- Advocate for better documentation and tools that simplify storage layout discovery.

2. **Secure with code**:
- Continuously run your dApp on the testnet of the target chain to catch breaking changes before they affect the mainnet.
- Set up automated integration tests that verify the correctness of KV Interchain Queries against the latest builds.
- Set up monitoring for target chain versions to detect changes proactively.
- Build fallback mechanisms to detect and handle query failures gracefully.

In the event of an upcoming breaking change, update your codebase and prepare to upgrade your dApp on the mainnet once the remote chain is updated.

## What's the role of IBC connections in Interchain Queries and how to choose one?

IBC [clients](https://ibc.cosmos.network/v8/ibc/overview/#clients) and [connections](https://ibc.cosmos.network/v8/ibc/overview/#connections) play a crucial role in ensuring the authenticity of Interchain Queries. When an IBC connection is initialized, it creates IBC clients and verifies that their states are accurate for their respective counterparties. These client states are then used to verify the results of Interchain Queries. The chosen connection ID for an Interchain Query directly impacts the trustworthiness of the entire Interchain Queries-based application.
Expand Down