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

0.8.0 #19

Merged
merged 307 commits into from
Dec 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
307 commits
Select commit Hold shift + click to select a range
53a2789
pyln: Default to DEVELOPER=0 when running outside of tree
cdecker Oct 28, 2019
bc9b1c4
pyln: Move RPC and daemon instantiation into the LightningNode
cdecker Oct 28, 2019
9378be7
pyln: Allow users to override the LightningNode class
cdecker Oct 30, 2019
7679f25
devtools: fix mkcommit crash.
rustyrussell Nov 12, 2019
6f215a7
contrib: fixup documentation of l1/2-log
niftynei Oct 29, 2019
963a1da
addr: handle P2SH/P2PKH in scriptpubkey encoding
niftynei Oct 29, 2019
a333df4
listpeers: show close_to address
niftynei Oct 29, 2019
28cdccf
dev: add option flag for specifying temporary channel id
niftynei Nov 1, 2019
eaa72ed
pytest: fix `make pytest`
rustyrussell Nov 13, 2019
d4c0746
fixed argv indexes for parsing commands
remyers Nov 6, 2019
8dbb32a
fixed generate/decode to use assocdata
remyers Nov 7, 2019
1c6ac95
fixed to properly pass outgoing cltv to hopdata
remyers Nov 13, 2019
2821187
trim whitespace from end of onion before decoding
remyers Nov 13, 2019
a76518a
common/sphinx: rename hop_data to hop_data_legacy.
rustyrussell Nov 14, 2019
b7bbccd
common/sphinx: handle decoding of TLV payload.
rustyrussell Nov 14, 2019
2a22590
lightningd: handle tlv-style payloads.
rustyrussell Nov 14, 2019
3a25e9b
gossipd: add hop-style to nodes to mark whether they speak TLV onion.
rustyrussell Nov 14, 2019
997e3f7
lightningd: move json_add_route into gossip_control.c and make static.
rustyrussell Nov 14, 2019
c83834c
lightningd: expose/accept "style" parameter in routes.
rustyrussell Nov 14, 2019
0211712
sphinx: separate nonfinal from final interface, add tlv option.
rustyrussell Nov 14, 2019
9dc8cff
devtools/onion: use raw sphinx helper or new style, allow TLV.
rustyrussell Nov 14, 2019
bb06bec
features: set OPT_VAR_ONION (bit 9) iff EXPERIMENTAL_FEATURES
rustyrussell Nov 14, 2019
21555b2
tests: test that we only use tlv onion when advertized.
rustyrussell Nov 14, 2019
323e4f6
dev: add option to prevent HTLC timeouts.
rustyrussell Nov 14, 2019
39fa486
remove unnecessary software package from arm Dockerfile
arowser Oct 21, 2019
0d55dca
Revert "docker: Use system libraries, don't bring your own"
NicolasDorier Sep 26, 2019
ed23875
wallet: fix accessing blockheight of unconfirmed transaction
m-schmoock Nov 14, 2019
fe4a25a
wallet: fix skipping tx dups memory corruption
m-schmoock Nov 14, 2019
d7609e6
pytest: add test for raising listtransactions after funding
m-schmoock Nov 12, 2019
fdd69af
gossipd: don't discard node_announcements with old timestamps.
rustyrussell Nov 15, 2019
f075b87
bitcoind: remove the chainparams member
darosior Oct 15, 2019
7f0a366
lightningd: fix uninitialized variable
rustyrussell Nov 15, 2019
b0a72a6
doc/lightningd-config.5.txt: remove
rustyrussell Nov 17, 2019
4fa7b30
lightningd: have optional node_id associated with subdaemons.
rustyrussell Nov 17, 2019
e433d4d
lightningd: have logging include an optional node_id for each entry.
rustyrussell Nov 17, 2019
00cb5ad
common: allow subdaemons to specify the node_id in status messages.
rustyrussell Nov 17, 2019
eed654f
connectd, gossipd: use per-peer logging.
rustyrussell Nov 18, 2019
3270e5c
lightningd: move log structs into log.c.
rustyrussell Nov 18, 2019
86fb54a
lightningd: remove per-peer log book.
rustyrussell Nov 18, 2019
ef7a820
log: make formatting more consistent.
rustyrussell Nov 18, 2019
0607f99
options: allow --log-level <level>:<prefix> for finegrained log control.
rustyrussell Nov 18, 2019
4fc498f
lightningd: enable io logging on subdaemons iff we're going to print it.
rustyrussell Nov 18, 2019
0c6d899
lightningd: avoid keeping multiple copies of nodeid.
rustyrussell Nov 18, 2019
a83fd16
lightningd: perform better log pruning.
rustyrussell Nov 18, 2019
39d537b
lightningd: remove log_add functions.
rustyrussell Nov 18, 2019
b210c9d
lightningd: use a simple array for less memory usage.
rustyrussell Nov 18, 2019
f91ff99
pytest: deflake test_htlc_send_timeout
rustyrussell Nov 18, 2019
24f708e
lightningd: kill per-peer daemons if they claim a different peer id.
rustyrussell Nov 18, 2019
0aad532
logging: add examples for logging.
rustyrussell Nov 18, 2019
709c98f
logging: remove spaces from subsystem names.
rustyrussell Nov 18, 2019
3437f7e
devtools/gossipwith: change timeout to seconds.
rustyrussell Nov 15, 2019
2e9b8f4
devtools/gossipwith: option to print out messages in hex.
rustyrussell Nov 15, 2019
14a5584
devtools/gossipwith: allow setting features on cmdline.
rustyrussell Nov 15, 2019
6e433e0
gossipd: work around LND reply_channel_range.
rustyrussell Nov 15, 2019
68b9ded
fix: listtx set txindex only if blockheight is known
m-schmoock Nov 18, 2019
dda792c
plugin: Pass the full raw_payload including realm to htlc_accepted
cdecker Nov 14, 2019
69040e5
.gitignore: add tools/hsmtool
jsarenik Nov 19, 2019
ea9faf6
onion fixup: use enum for type, not length of packet
niftynei Nov 19, 2019
170918f
Add cross-compilation options only when requested (#3275)
jsarenik Nov 20, 2019
5a95e9f
gossipd: remove chainparams local var.
rustyrussell Nov 20, 2019
ce10491
channeld: remove chainparams local parameter.
rustyrussell Nov 20, 2019
edbcb6f
lightningd: remove chainparams local parameter from wallet.
rustyrussell Nov 20, 2019
861b12b
dump_tx: fixup compiliation errs
niftynei Nov 18, 2019
3705b5f
devtools: add privkey+hash printing to mkcommit/mkgossip
niftynei Nov 19, 2019
c5e7943
devtools: add note when using option-static-remotekey
niftynei Nov 18, 2019
a3ef71b
devtools: fixup chainparams crash (global now)
niftynei Nov 18, 2019
d119758
gossipd: don't crash if we have > 7000 stale short_channel_ids.
rustyrussell Nov 19, 2019
d4b48a6
pytest: test that we refuse to follow bitcoind backwards.
rustyrussell Nov 20, 2019
654faa6
lightningd: don't start if bitcoind is behind.
rustyrussell Nov 21, 2019
de16d0f
openchannel hook: add new `close_to` field
niftynei Nov 21, 2019
1e89937
pytest: Skip mem-leak test when not running in developer mode
cdecker Nov 17, 2019
3482d25
pytest: Fix a test assuming a specific DB order
cdecker Nov 19, 2019
5a233a1
pytest: Fix TLV hook tests in experimental mode
cdecker Nov 21, 2019
162cea2
github: Mark derived doc files as generated
cdecker Nov 21, 2019
2255024
tlv: Add raw fields so we can store unknown fields as well
cdecker Nov 18, 2019
5794c83
tlv: Add typesafe fromwire codegen for TLV namespaces
cdecker Nov 18, 2019
2519f93
tlv: Add validity check codegen for the tlv namespaces
cdecker Nov 18, 2019
d69a437
sphinx: Use the new `fromwire_tlv_payload` function
cdecker Nov 18, 2019
baffa84
sphinx: Decode payload and place shortcuts in the route-step
cdecker Nov 19, 2019
fc14e5e
htlcs: Make necessary payload fields optional and derfer validation
cdecker Nov 19, 2019
d7b28ac
htlc: Consolidate validation after the htlc_accepted hook returns
cdecker Nov 19, 2019
e46f423
sphinx: Cleanup route_step_decode_* functions
cdecker Nov 19, 2019
d1df4d6
htlc: Add a checker function tellung us whether we can continue
cdecker Nov 21, 2019
6defc69
channeld: allow transient negative balance.
rustyrussell Nov 22, 2019
34c89cb
config: Add include directive support.
rustyrussell Nov 23, 2019
5673607
lightningd: don't use chainparams before param() call in json_fund_ch…
rustyrussell Nov 23, 2019
8b1aa3e
lightningd: move basic parameter parsing into common/configdir
rustyrussell Nov 23, 2019
dc23c30
config: Read both top-level and network-subdir config files.
rustyrussell Nov 23, 2019
aab83e7
lightningd: change config-dir from plugin / wallet / hsm POV into <ne…
rustyrussell Nov 23, 2019
d512bcb
lightningd: automatically move files for existing deployments.
rustyrussell Nov 23, 2019
a56f2b2
common: parse --allow-deprecated-apis extremely early.
rustyrussell Nov 23, 2019
36c517b
common: change default network from testnet to mainnet for new installs.
rustyrussell Nov 23, 2019
e3dbd78
config: explicitly disallow nonsensical options.
rustyrussell Nov 23, 2019
747bb99
lightningd: keep pid files in top-level config dir.
rustyrussell Nov 23, 2019
57a32ee
pytest: test for config parsing errors.
rustyrussell Nov 23, 2019
a06fa7f
log: print UNUSUAL messages before log initialization too.
rustyrussell Nov 23, 2019
badeaf1
pytest: upgrade tests.
rustyrussell Nov 23, 2019
f5831e5
config: limit depth on includes.
rustyrussell Nov 23, 2019
14997f6
lightningd: fix handling of truncated config options.
rustyrussell Nov 23, 2019
fb040bc
Spec: trivial update to latest.
rustyrussell Nov 22, 2019
50d6941
lightningd: remove redundant htlc_accepted_hook_payload fields
rustyrussell Nov 23, 2019
ebac3d2
spec: update to experimental BOLTs with secret/total_amount.
rustyrussell Nov 23, 2019
09cdbb7
common: make BOLT11 use the normal feature array.
rustyrussell Nov 23, 2019
81c89aa
wallet: add invoice features into db.
rustyrussell Nov 23, 2019
854c64f
common/bolt11: add secret support.
rustyrussell Nov 23, 2019
dfb1f6a
JSON: add `payment_secret` parameter to sendpay.
rustyrussell Nov 23, 2019
18e9144
plugins/pay: hand payment_secret from bolt11 through to sendpay.
rustyrussell Nov 23, 2019
c2e8531
lightningd: add secrets (and associated feature) to invoices.
rustyrussell Nov 23, 2019
e5247a6
lightningd: check payment secret on htlc receipt.
rustyrussell Nov 23, 2019
9765642
lightningd: use final_tlv if the payment_secret is supplied.
rustyrussell Nov 23, 2019
3b37c9d
common/features: clean up feature handling for different cases.
rustyrussell Nov 23, 2019
8393d21
common/features: add `payment_secret` feature if EXPERIMENTAL.
rustyrussell Nov 23, 2019
6ed3201
feat: restructure plugin and options in listconfigs
m-schmoock Nov 21, 2019
17bb862
don't enforce description_hash checking
fiatjaf Nov 24, 2019
e8ce9d0
unit test: fix run-sphinx dependencies and update mocks
gorazdko Nov 23, 2019
d5a6072
unit test: fix test vectors in run-sphinx
gorazdko Nov 23, 2019
a3961c4
unit test: run sphinx unit test by default
gorazdko Nov 23, 2019
5fb8e0a
tools/gen/impl_template: correct tlvs fromwire's for-loop
darosior Nov 26, 2019
670f920
tools/gen/impl_template: correct one-line for-loops indentation
darosior Nov 26, 2019
493c2ab
openingd: clean up and fix minor leak.
rustyrussell Nov 27, 2019
b9a03a0
wallet/Makefile: fix dependency line.
rustyrussell Nov 27, 2019
3c5ed15
pyln: Add psycopg2-binary as a dependency
cdecker Nov 22, 2019
9e59740
pyln-testing: Do not require a conftest.py to annotate tests
cdecker Nov 22, 2019
c84473f
hsm: Stabilize the hsm encryption and decryption tests
cdecker Nov 25, 2019
e6b8a02
connectd: setup chainparams
darosior Nov 28, 2019
4b13b88
bitcoin/chainparams: add an utility to retrieve chainparams for all n…
darosior Nov 28, 2019
3322048
connectd: add network to init message
darosior Nov 28, 2019
cd11c20
devtools/gossipwith: add a "network" option
darosior Nov 28, 2019
e5e4958
tool/hsmtool: add a 'guesstoremote' command
darosior Nov 25, 2019
36e8d83
tools/hsmtool: correct bad access to argv[]
darosior Nov 25, 2019
895e061
doc: adds pyln deps to command for running blackbox tests
m-schmoock Nov 28, 2019
dc1f27c
pytest: Add failing test for unicode in JSON-RPC through pylightning
cdecker Nov 2, 2019
d712f73
pylightning - allow unicode symbols in the description to be passed a…
jarret Sep 2, 2019
de6bf3e
json: Add two param parsers for secrets and hex-encoded binary data
cdecker Nov 7, 2019
714b572
sphinx: Promote TLV payloads to be non-experimental
cdecker Nov 7, 2019
6ecdc3f
json-rpc: Add `createonion` command similar to the `devtools/onion` tool
cdecker Nov 7, 2019
8daf9b2
pytest: Add a test for `createonion`
cdecker Nov 7, 2019
e13ee29
pay: Split the onion construction from sendpay
cdecker Nov 7, 2019
41221b6
pay: Make wallet_payment->destination optional
cdecker Nov 7, 2019
57f13af
pay: Add param_route_hop helper to parse `struct route_hop` from JSON
cdecker Nov 8, 2019
42277a7
json-rpc: Add the `sendonion` RPC command
cdecker Nov 7, 2019
cb912c9
pytest: Add a test for the `sendonion` method
cdecker Nov 8, 2019
b8ce175
pay: Handle payment failures resulting from sendonion correctly
cdecker Nov 8, 2019
43fb2a6
json: Add helper to extract a secret from JSON
cdecker Nov 8, 2019
88961aa
pay: Make `erring_node` optional in `struct routing_failure`
cdecker Nov 11, 2019
7e41d6c
pay: Make `erring_channel` optional in `struct routing_failure`
cdecker Nov 11, 2019
27547ce
pay: Allow `sendonion` callers to provide `shared_secrets`
cdecker Nov 11, 2019
1cf3c12
cleanup: The failchannel is not tal-allocated when first assigned
cdecker Nov 11, 2019
16b6c31
json-rpc: Add the error onion if we stored it in the DB
cdecker Nov 11, 2019
705e189
pay: Allow payments initiated with `sendonion` to be retried
cdecker Nov 12, 2019
2080416
doc: Add manpages for `createonion` and `sendonion`
cdecker Nov 14, 2019
f569b52
sphinx: Make the sphinx_hop struct public
cdecker Nov 24, 2019
55d8dcc
param: Encapsulate hops parsing in a param_hops_array helper
cdecker Nov 24, 2019
21b5b59
json-rpc: Rename onion payload type to style
cdecker Nov 25, 2019
82255e2
json-rpc: Add helper for an array of secrets
cdecker Nov 25, 2019
0b61781
json-rpc: Only show the amount_msat field if we know it in payments
cdecker Nov 25, 2019
7f36a4e
lightningd: fix reference to out-of-scope var.
rustyrussell Dec 2, 2019
4661dfa
tests: update requirements
darosior Dec 1, 2019
d9aeeb4
pytest: skip test_sendonion if not DEVELOPER
darosior Dec 2, 2019
69c17d2
wire: Let the TLV _is_valid function actually return validity
cdecker Nov 25, 2019
838001a
tlv: Migrate run-tlvstream to typesafe helpers
cdecker Nov 25, 2019
5a78671
wire: Remove unused fromwire_tlvs
cdecker Nov 25, 2019
e12b5c3
tlv: Add a typesafe serialization function for tlv namespaces
cdecker Nov 27, 2019
626675c
tlv: Migrate tlv serialization to typesafe function
cdecker Nov 27, 2019
db92c2a
tlv: Remove unused TLV deserialization function
cdecker Nov 27, 2019
7707896
jsonrpc: Add json_add_preimage helper
Nov 26, 2019
c0368a7
also return preimage on listinvoices.
Nov 26, 2019
99ff86f
update docs with `payment_preimage`.
Nov 26, 2019
f6006f4
Init commit to be able to create a tor static service on the fly.
Saibato Nov 15, 2019
b18510a
Reflect the changes in documentation
Saibato Nov 15, 2019
2c16b41
Add basic tests
Saibato Nov 15, 2019
4683d09
doc: feerate is not obvious, refer to fundchannel documentation:
rustyrussell Dec 4, 2019
ff412a6
plugins/fundchannel: try to connect to peer before funding
darosior Dec 1, 2019
f6ff5e5
connectd: make failure message more descriptive
niftynei Dec 4, 2019
a30ee2b
fundchannel: attempt to connect before funding channel
niftynei Dec 4, 2019
d8fc533
pytest: test rpc_command hook when it handles command to stop itself.
rustyrussell Dec 6, 2019
f6ed7f2
plugin: handle corner case where rpc_command is to stop the plugin.
rustyrussell Dec 6, 2019
e572b48
pytest: demonstrate failing rpc_command hook rewrite to plugin.
rustyrussell Dec 6, 2019
30c8db1
lightningd: make sure rpc_command replacement is well-formed.
rustyrussell Dec 7, 2019
44c23ed
chore: adds announce_channel parameter to pyln fund_channel
m-schmoock Dec 6, 2019
bd369ed
chore: reduce rpc load in is_channel_active helper
m-schmoock Dec 6, 2019
f8d8348
doc: add 'id' to rpc_command
rustyrussell Dec 8, 2019
bb538a1
common: don't crash on bad sphinx payload.
rustyrussell Dec 4, 2019
f7ebbb2
common: make sphinx code ignorant of payload format.
rustyrussell Dec 5, 2019
3371f0c
plugins/libplugin: notifications support
darosior Dec 4, 2019
fcbd11f
plugins/libplugin: hook support
darosior Dec 5, 2019
cd30f76
build: fix ./configure options' descriptions
vasild Dec 10, 2019
518c43a
pytest: Remember a node's return code so we can check it later
cdecker Nov 29, 2019
15f04d5
pytest: Give details about which node exited with a return code != 0
cdecker Nov 29, 2019
e1b1f47
pytest: Avoid starting the btcproxy twice
cdecker Nov 29, 2019
ff5f7b1
sphinx: Return the error in parse_onionpacket
cdecker Nov 29, 2019
fc93787
pytest: Parametrize test_gossip_query_channel_range for elements
cdecker Dec 1, 2019
d6a5b87
pytest: Parametrize test_query_short_channel_id for elements
cdecker Dec 1, 2019
843846f
pytest: Parametrize test_config_in_subdir for elements
cdecker Dec 1, 2019
301b634
pytest: Skip some tests in elements if paratrization is convoluted
cdecker Dec 1, 2019
43dfb4d
pytest: Stabilize and parameterize closing_specified_destination
cdecker Dec 2, 2019
6cc60f5
pytest: Parametrize test_deprecated_closing_compat for elements
cdecker Dec 2, 2019
3def539
pytest: Stabilize the hsm_encryption test
cdecker Dec 9, 2019
2986854
doc/lightningd-config: correct misaligned RGB option paragraph
darosior Dec 11, 2019
b4c18a1
doc/lightningd-config: precise alias are 32 __bytes__ long.
darosior Dec 11, 2019
38d88f1
doc: fix commit-time formatting
vasild Dec 11, 2019
d565133
lightningd: don't always defer commitment_signed if we're not synced.
rustyrussell Dec 10, 2019
dd34ccc
hsmtool: fixup miscount on params
niftynei Dec 11, 2019
d449423
pyln: Bump the version of pyln-client
cdecker Dec 11, 2019
5ca9380
tools: Fix changelog script to be case insensitive and support auth
cdecker Dec 11, 2019
9660549
changelog: Update changelog for the 0.7.4 release
cdecker Dec 11, 2019
727d6a0
doc: correct wording in changelog
m-schmoock Dec 12, 2019
2d18c3a
db: add partid, total_msat fields to payment entries.
rustyrussell Dec 11, 2019
345ca9b
db: add partid field to htlc_out.
rustyrussell Dec 11, 2019
1298533
htlcs: remove origin_htlc_id from htlc_out.
rustyrussell Dec 11, 2019
618c390
lightningd: share more code between sendpay and sendonion.
rustyrussell Dec 11, 2019
ce4403d
lightningd: change amount-in-flight check to be more nuanced.
rustyrussell Dec 11, 2019
cd35835
sendpay/sendonion: add optional partid arg, finesse msatoshi argument.
rustyrussell Dec 11, 2019
63fffd4
configure: make partid payments only available with EXPERIMENTAL_FEAT…
rustyrussell Dec 11, 2019
b670b51
waitsendpay: add partid arg.
rustyrussell Dec 11, 2019
280523e
pytest: Add tests to make sure received onion is as expected.
rustyrussell Dec 11, 2019
0e4a30c
doc: update experimental bolt version quotes.
rustyrussell Dec 11, 2019
8b129b4
lightningd: cleanup redundant args from handle_localpay
rustyrussell Dec 11, 2019
7f629e5
lightningd: split invoice check into separate function.
rustyrussell Dec 11, 2019
36b1e88
lightningd: implement htlc sets.
rustyrussell Dec 11, 2019
c2b357b
lightningd: wrap htlc replay in a database transaction.
rustyrussell Dec 11, 2019
8e3234e
lightningd: sew in htlc set.
rustyrussell Dec 11, 2019
f1bc0b2
plugins: listpays ignores pre-0.7.0 or manual sendpay payments w/ no …
rustyrussell Dec 11, 2019
207689c
plugins: listpays will now consolidate multi-part payments.
rustyrussell Dec 11, 2019
5d413e0
common: offer option_basic_mpp for EXPERIMENTAL_FEATURES.
rustyrussell Dec 11, 2019
326ceab
pytest: add more multi-part-payment tests.
rustyrussell Dec 11, 2019
7fb4efd
lightningd: require payment_secret for MPP.
rustyrussell Dec 11, 2019
edab0df
lightningd: fix spurious "more than twice final" error.
rustyrussell Dec 12, 2019
ec15051
lightningd: fix failure message in waitsendpay with multi-part payments.
rustyrussell Dec 12, 2019
b9d6e8b
common: add fee_states state machine for update_fee.
rustyrussell Dec 12, 2019
8ffd9d5
channeld: cleanup: use the channel_feerate() accessor everywhere.
rustyrussell Dec 12, 2019
acb89de
channeld: generate revoke_and_ack before telling lightningd about com…
rustyrussell Dec 12, 2019
24d54f9
channeld: use fee_states internally.
rustyrussell Dec 12, 2019
d2673a4
channeld: remove changes_pending flags.
rustyrussell Dec 12, 2019
4270031
wallet: add per-channel feerate_state to the database.
rustyrussell Dec 12, 2019
72aa315
lightningd: save the fee_states into the database.
rustyrussell Dec 12, 2019
e521aae
devtools: fix example at top of mkcommit.
rustyrussell Dec 12, 2019
fb7c678
htlcs: Make sure htlc_sets is not erroneously flagged as a memleak
cdecker Dec 12, 2019
2e97afd
lightningd: remove htlc_set destruction timer once we head to invoice.
rustyrussell Dec 12, 2019
839909d
Protocol: make var_onion, payment_secret and basic_mpp non-EXPERIMENTAL.
rustyrussell Dec 12, 2019
1d0c433
channeld: treat all incoming errors as "soft", so we retry.
rustyrussell Dec 13, 2019
eb6a768
tools: don't use bytelength as array length for arrays in TLVs.
rustyrussell Dec 13, 2019
b315a29
wire: perform corruption test on init_msg.
rustyrussell Dec 13, 2019
eb2b225
changelog: Update the changelog for 0.8.0rc2
cdecker Dec 13, 2019
250fc79
doc: remove trailing whitespace from doc/TOR.md
vasild Dec 13, 2019
1fe8cd8
doc: fix typos in doc/TOR.md
vasild Dec 13, 2019
bf1f768
doc: fix the path to the sqlite database file
vasild Dec 16, 2019
c15169b
release: Updating changelog to v0.8.0 final
cdecker Dec 16, 2019
7b15419
Merge remote-tracking branch 'upstream/master' into 0.8.0
gruve-p Dec 17, 2019
830dbb1
minor fixes after merge
gruve-p Dec 17, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
Makefile text eol=lf
configure text eol=lf
.gitmodules text eol=lf
# The following files are generated and should not be shown in the
# diffs by default on Github.
doc/lightning*.7 linguist-generated=true

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ccan/ccan/cdump/tools/cdump-enumstr
gen_*
cli/lightning-cli
tools/check-bolt
tools/hsmtool
coverage
ccan/config.h
__pycache__
Expand Down
2 changes: 1 addition & 1 deletion .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export SOURCE_CHECK_ONLY=${SOURCE_CHECK_ONLY:-"false"}
export COMPAT=${COMPAT:-1}
export PATH=$CWD/dependencies/bin:"$HOME"/.local/bin:"$PATH"
export PYTEST_PAR=2
export PYTHONPATH=$PWD/contrib/pylightning:$PYTHONPATH

# If we're not in developer mode, tests spend a lot of time waiting for gossip!
# But if we're under valgrind, we can run out of memory!
if [ "$DEVELOPER" = 0 ] && [ "$VALGRIND" = 0 ]; then
Expand Down
90 changes: 81 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,80 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.0] - 2019-12-16: "Blockchain Good, Orange Coin Bad"

