Skip to content

Security/shielded pool hardening - #109

Merged
nol4lej merged 18 commits into
mainfrom
security/shielded-pool-hardening
Jul 6, 2026
Merged

Security/shielded pool hardening#109
nol4lej merged 18 commits into
mainfrom
security/shielded-pool-hardening

Conversation

@nol4lej

@nol4lej nol4lej commented Jul 6, 2026

Copy link
Copy Markdown
Member

Security hardening of frame/shielded-pool, fixed change-by-change with tests. Requires a runtime upgrade (spec_version 2 → 3).

  • Gate private_transfer on a registered, verified asset (the only path that skipped the asset state-machine).
  • Reject asset-id collision instead of silently overwriting an existing asset.
  • Bind the unsigned relayer field into the tx-pool provides tag.
  • Error on unattributable relay fees instead of dropping them silently.
  • Bound unsigned-tx longevity and claim_shielded_fees inputs.
  • Price private_transfer per inserted leaf; make shield_batch use its benchmarked weight and reject empty batches.
  • Regenerate all affected pallet weights.
  • Harden the historic Merkle-root window (non-zero window enforced, atomic insertion, duplicate-aware eviction).
  • Harden the pool-balance ledger invariant with a try_state check and defensive assertions.
  • Reject non-32-byte recipient binding; tie the merkle capacity guard to the fixed tree depth.
  • Unify Note.asset_id to u32 to match the circuit.

nol4lej added 18 commits July 5, 2026 11:24
Regenerate weights for account-mapping, relayer, shielded-pool and zk-verifier.
Replaces the interim placeholder for shielded-pool's parameterized
private_transfer(n) with measured figures.
@nol4lej
nol4lej merged commit 2ffd2fc into main Jul 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant