Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make HTLCDescriptor writeable #2571

Merged

Conversation

davidcaseria
Copy link
Contributor

Because HTLCDescriptor is used in the EcdsaChannelSigner trait it is may be needed by an external signer, thus it should be able to be serialized. Implementing the existing Readable/Writeable traits seems to make the most sense.

@TheBlueMatt
Copy link
Collaborator

We really want to deprecate the writing of signers - ideally modern signing implementations write out zero bytes and re-derive their state entirely from the derivation info.

@davidcaseria
Copy link
Contributor Author

Sorry @TheBlueMatt I should've been more clear. HTLCDescriptor does not need to be serialized for the state of the external signer, it needs to be serialized since it is used in a function call by the EcdsaChannelSigner trait:

fn sign_holder_htlc_transaction(&self, htlc_tx: &Transaction, input: usize,
htlc_descriptor: &HTLCDescriptor, secp_ctx: &Secp256k1<secp256k1::All>
) -> Result<Signature, ()>;

The data passed to the function needs to be serialized so that it can be sent to the external signer.

@wpaulino wpaulino merged commit cd16cdd into lightningdevkit:main Sep 14, 2023
8 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants