Repository navigation
Prepare USDT fixtures and Paykit peer for E2E journeys - #276
Conversation
fcf2914 to
14d77d2
Compare
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Pins the bitkit-docker USDT fixture by commit and adds a launcher that fetches it. Adds TypeScript helpers for funding, inclusion, provider and bridge controls, and has the iOS build embed the USDT_* endpoints. The Paykit fixture peer gains USDT and mixed endpoints, recurrence, per-period quotes, payment deadlines, accept/proof/quote commands and evidence export. Reviewed d2eb0e0, full tier.
What I checked, and 5 candidates I ruled out
Read in full: scripts/usdt-fixture, test/helpers/usdt.ts, the scripts/build-ios-sim.sh hunk, tools/paykit-fixture-sender/src/main.rs. Lockfile not reviewed.
Ran here: cargo test --locked for the fixture peer (7/7 pass, including the two new USDT/recurrence tests against the real rc71 SDK), with a stripped environment.
Not run: the helpers against a live fixture (needs the archive RPC), and any Appium spec (none added).
CI: no checks reported on this branch.
Ruled out
- The pinned
USDT_INFRA_REVISIONdisappears when synonymdev/bitkit-docker#25 is squash-merged: GitHub still serves a fetch by SHA throughrefs/pull/25/head. prepareUsdtFixturerejects valid env:status.urls.gatewayuses the sameUSDT_GATEWAY_PORTthat Compose passes to the fixture and thatenvprints.evidenceoutput is not parseable JSON: the issuer line moved toeprintln!, so stdout carries only the JSON.- A preset combined with
--per-periodsilently keeps fixed rates: it fails loudly atper-period quotes cannot have fixed request rates. sendpublishes only the Bitcoin endpoint: it now syncs every endpoint in the validated terms.
Merge confidence: 4/5, the helpers and launcher were not exercised against a live fixture here, and no CI runs on this branch.
piotr-iohk
left a comment
There was a problem hiding this comment.
Reviewed the fixture peer and pushed a fix in 6f9ea08: the USDT endpoint payload was missing chain_id and token, which both native apps require. Added those fields and test assertions, and updated the Docker revision pin to include the image-tag fix.
Peer tests and TypeScript checks passed, and the corrected payload was verified in the offline preview. Android/iOS testing against the running stack is still pending.
|
@piotr-iohk I've updated this and Docker #25 so the normal USDT setup doesn't need paid Alchemy features. We now skip mainnet logs from before the fork, keep all payments made locally, and pace/cache the RPC reads. I tested sends, receives, proofs, history recovery and the bridge scenarios with free-tier limits enforced, including rate-limit retries. Everything passed. This used our existing key with those limits enforced, rather than an actual free account. No setup changes for you beyond pulling the latest revisions and rebuilding. A Free Arbitrum RPC URL should be enough within its quota. Your app flows and helpers stay the same; testing old mainnet wallet history is outside this local setup. |
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: Full review of the complete pull request diff against merge base 492dbfcc, at 3b2db84. There is no inherited baseline.
No new actionable code findings.
The pinned fixture 9e32a22 fetches with the launcher's git fetch --depth 1 origin <sha>. prepareUsdtFixture() compares the four app routes to status.urls.gateway (http://127.0.0.1:$USDT_GATEWAY_PORT), which matches usdt-fixture env, and reverses that published gateway port on Android. The sender's USDT endpoint (usdt-arbitrum-address, string chain_id 42161, token 0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9) matches the draft parsers on bitkit-android#1432 (56e1c321) and bitkit-ios#884 (554f116). Evidence payer/payee values strip a normal pubky + 52-character key the same way as PaykitPublicKeys.raw in paykit-rs e4e58d3. Those drafts were checked only for this contract.
Validation: The full diff and the pinned fixture control API were inspected. bash -n passed for scripts/usdt-fixture and scripts/build-ios-sim.sh. This PR adds no Appium specs. The Docker fixture, sender cargo test, and devices were not run. Local Rust is 1.83; the sender asks for 1.91.1. This branch has no GitHub checks. App wallet, contact, Shop, and bridge UI journeys remain the follow-up described in the PR. Build those draft apps with BACKEND=regtest after eval "$(./scripts/usdt-fixture env)".
piotr-iohk
left a comment
There was a problem hiding this comment.
Approved as USDT test setup and helpers, following the current-head QA review. The pinned local fixture passed checks, payment smoke and bridge smoke. Mobile/Appium, VSS restore and paid Shop acceptance remain follow-up work.
Prepare USDT journeys for the existing Appium suite.
USDT_INFRA_REVISIONpins the Docker Compose fixture from synonymdev/bitkit-docker#25, including the gateway built from merged synonymdev/bitkit-usdt-service#4. The launcher fetches that exact revision and builds the images. The Shop profile includes the matching seller-setup fix in pubky/pubky-marketplace#167 and per-rail verifier in pubky/locks#75. Existing staging VSS, Pubky and rate services remain in use.The pinned fixture works within Alchemy Free capabilities: paced/cached archive reads, throttling retries and local-only payment history. It skips pre-fork mainnet logs; the provider monthly quota still applies.
The iOS build helper embeds the fixture endpoints. Shared test helpers validate the selected fixture, reverse Android's gateway port, fund wallets, control inclusion/failures and drive bridge scenarios. The real SDK peer supports USDT-only or mixed endpoints, fixed/per-period quotes, deadlines, request claim/acceptance, proof submission and authenticated evidence export.
README and
docs/usdt-e2e.mdcontain setup, selectors and the journey matrix. Use USDT-enabled builds from iOS #884 and Android #1432 or their descendants. No mobile or Core source change is required for the test setup.Validation:
This provides infrastructure, peer commands and controls. Piotr still needs to author/run the full Android/iOS wallet, contact/request/subscription, VSS recovery, paid Shop and bridge UI journeys and wire them into Docker-capable CI. Contracts execute locally; Pimlico pricing/signing and external Orchestra/LayerZero delivery are simulated. Production provider behavior needs separate live acceptance.