docs+tests: HIGH-1 follow-through — README, stale comments, regressio… - #148
Merged
Conversation
…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
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.
…n tests
Aligns the docs and tests with the M-1 fix (commit a35c4e9... f75ad9a) that deferred
commit_pool_ordinalallocation from create-time to threshold-cross-time.Docs
xdefinition (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
Regression tests (NEW)
Createmust not bump COMMIT_POOL_COUNTER;NotifyThresholdCrossedmust.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