Skip to content

tapgarden: merge upstream main into custom genesis PSBT support - #2

Draft
SadiqJaf wants to merge 34 commits into
mainfrom
codex/issue-721-merge-upstream-main
Draft

SadiqJaf wants to merge 34 commits into
mainfrom
codex/issue-721-merge-upstream-main

Conversation

@SadiqJaf

Copy link
Copy Markdown
Owner

In-fork draft so CI and backward-compatibility workflows run against the merge of codex/issue-721-custom-genesis-psbt (d85ccfd877) with upstream main (93420d46). This does not update lightninglabs#2238.

The merge keeps the PR's 33 commits and takes upstream's anchoring-only confirmation path. Custom genesis PSBT handling is re-applied on that path: trace logging, publishBroadcast (an ambiguous earlier publish must not drop confirmation tracking), CustomAnchorLeaseRenewalInterval, and outpoint-based itest anchor checks. proofsWatched and UpdateMintingProofs went away with the legacy confirmation subscription.

Issue 721 tests now wait on mint anchorings, deliver confirmation through the mock registrar, and cover registration failure, lease-suppressed publish retry, and a Broadcast batch whose anchoring was not persisted across restart.

Open in Web Open in Cursor 

…tom-genesis-psbt

# Conflicts:
#	docs/release-notes/release-notes-0.9.0.md
#	lndservices/chain_bridge_test.go
#	tapdb/sqlc/querier.go
Use MintingBatch.Copy to avoid copying atomic state, cover staging isolation and error paths, and wrap wallet-anchor lines to satisfy CI lint.
Integrate upstream cancellation lease cleanup through a shared dispatcher. Preserve batch-scoped custom leases and never unlock foreign custom-anchor inputs through the ordinary wallet fallback. Add mixed-input and all-foreign cancellation regressions.

Signed-off-by: Sadiq Jaffer <sadiq.jaffer@satscryption.io>
SadiqJaf and others added 4 commits September 9, 2026 07:35
Preserve both custom-anchor key repair queries and upstream orphan-UTXO candidate selection at their shared SQL insertion point. Keep generated bindings and upstream orphan-validation regressions intact.

Signed-off-by: Sadiq Jaffer <sadiq.jaffer@satscryption.io>
Integrate upstream cd3253d through a history-preserving merge. Retain custom genesis anchor changes alongside upstream proof encoding, grouped receive, invoice validation, integration coverage, and dependency updates.

Signed-off-by: Sadiq Jaffer <sadiq.jaffer@satscryption.io>
Merge upstream 9bf78a5. Preserve custom-anchor publication retries and batch-scoped lease renewal after registering the new mint anchoring watcher, and release only recorded custom leases on durable abandonment. Retain legacy confirmation behavior and immutable signed packets. Regenerate SQL and RPC bindings with pinned tools and add watcher failure, confirmation, retry and abandonment regressions.

Signed-off-by: Sadiq Jaffer <sadiq.jaffer@satscryption.io>
Merge upstream main (93420d4) into
codex/issue-721-custom-genesis-psbt (d85ccfd). The PR's 33 commits
are preserved. Upstream's re-org watcher rework removed the cultivator's
legacy RegisterConfirmationsNtfn path, so confirmation is learned only
by staking a mint anchoring and waiting on its delivered phase.

Conflict resolutions:

tapgarden/cultivator.go
- Drop proofsWatched. It only gated ProofWatcher.WatchProofs on the
  legacy confirmation path, which upstream deleted. Nothing else reads
  it. UpdateMintingProofs is dropped with it.
- Broadcast keeps upstream's anchoring-only flow: registerMintAnchoring
  before any Broadcast publish, then one goroutine waits on the
  registry. Re-apply the custom-genesis trace log (isCustomAnchorPsbt)
  and publishBroadcast. An earlier Committed-state publish may already
  have relayed the transaction, so a later publish error must not cancel
  confirmation tracking or return the batch to a mutable state.
  publishBroadcast renews custom-anchor leases and treats an ambiguous
  wallet rejection as still-watched. Non-custom publishes still fail the
  state step when PublishTransaction fails.

tapgarden/planter.go
- Cultivator config keeps upstream's anchoring waiter wiring and drops
  UpdateMintingProofs. CustomAnchorLeaseRenewalInterval is still passed
  through so Broadcast retries and lease renewal keep the PR's cadence.

tapgarden/planter_test.go
- mintAnchorings is upstream's trigger-outpoint lookup. assertTxPublished
  only waits on PublishReq. The legacy ConfReqSignal handshake is gone.
  assertAnchoringRegistered also rejects a non-zero confirmation
  subscription count.

bench/fixture/mint_driver.go
- The pump confirms a published genesis transaction on the mock re-org
  watcher (upstream). It no longer correlates ConfReqSignal with
  publishes.

itest/assertions.go
- AssertAssetsMintedAtOutpoint keeps the PR's outpoint check
  (AssetAnchorOutpointCheck, so a non-zero asset anchor index is
  asserted) and upstream's scriptKeyLocalCheck (external script keys are
  not required to be wallet-local).

Tests:
- Issue 721 stateful tests wait on mint anchorings instead of
  ConfReqSignal, deliver confirmation through confirmAnchoring, and
  fail registration with MockRegistrar.FailNextRegister. PauseNextRegister
  holds Register after the anchoring is stored so a lease fault can be
  injected before publishBroadcast. DropAnchorings covers a Broadcast
  batch whose anchoring was not persisted across restart.

Co-authored-by: Sadiq Jaffer <SadiqJaf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants