ADR-40 Effect on IBC #256
Replies: 4 comments 6 replies
-
Explanation of the work involved on IBC side to support Proposed ChangesSo to support the second change, there will need to be a non-trivial amount of work on the IBC team. Implementation work for the first upgrade to remove prefix:
Interim Technical Debt:
Removing Technical Debt once all counterparties upgrade to better
The work required on this I believe will take 1 month of time on each end, and in the interim (~1-2 yrs) there is some hacky technical debt on legacy chains. However, I appreciate that this is a tradeoff between having hacky technical debt on SDK for 1-2 yrs, so this discussion is here to help us decide on a path forward that is best for both developer teams and the community at large. I've laid out the backwards-compatible solution from IBC and the work/technical debt involved to achieve it; hopefully that helps steer the discussion to the best outcome. cc: @robert-zaremba @zmanian @colin-axner @cwgoes @marbar3778 |
Beta Was this translation helpful? Give feedback.
-
Was the |
Beta Was this translation helpful? Give feedback.
-
Second solution for the Multistore removal for IBC.We were discussing the second solution for Multistore removal:
|
Beta Was this translation helpful? Give feedback.
-
So we need an additional level of coordination for the chain upgrade? |
Beta Was this translation helpful? Give feedback.
-
Explanation of the Proposed Changes and the Proposed Fix
The SDK team is looking to make some major changes to the way stores work in IBC. There are separate but related proposed changes.
The first is to replace IAVL stores with SMT stores.
The second is to remove the Multistore altogether with each seperate store becoming a prefixed subspace of a single root store.
Here are the discussions on the SDK:
cosmos/cosmos-sdk#9331
cosmos/cosmos-sdk#8297
cosmos/cosmos-sdk#9331 (reply in thread)
cosmos/cosmos-sdk#8297 (reply in thread)
The first change should be supported natively in IBC without any changes to the protocol. This is because we simply need to change the
ProofSpecs
on the counterparty clients fromIAVLSpec
toSMTSpec
.The upgrade process would be as follows:
UpgradedClientState
that includes the changedProofSpec
with an upgrade height (time-based upgrades disallowed)UpgradedClientState
along with a proof from the old chain state (thus, there must be at least 1 node that does not immediately perform upgrade but instead just halts at upgrade height)UpgradeClientMsg
to all counterparty chains, which then can upgrade their clients upon receiving the new client state with associated proof.Note: This only requires a proposal on the upgrading chain, all counterparties can upgrade their client after upgrade height with a relayer msg.
The second proposed fix is not currently supported in IBC. The reasons why are explained here.
A fix on ibc-go that requires all counterparties to upgrade will be very costly from a time and coordination point-of-view. The current estimate is that this could be upwards of a year time for all important chains to upgrade: cosmos/cosmos-sdk#8297 (reply in thread)
There does exist a fix that does not require all counterparties to upgrade. It would work like so:
UpgradedClientState
that includes the changedProofSpec
to [NoOpSpec
,SMTSpec
]. The migration for the upgrade also moves the ibc store to the root level, effectively removing theibc/
prefix from all ibc keys.Same steps as above
All counterparty chains once their clients have upgraded are now verifying proofs of ibc state without the
ibc/
prefix. Similarly, the upgraded chain is now storing all ibc state without theibc/
prefix. Since both the prover and verifier are back to agreement on the key structure, all the proof verification will pass.In the future, once all counterparties have upgraded to a version that supports better prefixing logic. The upgrading chain can do a second upgrade to add back the ibc prefix.
UpgradeProposal
with new ProofSpecsSMTSpec
. The migration moves all ibc state from root level back to the ibc prefix.Now the counterparties chains will apply the
ibc/
prefix as a prepend to the original key rather than as a separate key in a chained proof. The prover and verifier are in agreement on key structure, and the proofs pass.Beta Was this translation helpful? Give feedback.
All reactions