Problem
Several small follow-ups from the May 2026 audit are tracked in design notes but not as code. Bundled here because each is too small to file separately:
-
chain_head == None branch in validate_block_above is not unit-tested. Commit 6d302a7a0 added an instant-abstain when local chain_head is unset, but no test exercises it.
-
TryFrom<RawProposedValue> bound check has no positive regression test. Commit 503a3d43d flipped silent From to fallible TryFrom, but the pinned-test that documented the bug was deleted along with the fix. A future refactor could re-introduce silent aliasing without breaking any test.
-
InjectedTxMempool::insert doc comment lines 326-340 still describes the old retain policy. Commit d52c62e01 changed purge_expired to drop unresolved ref-block txs (symmetric with seen), but the inline comment in insert was not updated.
Proposed solution
A single PR with three small additions:
validate_rejects_advance_when_chain_head_is_none() in service/src/externalities.rs tests module.
raw_proposed_value_out_of_range_round_is_rejected() in core/src/codec.rs tests module — assert TryFrom returns Err on round = i64::MIN.
- Edit the doc comment in
service/src/mempool.rs around the insert impl to reflect the post-commit-d52c62e01 drop policy.
Alternatives
File three separate issues — overkill for the scope of each fix.
Additional context
All three are audit follow-ups that surfaced while triaging issues already fixed (#7, #9, #10 in the audit tracker).
Problem
Several small follow-ups from the May 2026 audit are tracked in design notes but not as code. Bundled here because each is too small to file separately:
chain_head == Nonebranch invalidate_block_aboveis not unit-tested. Commit6d302a7a0added an instant-abstain when local chain_head is unset, but no test exercises it.TryFrom<RawProposedValue>bound check has no positive regression test. Commit503a3d43dflipped silentFromto fallibleTryFrom, but the pinned-test that documented the bug was deleted along with the fix. A future refactor could re-introduce silent aliasing without breaking any test.InjectedTxMempool::insertdoc comment lines 326-340 still describes the old retain policy. Commitd52c62e01changedpurge_expiredto drop unresolved ref-block txs (symmetric withseen), but the inline comment ininsertwas not updated.Proposed solution
A single PR with three small additions:
validate_rejects_advance_when_chain_head_is_none()inservice/src/externalities.rstests module.raw_proposed_value_out_of_range_round_is_rejected()incore/src/codec.rstests module — assertTryFromreturnsErronround = i64::MIN.service/src/mempool.rsaround theinsertimpl to reflect the post-commit-d52c62e01drop policy.Alternatives
File three separate issues — overkill for the scope of each fix.
Additional context
All three are audit follow-ups that surfaced while triaging issues already fixed (#7, #9, #10 in the audit tracker).