Skip to content

fix: add TTL to soft tx validation cache for relay node mempool cleanup#737

Merged
gilescope merged 3 commits into
release/node-0.22.0from
ozgb-soft-cache-ttl
Feb 21, 2026
Merged

fix: add TTL to soft tx validation cache for relay node mempool cleanup#737
gilescope merged 3 commits into
release/node-0.22.0from
ozgb-soft-cache-ttl

Conversation

@ozgb

@ozgb ozgb commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Overview

Motivation

🗹 TODO before merging

  • Ready

📌 Submission Checklist

  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason: cache config only, no product-facing change
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Validated under load on a relay node — after TTL expiry, stale transactions are evicted from the mempool on the next revalidation cycle.

  • Additional tests are provided (if possible)

🔱 Fork Strategy

  • Node Client Update
  • N/A

Links

…lay nodes

The soft validation cache only had time-to-idle (TTI), which resets on
every access. On relay nodes (non-block-producers), pool revalidation
continuously accesses cached entries, preventing TTI expiry. Since relay
nodes never call do_validate_guaranteed_execution (block authoring only),
the soft cache is never explicitly invalidated either — causing invalid
transactions to persist in the mempool indefinitely.

Adding a 60-second time-to-live (TTL) ensures entries are unconditionally
evicted, forcing a fresh apply() check against current ledger state on
the next revalidation cycle.

JIRA: PM-21787
@ozgb ozgb requested a review from a team as a code owner February 20, 2026 13:47
ozgb added 2 commits February 20, 2026 13:48
…nerabilities

Upgrade eslint (^4.0.0 → ^9.29.0), typescript-eslint (^7.3.1 → ^8.33.0),
and minimatch override (10.1.2 → 10.2.1) to resolve all 11 high severity
npm audit vulnerabilities. Fix switch fallthrough bug in run.ts and suppress
no-require-imports in standalone JS worker script.
@gilescope gilescope merged commit 16a459f into release/node-0.22.0 Feb 21, 2026
33 checks passed
@gilescope gilescope deleted the ozgb-soft-cache-ttl branch February 21, 2026 15:42
ozgb added a commit that referenced this pull request Feb 23, 2026
…up (#737)

* fix: add TTL to soft tx validation cache to evict stale entries on relay nodes

The soft validation cache only had time-to-idle (TTI), which resets on
every access. On relay nodes (non-block-producers), pool revalidation
continuously accesses cached entries, preventing TTI expiry. Since relay
nodes never call do_validate_guaranteed_execution (block authoring only),
the soft cache is never explicitly invalidated either — causing invalid
transactions to persist in the mempool indefinitely.

Adding a 60-second time-to-live (TTL) ensures entries are unconditionally
evicted, forcing a fresh apply() check against current ledger state on
the next revalidation cycle.

JIRA: PM-21787

* chore: add change file for soft cache TTL fix

* fix: upgrade eslint and fix lint errors to resolve npm audit high vulnerabilities

Upgrade eslint (^4.0.0 → ^9.29.0), typescript-eslint (^7.3.1 → ^8.33.0),
and minimatch override (10.1.2 → 10.2.1) to resolve all 11 high severity
npm audit vulnerabilities. Fix switch fallthrough bug in run.ts and suppress
no-require-imports in standalone JS worker script.
github-merge-queue Bot pushed a commit that referenced this pull request Feb 23, 2026
…up (#737) (#748)

* fix: add TTL to soft tx validation cache for relay node mempool cleanup (#737)

* fix: add TTL to soft tx validation cache to evict stale entries on relay nodes

The soft validation cache only had time-to-idle (TTI), which resets on
every access. On relay nodes (non-block-producers), pool revalidation
continuously accesses cached entries, preventing TTI expiry. Since relay
nodes never call do_validate_guaranteed_execution (block authoring only),
the soft cache is never explicitly invalidated either — causing invalid
transactions to persist in the mempool indefinitely.

Adding a 60-second time-to-live (TTL) ensures entries are unconditionally
evicted, forcing a fresh apply() check against current ledger state on
the next revalidation cycle.

JIRA: PM-21787

* chore: add change file for soft cache TTL fix

* fix: upgrade eslint and fix lint errors to resolve npm audit high vulnerabilities

Upgrade eslint (^4.0.0 → ^9.29.0), typescript-eslint (^7.3.1 → ^8.33.0),
and minimatch override (10.1.2 → 10.2.1) to resolve all 11 high severity
npm audit vulnerabilities. Fix switch fallthrough bug in run.ts and suppress
no-require-imports in standalone JS worker script.

* chore: update change file with new PR link
m2ux added a commit that referenced this pull request Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
m2ux added a commit that referenced this pull request Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants