What changed, and why it matters
This commit is a small cleanup pull request titled 'Nits'. It fixes a typo in documentation, corrects a log message to show the right commitment format name, changes a debug log to info level for transaction signing, adds structured logging context for authenticated peer connections, and removes an outdated ASCII diagram comment. None of these changes affect security.
No security action required. Treat as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff contains five trivial changes: (1) spelling fix ‘decriptor-enabled’ → ‘descriptor-enabled’ in docs; (2) log interpolation fix in Channel.scala so the accepted commitment format is logged as the actual format object rather than the channel type enum; (3) log level change from debug to info when signing a PSBT in LocalOnChainKeyManager.scala; (4) wrapping an authentication log line with MDC context and removing a blank line in PeerConnection.scala; (5) removing a redundant BOLT-4 packet layout comment in FailureMessage.scala. No functional code paths, validation logic, cryptography, or wire protocols are altered.
Changed components
docs/ManagingBitcoinCoreKeys.mdeclair-core/src/main/scala/fr/acinq/eclair/channel/fsm/Channel.scalaeclair-core/src/main/scala/fr/acinq/eclair/crypto/keymanager/LocalOnChainKeyManager.scalaeclair-core/src/main/scala/fr/acinq/eclair/io/PeerConnection.scalaeclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/FailureMessage.scalaInspect captured patch +7 / −8
diff --git a/docs/ManagingBitcoinCoreKeys.md b/docs/ManagingBitcoinCoreKeys.md
index 66f0e8f..e291557 100644
--- a/docs/ManagingBitcoinCoreKeys.md
+++ b/docs/ManagingBitcoinCoreKeys.md
@@ -42,7 +42,7 @@ This is an example of `eclair-signer.conf` configuration file:
Restart eclair, without changing `eclair.bitcoind.wallet` (so it uses the default wallet or the previously used bitcoin wallet for existing nodes).
-Create a new empty, decriptor-enabled wallet on your new Bitcoin Core node.
+Create a new empty, descriptor-enabled wallet on your new Bitcoin Core node.
:warning: The name must match the one that you set in `eclair-signer.conf` (here we use "eclair")
diff --git a/eclair-core/src/main/scala/fr/acinq/eclair/channel/fsm/Channel.scala b/eclair-core/src/main/scala/fr/acinq/eclair/channel/fsm/Channel.scala
index 84ac61d..928ab70 100644
--- a/eclair-core/src/main/scala/fr/acinq/eclair/channel/fsm/Channel.scala
+++ b/eclair-core/src/main/scala/fr/acinq/eclair/channel/fsm/Channel.scala
@@ -1108,7 +1108,7 @@ class Channel(val nodeParams: NodeParams, val channelKeys: ChannelKeys, val wall
// commitment format and will simply apply the previous commitment format.
val nextCommitmentFormat = msg.channelType_opt match {
case Some(ChannelTypes.SimpleTaprootChannelsPhoenix) if parentCommitment.commitmentFormat == UnsafeLegacyAnchorOutputsCommitmentFormat =>
- log.info("accepting upgrade to {} during splice from commitment format {}", ChannelTypes.SimpleTaprootChannelsPhoenix, parentCommitment.commitmentFormat)
+ log.info("accepting upgrade to {} during splice from commitment format {}", PhoenixSimpleTaprootChannelCommitmentFormat, parentCommitment.commitmentFormat)
PhoenixSimpleTaprootChannelCommitmentFormat
case Some(channelType) =>
log.info("rejecting upgrade to {} during splice from commitment format {}", channelType, parentCommitment.commitmentFormat)
diff --git a/eclair-core/src/main/scala/fr/acinq/eclair/crypto/keymanager/LocalOnChainKeyManager.scala b/eclair-core/src/main/scala/fr/acinq/eclair/crypto/keymanager/LocalOnChainKeyManager.scala
index 8eafa1b..8f06f39 100644
--- a/eclair-core/src/main/scala/fr/acinq/eclair/crypto/keymanager/LocalOnChainKeyManager.scala
+++ b/eclair-core/src/main/scala/fr/acinq/eclair/crypto/keymanager/LocalOnChainKeyManager.scala
@@ -163,7 +163,7 @@ class LocalOnChainKeyManager(override val walletName: String, seed: ByteVector,
for {
spent <- spentAmount(psbt, ourInputs)
change <- changeAmount(psbt, ourOutputs)
- _ = logger.debug(s"signing txid=${psbt.global.tx.txid} fees=${psbt.computeFees()} spent=$spent change=$change")
+ _ = logger.info(s"signing txid=${psbt.global.tx.txid} fees=${psbt.computeFees()} spent=$spent change=$change")
_ <- Try {
ourOutputs.foreach(i => require(isOurOutput(psbt, i), s"could not verify output $i: bitcoin core may be malicious"))
}
diff --git a/eclair-core/src/main/scala/fr/acinq/eclair/io/PeerConnection.scala b/eclair-core/src/main/scala/fr/acinq/eclair/io/PeerConnection.scala
index 8f2fe02..2ee93d0 100644
--- a/eclair-core/src/main/scala/fr/acinq/eclair/io/PeerConnection.scala
+++ b/eclair-core/src/main/scala/fr/acinq/eclair/io/PeerConnection.scala
@@ -86,7 +86,9 @@ class PeerConnection(keyPair: KeyPair, conf: PeerConnection.Conf, switchboard: A
when(AUTHENTICATING) {
case Event(TransportHandler.HandshakeCompleted(remoteNodeId), d: AuthenticatingData) =>
cancelTimer(AUTH_TIMER)
- log.info(s"connection authenticated (direction=${if (d.pendingAuth.outgoing) "outgoing" else "incoming"})")
+ Logs.withMdc(diagLog)(Logs.mdc(remoteNodeId_opt = Some(remoteNodeId))) {
+ log.info(s"connection authenticated (direction=${if (d.pendingAuth.outgoing) "outgoing" else "incoming"})")
+ }
Metrics.PeerConnectionsConnecting.withTag(Tags.ConnectionState, Tags.ConnectionStates.Authenticated).increment()
switchboard ! Authenticated(self, remoteNodeId, d.pendingAuth.outgoing)
goto(BEFORE_INIT) using BeforeInitData(remoteNodeId, d.pendingAuth, d.transport, d.isPersistent)
@@ -133,7 +135,6 @@ class PeerConnection(keyPair: KeyPair, conf: PeerConnection.Conf, switchboard: A
case Event(remoteInit: protocol.Init, d: InitializingData) =>
cancelTimer(INIT_TIMER)
d.transport ! TransportHandler.ReadAck(remoteInit)
-
log.info(s"peer is using features=${remoteInit.features}, networks=${remoteInit.networks.mkString(",")}")
remoteInit.remoteAddress_opt.foreach(address => log.info("peer reports that our IP address is {} (public={})", address.toString, NodeAddress.isPublicIPAddress(address)))
diff --git a/eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/FailureMessage.scala b/eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/FailureMessage.scala
index 563fcce..429b75b 100644
--- a/eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/FailureMessage.scala
+++ b/eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/FailureMessage.scala
@@ -192,9 +192,7 @@ object FailureMessageCodecs {
)
/**
- * An onion-encrypted failure from an intermediate node:
- *
- * | HMAC(32 bytes) | failure message length (2 bytes) | failure message | pad length (2 bytes) | pad |
+ * An onion-encrypted failure from an intermediate node.
*
* Bolt 4: SHOULD set pad such that the failure_len plus pad_len is equal to 256: by always using the same size we
* ensure error messages are indistinguishable.
Why this scored 15/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.