test(dlv): a fresh two-asset market runs its whole lifecycle with every step admitted - #866
Merged
Merged
Conversation
…ry step admitted
One route test chains the sovereign-finance lifecycle on fresh identities:
the owner is funded through the real admitted origins (ERA faucet, two
0x0029-minted tokens), four traders by admitted transfers; an admitted create
and advertisement; three settles while the owner is away and a stranger
composing from birth; the owner's storage.sync catching up, anchoring V_3 and
moving the advertisement; the stranger recomposing from V_3 to the same
frontier and a fourth settle off it; a second sync re-anchoring V_4; the
admitted close draining exactly the frontier reserves; and the proceeds
funding a second admitted create whose B leg exceeds the pre-close balance.
At every checkpoint both assets are conserved exactly across the owner, the
live vaults and every trader, and every participant's admitted balances equal
its head's.
Control: the second create sized one above the post-close balance is refused
("need 19038, have 19037 admitted").
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.
What
One route test,
a_fresh_two_asset_market_runs_its_whole_lifecycle_with_every_step_admitted, chains the whole sovereign-finance lifecycle on fresh identities. Every step goes through the real routes, and every step is admitted. Before this, each step was covered only by its own test; none ran them in sequence.The test is additive. No production path changes.
The run
Steps:
storage.synccatches up all three, oldest first, as admitted applies. It anchors a fresh baseline at V_3 and moves the advertisement to it.(sequence, c_n). A fourth trader then settles off V_3.(0, 0, 5).What it asserts at every checkpoint
Control
insufficient … to encumber (need 19038, have 19037 admitted). So the create's sufficiency check reads the admitted post-close balance, and step 7's amount is bounded by exactly what the close returned. The file was restored from a byte copy, andcmpconfirms it is identical.Verification
--test-threads=1: 1 passed.make lintexit 0.bash ci/production_safety_checks.shexit 0.RUSTUP_TOOLCHAIN=1.98.0.Not covered
scripts/rig_dlv_market.py+scripts/dlv_market_rig_proof.sh) is still owed.