Repository navigation
Conversation
c206f0d to
2814bf6
Compare
4283082 to
50595de
Compare
|
/gateway review |
|
👀 gateway review starting… |
starius
left a comment
There was a problem hiding this comment.
Style — ~18 unexported funcs and ~14 test helpers have no godoc, against the convention. Non-test: canonicalAddressParams, cloneAddressParams (both copies), validateScripts, genBtcControlBlock, validateAsset (both), findUniqueInput (both), validateSweep (both), validateSequence, verifyTapscriptSignature (both), timeoutPathSibling, encodedTimeoutPathSibling, newHtlcSwapKit, validateProof.
|
Follow-up commit 818876e also adds documentation to the unexported production and test helpers listed in the general review. Local verification passed: go test ./..., go test -race ./assets/..., go vet ./..., golangci-lint (0 issues), plus a Nautilus #1712 itest-package compile with integration tags. |
818876e to
81e876c
Compare
81e876c to
dcd5af1
Compare
|
@hieblmi, remember to re-request review from reviewers when ready |
4807556 to
547a9ad
Compare
f50abc0 to
f7565a9
Compare
|
@starius: review reminder |
f7565a9 to
4a124f3
Compare
4a124f3 to
a6b6846
Compare
Route existing HTLC, static address and reservation scripts through the same leaf serializers. Pin the quote templates so moving the serialization cannot change signed numbers or zero-hash fee estimates.
Define the key roles, cooperative and unilateral paths, witnesses and weight estimates for both directions. Exercise the legacy vectors and execute the spend conditions against the Bitcoin script engine.
8347df9 to
941c126
Compare
|
@starius: review reminder |
Build the swapkit adapter against the released pre-btcd-v2 modules. Pin tapd's bounded legacy TLV decoder at the v0.8.8 release commit. Map contracts and asset descriptors into SDK plans and reuse the authenticated wallet connection.
Taproot Assets v0.8.8 fixes an asset-invoice settlement regression. Check the running backend before new on-chain operations. Verify proof history, active and passive holdings, Bitcoin anchors and fee prevouts. Keep offline transaction and witness construction available.
Prepare confirmed inputs for native Build and check its allocations, Bitcoin template, change policy and fee before granting authority. Verify wallet-funded fees again after native Commit.
Check signing policy and the saved package before using LND, and accept peer witnesses only for the approved transaction. Preserve durable recovery while ephemeral signing sessions remain caller-owned.
Bind native compact paths to approved signed parents. After parents confirm, replace proof metadata with authenticated histories without altering the transaction or final witnesses.
Reconcile fallback, preimage and refund spends against agreed terms. Recover and export exact proofs, including after ambiguous publication or a restart. Verify against the transaction that actually mined.
941c126 to
0ad07d7
Compare
Provide shared contracts and SDK helpers for asset Loop In, asset Loop Out, and reservations.
swapkit/defines Bitcoin spending policies, signing roles, witnesses, and weights.swapkit/tapsdk/adapts those contracts to native tap-sdk transfer construction, checks independently agreed terms, binds signing to the approved package, and handles proofs and recovery. The consuming feature owns its state machine, persistence, Lightning deadlines, and decisions about releasing signatures or preimages.The implementation uses released tap-sdk v0.1.1 and Taproot Assets v0.8.8 on the pre-btcd-v2 dependency graph. New on-chain asset operations require a running tapd v0.8.8. The runtime gate accepts the released daemon's
0.8.8-alphaversion string and rejects v0.8.6, v0.8.7, and v0.8.8 release candidates. Consuming Go modules must repeat the bounded legacy TLV decoder replacement in Loop's go.mod, because Go does not inherit dependency replacements.All contracts have a cooperative MuSig2 path. Their unilateral refund policies are explicit:
NewDepositKitNewReservationKitNewSwapKit(SwapHTLCLegacyCSV)NewSwapKit(SwapHTLCStaticLoopInV3)/SwapHTLCCLTVBoth HTLC variants require the receiver's signature and the correct 32-byte preimage on success, with the existing one-block CSV. The reservation purchase flow in Loop #1229 preserves its quoted CSV delay by adapting
NewDepositKitwith explicit server/client key roles.NewReservationKitsupplies the separate CLTV policy.The default asset script descriptor preserves the fixed NUMS internal key and single
OP_TRUEleaf throughLegacyOPTrueOutput. The SDK supplied-key variant,SDKOPTrueOutput, requires explicit selection. Funded outputs retain their exact descriptors through spending and recovery.Review the eight commits in order. Each carries unit coverage for the behavior it introduces.
Package usage and validation boundaries are documented in the contract README and SDK adapter README.
All 11 active Loop CI checks passed on
0ad07d71c770, including build/lint, module and generated-file checks, SQLite/PostgreSQL race suites, and LiT unit and integration tests. Current Loop CIDaemon-backed asset lifecycle tests live in Nautilus #1712. They cover the contracts, transfer and proof boundaries, and an explicitly selected SDK supplied-key OP_TRUE deposit-to-HTLC lifecycle. That fresh-key case passed locally on tapd v0.8.8 for claim, HTLC timeout, and deposit timeout. The companion PR's current hosted run is incomplete: its default tranche 11 lost communication with the self-hosted runner, which also caused the integration guard to fail. Runner failure