cosmos / ibc

Interchain Standards (ICS) for the Cosmos network & interchain ecosystem.
Other
923 stars 382 forks source link

Directed acyclic graph of causal dependencies (partial packet ordering) #550

Open cwgoes opened 5 years ago

cwgoes commented 5 years ago

Split off from https://github.com/cosmos/ics/issues/126.

Desiderata

Implementation

Questions

cwgoes commented 5 years ago

Do we care about the "multi-chain execute or rollback" case or is that out of scope?

Chain A executes state transition 1, chain B executes state transition 2, either:

Right now this would need to be done at the application layer, since A and B would have independent channels to C.

With acyclic ordering, this would be possible if a packet receive on C were dependent on a send on A and a send on B, and the timeout of that packet could rollback both A & B - I think it breaks the channel abstraction though, so perhaps not worth it for now.

Alternatively we could implement atomic co-dependencies:

What about that? Not too complex, and I think it does the trick...

cwgoes commented 5 years ago

Note that validity predicates can be used across connections so new connections are not needed.

cwgoes commented 5 years ago

Decided not to put this in IBC v1.

Partial cross-chain ordering is a very interesting research topic and should be planned for IBC v2!

ethanfrey commented 4 years ago

Very cool idea here. And I definitely agree to keep this as a 2.0 feature.

Let's get the basic ordered/unordered channels implemented, and deployed and then have some real use cases where this will be a useful optimizations.

I :heart: DAG, vector clocks, and CRDTs... it would be awesome to enable some advance distributed system techniques on top of IBC.

colin-axner commented 3 years ago

Interchain Accounts would benefit greatly from this (it would order based on account sequences). See discussion

I think this would be a great feature to add to TAO v1.1.0