multi: rename experimental endorsement signal to accountable
What changed, and why it matters
This commit is a pure rename of an experimental Lightning Network feature from 'endorsement' to 'accountable/accountability' to match a community proposal update. No security vulnerability is introduced or fixed; the underlying behavior, feature bits, TLV type, and experiment end date remain unchanged. It is a terminology and identifier refactor across 21 files.
No security action required. Treat as a normal refactor; verify downstream tooling or documentation that may reference the old CLI flag '--protocol.no-experimental-endorsement' and update to '--protocol.no-experimental-accountability'.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change renames identifiers, configuration flags, RPC/backend fields, comments, and test names from ‘ExperimentalEndorsement’ to ‘ExperimentalAccountability’ (and related variants). The feature bits 260/261 keep their numeric values but now map to ‘accountable-x’. The TLV type 106823 is renamed to ExperimentalAccountableType. Values 0 and 7 are renamed to ExperimentalUnaccountable and ExperimentalAccountable. The experiment end timestamp (1767225600) and logic gating propagation are unchanged. The diff is almost entirely symbol substitution plus one new test file replacing an old one with equivalent logic.
Changed components
feature/default_sets.gofeature/manager.gohtlcswitch/link.gohtlcswitch/link_test.gohtlcswitch/test_utils.goitest/list_on_test.goitest/lnd_experimental_accountability.goitest/lnd_forward_interceptor_test.goitest/lnd_invoice_acceptor_test.golncfg/protocol.golncfg/protocol_integration.golnrpc/routerrpc/router_backend.golnrpc/routerrpc/router_backend_test.golntest/utils.golnwire/features.golnwire/update_add_htlc.gopeer/brontide.gorouting/route/route.gorpcserver.gosample-lnd.confserver.goInspect captured patch +319 / −317
diff --git a/feature/default_sets.go b/feature/default_sets.go
index fcb53b6..5be5706 100644
--- a/feature/default_sets.go
+++ b/feature/default_sets.go
@@ -100,7 +100,7 @@ var defaultSetDesc = setDesc{
SetInit: {}, // I
SetNodeAnn: {}, // N
},
- lnwire.ExperimentalEndorsementOptional: {
+ lnwire.ExperimentalAccountabilityOptional: {
SetNodeAnn: {}, // N
},
lnwire.RbfCoopCloseOptionalStaging: {
diff --git a/feature/manager.go b/feature/manager.go
index 862880f..baef440 100644
--- a/feature/manager.go
+++ b/feature/manager.go
@@ -69,9 +69,9 @@ type Config struct {
// NoTaprootOverlay unsets the taproot overlay channel feature bits.
NoTaprootOverlay bool
- // NoExperimentalEndorsement unsets any bits that signal support for
- // forwarding experimental endorsement.
- NoExperimentalEndorsement bool
+ // NoExperimentalAccountability unsets any bits that signal support for
+ // forwarding experimental accountability.
+ NoExperimentalAccountability bool
// NoRbfCoopClose unsets any bits that signal support for using RBF for
// coop close.
@@ -213,9 +213,9 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
raw.Unset(lnwire.SimpleTaprootOverlayChansOptional)
raw.Unset(lnwire.SimpleTaprootOverlayChansRequired)
}
- if cfg.NoExperimentalEndorsement {
- raw.Unset(lnwire.ExperimentalEndorsementOptional)
- raw.Unset(lnwire.ExperimentalEndorsementRequired)
+ if cfg.NoExperimentalAccountability {
+ raw.Unset(lnwire.ExperimentalAccountabilityOptional)
+ raw.Unset(lnwire.ExperimentalAccountabilityRequired)
}
if cfg.NoRbfCoopClose {
raw.Unset(lnwire.RbfCoopCloseOptionalStaging)
diff --git a/htlcswitch/link.go b/htlcswitch/link.go
index 4c81964..93bbabb 100644
--- a/htlcswitch/link.go
+++ b/htlcswitch/link.go
@@ -290,9 +290,9 @@ type ChannelLinkConfig struct {
// restrict the flow of HTLCs and fee updates.
MaxFeeExposure lnwire.MilliSatoshi
- // ShouldFwdExpEndorsement is a closure that indicates whether the link
- // should forward experimental endorsement signals.
- ShouldFwdExpEndorsement func() bool
+ // ShouldFwdExpAccountability is a closure that indicates whether the
+ // link should forward experimental accountability signals.
+ ShouldFwdExpAccountability func() bool
// AuxTrafficShaper is an optional auxiliary traffic shaper that can be
// used to manage the bandwidth of the link.
@@ -3163,11 +3163,11 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg) {
continue
}
- endorseValue := l.experimentalEndorsement(
+ accountableValue := l.experimentalAccountability(
record.CustomSet(add.CustomRecords),
)
- endorseType := uint64(
- lnwire.ExperimentalEndorsementType,
+ accountableType := uint64(
+ lnwire.ExperimentalAccountableType,
)
switch fwdPkg.State {
@@ -3191,9 +3191,9 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg) {
BlindingPoint: fwdInfo.NextBlinding,
}
- endorseValue.WhenSome(func(e byte) {
+ accountableValue.WhenSome(func(e byte) {
custRecords := map[uint64][]byte{
- endorseType: {e},
+ accountableType: {e},
}
outgoingAdd.CustomRecords = custRecords
@@ -3249,9 +3249,9 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg) {
BlindingPoint: fwdInfo.NextBlinding,
}
- endorseValue.WhenSome(func(e byte) {
+ accountableValue.WhenSome(func(e byte) {
addMsg.CustomRecords = map[uint64][]byte{
- endorseType: {e},
+ accountableType: {e},
}
})
@@ -3340,44 +3340,44 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg) {
l.forwardBatch(reforward, switchPackets...)
}
-// experimentalEndorsement returns the value to set for our outgoing
-// experimental endorsement field, and a boolean indicating whether it should
-// be populated on the outgoing htlc.
-func (l *channelLink) experimentalEndorsement(
+// experimentalAccountability returns the value to set for our outgoing
+// experimental accountable field. It only considers the accountability bit,
+// other custom records present are not considered for forwarding.
+func (l *channelLink) experimentalAccountability(
customUpdateAdd record.CustomSet) fn.Option[byte] {
// Only relay experimental signal if we are within the experiment
// period.
- if !l.cfg.ShouldFwdExpEndorsement() {
+ if !l.cfg.ShouldFwdExpAccountability() {
return fn.None[byte]()
}
// If we don't have any custom records or the experimental field is
// not set, just forward a zero value.
if len(customUpdateAdd) == 0 {
- return fn.Some[byte](lnwire.ExperimentalUnendorsed)
+ return fn.Some[byte](lnwire.ExperimentalUnaccountable)
}
- t := uint64(lnwire.ExperimentalEndorsementType)
+ t := uint64(lnwire.ExperimentalAccountableType)
value, set := customUpdateAdd[t]
if !set {
- return fn.Some[byte](lnwire.ExperimentalUnendorsed)
+ return fn.Some[byte](lnwire.ExperimentalUnaccountable)
}
// We expect at least one byte for this field, consider it invalid if
// it has no data and just forward a zero value.
if len(value) == 0 {
- return fn.Some[byte](lnwire.ExperimentalUnendorsed)
+ return fn.Some[byte](lnwire.ExperimentalUnaccountable)
}
- // Only forward endorsed if the incoming link is endorsed.
- if value[0] == lnwire.ExperimentalEndorsed {
- return fn.Some[byte](lnwire.ExperimentalEndorsed)
+ // Only forward accountable if the incoming link is accountable.
+ if value[0] == lnwire.ExperimentalAccountable {
+ return fn.Some[byte](lnwire.ExperimentalAccountable)
}
- // Forward as unendorsed otherwise, including cases where we've
+ // Forward as unaccountable otherwise, including cases where we've
// received an invalid value that uses more than 3 bits of information.
- return fn.Some[byte](lnwire.ExperimentalUnendorsed)
+ return fn.Some[byte](lnwire.ExperimentalUnaccountable)
}
// processExitHop handles an htlc for which this link is the exit hop. It
diff --git a/htlcswitch/link_test.go b/htlcswitch/link_test.go
index 101a47b..e4e63d9 100644
--- a/htlcswitch/link_test.go
+++ b/htlcswitch/link_test.go
@@ -2234,18 +2234,18 @@ func newSingleLinkTestHarness(t *testing.T, chanAmt,
PendingCommitTicker: ticker.New(time.Minute),
// Make the BatchSize and Min/MaxUpdateTimeout large enough
// to not trigger commit updates automatically during tests.
- BatchSize: 10000,
- MinUpdateTimeout: 30 * time.Minute,
- MaxUpdateTimeout: 40 * time.Minute,
- MaxOutgoingCltvExpiry: DefaultMaxOutgoingCltvExpiry,
- MaxFeeAllocation: DefaultMaxLinkFeeAllocation,
- NotifyActiveLink: func(wire.OutPoint) {},
- NotifyActiveChannel: func(wire.OutPoint) {},
- NotifyInactiveChannel: func(wire.OutPoint) {},
- NotifyInactiveLinkEvent: func(wire.OutPoint) {},
- HtlcNotifier: aliceSwitch.cfg.HtlcNotifier,
- GetAliases: getAliases,
- ShouldFwdExpEndorsement: func() bool { return true },
+ BatchSize: 10000,
+ MinUpdateTimeout: 30 * time.Minute,
+ MaxUpdateTimeout: 40 * time.Minute,
+ MaxOutgoingCltvExpiry: DefaultMaxOutgoingCltvExpiry,
+ MaxFeeAllocation: DefaultMaxLinkFeeAllocation,
+ NotifyActiveLink: func(wire.OutPoint) {},
+ NotifyActiveChannel: func(wire.OutPoint) {},
+ NotifyInactiveChannel: func(wire.OutPoint) {},
+ NotifyInactiveLinkEvent: func(wire.OutPoint) {},
+ HtlcNotifier: aliceSwitch.cfg.HtlcNotifier,
+ GetAliases: getAliases,
+ ShouldFwdExpAccountability: func() bool { return true },
}
aliceLink := NewChannelLink(aliceCfg, aliceLc.channel)
@@ -4924,17 +4924,17 @@ func (h *persistentLinkHarness) restartLink(
MinUpdateTimeout: 30 * time.Minute,
MaxUpdateTimeout: 40 * time.Minute,
// Set any hodl flags requested for the new link.
- HodlMask: hodl.MaskFromFlags(hodlFlags...),
- MaxOutgoingCltvExpiry: DefaultMaxOutgoingCltvExpiry,
- MaxFeeAllocation: DefaultMaxLinkFeeAllocation,
- NotifyActiveLink: func(wire.OutPoint) {},
- NotifyActiveChannel: func(wire.OutPoint) {},
- NotifyInactiveChannel: func(wire.OutPoint) {},
- NotifyInactiveLinkEvent: func(wire.OutPoint) {},
- HtlcNotifier: h.hSwitch.cfg.HtlcNotifier,
- SyncStates: syncStates,
- GetAliases: getAliases,
- ShouldFwdExpEndorsement: func() bool { return true },
+ HodlMask: hodl.MaskFromFlags(hodlFlags...),
+ MaxOutgoingCltvExpiry: DefaultMaxOutgoingCltvExpiry,
+ MaxFeeAllocation: DefaultMaxLinkFeeAllocation,
+ NotifyActiveLink: func(wire.OutPoint) {},
+ NotifyActiveChannel: func(wire.OutPoint) {},
+ NotifyInactiveChannel: func(wire.OutPoint) {},
+ NotifyInactiveLinkEvent: func(wire.OutPoint) {},
+ HtlcNotifier: h.hSwitch.cfg.HtlcNotifier,
+ SyncStates: syncStates,
+ GetAliases: getAliases,
+ ShouldFwdExpAccountability: func() bool { return true },
}
aliceLink := NewChannelLink(aliceCfg, aliceChannel)
diff --git a/htlcswitch/test_utils.go b/htlcswitch/test_utils.go
index bdb365d..b74dbd0 100644
--- a/htlcswitch/test_utils.go
+++ b/htlcswitch/test_utils.go
@@ -1157,27 +1157,27 @@ func (h *hopNetwork) createChannelLink(server, peer *mockServer,
UpdateContractSignals: func(*contractcourt.ContractSignals) error {
return nil
},
- NotifyContractUpdate: notifyContractUpdate,
- ChainEvents: &contractcourt.ChainEventSubscription{},
- SyncStates: true,
- BatchSize: 10,
- BatchTicker: ticker.NewForce(testBatchTimeout),
- FwdPkgGCTicker: ticker.NewForce(fwdPkgTimeout),
- PendingCommitTicker: ticker.New(2 * time.Minute),
- MinUpdateTimeout: minFeeUpdateTimeout,
- MaxUpdateTimeout: maxFeeUpdateTimeout,
- OnChannelFailure: func(lnwire.ChannelID, lnwire.ShortChannelID, LinkFailureError) {},
- OutgoingCltvRejectDelta: 3,
- MaxOutgoingCltvExpiry: DefaultMaxOutgoingCltvExpiry,
- MaxFeeAllocation: DefaultMaxLinkFeeAllocation,
- MaxAnchorsCommitFeeRate: chainfee.SatPerKVByte(10 * 1000).FeePerKWeight(),
- NotifyActiveLink: func(wire.OutPoint) {},
- NotifyActiveChannel: func(wire.OutPoint) {},
- NotifyInactiveChannel: func(wire.OutPoint) {},
- NotifyInactiveLinkEvent: func(wire.OutPoint) {},
- HtlcNotifier: server.htlcSwitch.cfg.HtlcNotifier,
- GetAliases: getAliases,
- ShouldFwdExpEndorsement: func() bool { return true },
+ NotifyContractUpdate: notifyContractUpdate,
+ ChainEvents: &contractcourt.ChainEventSubscription{},
+ SyncStates: true,
+ BatchSize: 10,
+ BatchTicker: ticker.NewForce(testBatchTimeout),
+ FwdPkgGCTicker: ticker.NewForce(fwdPkgTimeout),
+ PendingCommitTicker: ticker.New(2 * time.Minute),
+ MinUpdateTimeout: minFeeUpdateTimeout,
+ MaxUpdateTimeout: maxFeeUpdateTimeout,
+ OnChannelFailure: func(lnwire.ChannelID, lnwire.ShortChannelID, LinkFailureError) {},
+ OutgoingCltvRejectDelta: 3,
+ MaxOutgoingCltvExpiry: DefaultMaxOutgoingCltvExpiry,
+ MaxFeeAllocation: DefaultMaxLinkFeeAllocation,
+ MaxAnchorsCommitFeeRate: chainfee.SatPerKVByte(10 * 1000).FeePerKWeight(),
+ NotifyActiveLink: func(wire.OutPoint) {},
+ NotifyActiveChannel: func(wire.OutPoint) {},
+ NotifyInactiveChannel: func(wire.OutPoint) {},
+ NotifyInactiveLinkEvent: func(wire.OutPoint) {},
+ HtlcNotifier: server.htlcSwitch.cfg.HtlcNotifier,
+ GetAliases: getAliases,
+ ShouldFwdExpAccountability: func() bool { return true },
},
channel,
)
diff --git a/itest/list_on_test.go b/itest/list_on_test.go
index f596114..02457d7 100644
--- a/itest/list_on_test.go
+++ b/itest/list_on_test.go
@@ -700,8 +700,8 @@ var allTestCases = []*lntest.TestCase{
TestFunc: testDebuglevelShow,
},
{
- Name: "experimental endorsement",
- TestFunc: testExperimentalEndorsement,
+ Name: "experimental accountability",
+ TestFunc: testExperimentalAccountability,
},
{
Name: "quiescence",
diff --git a/itest/lnd_experimental_accountability.go b/itest/lnd_experimental_accountability.go
new file mode 100644
index 0000000..a636769
--- /dev/null
+++ b/itest/lnd_experimental_accountability.go
@@ -0,0 +1,113 @@
+package itest
+
+import (
+ "math"
+
+ "github.com/btcsuite/btcd/btcutil"
+ "github.com/lightningnetwork/lnd/lnrpc"
+ "github.com/lightningnetwork/lnd/lnrpc/routerrpc"
+ "github.com/lightningnetwork/lnd/lntest"
+ "github.com/lightningnetwork/lnd/lntest/node"
+ "github.com/lightningnetwork/lnd/lntest/rpc"
+ "github.com/lightningnetwork/lnd/lntest/wait"
+ "github.com/lightningnetwork/lnd/lntypes"
+ "github.com/lightningnetwork/lnd/lnwire"
+ "github.com/stretchr/testify/require"
+)
+
+// testExperimentalAccountability tests setting of positive and negative
+// experimental accountable signals.
+func testExperimentalAccountability(ht *lntest.HarnessTest) {
+ testAccountability(ht, true)
+ testAccountability(ht, false)
+}
+
+// testAccountability sets up a 5 hop network and tests propagation of
+// experimental accountable signals.
+func testAccountability(ht *lntest.HarnessTest, aliceAccountable bool) {
+ cfg := node.CfgAnchor
+ carolCfg := append(
+ []string{"--protocol.no-experimental-accountability"}, cfg...,
+ )
+ cfgs := [][]string{cfg, cfg, carolCfg, cfg, cfg}
+
+ const chanAmt = btcutil.Amount(300000)
+ p := lntest.OpenChannelParams{Amt: chanAmt}
+
+ _, nodes := ht.CreateSimpleNetwork(cfgs, p)
+ alice, bob, carol, dave, eve := nodes[0], nodes[1], nodes[2], nodes[3],
+ nodes[4]
+
+ bobIntercept, cancelBob := bob.RPC.HtlcInterceptor()
+ defer cancelBob()
+
+ carolIntercept, cancelCarol := carol.RPC.HtlcInterceptor()
+ defer cancelCarol()
+
+ daveIntercept, cancelDave := dave.RPC.HtlcInterceptor()
+ defer cancelDave()
+
+ req := &lnrpc.Invoice{ValueMsat: 1000}
+ addResponse := eve.RPC.AddInvoice(req)
+ invoice := eve.RPC.LookupInvoice(addResponse.RHash)
+
+ sendReq := &routerrpc.SendPaymentRequest{
+ PaymentRequest: invoice.PaymentRequest,
+ TimeoutSeconds: int32(wait.PaymentTimeout.Seconds()),
+ FeeLimitMsat: math.MaxInt64,
+ }
+
+ var expectedValue []byte
+ hasAccountability := lntest.ExperimentalAccountabilityActive()
+
+ if hasAccountability {
+ if aliceAccountable {
+ expectedValue = []byte{lnwire.ExperimentalAccountable}
+ t := uint64(lnwire.ExperimentalAccountableType)
+ sendReq.FirstHopCustomRecords = map[uint64][]byte{
+ t: expectedValue,
+ }
+ } else {
+ expectedValue = []byte{lnwire.ExperimentalUnaccountable}
+ }
+ }
+
+ _ = alice.RPC.SendPayment(sendReq)
+
+ // Validate that our signal (positive or zero) propagates until carol
+ // and then is dropped because she has disabled the feature.
+ // When the accountability experiment is not active, no signal is sent.
+ validateAccountableAndResume(
+ ht, bobIntercept, hasAccountability, expectedValue,
+ )
+ validateAccountableAndResume(
+ ht, carolIntercept, hasAccountability, expectedValue,
+ )
+ validateAccountableAndResume(ht, daveIntercept, false, nil)
+
+ var preimage lntypes.Preimage
+ copy(preimage[:], invoice.RPreimage)
+ ht.AssertPaymentStatus(alice, preimage.Hash(), lnrpc.Payment_SUCCEEDED)
+}
+
+func validateAccountableAndResume(ht *lntest.HarnessTest,
+ interceptor rpc.InterceptorClient, hasAccountable bool,
+ expectedValue []byte) {
+
+ packet := ht.ReceiveHtlcInterceptor(interceptor)
+
+ var expectedRecords map[uint64][]byte
+ if hasAccountable {
+ u64Type := uint64(lnwire.ExperimentalAccountableType)
+ expectedRecords = map[uint64][]byte{
+ u64Type: expectedValue,
+ }
+ }
+ require.Equal(ht, expectedRecords, packet.InWireCustomRecords)
+
+ err := interceptor.Send(&routerrpc.ForwardHtlcInterceptResponse{
+ IncomingCircuitKey: packet.IncomingCircuitKey,
+ Action: routerrpc.ResolveHoldForwardAction_RESUME,
+ })
+ require.NoError(ht, err)
+}
diff --git a/itest/lnd_experimental_endorsement.go b/itest/lnd_experimental_endorsement.go
deleted file mode 100644
index 67f5e30..0000000
--- a/itest/lnd_experimental_endorsement.go
+++ /dev/null
@@ -1,113 +0,0 @@
-package itest
-
-import (
- "math"
-
- "github.com/btcsuite/btcd/btcutil"
- "github.com/lightningnetwork/lnd/lnrpc"
- "github.com/lightningnetwork/lnd/lnrpc/routerrpc"
- "github.com/lightningnetwork/lnd/lntest"
- "github.com/lightningnetwork/lnd/lntest/node"
- "github.com/lightningnetwork/lnd/lntest/rpc"
- "github.com/lightningnetwork/lnd/lntest/wait"
- "github.com/lightningnetwork/lnd/lntypes"
- "github.com/lightningnetwork/lnd/lnwire"
- "github.com/stretchr/testify/require"
-)
-
-// testExperimentalEndorsement tests setting of positive and negative
-// experimental endorsement signals.
-func testExperimentalEndorsement(ht *lntest.HarnessTest) {
- testEndorsement(ht, true)
- testEndorsement(ht, false)
-}
-
-// testEndorsement sets up a 5 hop network and tests propagation of
-// experimental endorsement signals.
-func testEndorsement(ht *lntest.HarnessTest, aliceEndorse bool) {
- cfg := node.CfgAnchor
- carolCfg := append(
- []string{"--protocol.no-experimental-endorsement"}, cfg...,
- )
- cfgs := [][]string{cfg, cfg, carolCfg, cfg, cfg}
-
- const chanAmt = btcutil.Amount(300000)
- p := lntest.OpenChannelParams{Amt: chanAmt}
-
- _, nodes := ht.CreateSimpleNetwork(cfgs, p)
- alice, bob, carol, dave, eve := nodes[0], nodes[1], nodes[2], nodes[3],
- nodes[4]
-
- bobIntercept, cancelBob := bob.RPC.HtlcInterceptor()
- defer cancelBob()
-
- carolIntercept, cancelCarol := carol.RPC.HtlcInterceptor()
- defer cancelCarol()
-
- daveIntercept, cancelDave := dave.RPC.HtlcInterceptor()
- defer cancelDave()
-
- req := &lnrpc.Invoice{ValueMsat: 1000}
- addResponse := eve.RPC.AddInvoice(req)
- invoice := eve.RPC.LookupInvoice(addResponse.RHash)
-
- sendReq := &routerrpc.SendPaymentRequest{
- PaymentRequest: invoice.PaymentRequest,
- TimeoutSeconds: int32(wait.PaymentTimeout.Seconds()),
- FeeLimitMsat: math.MaxInt64,
- }
-
- var expectedValue []byte
- hasEndorsement := lntest.ExperimentalEndorsementActive()
-
- if hasEndorsement {
- if aliceEndorse {
- expectedValue = []byte{lnwire.ExperimentalEndorsed}
- t := uint64(lnwire.ExperimentalEndorsementType)
- sendReq.FirstHopCustomRecords = map[uint64][]byte{
- t: expectedValue,
- }
- } else {
- expectedValue = []byte{lnwire.ExperimentalUnendorsed}
- }
- }
-
- _ = alice.RPC.SendPayment(sendReq)
-
- // Validate that our signal (positive or zero) propagates until carol
- // and then is dropped because she has disabled the feature.
- // When the endorsement experiment is not active, no signal is sent.
- validateEndorsedAndResume(
- ht, bobIntercept, hasEndorsement, expectedValue,
- )
- validateEndorsedAndResume(
- ht, carolIntercept, hasEndorsement, expectedValue,
- )
- validateEndorsedAndResume(ht, daveIntercept, false, nil)
-
- var preimage lntypes.Preimage
- copy(preimage[:], invoice.RPreimage)
- ht.AssertPaymentStatus(alice, preimage.Hash(), lnrpc.Payment_SUCCEEDED)
-}
-
-func validateEndorsedAndResume(ht *lntest.HarnessTest,
- interceptor rpc.InterceptorClient, hasEndorsement bool,
- expectedValue []byte) {
-
- packet := ht.ReceiveHtlcInterceptor(interceptor)
-
- var expectedRecords map[uint64][]byte
- if hasEndorsement {
- u64Type := uint64(lnwire.ExperimentalEndorsementType)
- expectedRecords = map[uint64][]byte{
- u64Type: expectedValue,
- }
- }
- require.Equal(ht, expectedRecords, packet.InWireCustomRecords)
-
- err := interceptor.Send(&routerrpc.ForwardHtlcInterceptResponse{
- IncomingCircuitKey: packet.IncomingCircuitKey,
- Action: routerrpc.ResolveHoldForwardAction_RESUME,
- })
- require.NoError(ht, err)
-}
diff --git a/itest/lnd_forward_interceptor_test.go b/itest/lnd_forward_interceptor_test.go
index 615f9f4..d45d650 100644
--- a/itest/lnd_forward_interceptor_test.go
+++ b/itest/lnd_forward_interceptor_test.go
@@ -387,7 +387,7 @@ func testForwardInterceptorRestart(ht *lntest.HarnessTest) {
// all intercepted packets. These packets are held to simulate a
// pending payment.
packet := ht.ReceiveHtlcInterceptor(bobInterceptor)
- require.Equal(ht, lntest.CustomRecordsWithUnendorsed(
+ require.Equal(ht, lntest.CustomRecordsWithUnaccountable(
customRecords,
), packet.InWireCustomRecords)
@@ -433,21 +433,21 @@ func testForwardInterceptorRestart(ht *lntest.HarnessTest) {
packet = ht.ReceiveHtlcInterceptor(bobInterceptor)
// Check the expected number of custom records based on whether the
- // endorsement experiment is still active.
+ // accountability experiment is still active.
expectedLen := 1
- if lntest.ExperimentalEndorsementActive() {
+ if lntest.ExperimentalAccountabilityActive() {
expectedLen = 2
}
require.Len(ht, packet.InWireCustomRecords, expectedLen)
- require.Equal(ht, lntest.CustomRecordsWithUnendorsed(customRecords),
+ require.Equal(ht, lntest.CustomRecordsWithUnaccountable(customRecords),
packet.InWireCustomRecords)
// And now we forward the payment at Carol, expecting only an
- // endorsement signal in our incoming custom records (if the experiment
+ // accountability signal in our incoming custom records (if the experiment
// is still active).
packet = ht.ReceiveHtlcInterceptor(carolInterceptor)
expectedCarolLen := 0
- if lntest.ExperimentalEndorsementActive() {
+ if lntest.ExperimentalAccountabilityActive() {
expectedCarolLen = 1
}
require.Len(ht, packet.InWireCustomRecords, expectedCarolLen)
@@ -462,7 +462,7 @@ func testForwardInterceptorRestart(ht *lntest.HarnessTest) {
alice, preimage.Hash(), lnrpc.Payment_SUCCEEDED,
func(p *lnrpc.Payment) error {
recordsEqual := reflect.DeepEqual(
- lntest.CustomRecordsWithUnendorsed(
+ lntest.CustomRecordsWithUnaccountable(
sendReq.FirstHopCustomRecords,
), p.FirstHopCustomRecords,
)
diff --git a/itest/lnd_invoice_acceptor_test.go b/itest/lnd_invoice_acceptor_test.go
index f7c617b..4d5e30c 100644
--- a/itest/lnd_invoice_acceptor_test.go
+++ b/itest/lnd_invoice_acceptor_test.go
@@ -102,9 +102,9 @@ func testInvoiceHtlcModifierBasic(ht *lntest.HarnessTest) {
ht, tc.sendAmountMsat, modifierRequest.ExitHtlcAmt,
)
- // Expect custom records plus endorsement signal.
+ // Expect custom records plus accountable signal.
require.Equal(
- ht, lntest.CustomRecordsWithUnendorsed(
+ ht, lntest.CustomRecordsWithUnaccountable(
tc.lastHopCustomRecords,
), modifierRequest.ExitHtlcWireCustomRecords,
)
@@ -152,7 +152,7 @@ func testInvoiceHtlcModifierBasic(ht *lntest.HarnessTest) {
require.Len(ht, updatedInvoice.Htlcs, 1)
require.Equal(
- ht, lntest.CustomRecordsWithUnendorsed(
+ ht, lntest.CustomRecordsWithUnaccountable(
tc.lastHopCustomRecords,
), updatedInvoice.Htlcs[0].CustomRecords,
)
diff --git a/lncfg/protocol.go b/lncfg/protocol.go
index 4d348b2..fbfe264 100644
--- a/lncfg/protocol.go
+++ b/lncfg/protocol.go
@@ -71,8 +71,8 @@ type ProtocolOptions struct {
// NoRouteBlindingOption disables forwarding of payments in blinded routes.
NoRouteBlindingOption bool `long:"no-route-blinding" description:"do not forward payments that are a part of a blinded route"`
- // NoExperimentalEndorsementOption disables experimental endorsement.
- NoExperimentalEndorsementOption bool `long:"no-experimental-endorsement" description:"do not forward experimental endorsement signals"`
+ // NoExperimentalAccountabilityOption disables experimental accountability.
+ NoExperimentalAccountabilityOption bool `long:"no-experimental-accountability" description:"do not forward experimental accountability signals"`
// CustomMessage allows the custom message APIs to handle messages with
// the provided protocol numbers, which fall outside the custom message
@@ -139,10 +139,10 @@ func (l *ProtocolOptions) NoRouteBlinding() bool {
return l.NoRouteBlindingOption
}
-// NoExperimentalEndorsement returns true if experimental endorsement should
-// be disabled.
-func (l *ProtocolOptions) NoExperimentalEndorsement() bool {
- return l.NoExperimentalEndorsementOption
+// NoExpAccountability returns true if experimental accountability should be
+// disabled.
+func (l *ProtocolOptions) NoExpAccountability() bool {
+ return l.NoExperimentalAccountabilityOption
}
// NoQuiescence returns true if quiescence is disabled.
diff --git a/lncfg/protocol_integration.go b/lncfg/protocol_integration.go
index c68d6ff..72a26ae 100644
--- a/lncfg/protocol_integration.go
+++ b/lncfg/protocol_integration.go
@@ -74,8 +74,8 @@ type ProtocolOptions struct {
// NoRouteBlindingOption disables forwarding of payments in blinded routes.
NoRouteBlindingOption bool `long:"no-route-blinding" description:"do not forward payments that are a part of a blinded route"`
- // NoExperimentalEndorsementOption disables experimental endorsement.
- NoExperimentalEndorsementOption bool `long:"no-experimental-endorsement" description:"do not forward experimental endorsement signals"`
+ // NoExperimentalAccountabilityOption disables experimental accountability.
+ NoExperimentalAccountabilityOption bool `long:"no-experimental-accountability" description:"do not forward experimental accountability signals"`
// NoQuiescenceOption disables quiescence for all channels.
NoQuiescenceOption bool `long:"no-quiescence" description:"do not allow or advertise quiescence for any channel"`
@@ -137,10 +137,10 @@ func (l *ProtocolOptions) NoRouteBlinding() bool {
return l.NoRouteBlindingOption
}
-// NoExperimentalEndorsement returns true if experimental endorsement should
-// be disabled.
-func (l *ProtocolOptions) NoExperimentalEndorsement() bool {
- return l.NoExperimentalEndorsementOption
+// NoExpAccountability returns true if experimental accountability should be
+// disabled.
+func (l *ProtocolOptions) NoExpAccountability() bool {
+ return l.NoExperimentalAccountabilityOption
}
// NoQuiescence returns true if quiescence is disabled.
diff --git a/lnrpc/routerrpc/router_backend.go b/lnrpc/routerrpc/router_backend.go
index f8a3c56..d8c8a17 100644
--- a/lnrpc/routerrpc/router_backend.go
+++ b/lnrpc/routerrpc/router_backend.go
@@ -122,9 +122,9 @@ type RouterBackend struct {
// channel data from the first hop of a route.
ParseCustomChannelData func(message proto.Message) error
- // ShouldSetExpEndorsement returns a boolean indicating whether the
- // experimental endorsement bit should be set.
- ShouldSetExpEndorsement func() bool
+ // ShouldSetExpAccountability returns a boolean indicating whether the
+ // experimental accountability bit should be set.
+ ShouldSetExpAccountability func() bool
// Clock is the clock used to validate payment requests expiry.
// It is useful for testing.
@@ -947,19 +947,19 @@ func (r *RouterBackend) extractIntentFromSendRequest(
}
payIntent.FirstHopCustomRecords = firstHopRecords
- // If the experimental endorsement signal is not already set, propagate
+ // If the experimental accountable signal is not already set, propagate
// a zero value field if configured to set this signal.
- if r.ShouldSetExpEndorsement() {
+ if r.ShouldSetExpAccountability() {
if payIntent.FirstHopCustomRecords == nil {
payIntent.FirstHopCustomRecords = make(
map[uint64][]byte,
)
}
- t := uint64(lnwire.ExperimentalEndorsementType)
+ t := uint64(lnwire.ExperimentalAccountableType)
if _, set := payIntent.FirstHopCustomRecords[t]; !set {
payIntent.FirstHopCustomRecords[t] = []byte{
- lnwire.ExperimentalUnendorsed,
+ lnwire.ExperimentalUnaccountable,
}
}
}
diff --git a/lnrpc/routerrpc/router_backend_test.go b/lnrpc/routerrpc/router_backend_test.go
index a1095a3..373b929 100644
--- a/lnrpc/routerrpc/router_backend_test.go
+++ b/lnrpc/routerrpc/router_backend_test.go
@@ -677,7 +677,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Amount conflict, both sat and msat specified",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return true
},
},
@@ -692,7 +692,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Both dest and payment_request provided",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
},
@@ -708,7 +708,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Both payment_hash and payment_request provided",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
},
@@ -725,7 +725,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
name: "Both final_cltv_delta and payment_request " +
"provided",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
},
@@ -741,7 +741,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Invalid payment request length",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
ActiveNetParams: &chaincfg.RegressionNetParams,
@@ -756,7 +756,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Expired invoice payment request",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
ActiveNetParams: &chaincfg.RegressionNetParams,
@@ -772,7 +772,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Invoice missing payment address",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
ActiveNetParams: &chaincfg.RegressionNetParams,
@@ -789,7 +789,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Invalid dest vertex length",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
},
@@ -803,7 +803,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Payment request with missing amount",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
},
@@ -817,7 +817,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Destination lacks AMP support",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
},
@@ -834,7 +834,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Invalid payment hash length",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
},
@@ -849,7 +849,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
{
name: "Payment amount exceeds maximum possible amount",
backend: &RouterBackend{
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
},
@@ -868,7 +868,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
name: "Reject self-payments if not permitted",
backend: &RouterBackend{
MaxTotalTimelock: 1000,
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
SelfNode: target,
@@ -885,7 +885,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
name: "Required and optional feature bits set",
backend: &RouterBackend{
MaxTotalTimelock: 1000,
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
},
@@ -906,7 +906,7 @@ func TestExtractIntentFromSendRequest(t *testing.T) {
name: "Valid send req parameters, payment settled",
backend: &RouterBackend{
MaxTotalTimelock: 1000,
- ShouldSetExpEndorsement: func() bool {
+ ShouldSetExpAccountability: func() bool {
return false
},
},
diff --git a/lntest/utils.go b/lntest/utils.go
index ab998ec..a2c3ea8 100644
--- a/lntest/utils.go
+++ b/lntest/utils.go
@@ -285,12 +285,13 @@ func CalcStaticFeeBuffer(c lnrpc.CommitmentType, numHTLCs int) btcutil.Amount {
return feeBuffer.ToSatoshis()
}
-// CustomRecordsWithUnendorsed copies the map of custom records and adds an
-// endorsed signal (replacing in the case of conflict) for assertion in tests.
-func CustomRecordsWithUnendorsed(
+// CustomRecordsWithUnaccountable copies the map of custom records and adds an
+// accountable signal (replacing in the case of conflict) for assertion in
+// tests.
+func CustomRecordsWithUnaccountable(
originalRecords lnwire.CustomRecords) map[uint64][]byte {
- if !ExperimentalEndorsementActive() {
+ if !ExperimentalAccountabilityActive() {
// Return nil if there are no records, to match wire encoding.
if len(originalRecords) == 0 {
return nil
@@ -300,16 +301,16 @@ func CustomRecordsWithUnendorsed(
}
return originalRecords.MergedCopy(map[uint64][]byte{
- uint64(lnwire.ExperimentalEndorsementType): {
- lnwire.ExperimentalUnendorsed,
+ uint64(lnwire.ExperimentalAccountableType): {
+ lnwire.ExperimentalUnaccountable,
}},
)
}
-// ExperimentalEndorsementActive returns true if the experimental endorsement
+// ExperimentalAccountabilityActive returns true if the experimental accountability
// window is still open.
-func ExperimentalEndorsementActive() bool {
- return time.Now().Before(lnd.EndorsementExperimentEnd)
+func ExperimentalAccountabilityActive() bool {
+ return time.Now().Before(lnd.AccountabilityExperimentEnd)
}
// LnrpcOutpointToStr returns a string representation of an lnrpc.OutPoint.
diff --git a/lnwire/features.go b/lnwire/features.go
index 107828e..4e927e1 100644
--- a/lnwire/features.go
+++ b/lnwire/features.go
@@ -289,13 +289,15 @@ const (
// being finalized.
SimpleTaprootChannelsOptionalStaging = 181
- // ExperimentalEndorsementRequired is a required feature bit that
- // indicates that the node will relay experimental endorsement signals.
- ExperimentalEndorsementRequired FeatureBit = 260
+ // ExperimentalAccountabilityRequired is a required feature bit that
+ // indicates that the node will relay experimental accountability
+ // signals.
+ ExperimentalAccountabilityRequired FeatureBit = 260
- // ExperimentalEndorsementOptional is an optional feature bit that
- // indicates that the node will relay experimental endorsement signals.
- ExperimentalEndorsementOptional FeatureBit = 261
+ // ExperimentalAccountabilityOptional is an optional feature bit that
+ // indicates that the node will relay experimental accountability
+ // signals.
+ ExperimentalAccountabilityOptional FeatureBit = 261
// Bolt11BlindedPathsRequired is a required feature bit that indicates
// that the node is able to understand the blinded path tagged field in
@@ -385,8 +387,8 @@ var Features = map[FeatureBit]string{
SimpleTaprootChannelsOptionalStaging: "simple-taproot-chans-x",
SimpleTaprootOverlayChansOptional: "taproot-overlay-chans",
SimpleTaprootOverlayChansRequired: "taproot-overlay-chans",
- ExperimentalEndorsementRequired: "endorsement-x",
- ExperimentalEndorsementOptional: "endorsement-x",
+ ExperimentalAccountabilityRequired: "accountable-x",
+ ExperimentalAccountabilityOptional: "accountable-x",
Bolt11BlindedPathsOptional: "bolt-11-blinded-paths",
Bolt11BlindedPathsRequired: "bolt-11-blinded-paths",
RbfCoopCloseOptional: "rbf-coop-close",
diff --git a/lnwire/update_add_htlc.go b/lnwire/update_add_htlc.go
index e627dbf..38ceeec 100644
--- a/lnwire/update_add_htlc.go
+++ b/lnwire/update_add_htlc.go
@@ -16,20 +16,21 @@ const (
// entire packet.
OnionPacketSize = 1366
- // ExperimentalEndorsementType is the TLV type used for a custom
- // record that sets an experimental endorsement value.
- ExperimentalEndorsementType tlv.Type = 106823
-
- // ExperimentalUnendorsed is the value that the experimental endorsement
- // field contains when a htlc is not endorsed.
- ExperimentalUnendorsed = 0
-
- // ExperimentalEndorsed is the value that the experimental endorsement
- // field contains when a htlc is endorsed. We're using a single byte
- // to represent our endorsement value, but limit the value to using
- // the first three bits (max value = 00000111). Interpreted as a uint8
- // (an alias for byte in go), we can just define this constant as 7.
- ExperimentalEndorsed = 7
+ // ExperimentalAccountableType is the TLV type used for a custom
+ // record that sets an experimental accountable value.
+ ExperimentalAccountableType tlv.Type = 106823
+
+ // ExperimentalUnaccountable is the value that the experimental
+ // accountable field contains when a htlc is not accountable.
+ ExperimentalUnaccountable = 0
+
+ // ExperimentalAccountable is the value that the experimental
+ // accountable field contains when a htlc is accountable. We're using a
+ // single byte to represent our accountable value, but limit the value
+ // to using the first three bits (max value = 00000111). Interpreted as
+ // a uint8 (an alias for byte in go), we can just define this constant
+ // as 7.
+ ExperimentalAccountable = 7
)
type (
diff --git a/peer/brontide.go b/peer/brontide.go
index 8d02ca6..73c5acd 100644
--- a/peer/brontide.go
+++ b/peer/brontide.go
@@ -468,9 +468,9 @@ type Config struct {
// onion messages to subscribers.
OnionMessageServer *subscribe.Server
- // ShouldFwdExpEndorsement is a closure that indicates whether
- // experimental endorsement signals should be set.
- ShouldFwdExpEndorsement func() bool
+ // ShouldFwdExpAccountability is a closure that indicates whether
+ // experimental accountability signals should be set.
+ ShouldFwdExpAccountability func() bool
// NoDisconnectOnPongFailure indicates whether the peer should *not* be
// disconnected if a pong is not received in time or is mismatched.
@@ -1460,25 +1460,25 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
PendingCommitTicker: ticker.New(
p.cfg.PendingCommitInterval,
),
- BatchSize: p.cfg.ChannelCommitBatchSize,
- UnsafeReplay: p.cfg.UnsafeReplay,
- MinUpdateTimeout: htlcswitch.DefaultMinLinkFeeUpdateTimeout,
- MaxUpdateTimeout: htlcswitch.DefaultMaxLinkFeeUpdateTimeout,
- OutgoingCltvRejectDelta: p.cfg.OutgoingCltvRejectDelta,
- TowerClient: p.cfg.TowerClient,
- MaxOutgoingCltvExpiry: p.cfg.MaxOutgoingCltvExpiry,
- MaxFeeAllocation: p.cfg.MaxChannelFeeAllocation,
- MaxAnchorsCommitFeeRate: p.cfg.MaxAnchorsCommitFeeRate,
- NotifyActiveLink: p.cfg.ChannelNotifier.NotifyActiveLinkEvent,
- NotifyActiveChannel: p.cfg.ChannelNotifier.NotifyActiveChannelEvent,
- NotifyInactiveChannel: p.cfg.ChannelNotifier.NotifyInactiveChannelEvent,
- NotifyInactiveLinkEvent: p.cfg.ChannelNotifier.NotifyInactiveLinkEvent,
- HtlcNotifier: p.cfg.HtlcNotifier,
- GetAliases: p.cfg.GetAliases,
- PreviouslySentShutdown: shutdownMsg,
- DisallowRouteBlinding: p.cfg.DisallowRouteBlinding,
- MaxFeeExposure: p.cfg.MaxFeeExposure,
- ShouldFwdExpEndorsement: p.cfg.ShouldFwdExpEndorsement,
+ BatchSize: p.cfg.ChannelCommitBatchSize,
+ UnsafeReplay: p.cfg.UnsafeReplay,
+ MinUpdateTimeout: htlcswitch.DefaultMinLinkFeeUpdateTimeout,
+ MaxUpdateTimeout: htlcswitch.DefaultMaxLinkFeeUpdateTimeout,
+ OutgoingCltvRejectDelta: p.cfg.OutgoingCltvRejectDelta,
+ TowerClient: p.cfg.TowerClient,
+ MaxOutgoingCltvExpiry: p.cfg.MaxOutgoingCltvExpiry,
+ MaxFeeAllocation: p.cfg.MaxChannelFeeAllocation,
+ MaxAnchorsCommitFeeRate: p.cfg.MaxAnchorsCommitFeeRate,
+ NotifyActiveLink: p.cfg.ChannelNotifier.NotifyActiveLinkEvent,
+ NotifyActiveChannel: p.cfg.ChannelNotifier.NotifyActiveChannelEvent,
+ NotifyInactiveChannel: p.cfg.ChannelNotifier.NotifyInactiveChannelEvent,
+ NotifyInactiveLinkEvent: p.cfg.ChannelNotifier.NotifyInactiveLinkEvent,
+ HtlcNotifier: p.cfg.HtlcNotifier,
+ GetAliases: p.cfg.GetAliases,
+ PreviouslySentShutdown: shutdownMsg,
+ DisallowRouteBlinding: p.cfg.DisallowRouteBlinding,
+ MaxFeeExposure: p.cfg.MaxFeeExposure,
+ ShouldFwdExpAccountability: p.cfg.ShouldFwdExpAccountability,
DisallowQuiescence: p.cfg.DisallowQuiescence ||
!p.remoteFeatures.HasFeature(lnwire.QuiescenceOptional),
AuxTrafficShaper: p.cfg.AuxTrafficShaper,
diff --git a/routing/route/route.go b/routing/route/route.go
index 3b35ad6..1bb52ba 100644
--- a/routing/route/route.go
+++ b/routing/route/route.go
@@ -526,7 +526,7 @@ type Route struct {
// FirstHopWireCustomRecords is a set of custom records that should be
// included in the wire message sent to the first hop. This is for
// example used in custom channels. Besides custom channels we use it
- // also for the endorsement bit. This data will be sent to the first
+ // also for the accountable bit. This data will be sent to the first
// hop in the UpdateAddHTLC message.
//
// NOTE: Since these records already represent TLV records, and we
diff --git a/rpcserver.go b/rpcserver.go
index 5d2c4d2..026b224 100644
--- a/rpcserver.go
+++ b/rpcserver.go
@@ -695,8 +695,6 @@ func newRPCServer(cfg *Config, interceptorChain *rpcperms.InterceptorChain,
// addDeps populates all dependencies needed by the RPC server, and any
// of the sub-servers that it maintains. When this is done, the RPC server can
// be started, and start accepting RPC calls.
-//
-//nolint:funlen
func (r *rpcServer) addDeps(ctx context.Context, s *server,
macService *macaroons.Service,
subServerCgs *subRPCServerConfigs, atpl *autopilot.Manager,
@@ -781,13 +779,13 @@ func (r *rpcServer) addDeps(ctx context.Context, s *server,
return nil
},
- ShouldSetExpEndorsement: func() bool {
- if s.cfg.ProtocolOptions.NoExperimentalEndorsement() {
+ ShouldSetExpAccountability: func() bool {
+ if s.cfg.ProtocolOptions.NoExpAccountability() {
return false
}
return clock.NewDefaultClock().Now().Before(
- EndorsementExperimentEnd,
+ AccountabilityExperimentEnd,
)
},
}
diff --git a/sample-lnd.conf b/sample-lnd.conf
index c9a2865..830d42e 100644
--- a/sample-lnd.conf
+++ b/sample-lnd.conf
@@ -1440,8 +1440,8 @@
; Set to disable blinded route forwarding.
; protocol.no-route-blinding=false
-; Set to disable experimental endorsement signaling.
-; protocol.no-experimental-endorsement=false
+; Set to disable experimental accountability signaling.
+; protocol.no-experimental-accountability=false
; Set to enable support for RBF based coop close.
; protocol.rbf-coop-close=false
diff --git a/server.go b/server.go
index c3b724e..ef8abbf 100644
--- a/server.go
+++ b/server.go
@@ -139,11 +139,11 @@ var (
// TODO(roasbeef): add command line param to modify.
MaxFundingAmount = funding.MaxBtcFundingAmount
- // EndorsementExperimentEnd is the time after which nodes should stop
- // propagating experimental endorsement signals.
+ // AccountabilityExperimentEnd is the time after which nodes should stop
+ // propagating experimental accountable signals.
//
// Per blip04: January 1, 2026 12:00:00 AM UTC in unix seconds.
- EndorsementExperimentEnd = time.Unix(1767225600, 0)
+ AccountabilityExperimentEnd = time.Unix(1767225600, 0)
// ErrGossiperBan is one of the errors that can be returned when we
// attempt to finalize a connection to a remote peer.
@@ -641,22 +641,22 @@ func newServer(ctx context.Context, cfg *Config, listenAddrs []net.Addr,
//nolint:ll
featureMgr, err := feature.NewManager(feature.Config{
- NoTLVOnion: cfg.ProtocolOptions.LegacyOnion(),
- NoStaticRemoteKey: cfg.ProtocolOptions.NoStaticRemoteKey(),
- NoAnchors: cfg.ProtocolOptions.NoAnchorCommitments(),
- NoWumbo: !cfg.ProtocolOptions.Wumbo(),
- NoScriptEnforcementLease: cfg.ProtocolOptions.NoScriptEnforcementLease(),
- NoKeysend: !cfg.AcceptKeySend,
- NoOptionScidAlias: !cfg.ProtocolOptions.ScidAlias(),
- NoZeroConf: !cfg.ProtocolOptions.ZeroConf(),
- NoAnySegwit: cfg.ProtocolOptions.NoAnySegwit(),
- CustomFeatures: cfg.ProtocolOptions.CustomFeatures(),
- NoTaprootChans: !cfg.ProtocolOptions.TaprootChans,
- NoTaprootOverlay: !cfg.ProtocolOptions.TaprootOverlayChans,
- NoRouteBlinding: cfg.ProtocolOptions.NoRouteBlinding(),
- NoExperimentalEndorsement: cfg.ProtocolOptions.NoExperimentalEndorsement(),
- NoQuiescence: cfg.ProtocolOptions.NoQuiescence(),
- NoRbfCoopClose: !cfg.ProtocolOptions.RbfCoopClose,
+ NoTLVOnion: cfg.ProtocolOptions.LegacyOnion(),
+ NoStaticRemoteKey: cfg.ProtocolOptions.NoStaticRemoteKey(),
+ NoAnchors: cfg.ProtocolOptions.NoAnchorCommitments(),
+ NoWumbo: !cfg.ProtocolOptions.Wumbo(),
+ NoScriptEnforcementLease: cfg.ProtocolOptions.NoScriptEnforcementLease(),
+ NoKeysend: !cfg.AcceptKeySend,
+ NoOptionScidAlias: !cfg.ProtocolOptions.ScidAlias(),
+ NoZeroConf: !cfg.ProtocolOptions.ZeroConf(),
+ NoAnySegwit: cfg.ProtocolOptions.NoAnySegwit(),
+ CustomFeatures: cfg.ProtocolOptions.CustomFeatures(),
+ NoTaprootChans: !cfg.ProtocolOptions.TaprootChans,
+ NoTaprootOverlay: !cfg.ProtocolOptions.TaprootOverlayChans,
+ NoRouteBlinding: cfg.ProtocolOptions.NoRouteBlinding(),
+ NoExperimentalAccountability: cfg.ProtocolOptions.NoExpAccountability(),
+ NoQuiescence: cfg.ProtocolOptions.NoQuiescence(),
+ NoRbfCoopClose: !cfg.ProtocolOptions.RbfCoopClose,
})
if err != nil {
return nil, err
@@ -4443,13 +4443,13 @@ func (s *server) peerConnected(conn net.Conn, connReq *connmgr.ConnReq,
AuxResolver: s.implCfg.AuxContractResolver,
AuxTrafficShaper: s.implCfg.TrafficShaper,
AuxChannelNegotiator: s.implCfg.AuxChannelNegotiator,
- ShouldFwdExpEndorsement: func() bool {
- if s.cfg.ProtocolOptions.NoExperimentalEndorsement() {
+ ShouldFwdExpAccountability: func() bool {
+ if s.cfg.ProtocolOptions.NoExpAccountability() {
return false
}
return clock.NewDefaultClock().Now().Before(
- EndorsementExperimentEnd,
+ AccountabilityExperimentEnd,
)
},
NoDisconnectOnPongFailure: s.cfg.NoDisconnectOnPongFailure,
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.