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

Settling after finalization through ForceUpdate #333

Open
leandro-ro opened this issue Mar 23, 2022 · 2 comments
Open

Settling after finalization through ForceUpdate #333

leandro-ro opened this issue Mar 23, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@leandro-ro
Copy link

Location

client/adjudicate.go

Problem

When a client is enforcing an update via ForceUpdate (e.g., finalizing the channel) and tries to settle directly after, there is no guarantee that the progressed on-chain state persisted in time and is taken over to the client's off-chain state. There is no way to wait for on-chain progression. Hence, there is a short mismatch between these states, leading to problems when trying to settle because the off-chain state may not be finalized yet. This could also be a problem for other (asynchronous) channel participants.

Proposal

Let ForceUpdate return an object that the user can wait for if desired.

@matthiasgeihs matthiasgeihs added this to the Ethereum Mainnet milestone Mar 24, 2022
@matthiasgeihs matthiasgeihs added the bug Something isn't working label Mar 24, 2022
@matthiasgeihs
Copy link
Contributor

When ForceUpdate returns, the channel machine may still be in phase Progressing. Only the on-chain event will progress the machine into phase progressed, but ForceUpdate doesn't wait for that.

@matthiasgeihs
Copy link
Contributor

The way we currently receive on-chain events is via the adjudicator subscription. There you can also listen for on-chain progression events. Does that solve the issue? @leandro-ro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants