-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(contracts): new challenger #223
feat(contracts): new challenger #223
Conversation
dd182a5
to
8f6bf3e
Compare
3b7f6ed
to
2a96103
Compare
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.
Stunning work. Just left some comments on the dispute logic since I've trouble understanding to what data the account proofs points to: before transactions or after transactions?
|
||
AccountData memory account = _decodeAccountRLP(accountRLP); | ||
|
||
if (account.nonce > decodedTx.nonce) { |
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'm not sure about this check:
- Suppose my account before sending the preconf has nonce
$n$ . As such, the nonce of the tx is$n$ as well. After it has been included my account will have nonce$n+1$ . Since theproof.accountMerkleProof
is performed against theblockHeader.stateRoot
after all its transaction I'm worried we might always enter thisif
condition is always satisfied - What if I send multiple preconfirmations for the same slot? According to the reasoning of the previous point, can we encounter some edge cases?
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.
Good points! A simple fix is using the previous blocks' state root to do these checks right?
e0db9f3
to
82b4744
Compare
chore(restore): stacked challenges PR
Overview
This iteration of the
BoltChallenger
implements the new Commitment Challenge game.The challenge resolution flow consists of the following steps:
blockHash
from a trusted source. For recent blocks, this can be the EVM directly. For historical blocks, this can come from a number of sources like blockhash accumulators, zk-coprocessors, or other proving systems.Tasks
RLP transaction decoder
Extra (out of scope):
Meta