Skip to content

Commit d62edd5

Browse files
committed
Move node_id signing of ChannelAnnouncement into Signer
This removes one more place where we directly access the node_id secret key in `ChannelManager`, slowly marching towards allowing the node_id secret key to be offline in the signer. More importantly, it allows more ChannelAnnouncement logic to move into the `Channel` without having to pass the node secret key around, avoiding the announcement logic being split across two files.
1 parent 1a24dcc commit d62edd5

File tree

8 files changed

+64
-47
lines changed

8 files changed

+64
-47
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ impl KeysInterface for KeyProvider {
188188
let id = self.rand_bytes_id.fetch_add(1, atomic::Ordering::Relaxed);
189189
let keys = InMemorySigner::new(
190190
&secp_ctx,
191+
self.get_node_secret(),
191192
SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, self.node_id]).unwrap(),
192193
SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, self.node_id]).unwrap(),
193194
SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, self.node_id]).unwrap(),
@@ -211,7 +212,7 @@ impl KeysInterface for KeyProvider {
211212
fn read_chan_signer(&self, buffer: &[u8]) -> Result<Self::Signer, DecodeError> {
212213
let mut reader = std::io::Cursor::new(buffer);
213214

214-
let inner: InMemorySigner = Readable::read(&mut reader)?;
215+
let inner: InMemorySigner = ReadableArgs::read(&mut reader, self.get_node_secret())?;
215216
let state = self.make_enforcement_state_cell(inner.commitment_seed);
216217

217218
Ok(EnforcingSigner {

fuzz/src/full_stack.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ use lightning::util::errors::APIError;
4545
use lightning::util::events::Event;
4646
use lightning::util::enforcing_trait_impls::{EnforcingSigner, EnforcementState};
4747
use lightning::util::logger::Logger;
48-
use lightning::util::ser::Readable;
48+
use lightning::util::ser::ReadableArgs;
4949

5050
use utils::test_logger;
5151
use utils::test_persister::TestPersister;
@@ -293,6 +293,7 @@ impl KeysInterface for KeyProvider {
293293
EnforcingSigner::new(if inbound {
294294
InMemorySigner::new(
295295
&secp_ctx,
296+
self.node_secret.clone(),
296297
SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ctr]).unwrap(),
297298
SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, ctr]).unwrap(),
298299
SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, ctr]).unwrap(),
@@ -305,6 +306,7 @@ impl KeysInterface for KeyProvider {
305306
} else {
306307
InMemorySigner::new(
307308
&secp_ctx,
309+
self.node_secret.clone(),
308310
SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, ctr]).unwrap(),
309311
SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, ctr]).unwrap(),
310312
SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, ctr]).unwrap(),
@@ -324,7 +326,7 @@ impl KeysInterface for KeyProvider {
324326
}
325327

