Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
02ec9f6
rfqmsg: add AssetRateLimit TLV 29 wire field to request
jtobin Mar 23, 2026
3220947
rfqmsg+rfq: surface min fill and rate limit fields
jtobin Mar 23, 2026
de0f36c
rfq+rpcserver: add proto fields, RPC marshalling, and reject codes
jtobin Mar 23, 2026
ef5578b
rfq: enforce rate bound and min fill in VerifyAcceptQuote
jtobin Mar 23, 2026
46c63d2
itest: log min fill and rate limit in portfolio pilot
jtobin Mar 23, 2026
26df44b
rfqmsg+rfq: add tests for limit-order constraints
jtobin Mar 23, 2026
8df1ad3
itest+rfqmsg: add integration tests for limit-order constraints
jtobin Mar 23, 2026
dd6e20a
rfqmsg+rfq: address review findings for limit-order constraints
jtobin Mar 23, 2026
693ab07
multi: fix lint and itest failures
jtobin Apr 3, 2026
194d0c1
docs: add release note
jtobin Apr 3, 2026
211a8d8
rfqmsg: add execution policy type and wire encoding
jtobin Mar 25, 2026
eb8b36f
rfqmsg+rfq: surface execution policy through orders and negotiator
jtobin Mar 25, 2026
42ed924
rfq: add FOK reject code and enforcement in VerifyAcceptQuote
jtobin Mar 25, 2026
78c650f
rfq+rpcserver: add execution policy proto field and RPC unmarshal
jtobin Mar 25, 2026
194dac4
rfqmsg: add unit and property tests for execution policy
jtobin Mar 25, 2026
3e46b47
rfq: add TestCheckFOK for FOK enforcement
jtobin Mar 25, 2026
8eeaaff
itest: add execution policy integration tests
jtobin Mar 25, 2026
0b222f6
rfqmsg+rfq+rpcserver: address review findings for execution policy
jtobin Mar 25, 2026
ba96c91
rfqmsg+itest: fix execution-policy build errors
jtobin Apr 3, 2026
8b18f7c
rfq+rfqmsg: use NewBigIntFixedPoint helper, treat wire 0 as None
jtobin Apr 3, 2026
b20fcee
docs: add release note
jtobin Apr 3, 2026
e48e10f
rfqmsg: add optional fill quantity to accept wire message
jtobin Apr 6, 2026
005ed31
rfq: add fill amount validation and constraint unification
jtobin Apr 6, 2026
7a64d43
rfq+rpcserver: add fill quantity proto fields and RPC marshal
jtobin Apr 6, 2026
0df5249
tapdb: persist AcceptedMaxAmount for RFQ policies
jtobin Apr 6, 2026
f6a71f9
rfqmsg+rfq+tapdb: add tests for fill quantity and constraints
jtobin Apr 6, 2026
a4b4c4d
itest: add fill quantity and execution policy integration tests
jtobin Apr 6, 2026
c316771
tapdb: bump LatestMigrationVersion to 55
jtobin Apr 6, 2026
dac78b0
itest+rpcserver: fix CI lint, build, and peer reject handling
jtobin Apr 6, 2026
358f0e7
docs: add release note
jtobin Apr 6, 2026
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ cmd/tapd/tapd
/itest/custom_channels/*.log.*

/docs/examples/basic-price-oracle/basic-price-oracle
/docs/examples/basic-portfolio-pilot/basic-portfolio-pilot
basic-portfolio-pilot

# Test binary, built with `go test -c`
*.test
Expand Down
14 changes: 12 additions & 2 deletions docs/examples/basic-portfolio-pilot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,19 @@ func (p *RpcPortfolioPilotServer) ResolveRequest(_ context.Context,
var hint *portfoliopilotrpc.AssetRate
switch r := req.GetRequest().(type) {
case *portfoliopilotrpc.ResolveRequestRequest_BuyRequest:
hint = r.BuyRequest.GetAssetRateHint()
br := r.BuyRequest
hint = br.GetAssetRateHint()
log.Printf("ResolveRequest buy: max=%d min=%d "+
"rate_limit=%v", br.GetAssetMaxAmount(),
br.GetAssetMinAmount(),
br.GetAssetRateLimit())
case *portfoliopilotrpc.ResolveRequestRequest_SellRequest:
hint = r.SellRequest.GetAssetRateHint()
sr := r.SellRequest
hint = sr.GetAssetRateHint()
log.Printf("ResolveRequest sell: max=%d min=%d "+
"rate_limit=%v", sr.GetPaymentMaxAmount(),
sr.GetPaymentMinAmount(),
sr.GetAssetRateLimit())
default:
return nil, fmt.Errorf("unknown request type: %T", r)
}
Expand Down
67 changes: 67 additions & 0 deletions docs/release-notes/release-notes-0.8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,30 @@
**Note:** For full functionality, it is highly recommended to start LND with
the `--store-final-htlc-resolutions` flag enabled, which is disabled by default.

- [Limit-Order Constraints](https://github.com/lightninglabs/taproot-assets/pull/2048):
RFQ buy and sell orders can now carry explicit limit-price bounds
(`asset_rate_limit`) and minimum fill sizes (`asset_min_amt` /
`payment_min_amt`). Quotes that violate these constraints are rejected
with machine-readable reasons (`RATE_BOUND_MISS`, `MIN_FILL_NOT_MET`).
New fields are optional and backward-compatible; constraint validation
only activates when they are present.

- [Execution Policy](https://github.com/lightninglabs/taproot-assets/pull/2049):
RFQ buy and sell orders can now specify an execution policy: IOC
(Immediate-Or-Cancel, the default) allows partial fills above the
minimum, while FOK (Fill-Or-Kill) requires the full requested amount
or rejects the quote. FOK viability is checked in `VerifyAcceptQuote`
with a new `FOK_NOT_VIABLE` reject code. New fields are optional and
backward-compatible.

- [Fill Quantity Negotiation](https://github.com/lightninglabs/taproot-assets/pull/2050):
RFQ accept messages now carry an optional fill quantity, allowing
the responder to signal the maximum amount it is willing to fill.
The negotiated fill caps HTLC policies so forwarding never exceeds
the agreed amount. `VerifyAcceptQuote` validates the fill against
request constraints (min fill, FOK viability). Zero fill on the
wire is normalised to None for backward compatibility.

## Functional Enhancements

- [Wallet Backup/Restore](https://github.com/lightninglabs/taproot-assets/pull/1980):
Expand Down Expand Up @@ -148,6 +172,26 @@
Add `RemoveMessage` RPC to the auth mailbox service. Receivers can
authenticate with a Schnorr signature to delete their own messages by ID.

- [PR#2048](https://github.com/lightninglabs/taproot-assets/pull/2048):
Add `asset_rate_limit` to `AddAssetBuyOrder` and `AddAssetSellOrder`
requests. Add `asset_min_amt` to buy orders and `payment_min_amt`
to sell orders. Add `asset_rate_limit` and min fill fields to
`PortfolioPilot.ResolveRequest` for constraint forwarding. Add
`RATE_BOUND_MISS` and `MIN_FILL_NOT_MET` to `QuoteRespStatus`.

- [PR#2049](https://github.com/lightninglabs/taproot-assets/pull/2049):
Add `execution_policy` enum (`EXECUTION_POLICY_IOC`,
`EXECUTION_POLICY_FOK`) to `AddAssetBuyOrder` and `AddAssetSellOrder`
requests, and to `PortfolioPilot.ResolveRequest` for constraint
forwarding. Add `FOK_NOT_VIABLE` to `QuoteRespStatus`.

- [PR#2050](https://github.com/lightninglabs/taproot-assets/pull/2050):
Add `max_in_asset` to `PeerAcceptedBuyQuote` and
`PeerAcceptedSellQuote` in both the RFQ and PortfolioPilot
services, exposing the negotiated fill quantity to RPC clients.
Add `fill_amount` to `PortfolioPilot.ResolveResponse` for
responder-side fill signalling.

## tapcli Additions

- [Wallet Backup CLI](https://github.com/lightninglabs/taproot-assets/pull/1980):
Expand Down Expand Up @@ -331,6 +375,19 @@
New integration test `testForwardingEventHistory` verifies that forwarding events are
properly logged when routing asset payments.

- [PR#2048](https://github.com/lightninglabs/taproot-assets/pull/2048):
Add unit, property-based, and integration tests for limit-order
constraint fields.

- [PR#2049](https://github.com/lightninglabs/taproot-assets/pull/2049):
Add unit, property-based, and integration tests for execution policy.

- [PR#2050](https://github.com/lightninglabs/taproot-assets/pull/2050):
Add unit and integration tests for fill quantity negotiation,
including wire roundtrip, zero-normalisation, fill-vs-constraint
validation, sell-side FOK/IOC with fill caps, and responder
constraint rejection.

## Database

- [forwards table](https://github.com/lightninglabs/taproot-assets/pull/1921):
Expand All @@ -340,8 +397,18 @@
Add `DeleteUniverseLeaf` SQL query for single-leaf deletion from a
universe.

- [PR#2050](https://github.com/lightninglabs/taproot-assets/pull/2050)
Add `accepted_max_amount` column to the `rfq_policies` table
(migration 55) to persist the negotiated fill quantity alongside
HTLC policies.

## Code Health

- [PR#2050](https://github.com/lightninglabs/taproot-assets/pull/2050)
Unify buy and sell request constraint logic behind a shared
`RequestConstraints` interface, removing duplicated validation
in `VerifyAcceptQuote` and `checkRateBound`.

## Tooling and Documentation

- [Wallet Backup Format Spec](https://github.com/lightninglabs/taproot-assets/pull/1980):
Expand Down
4 changes: 4 additions & 0 deletions itest/custom_channels/custom_channels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ var testCases = []*ccTestCase{
name: "invoice quote expiry mismatch",
test: testCustomChannelsInvoiceQuoteExpiryMismatch,
},
{
name: "limit constraints",
test: testCustomChannelsLimitConstraints,
},
{
name: "fee",
test: testCustomChannelsFee,
Expand Down
Loading