fix: add TTL to soft tx validation cache for relay node mempool cleanup#737
Merged
Conversation
…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
…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
approved these changes
Feb 21, 2026
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.
14 tasks
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
gilescope
added a commit
that referenced
this pull request
Apr 8, 2026
14 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Motivation
do_validate_guaranteed_execution(block authoring only), so the explicit cache invalidation added in fix: reject invalid transactions at mempool entry with dry-run apply #620 never fires on relaysapply()against current ledger state — invalid txs then fail revalidation and get dropped🗹 TODO before merging
📌 Submission Checklist
🧪 Testing Evidence
Validated under load on a relay node — after TTL expiry, stale transactions are evicted from the mempool on the next revalidation cycle.
🔱 Fork Strategy
Links