Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4094e8f
taprpc: simplify MacaroonWhitelist func code
ffranr Sep 29, 2025
cea2725
taprpc: separate universe proof courier permissions in MacaroonWhitelist
ffranr Oct 8, 2025
a7d6ebd
proof+taprpc: inline default macaroon whitelist logic
ffranr Oct 8, 2025
fe70d4f
proof: update stale universe proof courier comment
ffranr Oct 8, 2025
99c30a5
taprpc: add default permissions for MailboxInfo and Universe/Info
ffranr Oct 8, 2025
9f2fe58
tapgarden: refactor fee rate calculation from fundGenesisPsbt
ffranr Mar 3, 2025
687b851
tapgarden: refactor fundGenesisPsbt to pass wallet funding as closure
ffranr Mar 3, 2025
affedad
tapgarden: refactor fundGenesisPsbt to pass in pending batch
ffranr Mar 3, 2025
f61140d
tapgarden: remove batch key argument from fundGenesisPsbt
ffranr Mar 3, 2025
3164451
tapgarden: mock helper FundGenesisTx returns change output index
ffranr Oct 9, 2025
2b04c29
tapgarden: add batch funding support to RandMintingBatch
ffranr Oct 9, 2025
1fc3ea5
tapdb: use new funded mint batch in TestUpsertMintSupplyPreCommit
ffranr Oct 9, 2025
10b3fb4
tapdb+tapgarden: replace RandSeedlingMintingBatch with RandMintingBatch
ffranr Oct 9, 2025
9b16515
docs: add release note
ffranr Oct 10, 2025
c0845a7
tapdb: add pagination and ordering to QueryAddrEvents
darioAnongba Sep 30, 2025
9a786ad
taprpc: add pagination and sorting to AddrReceivesRequest
darioAnongba Sep 30, 2025
1e085a3
rpc: add pagination and sorting to AddrReceives endpoint
darioAnongba Sep 30, 2025
aece748
cmd: add pagination and sorting to tapcli addr receives
darioAnongba Sep 30, 2025
12dccdd
docs: release notes for addrs receives pagination
darioAnongba Sep 30, 2025
60fbb90
itest: add test for address receives pagination
darioAnongba Sep 30, 2025
b7d65fa
chain_bridge: refactor GetBlockTimestamp to use GetBlockHeaderByHeight
ffranr Oct 10, 2025
8c6af45
lndservices: add block header cache
ffranr Oct 10, 2025
8f6b510
Merge pull request #1841 from lightninglabs/wip/refactor-rpc-macaroon…
jtobin Oct 13, 2025
9853145
lndservices+tapcfg: use block header cache in LndRpcChainBridge
ffranr Oct 13, 2025
57984a4
Merge pull request #1418 from lightninglabs/unit-tests-mint-pre-commit
GeorgeTsagk Oct 15, 2025
83a4116
Merge pull request #1849 from lightninglabs/wip/add-block-header-cache
ffranr Oct 16, 2025
a13eff8
build: bump lnd, lndclient
GeorgeTsagk Oct 23, 2025
e3a9299
rfq+lndservices: remove scid alias of expired quotes
GeorgeTsagk Aug 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lndservices/router_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ func (l *LndRouterClient) DeleteLocalAlias(ctx context.Context, alias,
return l.lnd.Router.XDeleteLocalChanAlias(ctx, alias, baseScid)
}

// FindBaseAlias finds the base channel ID for a given alias.
func (l *LndRouterClient) FindBaseAlias(ctx context.Context,
alias lnwire.ShortChannelID) (lnwire.ShortChannelID, error) {

return l.lnd.Router.XFindBaseLocalChanAlias(ctx, alias)
}

