-
Notifications
You must be signed in to change notification settings - Fork 11
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: Add FaultProofFixture definition #70
base: main
Are you sure you want to change the base?
Conversation
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
.
/// 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 | ||
} |
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 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 | |
} |
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.
Added you as a collaborator btw @BrianBland so you don't need if a fork if you don't want :) |
360c1ec
to
25c51e5
Compare
25c51e5
to
70afc00
Compare
Description
Adds a new
FaultProofFixture
type 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