statechannels / statechannels

Development monorepo for the State Channels project.
https://statechannels.org
MIT License
132 stars 19 forks source link

Testing infrastructure to ensure data-availability #3752

Open NiloCK opened 3 years ago

NiloCK commented 3 years ago

Why: Problem description :confused:

From #3739:

Previous claim workflow (circa May 19, asset-holder era)

(4f0def9fe640dceeb778dc66bb03a9d491077dbc, chosen randomly)

This is a slight abuse of notation! The guarantor channel's allocation (ie, the guarantee) was not actually changed along the way - only its holdings. In any case, the emitted event provides a listening wallet with:

... which is enough for the wallet to calculate the updated outcome at the target channel using the same logic as in _claim.

:exclamation: :question: If Alice is calling claim via the Alice-Ingrid guarantor channel, how is Bob notified? Catching this emitted event requires that Bob can recognize the channelId of the A-I guarantor channel, but he cannot compute this id independently. Is there a prefund step that involves exchange of guarantor channel ids?

What: Describe the solution you'd like :sparkles:

This particular issue is out-of-date, as the current claim implementation emits from both the source and target channels. Broader question is about what sort of automated setup could / should exist to ensure that less-than-fully-cooperative parties all have the information they need to progress their channels & execute funds recovery on chain.

Generally, our current tests orchestrate actions performed by different participants / wallets. A more realistic approach is for wallets to interact from some form of information silo, so we can be assured that individual wallets have (or can get) all the information they need!

andrewgordstewart commented 3 years ago

❗ ❓ If Alice is calling claim via the Alice-Ingrid guarantor channel, how is Bob notified? Catching this emitted event requires that Bob can recognize the channelId of the A-I guarantor channel, but he cannot compute this id independently. Is there a prefund step that involves exchange of guarantor channel ids?

There is not. (You could exchange the guarantor channel ids in the protocol, but how does Bob know that Alice & Ingrid are telling the truth?)