// SubscribeHtlcEvents subscribes to a stream of events related to
// HTLC updates.
func (l *LndRouterClient) SubscribeHtlcEvents(
Expand Down
5 changes: 5 additions & 0 deletions rfq/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ type ScidAliasManager interface {
// Manager's maps.
DeleteLocalAlias(ctx context.Context, alias,
baseScid lnwire.ShortChannelID) error

// FindBaseAlias finds the base channel ID for a given alias.
FindBaseAlias(ctx context.Context,
alias lnwire.ShortChannelID) (lnwire.ShortChannelID, error)
}

type (
Expand Down Expand Up @@ -261,6 +265,7 @@ func (m *Manager) startSubsystems(ctx context.Context) error {
HtlcInterceptor: m.cfg.HtlcInterceptor,
HtlcSubscriber: m.cfg.HtlcSubscriber,
AcceptHtlcEvents: m.acceptHtlcEvents,
AliasManager: m.cfg.AliasManager,
SpecifierChecker: m.AssetMatchesSpecifier,
NoOpHTLCs: m.cfg.NoOpHTLCs,
AuxChanNegotiator: m.cfg.AuxChanNegotiator,
Expand Down
54 changes: 48 additions & 6 deletions rfq/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,10 @@ type OrderHandlerCfg struct {
// intercept and accept/reject HTLCs.
HtlcInterceptor HtlcInterceptor

// AliasManager is the SCID alias manager. This component is used to add
// and remove SCID aliases.
AliasManager ScidAliasManager

// AcceptHtlcEvents is a channel that receives accepted HTLCs.
AcceptHtlcEvents chan<- *AcceptHtlcEvent

Expand Down Expand Up @@ -918,7 +922,7 @@ func (h *OrderHandler) subscribeHtlcs(ctx context.Context) error {
func (h *OrderHandler) Start() error {
var startErr error
h.startOnce.Do(func() {
// Start the main event loop in a separate goroutine.
// Start the HTLC interceptor in a separate go routine.
h.Wg.Add(1)
go func() {
defer h.Wg.Done()
Expand All @@ -932,6 +936,12 @@ func (h *OrderHandler) Start() error {
"interception: %v", startErr)
return
}
}()

// Start the main event loop in a separate go routine.
h.Wg.Add(1)
go func() {
defer h.Wg.Done()
Comment on lines +941 to +944
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could use h.ContextGuard.Goroutine here (and above if you like)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL go1.25.0 apparently also adds a WaitGroup.Go method for handling the Add(1)/Done pattern.


h.mainEventLoop()
}()
Expand Down Expand Up @@ -968,8 +978,8 @@ func (h *OrderHandler) RegisterAssetSalePolicy(buyAccept rfqmsg.BuyAccept) {
h.policies.Store(policy.AcceptedQuoteId.Scid(), policy)
}

// RegisterAssetPurchasePolicy generates and registers an asset buy policy with the
// order handler. This function takes an incoming sell accept message as an
// RegisterAssetPurchasePolicy generates and registers an asset buy policy with
// the order handler. This function takes an incoming sell accept message as an
// argument.
func (h *OrderHandler) RegisterAssetPurchasePolicy(
sellAccept rfqmsg.SellAccept) {
Expand Down Expand Up @@ -1112,9 +1122,41 @@ func (h *OrderHandler) cleanupStalePolicies() {

h.policies.ForEach(
func(scid SerialisedScid, policy Policy) error {
if policy.HasExpired() {
staleCounter++
h.policies.Delete(scid)
if !policy.HasExpired() {
return nil
}

staleCounter++

// Delete the local entry of this policy.
h.policies.Delete(scid)
Comment on lines +1131 to +1132
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a big deal in this case but: slightly better if we delete from the local cache last; otherwise, we might lose our reference to the resource? the cleanup routine could appear to be working from tapd's POV (few log messages without re-attempt), but in reality the cleanup could be failing.


ctx, cancel := h.WithCtxQuitCustomTimeout(
h.DefaultTimeout,
)
defer cancel()

aliasScid := lnwire.NewShortChanIDFromInt(
uint64(scid),
)

// Find the base SCID for the alias.
baseScid, err := h.cfg.AliasManager.FindBaseAlias(
ctx, aliasScid,
)
if err != nil {
log.Warnf("Error finding base SCID for alias "+
"%d: %v", scid, err)
return nil
}

// Delete the alias scid mapping on LND.
err = h.cfg.AliasManager.DeleteLocalAlias(
ctx, aliasScid, baseScid,
)
if err != nil {
log.Warnf("Error deleting SCID alias %d: %v",
scid, err)
}

return nil
Expand Down
Loading