Commit graph

62 commits

Author SHA1 Message Date
Antoine Riard
6133498ca1 Overhaul LocalCommitmentTx to new nomenclature 2020-09-14 14:39:47 -04:00
Antoine Riard
00d063df5c Overhaul ChannelMonitor/OnchainTxHandler to new nomenclature 2020-09-14 14:39:47 -04:00
Antoine Riard
9a23130db9 Change ChannelKeys interface nomenclature to holder/counterparty one
Transaction signing methods are changed from local_/remote_ prefix
to newer holder_/counterparty_ wihout any semantic changes.
2020-09-14 14:39:47 -04:00
Antoine Riard
b51721fc8a Underscore TxCreationKeys ownership
A TxCreationKeys set represents the key which will be embedded in output
scripts of a party's commitment tx state. Among them there is a always
a key belonging to counter-party, the HTLC pubkey. To dissociate
strongly, prefix keys with broadcaster/countersignatory.

A revocation keypair is attributed to the broadcaster as it's used
to punish a fraudulent broadcast while minding that such keypair
derivation method will be always used by countersignatory as it's
its task to enforce punishement thanks to the release secret.
2020-09-14 14:39:47 -04:00
Antoine Riard
c6a91f2ebd Change variable nomenclature for to_self_delay
To avoid reviewers confusion, rename counterparty_to_self_delay
to counteparty_selected_contest_delay, i.e the justice delay announced
by a channel counterparty restraining our transactions, and to_self_delay
to locally_selected_contest_delay, i.e the justice delay announced by us
restraining counterparty's transactions

We deviate from wider nomenclature by prefixing local data with a
locally_ extension due to the leak of this value in transactions/scripts
builder, where the confusion may happen.

Rename further AcceptChannelData to the new nomenclature.
2020-09-14 14:39:44 -04:00
Matt Corallo
dce831ed20 Rename lightning C/C++ bindings library to libldk
This should fix #689.
2020-09-13 20:58:50 -04:00
Matt Corallo
53182a8cec Note that genbindings.sh is really also a test script. 2020-09-13 20:58:50 -04:00
Matt Corallo
dbf4f58987 Remove the bindings crate from the root namespace to let it break
Until we get the bindings generation process super stable, let the
bindings get stale with respect to the main repo while still letting
`cargo check` pass.
2020-09-13 20:58:50 -04:00
Antoine Riard
1d7c4f663c Change variable nomenclature in chan_utils
Variables should be named according to the script semantic which is
an invariant with regards to generating a local or remote commitment
transaction.

I.e a broadcaster_htlc_key will always guard a HTLC to the party able
to broadcast the computed transactions whereas countersignatory_htlc_key
will guard HTLC to a countersignatory of the commitment transaction.
2020-09-11 09:50:18 -04:00
Matt Corallo
4f6f34fa30 Add bindings README 2020-09-10 22:03:32 -04:00
Matt Corallo
96b2927a9a Add automatically generated C/C++ wrapper bindings 2020-09-10 22:03:32 -04:00
Matt Corallo
1af8a464b4 Add all the manually-generated bits for the c-bindings crate
Including:
 * A script to automatically generate all the rest,
 * Cargo.toml and cbindgen.toml,
 * manually-written wrapper types for a few types
2020-09-10 22:03:32 -04:00