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

fix(fault_proof): fix defend logic #411

Merged
merged 1 commit into from
Feb 27, 2025
Merged

fix(fault_proof): fix defend logic #411

merged 1 commit into from
Feb 27, 2025

Conversation

fakedev9999
Copy link
Member

Summary

This PR modifies the get_oldest_game_address function to accept a parameter that determines whether to check for equality or inequality between the output root and the claim.

Problem

The get_oldest_game_address function is used for both defense (get_oldest_defensible_game_address) and challenging (get_oldest_challengable_game_address).

For challenging, we should challenge games where the claimed root doesn't match the actual output root (the current logic is correct for this)

For defending, we should defend games where the claimed root does match the actual output root (the current logic is incorrect for this)

So for defense, we want the opposite condition: if output_root == game_claim. This would mean we're defending games where the claim is correct but a challenge occurred.

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.

LGTM!

@fakedev9999 fakedev9999 merged commit 6ffb152 into main Feb 27, 2025
8 checks passed
@fakedev9999 fakedev9999 deleted the taehoon/fix-defend branch February 27, 2025 00:58
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.

2 participants