parameters for chain exercises#122
Open
n13 wants to merge 3 commits into
Open
Conversation
so this can also be run on testnet
The wormhole round-trips its amount back to the funding wallet and draws
it from the root account, which is funded independently of --total-amount,
so scaling it down saves nothing. Worse, each round re-partitions the
amount across num_proofs and deducts fees, so a scaled-down amount rounds
an output below the on-chain minimum in a later round and emits no
transfer event ("No transfer event found"). Restore the proven 50.0.
Verified on a local --dev node: full `quantus exercise` suite now passes
62/62 with --root-account crystal_alice --total-amount 40.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…nt flags The exercise command was undocumented in the README. Add a Command Reference section covering the phases, usage (dev node vs. public testnet), and a flag table for the new --root-account / --total-amount options and the existing --phases/--skip/--seed/--json flags. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Summary
Adds two parameters to
quantus exerciseso the suite can run against any funded account — e.g. a public testnet — instead of requiring the genesis-fundedcrystal_alicedev account and ~4000 tokens.What's new
--root-account <NAME>(+--root-password/--root-password-file) — the wallet that funds the run. Defaults to the built-incrystal_alicedev account, so existing--devusage is unchanged. Threaded through the funding step and the wormhole scenario.--total-amount <TOKENS>(default40) — total budget drawn from the root account, split evenly across the ephemeral test accounts.How it works
DISCRETIONARY_SCALE = 100via a newctx.test_unit = unit / 100, so the suite needs ~tens of tokens instead of ~4000.Inability to pay some fees) with fast, actionable errors:test_unit/2must stay above ED).50.0): it round-trips back to the wallet and draws from the separately-funded root account, so shrinking it saves nothing — and small per-proof amounts round below the on-chain minimum in later rounds (No transfer event found).Caveat
The
governancephase still relies on the dev genesis accounts (tech-collective membership), so pass--skip governancewhen using a custom root account on a public testnet. This is documented in--help.Testing
--devnode (spec 135 / tx 3): full suite 62/62 passing with--root-account crystal_alice --total-amount 40— funds 4 ephemeral accounts at 10 DEV each; multisig, governance, preimage (all deposit-bearing) and wormhole all green.Docs
quantus exercisewas previously undocumented — added a Chain Exercise Suite section to the README (phases, dev-node vs. testnet usage, and a flag table). All new flags are also self-documented in--help.