-
Notifications
You must be signed in to change notification settings - Fork 5
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
20241007 potato go on chain #44
base: main
Are you sure you want to change the base?
Conversation
…h the game on chain (todo at potato_handler line 1812
…the channel coin, leaving the rewards if any and the game coins
src/channel_handler/types.rs
Outdated
} | ||
|
||
impl LiveGame { | ||
/// Back up the live game state to the state we know so that we can generate the puzzle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use the word "Copy" instead of "back up". "Back up is a little ambiguous - before I read further, I thought you meant "go to a previous state", but now I see you mean "grab a copy".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it's literally about, if necessary, returning to an earlier state. I would say 'backup' if what i meant was storing the state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe 'regress' is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also note this part of the code is badly in flux. i have no idea if this particular thing will survive. i'm experimenting with ideas around being able to figure out what i'm looking at as much as actually writing code that does the thing, although hopefully I'll be able to solidify that idea relatively soon.
…m of being commanded to go on chain
…r it's baked in for unroll transaction
…nt the unrolling party from just spending it right away, rather than giving the other one an opportunity to bump it.
…ion so it's clear that it doesn't spend the unroll coin but instead creates it
…erstanding of things after reviewing things with adam. I had remembered the update part but not the timelock of the unroll coin, which must be allowed to expire before the party who decides to go on chain spends it (and must be routed into UnrollCoin). That's what gives the other party time to do their upgrade if desired. New potato handler states are needed to support this timing and have been added. The new workflow supports this.
… of implementation. We're offending ourselves after sending a go on chain message. I _think_ the condition is ok, so will test that tomorrow.
…r_container for simulation tests
… perspective). Advance is a todo, but I know more. Adam helped quite a bit with sorting through this. Next the two unroll paths join and we must regress games in channel handler if needed to the states targeted by the unroll, whatever it was. If we were the receiving party of the unroll and wanted different states, we should have done an immediate spend to target different ones using the bump interface.
…_on_chain_transition to get everything working, which will include making maps of coin string to game id and telling channel handler to regress the appropriate states, which I have some of the infra for
Finishing all aspects of going on chain.