From 2095293d7baccb79ce3917ebf17c4af943774199 Mon Sep 17 00:00:00 2001 From: immrsd Date: Tue, 9 Dec 2025 13:40:57 +0300 Subject: [PATCH 01/11] Make state resolving logic consistent with Solidity --- packages/governance/src/governor/governor.cairo | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/governance/src/governor/governor.cairo b/packages/governance/src/governor/governor.cairo index 3fbbda05d..d167070be 100644 --- a/packages/governance/src/governor/governor.cairo +++ b/packages/governance/src/governor/governor.cairo @@ -894,13 +894,12 @@ pub mod GovernorComponent { assert(snapshot.is_non_zero(), Errors::NONEXISTENT_PROPOSAL); let current_timepoint = self.clock(); - if current_timepoint < snapshot { + if snapshot >= current_timepoint { return ProposalState::Pending; } let deadline = self._proposal_deadline(proposal_id); - - if current_timepoint <= deadline { + if deadline >= current_timepoint { return ProposalState::Active; } else if !self.quorum_reached(proposal_id) || !self.vote_succeeded(proposal_id) { return ProposalState::Defeated; From a4b100a4eebb8e66e1422918476c72627c26f2f3 Mon Sep 17 00:00:00 2001 From: immrsd Date: Tue, 9 Dec 2025 13:41:59 +0300 Subject: [PATCH 02/11] Fix timestamp in Governor tests --- .../governor/block_number/test_governor.cairo | 28 ++++++++++++------- .../governor/timestamp/test_governor.cairo | 28 ++++++++++++------- .../test_governor_timelock_execution.cairo | 18 ++++++++---- 3 files changed, 48 insertions(+), 26 deletions(-) diff --git a/packages/governance/src/tests/governor/block_number/test_governor.cairo b/packages/governance/src/tests/governor/block_number/test_governor.cairo index f26c7875c..6ddcda75e 100644 --- a/packages/governance/src/tests/governor/block_number/test_governor.cairo +++ b/packages/governance/src/tests/governor/block_number/test_governor.cairo @@ -581,8 +581,10 @@ fn test_execute() { // 2. Cast vote - // Fast forward the vote delay - current_time += GovernorMock::VOTING_DELAY; + // Fast forward to voting start + let snapshot = current_time + GovernorMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_number_global(current_time); // Cast vote @@ -634,8 +636,10 @@ fn test_execute_panics() { // 2. Cast vote - // Fast forward the vote delay - current_time += GovernorMock::VOTING_DELAY; + // Fast forward to voting start + let snapshot = current_time + GovernorMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_number_global(current_time); // Cast vote @@ -1230,8 +1234,10 @@ fn prepare_governor_and_signature( start_cheat_block_number_global(current_time); let proposal_id = governor.propose(calls, description.clone()); - // 2. Fast forward the vote delay - current_time += GovernorMock::VOTING_DELAY; + // 2. Fast forward the voting start + let snapshot = current_time + GovernorMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_number_global(current_time); // 3. Generate a key pair and set up an account @@ -1332,8 +1338,10 @@ fn prepare_governor_and_signature_with_reason_and_params( start_cheat_block_number_global(current_time); let proposal_id = governor.propose(calls, description.clone()); - // 2. Fast forward the vote delay - current_time += GovernorMock::VOTING_DELAY; + // 2. Fast forward to voting start + let snapshot = current_time + GovernorMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_number_global(current_time); // 3. Generate a key pair and set up an account @@ -2034,7 +2042,7 @@ fn test__cast_vote_pending() { } #[test] -#[should_panic(expected: 'Votes: future Lookup')] +#[should_panic(expected: 'Unexpected proposal state')] fn test__cast_vote_at_vote_start() { let mut state = COMPONENT_STATE(); deploy_votes_token(); @@ -2094,7 +2102,7 @@ fn test__cast_vote_active_with_params() { } #[test] -#[should_panic(expected: 'Votes: future Lookup')] +#[should_panic(expected: 'Unexpected proposal state')] fn test__cast_vote_zero_delay() { start_cheat_block_number_global(BLOCK_NUMBER - 1); let voter = test_address(); diff --git a/packages/governance/src/tests/governor/timestamp/test_governor.cairo b/packages/governance/src/tests/governor/timestamp/test_governor.cairo index 75fcb60cd..9b8c9bcc5 100644 --- a/packages/governance/src/tests/governor/timestamp/test_governor.cairo +++ b/packages/governance/src/tests/governor/timestamp/test_governor.cairo @@ -581,8 +581,10 @@ fn test_execute() { // 2. Cast vote - // Fast forward the vote delay - current_time += GovernorMock::VOTING_DELAY; + // Fast forward to voting start + let snapshot = current_time + GovernorMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_timestamp_global(current_time); // Cast vote @@ -634,8 +636,10 @@ fn test_execute_panics() { // 2. Cast vote - // Fast forward the vote delay - current_time += GovernorMock::VOTING_DELAY; + // Fast forward to voting start + let snapshot = current_time + GovernorMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_timestamp_global(current_time); // Cast vote @@ -934,7 +938,7 @@ fn test_cast_vote_pending() { } #[test] -#[should_panic(expected: 'Votes: future Lookup')] +#[should_panic(expected: 'Unexpected proposal state')] fn test__cast_vote_at_vote_start() { let mut state = COMPONENT_STATE(); deploy_votes_token(); @@ -968,7 +972,7 @@ fn test_cast_vote_active() { } #[test] -#[should_panic(expected: 'Votes: future Lookup')] +#[should_panic(expected: 'Unexpected proposal state')] fn test__cast_vote_zero_delay() { start_cheat_block_timestamp_global(TIMESTAMP - 1); let voter = test_address(); @@ -1286,8 +1290,10 @@ fn prepare_governor_and_signature( start_cheat_block_timestamp_global(current_time); let proposal_id = governor.propose(calls, description.clone()); - // 2. Fast forward the vote delay - current_time += GovernorMock::VOTING_DELAY; + // 2. Fast forward the voting start + let snapshot = current_time + GovernorMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_timestamp_global(current_time); // 3. Generate a key pair and set up an account @@ -1388,8 +1394,10 @@ fn prepare_governor_and_signature_with_reason_and_params( start_cheat_block_timestamp_global(current_time); let proposal_id = governor.propose(calls, description.clone()); - // 2. Fast forward the vote delay - current_time += GovernorMock::VOTING_DELAY; + // 2. Fast forward to voting start + let snapshot = current_time + GovernorMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_timestamp_global(current_time); // 3. Generate a key pair and set up an account diff --git a/packages/governance/src/tests/governor/timestamp/test_governor_timelock_execution.cairo b/packages/governance/src/tests/governor/timestamp/test_governor_timelock_execution.cairo index 2da5cb596..a41f7c4ed 100644 --- a/packages/governance/src/tests/governor/timestamp/test_governor_timelock_execution.cairo +++ b/packages/governance/src/tests/governor/timestamp/test_governor_timelock_execution.cairo @@ -381,8 +381,10 @@ fn test_execute_operations() { // 3. Cast vote - // Fast forward the vote delay - current_time += GovernorTimelockedMock::VOTING_DELAY; + // Fast forward to voting start + let snapshot = current_time + GovernorTimelockedMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_timestamp_global(current_time); // Cast vote @@ -458,8 +460,10 @@ fn test_queue_operations() { // 3. Cast vote - // Fast forward the vote delay - current_time += GovernorTimelockedMock::VOTING_DELAY; + // Fast forward to voting start + let snapshot = current_time + GovernorTimelockedMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_timestamp_global(current_time); // Cast vote @@ -535,8 +539,10 @@ fn test_cancel_operations_queued() { // 3. Cast vote - // Fast forward the vote delay - current_time += GovernorTimelockedMock::VOTING_DELAY; + // Fast forward to voting start + let snapshot = current_time + GovernorTimelockedMock::VOTING_DELAY; + let voting_start = snapshot + 1; + current_time = voting_start; start_cheat_block_timestamp_global(current_time); // Cast vote From cf53a2644f17a781c75688f0b178536adc568e53 Mon Sep 17 00:00:00 2001 From: immrsd Date: Tue, 9 Dec 2025 13:42:43 +0300 Subject: [PATCH 03/11] Add tests checking Governor Pending state at snapshot timestamp --- .../tests/governor/block_number/test_governor.cairo | 13 +++++++++++++ .../block_number/test_governor_core_execution.cairo | 13 +++++++++++++ .../tests/governor/timestamp/test_governor.cairo | 13 +++++++++++++ .../timestamp/test_governor_core_execution.cairo | 13 +++++++++++++ 4 files changed, 52 insertions(+) diff --git a/packages/governance/src/tests/governor/block_number/test_governor.cairo b/packages/governance/src/tests/governor/block_number/test_governor.cairo index 6ddcda75e..ad5d9e8a8 100644 --- a/packages/governance/src/tests/governor/block_number/test_governor.cairo +++ b/packages/governance/src/tests/governor/block_number/test_governor.cairo @@ -144,6 +144,19 @@ fn test_state_pending() { setup_pending_proposal(ref state, true); } +#[test] +fn test_state_pending_at_snapshot() { + let mut state = COMPONENT_STATE(); + deploy_votes_token(); + initialize_votes_component(VOTES_TOKEN); + let (id, proposal) = setup_pending_proposal(ref state, true); + + let snapshot = proposal.vote_start; + start_cheat_block_number_global(snapshot); + let current_state = get_state(@state, id, true); + assert_eq!(current_state, ProposalState::Pending); +} + fn test_state_active_external_version(external_state_version: bool) { let mut state = COMPONENT_STATE(); deploy_votes_token(); diff --git a/packages/governance/src/tests/governor/block_number/test_governor_core_execution.cairo b/packages/governance/src/tests/governor/block_number/test_governor_core_execution.cairo index c4df4cf90..adff683a3 100644 --- a/packages/governance/src/tests/governor/block_number/test_governor_core_execution.cairo +++ b/packages/governance/src/tests/governor/block_number/test_governor_core_execution.cairo @@ -62,6 +62,19 @@ fn test_state_pending() { assert_eq!(state, ProposalState::Pending); } +#[test] +fn test_state_pending_at_snapshot() { + let mut component_state = COMPONENT_STATE(); + deploy_votes_token(); + initialize_votes_component(VOTES_TOKEN); + let (id, proposal) = setup_pending_proposal(ref component_state, false); + + let snapshot = proposal.vote_start; + start_cheat_block_number_global(snapshot); + let state = GovernorExecution::state(@component_state, id); + assert_eq!(state, ProposalState::Pending); +} + #[test] fn test_state_active() { let mut component_state = COMPONENT_STATE(); diff --git a/packages/governance/src/tests/governor/timestamp/test_governor.cairo b/packages/governance/src/tests/governor/timestamp/test_governor.cairo index 9b8c9bcc5..6cc86cfe4 100644 --- a/packages/governance/src/tests/governor/timestamp/test_governor.cairo +++ b/packages/governance/src/tests/governor/timestamp/test_governor.cairo @@ -144,6 +144,19 @@ fn test_state_pending() { setup_pending_proposal(ref state, true); } +#[test] +fn test_state_pending_at_snapshot() { + let mut state = COMPONENT_STATE(); + deploy_votes_token(); + initialize_votes_component(VOTES_TOKEN); + let (id, proposal) = setup_pending_proposal(ref state, true); + + let snapshot = proposal.vote_start; + start_cheat_block_timestamp_global(snapshot); + let current_state = get_state(@state, id, true); + assert_eq!(current_state, ProposalState::Pending); +} + fn test_state_active_external_version(external_state_version: bool) { let mut state = COMPONENT_STATE(); deploy_votes_token(); diff --git a/packages/governance/src/tests/governor/timestamp/test_governor_core_execution.cairo b/packages/governance/src/tests/governor/timestamp/test_governor_core_execution.cairo index 0e02b3b74..013c872ce 100644 --- a/packages/governance/src/tests/governor/timestamp/test_governor_core_execution.cairo +++ b/packages/governance/src/tests/governor/timestamp/test_governor_core_execution.cairo @@ -62,6 +62,19 @@ fn test_state_pending() { assert_eq!(state, ProposalState::Pending); } +#[test] +fn test_state_pending_at_snapshot() { + let mut component_state = COMPONENT_STATE(); + deploy_votes_token(); + initialize_votes_component(VOTES_TOKEN); + let (id, proposal) = setup_pending_proposal(ref component_state, false); + + let snapshot = proposal.vote_start; + start_cheat_block_timestamp_global(snapshot); + let state = GovernorExecution::state(@component_state, id); + assert_eq!(state, ProposalState::Pending); +} + #[test] fn test_state_active() { let mut component_state = COMPONENT_STATE(); From 8d1b1dbc7cf07b5490933cc34fd08a70709d8be8 Mon Sep 17 00:00:00 2001 From: immrsd Date: Tue, 9 Dec 2025 13:50:40 +0300 Subject: [PATCH 04/11] Add changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27c13f24f..8bcf4f568 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `MAXIMUM_DEFAULT_ADMIN_TRANSFER_DELAY` constant exposed in the component ImmutableConfig. - `maximum_default_admin_transfer_delay` getter to the `IAccessControlDefaultAdminRules` interface. +### Changed (Breaking) + +- `GovernorComponent` proposal state resolution at snapshot timestamp changed from Active to Pending (#1606) + ## 3.0.0-alpha.3 (2025-10-9) ### Added From 1d3d0ad48022ccc5badf3d5efd222354dedee463 Mon Sep 17 00:00:00 2001 From: immrsd Date: Tue, 9 Dec 2025 13:52:43 +0300 Subject: [PATCH 05/11] Format files --- .../src/tests/governor/block_number/test_governor.cairo | 2 +- .../governance/src/tests/governor/timestamp/test_governor.cairo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/governance/src/tests/governor/block_number/test_governor.cairo b/packages/governance/src/tests/governor/block_number/test_governor.cairo index ad5d9e8a8..1b741981a 100644 --- a/packages/governance/src/tests/governor/block_number/test_governor.cairo +++ b/packages/governance/src/tests/governor/block_number/test_governor.cairo @@ -150,7 +150,7 @@ fn test_state_pending_at_snapshot() { deploy_votes_token(); initialize_votes_component(VOTES_TOKEN); let (id, proposal) = setup_pending_proposal(ref state, true); - + let snapshot = proposal.vote_start; start_cheat_block_number_global(snapshot); let current_state = get_state(@state, id, true); diff --git a/packages/governance/src/tests/governor/timestamp/test_governor.cairo b/packages/governance/src/tests/governor/timestamp/test_governor.cairo index 6cc86cfe4..54c90fb24 100644 --- a/packages/governance/src/tests/governor/timestamp/test_governor.cairo +++ b/packages/governance/src/tests/governor/timestamp/test_governor.cairo @@ -150,7 +150,7 @@ fn test_state_pending_at_snapshot() { deploy_votes_token(); initialize_votes_component(VOTES_TOKEN); let (id, proposal) = setup_pending_proposal(ref state, true); - + let snapshot = proposal.vote_start; start_cheat_block_timestamp_global(snapshot); let current_state = get_state(@state, id, true); From f7e0c6ecac8f0df34c820f772002c54f6677507d Mon Sep 17 00:00:00 2001 From: immrsd Date: Tue, 9 Dec 2025 14:35:22 +0300 Subject: [PATCH 06/11] Fix changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bcf4f568..9c5809914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed (Breaking) -- `GovernorComponent` proposal state resolution at snapshot timestamp changed from Active to Pending (#1606) +- `GovernorComponent` proposal state resolution at snapshot timepoint changed from Active to Pending (#1606) ## 3.0.0-alpha.3 (2025-10-9) From 9e958f01c238b5e5ef3d1f3f6f1644946cf79f1c Mon Sep 17 00:00:00 2001 From: immrsd Date: Tue, 9 Dec 2025 15:03:38 +0300 Subject: [PATCH 07/11] Extract duplicated logic into helper func in tests --- .../governor/block_number/test_governor.cairo | 22 +++++++++---------- .../governor/timestamp/test_governor.cairo | 22 +++++++++---------- .../test_governor_timelock_execution.cairo | 18 +++++++-------- 3 files changed, 29 insertions(+), 33 deletions(-) diff --git a/packages/governance/src/tests/governor/block_number/test_governor.cairo b/packages/governance/src/tests/governor/block_number/test_governor.cairo index 1b741981a..d339b7e01 100644 --- a/packages/governance/src/tests/governor/block_number/test_governor.cairo +++ b/packages/governance/src/tests/governor/block_number/test_governor.cairo @@ -595,9 +595,7 @@ fn test_execute() { // 2. Cast vote // Fast forward to voting start - let snapshot = current_time + GovernorMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_number_global(current_time); // Cast vote @@ -650,9 +648,7 @@ fn test_execute_panics() { // 2. Cast vote // Fast forward to voting start - let snapshot = current_time + GovernorMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_number_global(current_time); // Cast vote @@ -1248,9 +1244,7 @@ fn prepare_governor_and_signature( let proposal_id = governor.propose(calls, description.clone()); // 2. Fast forward the voting start - let snapshot = current_time + GovernorMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_number_global(current_time); // 3. Generate a key pair and set up an account @@ -1352,9 +1346,7 @@ fn prepare_governor_and_signature_with_reason_and_params( let proposal_id = governor.propose(calls, description.clone()); // 2. Fast forward to voting start - let snapshot = current_time + GovernorMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_number_global(current_time); // 3. Generate a key pair and set up an account @@ -2230,3 +2222,9 @@ fn delegate_votes_to(delegatee: ContractAddress) { let votes_dispatcher = IVotesDispatcher { contract_address: VOTES_TOKEN }; votes_dispatcher.delegate(delegatee); } + +fn resolve_voting_start(propose_timepoint: u64) -> u64 { + let voting_delay = GovernorMock::VOTING_DELAY; + let snapshot_timepoint = propose_timepoint + voting_delay; + snapshot_timepoint + 1 +} diff --git a/packages/governance/src/tests/governor/timestamp/test_governor.cairo b/packages/governance/src/tests/governor/timestamp/test_governor.cairo index 54c90fb24..114080764 100644 --- a/packages/governance/src/tests/governor/timestamp/test_governor.cairo +++ b/packages/governance/src/tests/governor/timestamp/test_governor.cairo @@ -595,9 +595,7 @@ fn test_execute() { // 2. Cast vote // Fast forward to voting start - let snapshot = current_time + GovernorMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_timestamp_global(current_time); // Cast vote @@ -650,9 +648,7 @@ fn test_execute_panics() { // 2. Cast vote // Fast forward to voting start - let snapshot = current_time + GovernorMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_timestamp_global(current_time); // Cast vote @@ -1304,9 +1300,7 @@ fn prepare_governor_and_signature( let proposal_id = governor.propose(calls, description.clone()); // 2. Fast forward the voting start - let snapshot = current_time + GovernorMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_timestamp_global(current_time); // 3. Generate a key pair and set up an account @@ -1408,9 +1402,7 @@ fn prepare_governor_and_signature_with_reason_and_params( let proposal_id = governor.propose(calls, description.clone()); // 2. Fast forward to voting start - let snapshot = current_time + GovernorMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_timestamp_global(current_time); // 3. Generate a key pair and set up an account @@ -2230,3 +2222,9 @@ fn delegate_votes_to(delegatee: ContractAddress) { let votes_dispatcher = IVotesDispatcher { contract_address: VOTES_TOKEN }; votes_dispatcher.delegate(delegatee); } + +fn resolve_voting_start(propose_timepoint: u64) -> u64 { + let voting_delay = GovernorMock::VOTING_DELAY; + let snapshot_timepoint = propose_timepoint + voting_delay; + snapshot_timepoint + 1 +} diff --git a/packages/governance/src/tests/governor/timestamp/test_governor_timelock_execution.cairo b/packages/governance/src/tests/governor/timestamp/test_governor_timelock_execution.cairo index a41f7c4ed..5c14f7f82 100644 --- a/packages/governance/src/tests/governor/timestamp/test_governor_timelock_execution.cairo +++ b/packages/governance/src/tests/governor/timestamp/test_governor_timelock_execution.cairo @@ -382,9 +382,7 @@ fn test_execute_operations() { // 3. Cast vote // Fast forward to voting start - let snapshot = current_time + GovernorTimelockedMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_timestamp_global(current_time); // Cast vote @@ -461,9 +459,7 @@ fn test_queue_operations() { // 3. Cast vote // Fast forward to voting start - let snapshot = current_time + GovernorTimelockedMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_timestamp_global(current_time); // Cast vote @@ -540,9 +536,7 @@ fn test_cancel_operations_queued() { // 3. Cast vote // Fast forward to voting start - let snapshot = current_time + GovernorTimelockedMock::VOTING_DELAY; - let voting_start = snapshot + 1; - current_time = voting_start; + current_time = resolve_voting_start(current_time); start_cheat_block_timestamp_global(current_time); // Cast vote @@ -697,6 +691,12 @@ fn initialize_votes_component(votes_token: ContractAddress) { mock_state.governor_votes.initializer(votes_token); } +fn resolve_voting_start(propose_timepoint: u64) -> u64 { + let voting_delay = GovernorTimelockedMock::VOTING_DELAY; + let snapshot_timepoint = propose_timepoint + voting_delay; + snapshot_timepoint + 1 +} + // // Setup proposals // From 735b08c20d81e6921c3578df9a47cf0029fe7dbf Mon Sep 17 00:00:00 2001 From: immrsd Date: Wed, 10 Dec 2025 12:25:16 +0300 Subject: [PATCH 08/11] Reduce number of fuzzer runs --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6453b02d6..576e52aae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,7 @@ jobs: run: scarb fmt --check --workspace - name: Run tests - run: snforge test --workspace --features fuzzing --fuzzer-runs 500 + run: snforge test --workspace --features fuzzing --fuzzer-runs 50 - name: Run tests and generate coverage report run: snforge test --workspace --coverage From e33cb0b80a248f82e73450308293bb8f9657e86a Mon Sep 17 00:00:00 2001 From: immrsd Date: Wed, 10 Dec 2025 13:31:12 +0300 Subject: [PATCH 09/11] Fix setup-snfoundry version in tests workflow --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 576e52aae..7f07f2ae4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: FOUNDRY_VERSION=$(grep 'snforge_std = ' Scarb.toml | sed 's/snforge_std = "\(.*\)"/\1/') echo "FOUNDRY_VERSION=$FOUNDRY_VERSION" >> "$GITHUB_ENV" - - uses: foundry-rs/setup-snfoundry@v4 + - uses: foundry-rs/setup-snfoundry@vv5.0.0 with: starknet-foundry-version: ${{ env.FOUNDRY_VERSION }} From 15aeb3c3dc813d5d54fe53f9443d2b9dfe9283ef Mon Sep 17 00:00:00 2001 From: immrsd Date: Wed, 10 Dec 2025 13:32:31 +0300 Subject: [PATCH 10/11] Set number of fuzzer runs to 200 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f07f2ae4..4653fe9ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,7 @@ jobs: run: scarb fmt --check --workspace - name: Run tests - run: snforge test --workspace --features fuzzing --fuzzer-runs 50 + run: snforge test --workspace --features fuzzing --fuzzer-runs 200 - name: Run tests and generate coverage report run: snforge test --workspace --coverage From e1e868022400ab0f97aa4523be56187c1cad8c18 Mon Sep 17 00:00:00 2001 From: immrsd Date: Wed, 10 Dec 2025 15:18:54 +0300 Subject: [PATCH 11/11] Fix setup-snfoundry version --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4653fe9ad..8598ab4f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: FOUNDRY_VERSION=$(grep 'snforge_std = ' Scarb.toml | sed 's/snforge_std = "\(.*\)"/\1/') echo "FOUNDRY_VERSION=$FOUNDRY_VERSION" >> "$GITHUB_ENV" - - uses: foundry-rs/setup-snfoundry@vv5.0.0 + - uses: foundry-rs/setup-snfoundry@v5.0.0 with: starknet-foundry-version: ${{ env.FOUNDRY_VERSION }}