Repository navigation
docs(testnet): integration-harness guidance for live testnet, plus tooling specs and their decision log - #743
Merged
phertyameen merged 1 commit intoSep 26, 2026
Conversation
…decision log Adds the testnet-facing tooling specifications batch, plus guidance for consuming projects running their own integration suite against the live deployment. - examples/integration-test-harness-notes.md: latency budgets, test account funding/cleanup strategy, and how to keep a suite from interfering with other integrators on the shared deployment. Records that expiry tests are inherently ledger-bound because the repo has no local sandbox. - tooling/nonce-inspector-spec.md: read-only helper printing the current on-chain nonce, with multi-sample stability detection so nonce churn is visible before submitting. - tooling/faucet-helper-spec.md: one-step create/fund/deploy/initialise, defaulting expiry to a human duration and echoing the immutable recovery_address so it cannot be set wrong silently. - tooling/decision-log.md: records that this batch was scoped away from scripts/, that specs-not-tools here is deliberate for now, and that where runnable tools should live remains undecided. Also flags that a future local sandbox would obsolete most of these specs. Specs are deliberately not implemented; each opens with an explicit status line. No contract, script, or tool changes. tools/sweep-signer is referenced contextually and not modified. Closes #642 Closes #647 Closes #648 Closes #649
|
@Hassan-oladipupo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Four docs for teams consuming the live testnet deployment: guidance for writing your own integration suite, two tooling specifications, and a decision log explaining why
testnet/tooling/holds specs rather than code.testnet/examples/integration-test-harness-notes.mdtestnet/tooling/nonce-inspector-spec.mdtestnet/tooling/faucet-helper-spec.mdtestnet/tooling/decision-log.mdIntegration harness notes
scripts/test.shrunscargo testagainst an in-process Soroban environment — no network, no fees. That is the right tool for contract logic and the wrong tool for anything depending on a real deployment, so this doc covers what a live suite is actually for, and splits out the assertions an in-process test cannot make (balance conservation, WASM-vs-deployment drift, RPC behaviour, nonce contention).The two sections that took the most care:
Latency — budget ~15 s per state-changing step, sequence state transitions rather than parallelising them, prefer
simulate_sweep()for pre-flight, and never use a fixed sleep as a synchronisation primitive.Shared-state hygiene — the testnet deployment is shared, and the failure mode is concrete:
SweepControllerkeeps a single nonce for all accounts, so another integrator's sweep invalidates a signature you are holding, and the symptom is a bareed25519_verifytrap with no error code. The doc gives the rules that follow (re-read immediately before signing, serialise per controller, treat a trap as retryable, bound the retries) and draws an explicit line at what a suite may touch: it may create its own accounts, it may not change shared configuration.It also records several things that will otherwise cost a reader an afternoon: cleanup does not reclaim anything (
expire()moves no tokens), there is no local sandbox so expiry tests are genuinely ledger-bound,SweepControllerhas no getters so a whole suite failing withUnauthorizedDestinationusually means the shared controller is in locked mode rather than a bug in your code, andscripts/deploy-testnet.shcurrently aborts on an unassignedRESERVE_CONTRACT_ID.Tooling specs
Both specs are read-only or single-account by construction, so neither can grief the shared deployment — that property is stated as a design constraint rather than assumed. The nonce inspector multi-samples to expose churn before you pay a fee to have a stale signature rejected, and the faucet helper echoes the
recovery_addressprominently because it cannot be corrected afterinitialize().Neither spec is implemented. Each opens with an explicit status line.
Decision log
testnet/tooling/currently contains no runnable tools, which looks like an error and invites three reasonable-but-wrong reactions. The log records that the batch was explicitly scoped away fromscripts/, that specs-not-tools is deliberate for now, and — the important part — that where runnable tools should live has not been decided. It inventories the open questions, states what would count as legitimately "fixing" the directory, and distinguishesscripts/(repo build/CI entrypoints) from testnet-facing integrator tooling as a real category difference rather than a location preference.It also flags a risk to the whole batch: these tools mostly work around the absence of a local sandbox, so if one is ever added they should be re-evaluated before being built.
Scope
tools/sweep-signeris referenced contextually and not modified.testnet/tooling/README.md(the index) is tracked separately under testnet/tooling/README.md: index proposed testnet-facing tooling that lives outside the project's scripts/ folder #643 and is intentionally left alone; this PR adds thedecision-log.mdthat testnet/tooling/README.md follow-up: add a decision log noting why tooling specs live here rather than as actual scripts #649 asks for.contracts/sweep_controller/src/,contracts/ephemeral_account/src/, andcontracts/sweep_controller/src/errors.rsrather than restated fromdocs/api-reference.md.Closes #642
Closes #647
Closes #648
Closes #649