326328
fn read_chan_signer(&self, mut data: &[u8]) -> Result<EnforcingSigner, DecodeError> {
327-
let inner: InMemorySigner = Readable::read(&mut data)?;
329+
let inner: InMemorySigner = ReadableArgs::read(&mut data, self.node_secret.clone())?;
328330
let state = Arc::new(Mutex::new(EnforcementState::new()));
329331

330332
Ok(EnforcingSigner::new_with_revoked(

lightning/src/chain/channelmonitor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3479,6 +3479,7 @@ mod tests {
34793479
SecretKey::from_slice(&[41; 32]).unwrap(),
34803480
SecretKey::from_slice(&[41; 32]).unwrap(),
34813481
SecretKey::from_slice(&[41; 32]).unwrap(),
3482+
SecretKey::from_slice(&[41; 32]).unwrap(),
34823483
[41; 32],
34833484
0,
34843485
[0; 32]

lightning/src/chain/keysinterface.rs

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use bitcoin::secp256k1::recovery::RecoverableSignature;
3131
use bitcoin::secp256k1;
3232

3333
use util::{byte_utils, transaction_utils};
34-
use util::ser::{Writeable, Writer, Readable};
34+
use util::ser::{Writeable, Writer, Readable, ReadableArgs};
3535

3636
use chain::transaction::OutPoint;
3737
use ln::{chan_utils, PaymentPreimage};
@@ -346,13 +346,17 @@ pub trait BaseSign {
346346
/// chosen to forgo their output as dust.
347347
fn sign_closing_transaction(&self, closing_tx: &ClosingTransaction, secp_ctx: &Secp256k1<secp256k1::All>) -> Result<Signature, ()>;
348348

349-
/// Signs a channel announcement message with our funding key, proving it comes from one
350-
/// of the channel participants.
349+
/// Signs a channel announcement message with our funding key and our node secret key (aka
350+
/// node_id or network_key), proving it comes from one of the channel participants.
351+
///
352+
/// The first returned signature should be from our node secret key, the second from our
353+
/// funding key.
351354
///
352355
/// Note that if this fails or is rejected, the channel will not be publicly announced and
353356
/// our counterparty may (though likely will not) close the channel on us for violating the
354357
/// protocol.
355-
fn sign_channel_announcement(&self, msg: &UnsignedChannelAnnouncement, secp_ctx: &Secp256k1<secp256k1::All>) -> Result<Signature, ()>;
358+
fn sign_channel_announcement(&self, msg: &UnsignedChannelAnnouncement, secp_ctx: &Secp256k1<secp256k1::All>)
359+
-> Result<(Signature, Signature), ()>;
356360

357361
/// Set the counterparty static channel data, including basepoints,
358362
/// counterparty_selected/holder_selected_contest_delay and funding outpoint.
@@ -447,6 +451,8 @@ pub struct InMemorySigner {
447451
pub commitment_seed: [u8; 32],
448452
/// Holder public keys and basepoints
449453
pub(crate) holder_channel_pubkeys: ChannelPublicKeys,
454+
/// Private key of our node secret, used for signing channel announcements
455+
node_secret: SecretKey,
450456
/// Counterparty public keys and counterparty/holder selected_contest_delay, populated on channel acceptance
451457
channel_parameters: Option<ChannelTransactionParameters>,
452458
/// The total value of this channel
@@ -459,6 +465,7 @@ impl InMemorySigner {
459465
/// Create a new InMemorySigner
460466
pub fn new<C: Signing>(
461467
secp_ctx: &Secp256k1<C>,
468+
node_secret: SecretKey,
462469
funding_key: SecretKey,
463470
revocation_base_key: SecretKey,
464471
payment_key: SecretKey,
@@ -478,6 +485,7 @@ impl InMemorySigner {
478485
delayed_payment_base_key,
479486
htlc_base_key,
480487
commitment_seed,
488+
node_secret,
481489
channel_value_satoshis,
482490
holder_channel_pubkeys,
483491
channel_parameters: None,
@@ -720,9 +728,10 @@ impl BaseSign for InMemorySigner {
720728
Ok(closing_tx.trust().sign(&self.funding_key, &channel_funding_redeemscript, self.channel_value_satoshis, secp_ctx))
721729
}
722730

723-
fn sign_channel_announcement(&self, msg: &UnsignedChannelAnnouncement, secp_ctx: &Secp256k1<secp256k1::All>) -> Result<Signature, ()> {
731+
fn sign_channel_announcement(&self, msg: &UnsignedChannelAnnouncement, secp_ctx: &Secp256k1<secp256k1::All>)
732+
-> Result<(Signature, Signature), ()> {
724733
let msghash = hash_to_message!(&Sha256dHash::hash(&msg.encode()[..])[..]);
725-
Ok(secp_ctx.sign(&msghash, &self.funding_key))
734+
Ok((secp_ctx.sign(&msghash, &self.node_secret), secp_ctx.sign(&msghash, &self.funding_key)))
726735
}
727736

728737
fn ready_channel(&mut self, channel_parameters: &ChannelTransactionParameters) {
@@ -757,8 +766,8 @@ impl Writeable for InMemorySigner {
757766
}
758767
}
759768

760-
impl Readable for InMemorySigner {
761-
fn read<R: io::Read>(reader: &mut R) -> Result<Self, DecodeError> {
769+
impl ReadableArgs<SecretKey> for InMemorySigner {
770+
fn read<R: io::Read>(reader: &mut R, node_secret: SecretKey) -> Result<Self, DecodeError> {
762771
let _ver = read_ver_prefix!(reader, SERIALIZATION_VERSION);
763772

764773
let funding_key = Readable::read(reader)?;
@@ -784,6 +793,7 @@ impl Readable for InMemorySigner {
784793
payment_key,
785794
delayed_payment_base_key,
786795
htlc_base_key,
796+
node_secret,
787797
commitment_seed,
788798
channel_value_satoshis,
789799
holder_channel_pubkeys,
@@ -937,6 +947,7 @@ impl KeysManager {
937947

938948
InMemorySigner::new(
939949
&self.secp_ctx,
950+
self.node_secret,
940951
funding_key,
941952
revocation_base_key,
942953
payment_key,
@@ -1119,7 +1130,7 @@ impl KeysInterface for KeysManager {
11191130
}
11201131

11211132
fn read_chan_signer(&self, reader: &[u8]) -> Result<Self::Signer, DecodeError> {
1122-
InMemorySigner::read(&mut io::Cursor::new(reader))
1133+
InMemorySigner::read(&mut io::Cursor::new(reader), self.get_node_secret())
11231134
}
11241135

11251136
fn sign_invoice(&self, hrp_bytes: &[u8], invoice_data: &[u5]) -> Result<RecoverableSignature, ()> {

lightning/src/ln/channel.rs

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4596,17 +4596,19 @@ impl<Signer: Sign> Channel<Signer> {
45964596
})
45974597
}
45984598

4599-
/// Gets an UnsignedChannelAnnouncement, as well as a signature covering it using our
4600-
/// bitcoin_key, if available, for this channel. The channel must be publicly announceable and
4601-
/// available for use (have exchanged FundingLocked messages in both directions). Should be used
4602-
/// for both loose and in response to an AnnouncementSignatures message from the remote peer.
4599+
/// Gets an UnsignedChannelAnnouncement for this channel. The channel must be publicly
4600+
/// announceable and available for use (have exchanged FundingLocked messages in both
4601+
/// directions). Should be used for both loose and in response to an AnnouncementSignatures
4602+
/// message from the remote peer.
4603+
///
46034604
/// Will only fail if we're not in a state where channel_announcement may be sent (including
46044605
/// closing).
4606+
///
46054607
/// Note that the "channel must be funded" requirement is stricter than BOLT 7 requires - see
46064608
/// https://github.com/lightningnetwork/lightning-rfc/issues/468
46074609
///
46084610
/// This will only return ChannelError::Ignore upon failure.
4609-
pub fn get_channel_announcement(&self, node_id: PublicKey, chain_hash: BlockHash) -> Result<(msgs::UnsignedChannelAnnouncement, Signature), ChannelError> {
4611+
fn get_channel_announcement(&self, node_id: PublicKey, chain_hash: BlockHash) -> Result<msgs::UnsignedChannelAnnouncement, ChannelError> {
46104612
if !self.config.announced_channel {
46114613
return Err(ChannelError::Ignore("Channel is not available for public announcements".to_owned()));
46124614
}
@@ -4630,19 +4632,30 @@ impl<Signer: Sign> Channel<Signer> {
46304632
excess_data: Vec::new(),
46314633
};
46324634

4633-
let sig = self.holder_signer.sign_channel_announcement(&msg, &self.secp_ctx)
4635+
Ok(msg)
4636+
}
4637+
4638+
pub fn get_announcement_sigs(&self, node_pk: PublicKey, genesis_block_hash: BlockHash) -> Result<msgs::AnnouncementSignatures, ChannelError> {
4639+
let announcement = self.get_channel_announcement(node_pk, genesis_block_hash)?;
4640+
let (our_node_sig, our_bitcoin_sig) = self.holder_signer.sign_channel_announcement(&announcement, &self.secp_ctx)
46344641
.map_err(|_| ChannelError::Ignore("Signer rejected channel_announcement".to_owned()))?;
46354642

4636-
Ok((msg, sig))
4643+
Ok(msgs::AnnouncementSignatures {
4644+
channel_id: self.channel_id(),
4645+
short_channel_id: self.get_short_channel_id().unwrap(),
4646+
node_signature: our_node_sig,
4647+
bitcoin_signature: our_bitcoin_sig,
4648+
})
46374649
}
46384650

46394651
/// Signs the given channel announcement, returning a ChannelError::Ignore if no keys are
46404652
/// available.
4641-
fn sign_channel_announcement(&self, our_node_secret: &SecretKey, our_node_id: PublicKey, msghash: secp256k1::Message, announcement: msgs::UnsignedChannelAnnouncement, our_bitcoin_sig: Signature) -> Result<msgs::ChannelAnnouncement, ChannelError> {
4653+
fn sign_channel_announcement(&self, our_node_id: PublicKey, announcement: msgs::UnsignedChannelAnnouncement) -> Result<msgs::ChannelAnnouncement, ChannelError> {
46424654
if let Some((their_node_sig, their_bitcoin_sig)) = self.announcement_sigs {
46434655
let were_node_one = announcement.node_id_1 == our_node_id;
46444656

4645-
let our_node_sig = self.secp_ctx.sign(&msghash, our_node_secret);
4657+
let (our_node_sig, our_bitcoin_sig) = self.holder_signer.sign_channel_announcement(&announcement, &self.secp_ctx)
4658+
.map_err(|_| ChannelError::Ignore("Signer rejected channel_announcement".to_owned()))?;
46464659
Ok(msgs::ChannelAnnouncement {
46474660
node_signature_1: if were_node_one { our_node_sig } else { their_node_sig },
46484661
node_signature_2: if were_node_one { their_node_sig } else { our_node_sig },
@@ -4658,8 +4671,8 @@ impl<Signer: Sign> Channel<Signer> {
46584671
/// Processes an incoming announcement_signatures message, providing a fully-signed
46594672
/// channel_announcement message which we can broadcast and storing our counterparty's
46604673
/// signatures for later reconstruction/rebroadcast of the channel_announcement.
4661-
pub fn announcement_signatures(&mut self, our_node_secret: &SecretKey, our_node_id: PublicKey, chain_hash: BlockHash, msg: &msgs::AnnouncementSignatures) -> Result<msgs::ChannelAnnouncement, ChannelError> {
4662-
let (announcement, our_bitcoin_sig) = self.get_channel_announcement(our_node_id.clone(), chain_hash)?;
4674+
pub fn announcement_signatures(&mut self, our_node_id: PublicKey, chain_hash: BlockHash, msg: &msgs::AnnouncementSignatures) -> Result<msgs::ChannelAnnouncement, ChannelError> {
4675+
let announcement = self.get_channel_announcement(our_node_id.clone(), chain_hash)?;
46634676

46644677
let msghash = hash_to_message!(&Sha256d::hash(&announcement.encode()[..])[..]);
46654678

@@ -4676,18 +4689,17 @@ impl<Signer: Sign> Channel<Signer> {
46764689

46774690
self.announcement_sigs = Some((msg.node_signature, msg.bitcoin_signature));
46784691

4679-
self.sign_channel_announcement(our_node_secret, our_node_id, msghash, announcement, our_bitcoin_sig)
4692+
self.sign_channel_announcement(our_node_id, announcement)
46804693
}
46814694

46824695
/// Gets a signed channel_announcement for this channel, if we previously received an
46834696
/// announcement_signatures from our counterparty.
4684-
pub fn get_signed_channel_announcement(&self, our_node_secret: &SecretKey, our_node_id: PublicKey, chain_hash: BlockHash) -> Option<msgs::ChannelAnnouncement> {
4685-
let (announcement, our_bitcoin_sig) = match self.get_channel_announcement(our_node_id.clone(), chain_hash) {
4697+
pub fn get_signed_channel_announcement(&self, our_node_id: PublicKey, chain_hash: BlockHash) -> Option<msgs::ChannelAnnouncement> {
4698+
let announcement = match self.get_channel_announcement(our_node_id.clone(), chain_hash) {
46864699
Ok(res) => res,
46874700
Err(_) => return None,
46884701
};
4689-
let msghash = hash_to_message!(&Sha256d::hash(&announcement.encode()[..])[..]);
4690-
match self.sign_channel_announcement(our_node_secret, our_node_id, msghash, announcement, our_bitcoin_sig) {
4702+
match self.sign_channel_announcement(our_node_id, announcement) {
46914703
Ok(res) => Some(res),
46924704
Err(_) => None,
46934705
}
@@ -6270,6 +6282,7 @@ mod tests {
62706282

62716283
let mut signer = InMemorySigner::new(
62726284
&secp_ctx,
6285+
SecretKey::from_slice(&hex::decode("4242424242424242424242424242424242424242424242424242424242424242").unwrap()[..]).unwrap(),
62736286
SecretKey::from_slice(&hex::decode("30ff4956bbdd3222d44cc5e8a1261dab1e07957bdac5ae88fe3261ef321f3749").unwrap()[..]).unwrap(),
62746287
SecretKey::from_slice(&hex::decode("0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap()[..]).unwrap(),
62756288
SecretKey::from_slice(&hex::decode("1111111111111111111111111111111111111111111111111111111111111111").unwrap()[..]).unwrap(),

lightning/src/ln/channelmanager.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,20 +2896,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
28962896
log_trace!(self.logger, "Can't send announcement_signatures for private channel {}", log_bytes!(chan.channel_id()));
28972897
return None
28982898
}
2899-
2900-
let (announcement, our_bitcoin_sig) = match chan.get_channel_announcement(self.get_our_node_id(), self.genesis_hash.clone()) {
2901-
Ok(res) => res,
2902-
Err(_) => return None, // Only in case of state precondition violations eg channel is closing
2903-
};
2904-
let msghash = hash_to_message!(&Sha256dHash::hash(&announcement.encode()[..])[..]);
2905-
let our_node_sig = self.secp_ctx.sign(&msghash, &self.our_network_key);
2906-
2907-
Some(msgs::AnnouncementSignatures {
2908-
channel_id: chan.channel_id(),
2909-
short_channel_id: chan.get_short_channel_id().unwrap(),
2910-
node_signature: our_node_sig,
2911-
bitcoin_signature: our_bitcoin_sig,
2912-
})
2899+
chan.get_announcement_sigs(self.get_our_node_id(), self.genesis_hash.clone()).ok()
29132900
}
29142901

29152902
#[allow(dead_code)]
@@ -2969,7 +2956,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
29692956

29702957
let mut announced_chans = false;
29712958
for (_, chan) in channel_state.by_id.iter() {
2972-
if let Some(msg) = chan.get_signed_channel_announcement(&self.our_network_key, self.get_our_node_id(), self.genesis_hash.clone()) {
2959+
if let Some(msg) = chan.get_signed_channel_announcement(self.get_our_node_id(), self.genesis_hash.clone()) {
29732960
channel_state.pending_msg_events.push(events::MessageSendEvent::BroadcastChannelAnnouncement {
29742961
msg,
29752962
update_msg: match self.get_channel_update_for_broadcast(chan) {
@@ -4674,7 +4661,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
46744661
}
46754662

46764663
channel_state.pending_msg_events.push(events::MessageSendEvent::BroadcastChannelAnnouncement {
4677-
msg: try_chan_entry!(self, chan.get_mut().announcement_signatures(&self.our_network_key, self.get_our_node_id(), self.genesis_hash.clone(), msg), channel_state, chan),
4664+
msg: try_chan_entry!(self, chan.get_mut().announcement_signatures(self.get_our_node_id(), self.genesis_hash.clone(), msg), channel_state, chan),
46784665
// Note that announcement_signatures fails if the channel cannot be announced,
46794666
// so get_channel_update_for_broadcast will never fail by the time we get here.
46804667
update_msg: self.get_channel_update_for_broadcast(chan.get()).unwrap(),

lightning/src/util/enforcing_trait_impls.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ impl BaseSign for EnforcingSigner {
190190
Ok(self.inner.sign_closing_transaction(closing_tx, secp_ctx).unwrap())
191191
}
192192

193-
fn sign_channel_announcement(&self, msg: &msgs::UnsignedChannelAnnouncement, secp_ctx: &Secp256k1<secp256k1::All>) -> Result<Signature, ()> {
193+
fn sign_channel_announcement(&self, msg: &msgs::UnsignedChannelAnnouncement, secp_ctx: &Secp256k1<secp256k1::All>)
194+
-> Result<(Signature, Signature), ()> {
194195
self.inner.sign_channel_announcement(msg, secp_ctx)
195196
}
196197

lightning/src/util/test_utils.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ impl keysinterface::KeysInterface for OnlyReadsKeysInterface {
7979
fn get_secure_random_bytes(&self) -> [u8; 32] { [0; 32] }
8080

8181
fn read_chan_signer(&self, mut reader: &[u8]) -> Result<Self::Signer, msgs::DecodeError> {
82-
let inner: InMemorySigner = Readable::read(&mut reader)?;
82+
let dummy_sk = SecretKey::from_slice(&[42; 32]).unwrap();
83+
let inner: InMemorySigner = ReadableArgs::read(&mut reader, dummy_sk)?;
8384
let state = Arc::new(Mutex::new(EnforcementState::new()));
8485

8586
Ok(EnforcingSigner::new_with_revoked(
@@ -519,7 +520,7 @@ impl keysinterface::KeysInterface for TestKeysInterface {
519520
fn read_chan_signer(&self, buffer: &[u8]) -> Result<Self::Signer, msgs::DecodeError> {
520521
let mut reader = io::Cursor::new(buffer);
521522

522-
let inner: InMemorySigner = Readable::read(&mut reader)?;
523+
let inner: InMemorySigner = ReadableArgs::read(&mut reader, self.get_node_secret())?;
523524
let state = self.make_enforcement_state_cell(inner.commitment_seed);
524525

525526
Ok(EnforcingSigner::new_with_revoked(

0 commit comments

Comments
 (0)