Repository navigation
fix: enable max quotes in the usdt qa fixture - #28
Conversation
There was a problem hiding this comment.
Suggestion: 👍 Approve
Test run: synonymdev/bitkit-core#170 at 1ebbd77, on this change at 0395571: 1 passed.
The test run was for synonymdev/bitkit-core#170 at head 1ebbd77. Item 1 was the only item; it ran and passed.
The run used this change at commit 0395571, and the change was installed for the run.
Needed: yes. Item 1 could not be reviewed or run before because the fixture lacked MAX metadata and the Android companion package was unavailable; it passed on this change.
talosmachina
left a comment
There was a problem hiding this comment.
No findings. This PR moves the USDT fixture to Core 0.8.0-rc4, adds a quote-max wallet command and a max-smoke check, and counts override estimates, paymaster authorizations and submissions in the control status. Reviewed 0395571, full tier.
What I checked, and 5 candidates I ruled out
Read in full: the whole diff, plus usdt-fixture, usdt/config.cjs, usdt/bridge-smoke.cjs, the usdt/Dockerfile and the usdt-* services in docker-compose.yml. On Core at the pinned 1ebbd77 I also read UsdtWallet::quote_max_transfer and UsdtQuote (wallet.rs, types.rs) and the override branch in paymaster.rs.
Ran: npm run lint and npm test in usdt/ on Node 22, which passed (8 tests). I put the PR's usdt/wallet next to a Core checkout at the pinned sha and ran cargo metadata --locked, which passed: the 0.8.0-rc4 bump in Cargo.lock matches Core's Cargo.toml at that commit.
Not run: max-smoke against a live fork, because it needs a private Arbitrum archive RPC. I did not build the images either.
CI: none is configured for this branch.
Ruled out
quote-maxcall shape: Core'squote_max_transfer(recipient: String, destination: UsdtDestination) -> Result<UsdtQuote, _>matches the call inmain.rs, andUsdtQuotederivesSerialize, sojson!compiles.amountandmaximum_feecome out as JSON numbers, and the smoke'sBigInt(...)and> 0checks handle them.- Override counter counting the wrong calls: when the balance override is on, Core sends
eth_estimateUserOperationGaswith a third param (the state diff). Without it, Core sends two params. Soparams[2] !== undefinedonly counts the override estimate. - Submissions bypassing the counter: in
docker-compose.ymlthe gateway's environment gives itLOCAL_PROVIDER_URL(:23452), the provider the counter wraps, and no other bundler URL; its other upstreams are the node, Orchestra and LayerZero. I could not confirm in the gateway source that it sends user ops nowhere else, but the smoke's unchanged-balance assertions would catch a submission that landed. - A rejected estimate still counting: the counter increments before the request goes to Alto. That doesn't hide a failure, because a rejected estimate makes
quote-maxthrow and the smoke fails. - Fingerprint drift:
usdt/max-smoke.cjsis a tracked file underusdt/, so the image tag changes with this PR and an older image cannot be reused.
Merge confidence: 4/5. The new path crosses the Core and gateway contract, and the only check that exercises it, max-smoke against a live fork, was not run here.
jvsena42
left a comment
There was a problem hiding this comment.
Approving at 0395571 with 1 LOW open (inline); fix it here or in a follow-up, your choice. I read the diff and ran the fixture from this branch.
Run on macOS (Docker Desktop, arm64), default project and ports, upstream https://arbitrum-one.public.blastapi.io in the private env file:
| Step | Result |
|---|---|
./usdt-fixture build |
images built (after giving git read access to the two pinned repos) |
up, ps, /healthz |
four services healthy, {"status":"ok"}, chainId 42161, pins 1ebbd77 / ada7f6a |
check |
lint clean, 8 tests pass |
normal wallet quote on a funded probe wallet |
estimatesWithOverride stays 0, paymasterAuthorizations +1 |
max-smoke |
exit 0, amount=18319474, maximum_fee=1680526 (sum 20000000 = balance), submitted:false; counters: override +1, authorizations +1, submissions +0 |
provider-mode unavailable then max-smoke |
exit 1 |
smoke, bridge-smoke, max-smoke again |
all exit 0, passed:true |
The normal-quote row matters for the counter in server.cjs:86: a two-parameter estimate coming through the gateway is not counted as an override, so the override assertion cannot pass by accident.
Read and clean: the Core pin equals v0.8.0-rc4; the one-line Cargo.lock bump matches it; max-smoke is wired in usdt-fixture, cli.cjs, the Dockerfile copy and the image fingerprint; an assertion failure sets a non-zero exit through compose run; no port, bind or secret changes.
Not in the diff, so noted here: docs/usdt-fixture.md lists smoke and bridge-smoke in its command block but not max-smoke, and the wallet usage string in usdt/wallet/src/main.rs omits quote-max. The README and the script help are right.
|
Pushed 0d7508c, which answers the review at 0395571:
@jvsena42 Both added: Lint and the 8 fixture tests pass. |
Description
Out of Scope