This repository was archived by the owner on Jan 31, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Add FaultProofFixture definition #70
Open
BrianBland
wants to merge
4
commits into
ethereum-optimism:main
Choose a base branch
from
BrianBland:add-fault-proof-def
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clabby
suggested changes
Aug 20, 2024
Contributor
clabby
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.
Looks good at a high level. Changes in the FPP status; I didn't enumerate the full list for you (missed unfinished) on discord.
Should also probably add a TryFrom<u8> for FaultProofStatus.
Comment on lines
38
to
75
| /// The fault proof status is the result of executing the fault proof program. | ||
| #[derive(Serialize, Deserialize, Debug, Default, PartialEq, Eq)] | ||
| pub enum FaultProofStatus { | ||
| /// The claim is valid. | ||
| #[default] | ||
| Valid, | ||
| /// The claim is invalid. | ||
| Invalid, | ||
| /// Executing the program resulted in a panic. | ||
| Panic, | ||
| /// The status is unknown. | ||
| Unknown | ||
| } |
Contributor
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.
Suggested change
| /// The fault proof status is the result of executing the fault proof program. | |
| #[derive(Serialize, Deserialize, Debug, Default, PartialEq, Eq)] | |
| pub enum FaultProofStatus { | |
| /// The claim is valid. | |
| #[default] | |
| Valid, | |
| /// The claim is invalid. | |
| Invalid, | |
| /// Executing the program resulted in a panic. | |
| Panic, | |
| /// The status is unknown. | |
| Unknown | |
| } | |
| /// The fault proof status is the result of executing the fault proof program. | |
| #[derive(Serialize, Deserialize, Debug, Default, PartialEq, Eq)] | |
| #[repr(u8)] | |
| pub enum FaultProofStatus { | |
| /// The claim is valid. | |
| #[default] | |
| Valid = 0, | |
| /// The claim is invalid. | |
| Invalid = 1, | |
| /// Executing the program resulted in a panic. | |
| Panic = 2, | |
| /// The program has not exited. | |
| Unfinished = 3, | |
| /// The status is unknown. | |
| Unknown | |
| } |
Author
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.
Thanks 👍, will iterate on this a bit more as I wire this up to the op-program.
Contributor
|
Added you as a collaborator btw @BrianBland so you don't need if a fork if you don't want :) |
refcell
reviewed
Aug 21, 2024
360c1ec to
25c51e5
Compare
25c51e5 to
70afc00
Compare
refcell
approved these changes
Aug 30, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds a new
FaultProofFixturetype definition, which is intended to provide all of the data required to execute an offline fault proof testTests
Added basic serialization/deserialization roundtrip tests
Additional context
Add any other context about the problem you're solving.
Metadata