Skip to content

docs+tests: HIGH-1 follow-through — README, stale comments, regressio… - #148

Merged
Bluechip23 merged 1 commit into
mainfrom
claude/bluechip-security-audit-dbsuW
May 19, 2026
Merged

docs+tests: HIGH-1 follow-through — README, stale comments, regressio…#148
Bluechip23 merged 1 commit into
mainfrom
claude/bluechip-security-audit-dbsuW

Conversation

@Bluechip23

Copy link
Copy Markdown
Owner

…n tests

Aligns the docs and tests with the M-1 fix (commit a35c4e9... f75ad9a) that deferred commit_pool_ordinal allocation from create-time to threshold-cross-time.

Docs

  • README.md: rewrote the mint-formula x definition (line 655) so it reflects the new "ordinal among pools that have CROSSED threshold" semantics, and updated the two anti-spam narrative blocks (lines 133, 561) to clarify that the 1h create cooldown + USD fee defend against registry bloat (not against ordinal inflation — the fix removes that vector entirely).

Stale comments

  • factory/src/pool_creation_reply.rs:232: comment claimed the ordinal is "captured at create time" — false post-fix. Replaced with a description of the sentinel-then-overwrite flow.

Regression tests (NEW)

  • test_commit_pool_ordinal_advances_on_threshold_cross_not_create: pins the core invariant — Create must not bump COMMIT_POOL_COUNTER; NotifyThresholdCrossed must.
  • test_junk_creates_do_not_inflate_ordinal_for_legitimate_crosser: exercises the economic invariant — three junk creates from distinct attacker addresses must leave the counter at 0, and a legitimate pool that crosses afterward must receive ordinal 1 (with the mint amount in the undecayed-base range, confirming x=1 in the formula).

If either test fails in the future, the M-1 attack has regressed.

Test count: 250 → 252 (both new tests passing). Full factory suite passes; workspace compiles clean.

https://claude.ai/code/session_019mxdB2vwswjgipCUq2x4Fu

…n tests

Aligns the docs and tests with the M-1 fix (commit a35c4e9... f75ad9a)
that deferred `commit_pool_ordinal` allocation from create-time to
threshold-cross-time.

Docs
- README.md: rewrote the mint-formula `x` definition (line 655) so it
  reflects the new "ordinal among pools that have CROSSED threshold"
  semantics, and updated the two anti-spam narrative blocks (lines
  133, 561) to clarify that the 1h create cooldown + USD fee defend
  against registry bloat (not against ordinal inflation — the fix
  removes that vector entirely).

Stale comments
- factory/src/pool_creation_reply.rs:232: comment claimed the ordinal
  is "captured at create time" — false post-fix. Replaced with a
  description of the sentinel-then-overwrite flow.

Regression tests (NEW)
- test_commit_pool_ordinal_advances_on_threshold_cross_not_create:
  pins the core invariant — `Create` must not bump COMMIT_POOL_COUNTER;
  `NotifyThresholdCrossed` must.
- test_junk_creates_do_not_inflate_ordinal_for_legitimate_crosser:
  exercises the economic invariant — three junk creates from distinct
  attacker addresses must leave the counter at 0, and a legitimate
  pool that crosses afterward must receive ordinal 1 (with the mint
  amount in the undecayed-base range, confirming x=1 in the formula).

If either test fails in the future, the M-1 attack has regressed.

Test count: 250 → 252 (both new tests passing). Full factory suite
passes; workspace compiles clean.

https://claude.ai/code/session_019mxdB2vwswjgipCUq2x4Fu
@Bluechip23
Bluechip23 merged commit 1e31939 into main May 19, 2026
1 of 5 checks passed
@Bluechip23
Bluechip23 deleted the claude/bluechip-security-audit-dbsuW branch May 19, 2026 19:16
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.

2 participants