Skip to content

[stable2503] Backport #7777#8112

Closed
paritytech-release-backport-bot[bot] wants to merge 2 commits intostable2503from
backport-7777-to-stable2503
Closed

[stable2503] Backport #7777#8112
paritytech-release-backport-bot[bot] wants to merge 2 commits intostable2503from
backport-7777-to-stable2503

Conversation

@paritytech-release-backport-bot
Copy link
Copy Markdown

Backport #7777 into stable2503 from michalkucharczyk.

See the documentation on how to use this bot.

@paritytech-release-backport-bot
Copy link
Copy Markdown
Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-7777-to-stable2503
git worktree add --checkout .worktree/backport-7777-to-stable2503 backport-7777-to-stable2503
cd .worktree/backport-7777-to-stable2503
git reset --hard HEAD^
git cherry-pick -x 954d8571df26b5cc0d342c6c05d414bd6912f1cd
git push --force-with-lease

@github-actions github-actions bot added the A3-backport Pull request is already reviewed well in another branch. label Apr 1, 2025
…ing the view (#7777)

Avoid banning future/stale transactions reported as invalid by the
authorship module.

When re-org is handled by transaction pool, the view for new fork
(`Bn'`) is cloned from the tip of the other existing fork (`Bn`). The
new view is not entirely re-validated during the maintain process (it
will be revalidated in the background), so it may happen that it
contains transactions that are ready on (`Bn`) but actually are not
ready on (`Bn'`). All required (which are expected to be in retracted
set) transactions are submitted to the new view, but order of txs in
ready iterator is not updated.

The proper fix would require to re-build the the iterator - which is not
trivial as we do not have tags for transactions for block `Bn'` yet. We
could force retracted txs to be before ready transactions but it also
does not feel to be a good solution - it still would be best effort
trial.

For now allowing future transactions to re-enter the view immediately is
in my opinion a good compromise. This PR is a quick fix and actually
brings back behavior of txpool from before merging #6008. The bad thing
is that incorrect transactions are detected during block authorship, but
this situation to happen requires some specific pre-conditions which
should be rare.

If this PR is not merged, some transaction will get included into
blocks, only after
[`DEFAULT_BAN_TIME_SECS`](https://github.com/paritytech/polkadot-sdk/blob/4b39ff00b887039bc3e02a763a29deb09df56833/substrate/client/transaction-pool/src/graph/rotator.rs#L37),
which is pretty bad.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 954d857)
@michalkucharczyk michalkucharczyk force-pushed the backport-7777-to-stable2503 branch from fb99ac3 to eb13da2 Compare April 1, 2025 08:49
@michalkucharczyk michalkucharczyk requested a review from skunert April 1, 2025 08:56
@michalkucharczyk michalkucharczyk marked this pull request as ready for review April 1, 2025 10:04
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2025

This pull request is amending an existing release. Please proceed with extreme caution,
as to not impact downstream teams that rely on the stability of it. Some things to consider:

  • Backports are only for 'patch' or 'minor' changes. No 'major' or other breaking change.
  • Should be a legit fix for some bug, not adding tons of new features.
  • Must either be already audited or not need an audit.
Emergency Bypass

If you really need to bypass this check: add validate: false to each crate
in the Prdoc where a breaking change is introduced. This will release a new major
version of that crate and all its reverse dependencies and basically break the release.

@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/14192849975
Failed job name: test-doc

@iulianbarbu
Copy link
Copy Markdown
Contributor

There are a few tests that we want to fix in #8089 to make the CI almost green I hope for 2503 before merging a few more backports. Should we wait for the PR to be merged before merging this? There are a few PRs lined up already.

@EgorPopelyaev EgorPopelyaev deleted the branch stable2503 April 2, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A3-backport Pull request is already reviewed well in another branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants