-
Notifications
You must be signed in to change notification settings - Fork 6
Use CeloRollupConfig and commits from demo #8
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
Conversation
cda8eb6 to
b079e19
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.
Bug: Incorrect Skip Condition in Proposer Logic
The proposer resolution logic incorrectly changed its skip condition from claim_data.status != ProposalStatus::Unchallenged to claim_data.status == ProposalStatus::Challenged. The original condition skipped resolution for any non-unchallenged game (e.g., Challenged or Resolved), but the new condition only skips for Challenged games. This causes the proposer to attempt resolving games that are already Resolved, potentially wasting gas or causing transaction failures.
fault-proof/src/lib.rs#L623-L631
op-succinct/fault-proof/src/lib.rs
Lines 623 to 631 in 035eed5
| Mode::Proposer => { | |
| if claim_data.status == ProposalStatus::Challenged { | |
| tracing::info!( | |
| "Game {:?} at index {:?} is challenged, not attempting resolution", | |
| game_address, | |
| index | |
| ); | |
| return Ok(Action::Skipped); | |
| } |
Bug: Docker Build Fails on Missing Directory
The COPY resources/ ./resources/ instruction will cause Docker build failures if the resources/ directory is missing from the build context.
fault-proof/Dockerfile.proposer#L40-L41
op-succinct/fault-proof/Dockerfile.proposer
Lines 40 to 41 in 035eed5
| WORKDIR /app | |
| COPY resources/ ./resources/ |
fault-proof/Dockerfile.challenger#L40-L41
op-succinct/fault-proof/Dockerfile.challenger
Lines 40 to 41 in 035eed5
| WORKDIR /app | |
| COPY resources/ ./resources/ |
Was this report helpful? Give feedback by reacting with 👍 or 👎
karlb
left a comment
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 lacking the context from when the demo was prepared, so I left some notes on what I couldn't meaningfully review without more context. I'm willing to approve if those sections don't need a review (they might have been sufficiently discussed before the demo).
| rustls::crypto::ring::default_provider().install_default().unwrap(); | ||
|
|
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 don't know why we need this.
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.
The context is here, I faced an issue related to a crypto library, and this was the solution to resolve it.
fault-proof/src/proposer.rs
Outdated
| .strategy(FulfillmentStrategy::Hosted) | ||
| .skip_simulation(true) | ||
| .cycle_limit(1_000_000_000_000) | ||
| .cycle_limit(1_000_000_000) |
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 can't judge the implications of this.
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.
This is a similar concept with gas limit. Our Succinct account must have cycle_limit * credit_per_cycle amount of credit, and when the cycle limit is 1_000_000_000, the required credit is approximately 10.03 credit. We decided to set the cycle limit with an environment variable, and the default value as 3_000_000_000 which requires 30.03 credit exists on our account. You can see here the cycle limit and proof cost.
| if claim_data.status != ProposalStatus::Unchallenged { | ||
| if claim_data.status == ProposalStatus::Challenged { | ||
| tracing::info!( | ||
| "Game {:?} at index {:?} is not unchallenged, not attempting resolution", | ||
| "Game {:?} at index {:?} is challenged, not attempting resolution", |
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.
Should we really do something for ChallengedAndValidProofProvided?
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.
Yes, we need to resolve the game when it is challenged and valid proof provided which means the proposer's win. I don't know the exact reason why they didn't force the proposer to resolve the ChallengedAndValidProofProvided games, but maybe it is intended for the prover who actually provided the proof and not necessarily the proposer itself to resolve the game. But we don't have a separate prover instance apart from the proposer, so we had to change it like this.
Replaced
RollupConfigwithCeloRollupConfigto correctly deserializecel2_timefield in our rollup config. This PR also includes some commits from the demo work (fromseolaoh/demo-with-hokulea), either for improvements or to make the demo functional.But, we currently have several dependencies on upstream op-succinct, so it's a bit complicated to merge all the demo-related commits at this point. The base branch
developdepends on konav1.0.2, and we've already bumped celo-kona to the latest version, which also relies on konav1.0.2. But to merge our hokulea-related commits here, we would also need to merge this upstream branch, which still depends on konav1.0.1. So it can't be merged directly at the moment. I believe it's better to leave this area untouched until that PR gets merged. So there are some remaining demo commits not included in this PR, and we can pick them up later once the upstream PR is merged with konav1.0.2. I'll leave the remaining commit hashes below for reference: