Skip to content

reenable 0001-parachains-pvf#9046

Merged
alexggh merged 6 commits intomasterfrom
alexggh/fix_one_flaky
Jul 2, 2025
Merged

reenable 0001-parachains-pvf#9046
alexggh merged 6 commits intomasterfrom
alexggh/fix_one_flaky

Conversation

@alexggh
Copy link
Copy Markdown
Contributor

@alexggh alexggh commented Jun 30, 2025

Fixes: #8940.

All failure seems to be because occasionally we have 1 occurence in the 3 bucket, since the default backing timeout on polkadot is 2.5 it does makes sense to allow items in the 3 bucket as well.

be a bit more lenient with allowed pvf execution range.

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
@alexggh alexggh requested a review from lrubasze June 30, 2025 14:14
@alexggh alexggh requested review from a team as code owners June 30, 2025 14:14
@alexggh alexggh added the R0-no-crate-publish-required The change does not require any crates to be re-published. label Jun 30, 2025
Copy link
Copy Markdown
Contributor

@pepoviola pepoviola left a comment

Choose a reason for hiding this comment

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

Nice, thanks!!

Copy link
Copy Markdown
Contributor

@lrubasze lrubasze left a comment

Choose a reason for hiding this comment

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

LGTM! Yet another tests unflaked!

@@ -74,11 +74,11 @@ one: reports histogram polkadot_pvf_execution_time has at least 1 samples in buc
two: reports histogram polkadot_pvf_execution_time has at least 1 samples in buckets ["0.1", "0.5", "1", "2"] within 10 seconds

# Check if we have no samples > 2s.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure, but maybe it would make sense to add more detailed description, where are these numbers are taken from.

sigurpol and others added 2 commits June 30, 2025 20:46
## The issue 

In `FullSupportsOfMiner`, we initially considered `MaxWinnersPerPage` as
the overall maximum number of winners across pages. However, it should
be calculated as `Pages * MaxWinnersPerPage` to prevent the computed
solution from having a low overall total of winners, which could result
in a `WrongWinnerCount` error.

This bug was identified in

[#staking-miner-1074](paritytech/polkadot-staking-miner#1074)
while testing the staking miner in a setup with aggressive trimming to
evaluate backer bounding.

## How to test 

A test has been added to replicate this scenario:

Test configuration:
- `Pages=2`
- `MaxWinnersPerPage=2`
- `desired_targets=3` (3 or 4 doesn't matter here, the key point is that
is strictly > `MaxWinnersPerPage`)
- `MaxBackersPerWinner=1`

Before the fix in this PR: 
- `FullSupportsOfMiner` could only hold 2 winners in total (bounded by
`MaxWinnersPerPage`)
- But the mining algorithm needed to hold 3 winners across multiple
pages
- This would cause a `WrongWinnerCount` error during verification

With the fix:
- `FullSupportsOfMiner` can now hold `Pages * MaxWinnersPerPage = 2 * 2
= 4` winners
- The test passes with 3 winners across 2 pages (proving it can hold
more than `MaxWinnersPerPage=2`)
- No `WrongWinnerCount` errors occur

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@alvicsam alvicsam requested a review from a team as a code owner June 30, 2025 18:47
@paritytech-workflow-stopper
Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/15994605836
Failed job name: test-linux-stable

@alexggh alexggh removed request for a team July 2, 2025 07:50
@alexggh alexggh enabled auto-merge July 2, 2025 07:51
@alexggh
Copy link
Copy Markdown
Contributor Author

alexggh commented Jul 2, 2025

Ran the job around ~15 times in CI all passed, merging now.

@alexggh alexggh added this pull request to the merge queue Jul 2, 2025
Merged via the queue into master with commit 2ad96b7 Jul 2, 2025
239 of 240 checks passed
@alexggh alexggh deleted the alexggh/fix_one_flaky branch July 2, 2025 09:14
ordian added a commit that referenced this pull request Jul 24, 2025
* master: (91 commits)
  Add extra information to the harmless error logs during validate_transaction (#9047)
  `sp-tracing`: Remove `test-utils` feature (#9063)
  add try-state check for staking roles -- staker cannot be nominator a… (#9034)
  net/discovery: File persistence for `AddrCache` (#8839)
  dispute-coordinator: handle race with offchain disabling (#9050)
  Align parameters for `EventEmitter::emit_sent_event` (#9057)
  Fetch parent block `api_version` (#9059)
  [XCM Precompile] Rename functions and improve docs in the Solidity interface (#9023)
  Cleanup and improvements for `ControlledValidatorIndices` (#8896)
  reenable 0001-parachains-pvf (#9046)
  Add optional auto-rebag within on-idle (#8684)
  Fix flaxy 0003-block-building-warp-sync test - one more approach (#8974)
  [Staking] [AHM] Fixes insufficient slashing of nominators (and some other small issues). (#8937)
  chore: Bump bounded-collections dep (#9004)
  XCMP and DMP improvements (#8860)
  EPMB/unsigned: fixed multi-page winner computation (#8987)
  Always send full parent header, not only hash, part of collation response (#8939)
  revive: Precompiles should return dummy code when queried (#9001)
  Fix confusing log messages in network protocol behaviour (#8819)
  Fix pallet_migrations benchmark when FailedMigrationHandler emits events (#8694)
  ...
alvicsam added a commit that referenced this pull request Oct 17, 2025
Fixes: #8940.

All failure seems to be because occasionally we have 1 occurence in the
3 bucket, since the default backing timeout on polkadot is 2.5 it does
makes sense to allow items in the 3 bucket as well.

---------

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Co-authored-by: Paolo La Camera <paolo@parity.io>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: alvicsam <alvicsam@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R0-no-crate-publish-required The change does not require any crates to be re-published.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix zombienet-polkadot-functional-0001-parachains-pvf

5 participants