This release was named by Michael Schmoock @m-schmoock.

### Added

- JSON API: Added `createonion` and `sendonion` JSON-RPC methods allowing the implementation of custom protocol extensions that are not directly implemented in c-lightning itself. ([3260](https://github.com/ElementsProject/lightning/pull/3260))
- JSON API: `listinvoices` now displays the payment preimage if the invoice was paid. ([3295](https://github.com/ElementsProject/lightning/pull/3295))
- JSON API: `listpeers` channels now include `close_to` and `close_to_addr` iff a `close_to` address was specified at channel open ([3223](https://github.com/ElementsProject/lightning/pull/3223))
- The new `pyln-testing` package now contains the testing infrastructure so it can be reused to test against c-lightning in external projects ([3218](https://github.com/ElementsProject/lightning/pull/3218))
- config: configuration files now support `include`. ([3268](https://github.com/ElementsProject/lightning/pull/3268))
- options: Allow the Tor inbound service port differ from 9735 ([3155](https://github.com/ElementsProject/lightning/pull/3155))
- options: Persistent Tor address support ([3155](https://github.com/ElementsProject/lightning/pull/3155))
- plugins: A new plugin hook, `rpc_command` allows a plugin to take over `lightningd` for any RPC command. ([2925](https://github.com/ElementsProject/lightning/pull/2925))
- plugins: Allow the `accepter` to specify an upfront_shutdown_script for a channel via a `close_to` field in the openchannel hook result ([3280](https://github.com/ElementsProject/lightning/pull/3280))
- plugins: Plugins may now handle modern TLV-style payloads via the `htlc_accepted` hook ([3260](https://github.com/ElementsProject/lightning/pull/3260))
- plugins: libplugin now supports writing plugins which register to hooks ([3317](https://github.com/ElementsProject/lightning/pull/3317))
- plugins: libplugin now supports writing plugins which register to notifications ([3317](https://github.com/ElementsProject/lightning/pull/3317))
- protocol: Payment amount fuzzing is restored, but through shadow routing. ([3212](https://github.com/ElementsProject/lightning/pull/3212))
- protocol: We now signal the network we are running on at init. ([3300](https://github.com/ElementsProject/lightning/pull/3300))
- protocol: can now send and receive TLV-style onion messages. ([3335](https://github.com/ElementsProject/lightning/pull/3335))
- protocol: can now send and receive BOLT11 payment_secrets. ([3335](https://github.com/ElementsProject/lightning/pull/3335))
- protocol: can now receive basic multi-part payments. ([3335](https://github.com/ElementsProject/lightning/pull/3335))
- JSON RPC: low-level commands sendpay and waitsendpay can now be used to manually send multi-part payments. ([3335](https://github.com/ElementsProject/lightning/pull/3335))
- quirks: Workaround LND's `reply_channel_range` issues instead of sending error. ([3264](https://github.com/ElementsProject/lightning/pull/3264))
- tools: A new command, `guesstoremote`, is added to the hsmtool. It is meant to be used to recover funds after an unilateral close of a channel with `option_static_remotekey` enabled. ([3292](https://github.com/ElementsProject/lightning/pull/3292))

### Changed

:warning: The default network and the default location of the lightning home directory changed. Please make sure that the configuration, key file and database are moved into the network-specific subdirectory.

- config: Default network (new installs) is now bitcoin, not testnet. ([3268](https://github.com/ElementsProject/lightning/pull/3268))
- config: Lightning directory, plugins and files moved into `<network>/` subdir ([3268](https://github.com/ElementsProject/lightning/pull/3268))
- JSON API: The `fundchannel` command now tries to connect to the peer before funding the channel, no need to `connect` before `fundchannel` if an address for the peer is known ([3314](https://github.com/ElementsProject/lightning/pull/3314))
- JSON API: `htlc_accepted` hook has `type` (currently `legacy` or `tlv`) and other fields directly inside `onion`. ([3167](https://github.com/ElementsProject/lightning/pull/3167))
- JSON API: `lightning_` prefixes removed from subdaemon names, including in listpeers `owner` field. ([3241](https://github.com/ElementsProject/lightning/pull/3241))
- JSON API: `listconfigs` now structures plugins and include their options ([3283](https://github.com/ElementsProject/lightning/pull/3283))
- JSON API: the `raw_payload` now includes the first byte, i.e., the realm byte, of the payload as well. This allows correct decoding of a TLV payload in the plugins. ([3261](https://github.com/ElementsProject/lightning/pull/3261))
- logging: formatting made uniform: [NODEID-]SUBSYSTEM: MESSAGE ([3241](https://github.com/ElementsProject/lightning/pull/3241))
- options: `config` and `<network>/config` read by default. ([3268](https://github.com/ElementsProject/lightning/pull/3268))
- options: log-level can now specify different levels for different subsystems. ([3241](https://github.com/ElementsProject/lightning/pull/3241))
- protocol: The TLV payloads for the onion packets are no longer considered an experimental feature and generally available. ([3260](https://github.com/ElementsProject/lightning/pull/3260))
- quirks: We'll now reconnect and retry if we get an error on an established channel. This works around lnd sending error messages that may be non-fatal. ([3340](https://github.com/ElementsProject/lightning/pull/3340))

:warning: If you don't have a config file, you now may need to specify the network to `lightning-cli` ([3268](https://github.com/ElementsProject/lightning/pull/3268))

### Deprecated

Note: You should always set `allow-deprecated-apis=false` to test for changes.

- JSON API: `listconfigs` duplicated "plugin" paths ([3283](https://github.com/ElementsProject/lightning/pull/3283))
- JSON API: `htlc_accepted` hook `per_hop_v0` object deprecated, as is `short_channel_id` for the final hop. ([3167](https://github.com/ElementsProject/lightning/pull/3167))

### Removed

- JSON: `listpays` won't shown payments made via sendpay without a bolt11 string, or before 0.7.0. ([3309](https://github.com/ElementsProject/lightning/pull/3309))

### Fixed

- JSON API: #3231 `listtransactions` crash ([3256](https://github.com/ElementsProject/lightning/pull/3256))
- JSON API: `listconfigs` appends '...' to truncated config options. ([3268](https://github.com/ElementsProject/lightning/pull/3268))
- `pyln-client` now handles unicode characters in JSON-RPC requests and responses correctly. ([3018](https://github.com/ElementsProject/lightning/pull/3018))
- bitcoin: If bitcoind goes backwards (e.g. reindex) refuse to start (unless forced with --rescan). ([3274](https://github.com/ElementsProject/lightning/pull/3274))
- bug: `gossipd` crash on huge number of unknown channels. ([3273](https://github.com/ElementsProject/lightning/pull/3273))
- gossip: No longer discard most `node_announcements` (fixes #3194) ([3262](https://github.com/ElementsProject/lightning/pull/3262))
- options: We disable all dns even on startup the scan for bogus dns servers, if `--always-use-proxy` is set true ([3251](https://github.com/ElementsProject/lightning/pull/3251))
- protocol: "Bad commitment signature" closing channels when we sent back-to-back update_fee messages across multiple reconnects. ([3329](https://github.com/ElementsProject/lightning/pull/3329))
- protocol: Unlikely corner case is simultanous HTLCs near balance limits fixed. ([3286](https://github.com/ElementsProject/lightning/pull/3286))

### Security

## [0.7.3] - 2019-10-18: "Bitcoin's Proof of Stake"

This release named by @trueptolemy.
This release was named by @trueptolemy.

### Added

Expand Down Expand Up @@ -69,7 +140,7 @@ Note: You should always set `allow-deprecated-apis=false` to test for changes.

## [0.7.2.1] - 2019-08-19: "Nakamoto's Pre-approval by US Congress"

This release named by Antoine Poinsot @darosior.
This release was named by Antoine Poinsot @darosior.

(Technically a .1 release, as it contains last-minute fixes after 0.7.2 was tagged)

Expand Down Expand Up @@ -121,7 +192,7 @@ changes.

## [0.7.1] - 2019-06-29: "The Unfailing Twitter Consensus Algorithm"

This release named by (C-Lightning Core Team member) Lisa Neigut @niftynei.
This release was named by (C-Lightning Core Team member) Lisa Neigut @niftynei.

### Added

Expand Down Expand Up @@ -186,7 +257,7 @@ changes.

## [0.7.0] - 2019-02-28: "Actually an Altcoin"

This release named by Mark Beckwith @wythe.
This release was named by Mark Beckwith @wythe.

### Added

Expand Down Expand Up @@ -267,7 +338,7 @@ provide appropriate suffixes for JSON input fields.

## [0.6.3] - 2019-01-09: "The Smallblock Conspiracy"

This release named by @molxyz and [@ctrlbreak](https://twitter.com/ctrlbreak).
This release was named by @molxyz and [@ctrlbreak](https://twitter.com/ctrlbreak).

### Added

Expand Down Expand Up @@ -315,7 +386,7 @@ changes.

## [0.6.2] - 2018-10-20: "The Consensus Loving Nasal Daemon"

This release named by practicalswift.
This release was named by practicalswift.

### Added

Expand Down Expand Up @@ -372,7 +443,7 @@ changes.

## [0.6.1] - 2018-09-11: "Principled Opposition To Segwit"

This release named by ZmnSCPxj.
This release was named by ZmnSCPxj.

### Added

Expand Down Expand Up @@ -458,7 +529,7 @@ This release named by ZmnSCPxj.
In the prehistory of c-lightning, no changelog was kept. But major
JSON API changes are tracked.

This release named by Fabrice Drouin.
This release was named by Fabrice Drouin.

### Deprecated

Expand Down Expand Up @@ -496,7 +567,8 @@ There predate the BOLT specifications, and are only of vague historic interest:
6. [0.5.1] - 2016-10-21
7. [0.5.2] - 2016-11-21: "Bitcoin Savings & Trust Daily Interest II"

[Unreleased]: https://github.com/ElementsProject/lightning/compare/v0.7.3...HEAD
[Unreleased]: https://github.com/ElementsProject/lightning/compare/v0.8.0...HEAD
[0.8.0-rc1]: https://github.com/ElementsProject/lightning/releases/tag/v0.8.0-rc1
[0.7.3]: https://github.com/ElementsProject/lightning/releases/tag/v0.7.3
[0.7.2.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.7.2.1
[0.7.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.7.1
Expand Down
50 changes: 24 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,29 @@ RUN mkdir /opt/groestlcoin && cd /opt/groestlcoin \
FROM debian:stretch-slim as builder

ENV LIGHTNINGD_VERSION=master
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
autoconf \
automake \
build-essential \
git \
libtool \
python \
python3 \
python3-mako \
wget \
gnupg \
dirmngr \
git \
gettext \
unzip \
tclsh \
libsqlite3-dev \
libgmp-dev \
zlib1g-dev
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates autoconf automake build-essential git libtool python python3 python3-mako wget gnupg dirmngr git gettext

RUN wget -q https://zlib.net/zlib-1.2.11.tar.gz \
&& tar xvf zlib-1.2.11.tar.gz \
&& cd zlib-1.2.11 \
&& ./configure \
&& make \
&& make install && cd .. && rm zlib-1.2.11.tar.gz && rm -rf zlib-1.2.11

RUN apt-get install -y --no-install-recommends unzip tclsh \
&& wget -q https://www.sqlite.org/2018/sqlite-src-3260000.zip \
&& unzip sqlite-src-3260000.zip \
&& cd sqlite-src-3260000 \
&& ./configure --enable-static --disable-readline --disable-threadsafe --disable-load-extension \
&& make \
&& make install && cd .. && rm sqlite-src-3260000.zip && rm -rf sqlite-src-3260000

RUN wget -q https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz \
&& tar xvf gmp-6.1.2.tar.xz \
&& cd gmp-6.1.2 \
&& ./configure --disable-assembly \
&& make \
&& make install && cd .. && rm gmp-6.1.2.tar.xz && rm -rf gmp-6.1.2

WORKDIR /opt/lightningd
COPY . /tmp/lightning
Expand All @@ -74,12 +77,7 @@ RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVE

FROM debian:stretch-slim as final
COPY --from=downloader /opt/tini /usr/bin/tini
RUN apt-get update && apt-get install -y --no-install-recommends \
socat \
inotify-tools \
libgmp10 \
libsqlite3-0 \
zlib1g \
RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools \
&& rm -rf /var/lib/apt/lists/*

ENV LIGHTNINGD_DATA=/root/.lightning
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CCANDIR := ccan

# Where we keep the BOLT RFCs
BOLTDIR := ../lightning-rfc/
BOLTVERSION := 2afe3559e89520ba28b24ff5739491313217ae13
BOLTVERSION := 35f6376f2050191081b148fb540f604092be59e1

-include config.vars

Expand Down Expand Up @@ -47,7 +47,7 @@ endif

ifeq ($(COMPAT),1)
# We support compatibility with pre-0.6.
COMPAT_CFLAGS=-DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1
COMPAT_CFLAGS=-DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DCOMPAT_V073=1
endif

# Timeout shortly before the 600 second travis silence timeout
Expand Down Expand Up @@ -263,7 +263,7 @@ ifeq ($(PYTEST),)
exit 1
else
# Explicitly hand DEVELOPER and VALGRIND so you can override on make cmd line.
PYTHONPATH=`pwd`/contrib/pylightning:$$PYTHONPATH TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS)
PYTHONPATH=`pwd`/contrib/pyln-client:`pwd`/contrib/pyln-testing:`pwd`/contrib/pylightning:$$PYTHONPATH TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS)
endif

# Keep includes in alpha order.
Expand Down Expand Up @@ -316,7 +316,7 @@ check-python:
@# W503: line break before binary operator
@flake8 --ignore=E501,E731,W503 --exclude=contrib/pylightning/lightning/__init__.py ${PYSRC}

PYTHONPATH=contrib/pylightning:$$PYTHONPATH $(PYTEST) contrib/pylightning/
PYTHONPATH=contrib/pyln-client:$$PYTHONPATH $(PYTEST) contrib/pyln-client/

check-includes:
@tools/check-includes.sh
Expand Down
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ c-lightning is a lighweight, highly customizable and [standard compliant][std] i
* [Configuration File](#configuration-file)
* [Further Information](#further-information)
* [Pruning](#pruning)
* [HD wallet encryption](#hd-wallet-encryption)
* [Developers](#developers)

## Project Status
Expand Down Expand Up @@ -92,8 +93,6 @@ Once you've started for the first time, there's a script called
`contrib/bootstrap-node.sh` which will connect you to other nodes on
the lightning network.

You can encrypt the BIP32 root seed (what is stored in `hsm_secret`) by passing the `--encrypted-hsm` startup argument. You can start `lightningd` with `--encrypted-hsm` on an already existing `lightning-dir` (with a not encrypted `hsm_secret`). If you pass that option, you __will not__ be able to start `lightningd` (with the same wallet) again without the password, so please beware with your password management. Also beware of not feeling too safe with an encrypted `hsm_secret`: unlike for `groestlcoind` where the wallet encryption can restrict the usage of some RPC command, `lightningd` always need to access keys from the wallet which is thus __not locked__ (yet), even with an encrypted BIP32 master seed.

There are also numerous plugins available for c-lightning which add
capabilities: in particular there's a collection at:

Expand All @@ -102,7 +101,14 @@ capabilities: in particular there's a collection at:
Including [helpme][helpme-github] which guides you through setting up
your first channels and customizing your node.

### Opening a channel on the Groestlcoin testnet
For a less reckless experience, you can encrypt the HD wallet seed:
see [HD wallet encryption](#hd-wallet-encryption).

You can also chat to other users at [#c-lightning @ freenode.net][irc2];
we are always happy to help you get started!


### Opening A Channel

First you need to transfer some funds to `lightningd` so that it can
open a channel:
Expand Down Expand Up @@ -165,8 +171,8 @@ interfaces) for more sophisticated use.
`lightningd` can be configured either by passing options via the command line, or via a configuration file.
Command line options will always override the values in the configuration file.

To use a configuration file, create a file named `config` within your lightning directory
(eg. `~/.lightning/config`). See `man -l doc/lightningd-config.5`.
To use a configuration file, create a file named `config` within your top-level lightning directory or network subdirectory
(eg. `~/.lightning/config` or `~/.lightning/bitcoin/config`). See `man -l doc/lightningd-config.5`.

## Further information

Expand All @@ -179,6 +185,12 @@ If `groestlcoind` prunes a block that c-lightning has not processed yet, e.g., c
In order to avoid this situation you should be monitoring the gap between c-lightning's blockheight using `lightning-cli getinfo` and `groestlcoind`'s blockheight using `groestlcoin-cli getblockchaininfo`.
If the two blockheights drift apart it might be necessary to intervene.

### HD wallet encryption

You can encrypt the `hsm_secret` content (which is used to derive the HD wallet's master key) by passing the `--encrypted-hsm` startup argument, or by using the `hsmtool` (which you can find in the `tool/` directory at the root of this repo) with the `encrypt` method. You can unencrypt an encrypted `hsm_secret` using the `hsmtool` with the `decrypt` method.

If you encrypt your `hsm_secret`, you will have to pass the `--encrypted-hsm` startup option to `lightningd`. Once your `hsm_secret` is encrypted, you __will not__ be able to access your funds without your password, so please beware with your password management. Also beware of not feeling too safe with an encrypted `hsm_secret`: unlike for `bitcoind` where the wallet encryption can restrict the usage of some RPC command, `lightningd` always need to access keys from the wallet which is thus __not locked__ (yet), even with an encrypted BIP32 master seed.

### Developers

Developers wishing to contribute should start with the developer guide [here](doc/HACKING.md).
Expand Down
9 changes: 9 additions & 0 deletions bitcoin/chainparams.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "chainparams.h"
#include <ccan/array_size/array_size.h>
#include <ccan/str/str.h>
#include <common/utils.h>
#include <string.h>

/* Version codes for BIP32 extended keys in libwally-core.
Expand Down Expand Up @@ -119,6 +120,14 @@ const struct chainparams *chainparams_for_network(const char *network_name)
return NULL;
}

const struct chainparams **chainparams_for_networks(const tal_t *ctx)
{
const struct chainparams **params = tal_arr(ctx, const struct chainparams*, 0);
for (size_t i = 0; i < ARRAY_SIZE(networks); i++)
tal_arr_expand(&params, &networks[i]);
return params;
}

const struct chainparams *chainparams_by_chainhash(const struct bitcoin_blkid *chain_hash)
{
for (size_t i = 0; i < ARRAY_SIZE(networks); i++) {
Expand Down
6 changes: 6 additions & 0 deletions bitcoin/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ struct chainparams {
*/
const struct chainparams *chainparams_for_network(const char *network_name);

/**
* chainparams_for_networks - Get blockchain parameters for all known networks,
* as a tal array.
*/
const struct chainparams **chainparams_for_networks(const tal_t *ctx);

/**
* chainparams_by_bip173 - Helper to get a network by its bip173 name
*
Expand Down
Loading