@@ -53,6 +53,7 @@ A node:
53
53
* [ Route Blinding] ( #route-blinding )
54
54
* [ Accepting and Forwarding a Payment] ( #accepting-and-forwarding-a-payment )
55
55
* [ Non-strict Forwarding] ( #non-strict-forwarding )
56
+ * [ Resource Bucketing] ( #resource-bucketing )
56
57
* [ Payload for the Last Node] ( #payload-for-the-last-node )
57
58
* [ Shared Secret] ( #shared-secret )
58
59
* [ Blinding Ephemeral Keys] ( #blinding-ephemeral-keys )
@@ -62,6 +63,7 @@ A node:
62
63
* [ Returning Errors] ( #returning-errors )
63
64
* [ Failure Messages] ( #failure-messages )
64
65
* [ Receiving Failure Codes] ( #receiving-failure-codes )
66
+ * [ Recommendations for Reputation] ( #recommendations-for-reputation )
65
67
* [ Test Vector] ( #test-vector )
66
68
* [ Returning Errors] ( #returning-errors )
67
69
* [ References] ( #references )
@@ -635,6 +637,38 @@ Alternatively, implementations may choose to apply non-strict forwarding only to
635
637
like-policy channels to ensure their expected fee revenue does not deviate by
636
638
using an alternate channel.
637
639
640
+ ## Resource Bucketing
641
+
642
+ When making the decision to forward a payment on its outgoing channel, a node
643
+ MAY choose to limit its exposure to HTLCs that put it at risk of a denial of
644
+ service attack.
645
+ * ` unknown_allocation_slots ` : defines the number of HTLC slots allocated to
646
+ unknown traffic.
647
+ * ` unknown_allocation_liquidity ` : defines the amount of the channel balance
648
+ that is allocated to unknown traffic.
649
+
650
+ It is recommended to allocate 50% of a channel's liquidity and slots to unknown
651
+ traffic to accommodate the recommended maximum HTLC size (per the Oakland
652
+ Protocol).
653
+
654
+ A node implementing resource bucketing limits exposure on its outgoing channel:
655
+ - MUST choose ` unknown_allocation_slots ` <= the remote channel peer's
656
+ ` max_accepted_htlcs ` .
657
+ - MUST choose ` unknown_allocation_liquidity ` <= the remote channel peer's
658
+ ` max_htlc_value_in_flight_msat ` .
659
+ - If ` endorsed ` is set to 1 in the incoming ` update_add_htlc ` AND the HTLC
660
+ is from a node that the forwarding node considers to have good local
661
+ reputation (see [ Recommendations for Reputation] ( #recommendations-for-reputation ) ):
662
+ - SHOULD proceed with forwarding the HTLC.
663
+ - SHOULD set ` endorsed ` to 1 in the outgoing ` update_add_htlc ` .
664
+ - Otherwise, the HTLC is classified as ` unknown ` :
665
+ - If ` unknown_allocation_slots ` HTLC slots are occupied by other ` unknown ` HTLCs:
666
+ - SHOULD return ` temporary_channel_failure ` as specified in [ Failure Messages] ( #failure-messages ) .
667
+ - If ` unknown_allocation_liquidity ` satoshis of liquidity are locked in
668
+ other ` unknown ` HTLCs:
669
+ - SHOULD return ` temporary_channel_failure ` as specified in [ Failure Messages] ( #failure-messages ) .
670
+ - SHOULD set ` endorsed ` to 0 in the outgoing ` update_add_htlc ` .
671
+
638
672
## Payload for the Last Node
639
673
640
674
When building the route, the origin node MUST use a payload for
@@ -1407,6 +1441,10 @@ The _origin node_:
1407
1441
- MAY use the data specified in the various failure types for debugging
1408
1442
purposes.
1409
1443
1444
+ # Recommendations for Reputation
1445
+
1446
+ At the time of writing, specification for reputation recommendations is ongoing.
1447
+
1410
1448
# Test Vector
1411
1449
1412
1450
## Returning Errors
0 commit comments