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

feat: implement challenger #355

Merged
merged 3 commits into from
Feb 20, 2025
Merged

feat: implement challenger #355

merged 3 commits into from
Feb 20, 2025

Conversation

fakedev9999
Copy link
Member

@fakedev9999 fakedev9999 commented Jan 30, 2025

Overview

Implements challenger binary interfaces with the OPSuccinctDisputeGame implemented in #342 to challenge a game if the claim is incorrect by calling challenge() function in the game contract.

You can find a faulty game being challenged and resolved in favor of the challenger on ETH sepolia network: Faulty Game Contract, Challenge tx, Resolve tx

Notes on refac

The helper functions for game resolution are now in FactoryTrait since game resolution is both possible for the proposer and the challenger. There is a new enum Mode to distinguish whether it's being called by proposer or challenger.

@fakedev9999 fakedev9999 requested a review from puma314 January 30, 2025 02:47
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-challenger branch from 1fd51e6 to 17e8adc Compare January 31, 2025 02:57
@fakedev9999 fakedev9999 marked this pull request as ready for review January 31, 2025 02:57
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-challenger branch from 17e8adc to a4fe4b8 Compare January 31, 2025 22:53
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-proposer branch from 20d9b85 to 241fc47 Compare February 1, 2025 02:14
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-challenger branch from a4fe4b8 to 9396bb0 Compare February 1, 2025 02:28
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-proposer branch from 241fc47 to bb77999 Compare February 1, 2025 06:24
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-challenger branch 2 times, most recently from 1cadc70 to e843e67 Compare February 4, 2025 18:21
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-proposer branch 2 times, most recently from f1d8817 to e5243e8 Compare February 5, 2025 23:51
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-challenger branch 3 times, most recently from 74018f0 to 1b01c89 Compare February 6, 2025 19:44
fault_proof/src/lib.rs Outdated Show resolved Hide resolved
fault_proof/src/lib.rs Outdated Show resolved Hide resolved
fault_proof/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@ratankaliani ratankaliani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me. We should finalize this after the contracts are finalized.

@fakedev9999 fakedev9999 marked this pull request as draft February 12, 2025 19:05
@fakedev9999
Copy link
Member Author

Will be ready for review after contracts are finalized. Won't be much change.

@fakedev9999 fakedev9999 force-pushed the taehoon/implement-proposer branch from e5243e8 to be7e63f Compare February 14, 2025 18:33
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-proposer branch 4 times, most recently from 139ee5d to 9c09304 Compare February 15, 2025 08:30
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-challenger branch 3 times, most recently from b721634 to bd3e8d6 Compare February 18, 2025 05:39
@fakedev9999 fakedev9999 marked this pull request as ready for review February 18, 2025 05:40
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-proposer branch 2 times, most recently from 9b1cc31 to 5ce0b23 Compare February 19, 2025 23:39
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-challenger branch from bd3e8d6 to ce966a3 Compare February 20, 2025 00:56
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-proposer branch from 5ce0b23 to 5e774cd Compare February 20, 2025 00:57
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-challenger branch from e6ca209 to 831f4f8 Compare February 20, 2025 02:21
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-proposer branch from b1442a3 to 77eba09 Compare February 20, 2025 02:48
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-challenger branch 2 times, most recently from 7abca1c to 42ca7db Compare February 20, 2025 03:21
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-proposer branch from 77eba09 to 44ef872 Compare February 20, 2025 03:27
Base automatically changed from taehoon/implement-proposer to main February 20, 2025 03:30
@fakedev9999 fakedev9999 force-pushed the taehoon/implement-challenger branch from 42ca7db to 998681f Compare February 20, 2025 03:32
Copy link

github-actions bot commented Feb 20, 2025

Metric Value
Batch Start 790,180
Batch End 790,185
Witness Generation (seconds) 0
Execution Duration (seconds) 25
Total Instruction Count 1,118,268,270
Oracle Verify Cycles 172,578,038
Derivation Cycles 858,538,556
Block Execution Cycles 7,678,690
Blob Verification Cycles 23,292,488
Total SP1 Gas 0
Number of Blocks 5
Number of Transactions 5
Ethereum Gas Used 244,554
Cycles per Block 223,653,654
Cycles per Transaction 223,653,654
Transactions per Block 1
Gas Used per Block 48,910
Gas Used per Transaction 48,910
BN Pair Cycles 0
BN Add Cycles 0
BN Mul Cycles 0
KZG Eval Cycles 0
EC Recover Cycles 0
P256 Verify Cycles 0

challenger/fp/src/main.rs Outdated Show resolved Hide resolved
@fakedev9999 fakedev9999 merged commit 45d71c5 into main Feb 20, 2025
10 checks passed
@fakedev9999 fakedev9999 deleted the taehoon/implement-challenger branch February 20, 2025 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants