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

Fuzz tests for StorePacking #1296

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

immrsd
Copy link
Collaborator

@immrsd immrsd commented Jan 10, 2025

Adds fuzz test cases for StorePacking logic of various structs: TxInfo and ProposalCore in governance package, and Secp256k1Point and Secp256r1Point in account package.

Copy link
Collaborator

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

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

LGTM! I just left a question

Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of having a separate file for these, what do you think about just moving the proposal core test into proposal_core/tests and then make a local tests mod in the multisig/storage_utils file?

Copy link
Member

@ericnordelo ericnordelo left a comment

Choose a reason for hiding this comment

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

Looking good! Left a small suggestion.

@@ -0,0 +1,38 @@
use crate::governor::ProposalCore;
Copy link
Member

Choose a reason for hiding this comment

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

We already have this file now in main, so we need to merge these tests into that.

proposer_val: felt252,
vote_start: u64,
vote_duration: u64,
executed_val: u8,
Copy link
Member

Choose a reason for hiding this comment

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

We can implement Fuzzable for bool as described here with 0.38.0. Let's use that for our fuzz tests types (applies for other PRs as well)

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