Skip to content

0.9.0 #23

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

Merged
merged 528 commits into from
Aug 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
528 commits
Select commit Hold shift + click to select a range
32f9805
build: Make it possible to build without gcc
laanwj Jun 26, 2020
57f6f74
external/Makefile: fix spurious rebuilds.
rustyrussell Jun 29, 2020
b90be4f
prepare-tx: pass back the feerate, as json_tx_prepare sometimes sets it
niftynei Jun 9, 2020
103dce6
reserve/unreserve input: new RPC commands for reserving inputs/outputs
niftynei Jun 9, 2020
a68d79e
add manpages for reserve/unreserve
niftynei Jun 10, 2020
0388fe6
tx: add helper for extracting script from a wally_tx
niftynei Jun 16, 2020
fd8a716
wallet: have wallet_extract_outputs take wally_tx, not bitcoin_tx
niftynei Jun 16, 2020
9830c94
rpc: new signpsbt + sendpsbt rpcs
niftynei Jun 16, 2020
ee549a2
tx: fix case where input amounts are less than total outputs
niftynei Jun 16, 2020
2e9c387
coin_moves: update withdrawal logic to account for 'variable owner' txs
niftynei Jun 16, 2020
74abd30
pyln-proto, pyln-spec: fix 'make prod-release' target.
rustyrussell Jun 26, 2020
dd4a1a3
tests: fix flake in test_txprepare_restart
rustyrussell Jun 30, 2020
6b3bcd4
tests: fix flake in test_penalty_htlc_tx_fulfill
rustyrussell Jun 30, 2020
d14460e
wallet/walletrpc.c: Show input annotations for inputs.
ZmnSCPxj Jun 30, 2020
ae0cccb
wallet: fix memleak if we get shut down before finishing utxo cleanup.
rustyrussell Jun 30, 2020
7b899da
db: Retrieve peer ID if it exists or create the peer if not
cdecker Jun 26, 2020
5d72053
Makefile: Install `tools/hsmtool` as `lightning-hsmtool`.
ZmnSCPxj Jun 29, 2020
e4cd214
Reflect in TOR.md that we need a Tor version >= 0.3.2.2-alpha to reac…
Saibato Apr 12, 2020
2b0aba1
connectd/connectd: Display an error hint for V3 tor onions when conne…
Saibato Apr 14, 2020
eea6b33
connect/tor: Set errno, if connection failed we want to reflect this.
Saibato Apr 14, 2020
8138ef1
plugin: Add a data backend for the new payment state-machine
cdecker Apr 25, 2020
e108ebe
paymod: Add base state-machine for payment flow
cdecker May 8, 2020
5d17252
paymod: Implement base state-machine transitions
cdecker May 8, 2020
23b4dca
paymod: Add a simple test-command to test the paymod state-machine
cdecker May 8, 2020
aeb5cc0
paymod: Generate type-safe accessor functions for modifier data
cdecker May 8, 2020
5c32e33
paymod: Add a retry modifier that retries payments on failure
cdecker May 8, 2020
ce0025c
paymod: Implement bubbling results up the hierarchy of payments
cdecker May 11, 2020
3c3e2c9
paymod: Implement getroute call
cdecker May 12, 2020
5ef7297
paymod: Add a `getinfo` call on payment_start to get the blockheight
cdecker May 13, 2020
9d36e49
doc: Fix a documentation error in sendonion
cdecker May 13, 2020
5f32cfe
paymod: Implement legacy onion payload computation
cdecker May 14, 2020
d37b854
paymod: Call `createonion` to generate the onion and associated data
cdecker May 14, 2020
d8ebe6f
paymod: Parse createonion result and call sendonion
cdecker May 14, 2020
6fb81bf
paymod: Call waitsendpay on the sendonion we just queued
cdecker May 14, 2020
4fec969
paymod: Parse and store the waitsendpay result
cdecker May 14, 2020
04c9c5e
paymod: Collect and return results of a tree of partial payments
cdecker May 18, 2020
8207b4e
paymod: Use reasonable partids
cdecker May 18, 2020
c35df40
paymod: Maintain a list of current and past payments
cdecker May 18, 2020
df94ec3
paymod: Do not reply to the same JSON-RPC command multiple times
cdecker May 18, 2020
958eb41
paymod: Do not pass cmd to sub-payments, plugin suffices
cdecker May 18, 2020
cb9debc
tlv: Add generic getters and setters for tlvstream
cdecker May 19, 2020
c0b30ac
wiregen: Add enums for TLV types so we can call them by their name
cdecker Jun 1, 2020
b15876c
paymod: Implement TLV onion payload generation
cdecker May 20, 2020
6af5ab9
paymod: Move onion payload construction into its own function
cdecker Jun 19, 2020
d0c8503
wallet/walletrpc.c: `txprepare`d transactions now use current tip blo…
ZmnSCPxj Jun 28, 2020
77946bd
fromwire: return NULL if array empty
niftynei Jun 26, 2020
ad6ca61
bugfix: tx_parts omits two byte counts in serialization
niftynei Jun 22, 2020
2019349
tests: use chain's directory for finding sqlite3 file (works for liqu…
niftynei Jun 23, 2020
ba6e4b6
tests: mark as regtest only
niftynei Jun 23, 2020
8185474
liquid-compat: update coinmove check to be liquid compatible
niftynei Jun 23, 2020
2ab41af
rm pullpush: cleans up unused methods for push/pull
niftynei Jun 23, 2020
deabab8
lightningd/opening_control.c: `fundchannel_cancel` no longer requires…
ZmnSCPxj Jun 24, 2020
6fbfe24
paymod: Add a COMPAT_090 flag
cdecker Jun 1, 2020
b1e9f49
paymod: Add the final cltv delta to the getroute call
cdecker May 21, 2020
5e31340
paymod: Add a local_channel_hints modifier to collect local channels
cdecker May 22, 2020
c253839
json: Add helper to serialize short_channel_id_dir
cdecker May 22, 2020
10f231b
paymod: Include excludes resulting from channel_hints for getrotue
cdecker May 22, 2020
0b85b98
paymod: Teach the retry_mod not to insist when it's futile
cdecker May 22, 2020
957a3a0
json: Add helper to decode sha256 hashes
cdecker May 26, 2020
b5c9dca
pytest: Fix up the payload replacement test
cdecker May 26, 2020
be9b55f
pyln: Add a traceback if a hook or rpc method fails
cdecker May 26, 2020
9d7a48d
pay: Key the MPP payments based on the payment_hash not the bolt11
cdecker May 26, 2020
81dce40
pytest: Fix up test_pay_no_secret to wait for node_announcements
cdecker May 26, 2020
73fc10e
paymod: Parse error from waitsendpay and exclude failed chans
cdecker May 26, 2020
895542c
paymod: Simplify retry mod logic and add abort logic
cdecker May 26, 2020
fbd8cf1
paymod: Keep a copy of the serialized bolt11 in the root payment
cdecker May 27, 2020
7a266b8
paymod: Make payment_tree_result public to users can query state
cdecker May 27, 2020
2acb86b
paymod: Consider new payments when checking if an attempt is ongoing
cdecker May 27, 2020
9aff885
paymod Collect the final failure when aggregating the tree results
cdecker May 28, 2020
fc714bf
paymod: Fill in the `pay` return value
cdecker May 28, 2020
ddb0424
paymod: Remove the dummy payment modifier
cdecker May 29, 2020
7981f4c
paymod: Extract the channel hints update into its own function
cdecker Jun 25, 2020
fc2561f
pytest: fix test breakage added by d0c85033d2e5fe83861af7badb577e7cef…
rustyrussell Jul 6, 2020
a6374ad
openingd/openingd.c: Fix a mild deviation from BOLT#2.
ZmnSCPxj Jul 6, 2020
324d39b
docker: Add python3 to the docker image
cdecker Jun 18, 2020
1ef0ca5
ci: Add pytest-sentry so we have a place to collect failing tests
cdecker Jun 29, 2020
7aa8ffa
bitcoin: add weight calculation helpers.
rustyrussell Jul 6, 2020
5b82271
wallet: clean up json output creation, part 1.
rustyrussell Jul 6, 2020
1708fb9
wallet: clean up json output creation, part 2.
rustyrussell Jul 6, 2020
4271fc8
wallet: add explicit API for onchaind to register UTXOs.
rustyrussell Jul 6, 2020
e12defa
wallet: no longer expose wallet_add_utxo function.
rustyrussell Jul 6, 2020
3fec96a
tests: fix flake in test_partial_payment_htlc_loss
rustyrussell Jul 2, 2020
0b1f8fd
Take LIGHTNINGD_NETWORK env variable in Dockerfile.
joemphilips Jul 5, 2020
7f24646
tools/hsmtool.c: Make password optional for `guesstoremote` and `dump…
ZmnSCPxj Jul 7, 2020
4a89819
plugins/Makefile: Change plugins build procedure.
ZmnSCPxj Jun 19, 2020
2e88249
paymod: Make the transition to FAILED a function call
cdecker May 29, 2020
3a35dd3
paymod: Add the contents of paystatus
cdecker May 29, 2020
2f0e535
paymod: Add reason why a payment was attempted
cdecker May 29, 2020
097cb8d
paymod: Exclude nodes that we found to be faulty
cdecker May 29, 2020
1b057f0
paymod: Let the payment know the local ID
cdecker May 30, 2020
e71bdf9
paymod: Wrap the getroute request in a struct
cdecker Jun 1, 2020
4648d28
paymod: Compute fee and CLTV delta limits for a payment
cdecker Jun 3, 2020
935578e
paymod: Exclude most expensive/slowest chan if limits are exceeded
cdecker Jun 3, 2020
215a0ad
paymod: Update the route constraints as we apply routes and mods
cdecker Jun 4, 2020
2331cd6
paymod: Add user-provided label back into the paystatus result
cdecker Jul 2, 2020
cb00cba
paymod: Add support for the msatoshi override argument
cdecker Jun 8, 2020
6a75497
pytest: Add a `compat()` fixture allowing checks for specific flags
cdecker Jun 8, 2020
2ef130e
paymod: Apply and unapply routes to the channel hints
cdecker Jun 9, 2020
030633b
paymod: Add a human readable failreason to payments
cdecker Jun 9, 2020
4aed45e
paymod: Add attempts array to `pay` return value
cdecker Jun 9, 2020
4b3e849
paymod: Add function to set the current step
cdecker Jun 9, 2020
f557955
paymod: Consolidate parsing RPC results in libplugin
cdecker Jun 9, 2020
5601a1a
paymod: Add a deadline to the pay command and retry modifier
cdecker Jun 11, 2020
2649de5
paymod: Do not wait for a blockheight if we're already there
cdecker Jun 17, 2020
d8b8a0b
paymod: Add label to sendonion calls
cdecker Jun 11, 2020
da8eb6f
paymod: Expose riskfactor and wire through to getroute
cdecker Jun 11, 2020
2ac87c1
paymod: Reorder paymod arguments to match pay
cdecker Jun 11, 2020
0aa5c19
pytest: Fix tests broken by the pay and paystatus changes
cdecker Jul 2, 2020
5daa5bd
paymod: Fix the onion payload construction
cdecker Jul 2, 2020
af4955c
paymod: Fix waitsendpay error parsing for unknown failure codes
cdecker Jul 2, 2020
a9427f1
bitcoin/feerate: new exposure for feerate parsing outside lightningd.
rustyrussell Jul 7, 2020
972432d
param_feerate: parse numbers correctly.
rustyrussell Jul 7, 2020
94de18a
listfunds: add scriptpubkey if it's known.
rustyrussell Jul 7, 2020
31b2865
common/json_tok: expose routines to parse addresses.
rustyrussell Jul 7, 2020
731e037
change_amount: routine to determine if change output is worthwhile.
rustyrussell Jul 7, 2020
869fa08
common/json_tok: expose param_txid.
rustyrussell Jul 7, 2020
b27f4e1
doc/lightning-feerates.7.md: Document `feerates` command.
ZmnSCPxj Jul 12, 2020
389bd83
submodules/libwally: use blessed-branch
niftynei Jul 2, 2020
4ecbd5f
psbt: use pset initializer if needed
niftynei Jun 22, 2020
14de198
wally-tx: add type-to-string for a wally-tx
niftynei Jul 2, 2020
bc5a817
elements: convenience methods for dealing with assets
niftynei Jul 12, 2020
f5f85b3
elements,pset: populate elements specific data for PSBTs
niftynei Jul 10, 2020
eec5dfe
elements: update output amounts for elements test
niftynei Jul 10, 2020
bea05b1
elements,tests: skip over fee type outputs
niftynei Jul 10, 2020
ccb7871
elements,tests: fixup output amounts for elements
niftynei Jul 10, 2020
b1210ee
doc: update since addition of feerate(7)
rustyrussell Jul 13, 2020
01a4751
paymod: Implement keysend sending support as a native RPC command
cdecker Jun 17, 2020
7978a13
doc: Add a man-page for the new keysend command
cdecker Jul 1, 2020
514c404
tlv: Allow passing a raw pointer and a length to tlvstream_set_raw
cdecker Jul 9, 2020
5776a33
paymod: Activate paymod and move legacy pay to `legacypay` command
cdecker Jul 2, 2020
02e44e9
paymod: Set the STOPPED_RETRYING status code if we stopped retrying
cdecker Jul 6, 2020
411b760
paymod: Reset the step if we're waiting for a block
cdecker Jul 8, 2020
f20091f
pay: Do not duplicate "message" field in response to `pay`
cdecker Jul 10, 2020
817f7c7
travis: Parallelize non-valgrind tests even if under developer
cdecker Jul 10, 2020
b88a55b
paymod: Only wait on blockheight if we need to
cdecker Jul 10, 2020
6f40cb0
paymod: Inherit exemptfee modifier data on retry
cdecker Jul 10, 2020
9be4d55
paymod: Add a bit more information to the `pay` response
cdecker Jul 12, 2020
65963bc
exemptfee: Only apply to the root payment and fix logs
cdecker Jul 12, 2020
f536245
doc: add JSON API advice.
rustyrussell Jul 14, 2020
899ec2b
JSON API: fix up two existing warnings to be conformant.
rustyrussell Jul 14, 2020
7ebdc14
utxos: add a 'reserved_til' marker for utxos
niftynei Jul 14, 2020
50ff0b2
wallet: explicit routines to reserve/unreserve a UTXO.
rustyrussell Jul 14, 2020
27b4895
wallet: add wallet_find_utxo().
rustyrussell Jul 15, 2020
56ea215
wallet: new JSON commands reserveinputs and unreserveinputs.
rustyrussell Jul 15, 2020
be17a93
reserveinputs: add exclusive flag.
rustyrussell Jul 15, 2020
4ee527a
pytest: test reserve and unreserve.
rustyrussell Jul 15, 2020
bd19ec2
fundpsbt: new JSON API to gather UTXOs.
rustyrussell Jul 15, 2020
10e62af
fundpsbt: add reserve arg.
rustyrussell Jul 15, 2020
1091be3
doc: document fundpsbt.
rustyrussell Jul 15, 2020
31d7e01
pytest: test fundpsbt.
rustyrussell Jul 15, 2020
e85c895
pytest: restore test_sign_and_send_psbt.
rustyrussell Jul 15, 2020
371cabf
txprepare: revert 1fb9a078b620a65a2802bc8b1303970914cfb4cb (`psbt` fi…
rustyrussell Jul 15, 2020
406d0d0
doc/STYLE.md: be clear we're talking about JSON output.
rustyrussell Jul 15, 2020
7f53ade
paymod: Allow callers to opt out of shadow routing amount fuzzing
cdecker Jul 6, 2020
c97ff05
mpp: Add the presplit-modifier that splits a root payment first
cdecker Jul 1, 2020
f674568
tlvstream: Allow overwriting an already set value
cdecker Jul 3, 2020
3f399d1
paymod: Don't assume that the first payment was executed at all
cdecker Jul 3, 2020
b813974
mpp: Add the presplit MPP modifier
cdecker Jul 3, 2020
d0eb3a7
paymod: Not having a result doesn't mean we failed at getroute
cdecker Jul 3, 2020
443643e
retrymod: Reset retry counter if parent is a split
cdecker Jul 6, 2020
535aaca
paymod: Implement adaptive splitter
cdecker Jul 6, 2020
a287bbe
mpp: Enable adaptive splitter
cdecker Jul 6, 2020
de75d3a
mpp: Add CLI option to opt-out of multi-part payments
cdecker Jul 10, 2020
718b6e3
mpp: Detect if destination supports MPP from invoice and abort early
cdecker Jul 10, 2020
5bef4fc
mpp: Lower amounts below the presplit amount
cdecker Jul 10, 2020
041ee93
mpp: Consider an abort as the payment being finished
cdecker Jul 13, 2020
a3610d6
retrymod: Make retry modifier slightly more verbose
cdecker Jul 13, 2020
212a3c5
ld: We might not have a failing channel if localfail and sendonion
cdecker Jul 13, 2020
dad2306
pytest: Disable MPP sending for 4 tests
cdecker Jul 13, 2020
de90606
pytest: Add an adaptive MPP test
cdecker Jul 13, 2020
214f418
plugin: Fix a memory leak and a missing dereference in listconfigs
cdecker Jul 14, 2020
86ad15d
travis: Spread the valgrind load on more configurations
cdecker Jul 14, 2020
de096ee
pytest: Disable test_pay_routeboost for valgrind due to timeout
cdecker Jul 14, 2020
cc2f9b4
release: Add changelog entries for v0.9.0 release
cdecker Jul 15, 2020
d8c048e
Merge remote-tracking branch 'upstream/master' into 0.9.0
gruve-p Jul 16, 2020
2c02643
fixes after merging upstream
gruve-p Jul 16, 2020
31dac54
rename bitcoind to groestcloind
gruve-p Jul 16, 2020
f7b57f3
Patch libwally
gruve-p Jul 16, 2020
d6183db
Use single sha256 for txid
HashEngineering Jul 16, 2020
14db850
Merge pull request #22 from Groestlcoin/fix-commit-sig
gruve-p Jul 16, 2020
fe119fc
CHANGELOG.md: Update security changes for 0.7.1.
ZmnSCPxj Jul 16, 2020
73a5f5b
fundpsbt: make parameters more usable.
rustyrussell Jul 17, 2020
7ca00ca
ccan: update so we can compile with -O2 on Ubuntu.
rustyrussell Jul 17, 2020
055cfd1
wire: locale-independent patch order for EXPERIMENTAL_FEATURES patches
rustyrussell Jul 13, 2020
2788883
release: Fixup the changelog format before the release
cdecker Jul 16, 2020
3b54847
paymod: Do not assume that parsing the waitsendpay result succeeds
cdecker Jul 17, 2020
9582443
plugin: Do not get upset if it can't parse waitsendpay result
cdecker Jul 17, 2020
734f292
pytest: Reproduce issue #3847
cdecker Jul 18, 2020
2146a54
plugin: Do not return multiple times from `pay`
cdecker Jul 18, 2020
65ca634
plugin: Fix misspelled COMPAT_V090 compile guards
cdecker Jul 18, 2020
c984376
plugin: Always set an end_time for payments in a final state
cdecker Jul 18, 2020
25f1db3
release: Update changelog for v0.9.0rc2
cdecker Jul 18, 2020
f3a0052
Merge remote-tracking branch 'upstream/master' into 0.9.0
gruve-p Jul 18, 2020
73d5d96
sendpay: don't allow a new part payment if any part has succeeded.
rustyrussell Jul 21, 2020
09eb711
sendpay: insist that partid be an exact duplicate if in progress.
rustyrussell Jul 21, 2020
23af241
doc: document the payment_secret argument to sendpay.
rustyrussell Jul 21, 2020
c85a433
pytest: reduce accuracy of valgrind if SLOW_MACHINE.
rustyrussell Jul 22, 2020
1274d34
lightningd: add --dev-no-version-checks, use if SLOW_MACHINE and VALG…
rustyrussell Jul 22, 2020
b2463b1
paymod: Count all attempts, not just the ones with a result
cdecker Jul 19, 2020
157e70f
paymod: Add a comment about how we derive errors from erring_index
cdecker Jul 19, 2020
c0d70cd
paymod: Add invariant verification for constraints on shadowroute
cdecker Jul 19, 2020
0ca2c6b
paymod: Rewrite the shadow-route constraint enforcement
cdecker Jul 19, 2020
e1c6b97
paymod: Add a log entry whenever we add a channel hint
cdecker Jul 19, 2020
7b4e70e
paymod: Consolidate step selection and changes in presplit modifier
cdecker Jul 19, 2020
cb20dfc
paymod: Do not duplicate partids
cdecker Jul 19, 2020
f950153
paymod: Fix the adaptive splitter partitioning
cdecker Jul 19, 2020
a849e5f
pay: fix problematic sharing of shadow route data.
rustyrussell Jul 20, 2020
6951a9e
pytest: fix erroneous test_pay_retry result.
rustyrussell Jul 20, 2020
178415a
pay: handle returned errors more gracefully.
rustyrussell Jul 20, 2020
47002af
test_penalty_htlc_tx_timeout: debugging
rustyrussell Jul 20, 2020
9b4fd11
tests/test_pay.py: Replicate #3855.
ZmnSCPxj Jul 19, 2020
54888d4
Fixed assertion in pay plugin
vincenzopalazzo Jul 19, 2020
eb322b1
plugin: Do not automatically initialize the RPC connection in bcli
cdecker Jul 20, 2020
ce48fec
pytest: We now have multiple attempts in test_htlc_send_timeout
cdecker Jul 20, 2020
a1dc9cb
paymod: Track how many HTLCs each channel can still add
cdecker Jul 20, 2020
acdd9b8
paymod: Teach the presplit modifier to respect the chan HTLC limit
cdecker Jul 20, 2020
e92787a
paymod: Teach the adaptive splitter to respect the HTLC limit
cdecker Jul 20, 2020
d289ee6
paymod: Add the courtesy +1 to the CLTVs to allow for a new block
cdecker Jul 21, 2020
e76bf54
paymod: Fix the routehints being lost when retrying
cdecker Jul 21, 2020
534536b
paymod: Consolidate channel_hint creation in channel_hints_update
cdecker Jul 22, 2020
899a2e6
paymod: Randomly select a routehint, or none at random
cdecker Jul 22, 2020
6ada56c
paymod: Always initialize p->route
cdecker Jul 22, 2020
497b18b
paymod: fix typo which can cause memory overrun.
rustyrussell Jul 23, 2020
b78aa3f
paymod: Check if destination is reachable at all directly at startup
cdecker Jul 23, 2020
282f19d
paymod: Simplify routehint data initialization
cdecker Jul 23, 2020
1e28d66
paymod: Move application of routehints into its own function
cdecker Jul 23, 2020
56dd18e
paymod: Iterate through the routehints in order
cdecker Jul 23, 2020
2556df5
plugins/pay: Exclude the entrypoint to a routehint to avoid cycles
rustyrussell Jul 23, 2020
52a8b8f
paymod: Update step before creating child payments
cdecker Jul 23, 2020
85ec438
paymod: Routehintmod signals that we can retry if getroute fails
cdecker Jul 23, 2020
67e846f
pytest: Adjust test now that routehint order changed
cdecker Jul 23, 2020
15d1a19
pay: Remove duplicate message field
cdecker Jul 23, 2020
669daf6
release: Update CHANGELOG.md with changes since v0.9.0rc1
cdecker Jul 24, 2020
3784c80
Merge remote-tracking branch 'upstream/master' into 0.9.0
gruve-p Jul 24, 2020
f4f2853
pytest: test to show that listpays doesn't remember bolt11 string.
vincenzopalazzo Jul 26, 2020
71a2aef
sendonion: add bolt11 arg.
rustyrussell Jul 26, 2020
81fd552
plugins/pay: hand bolt11 arg to sendonion if we have one (i.e. for `p…
vincenzopalazzo Jul 26, 2020
b4aff49
pay: always send onion error message to gossipd.
rustyrussell Jul 26, 2020
8e02998
doc/PLUGINS.md: Correct misspelling of `getchaininfo`.
ZmnSCPxj Jul 24, 2020
d12ea51
pytest: Replicate the missing amount_msat in `listpays`
cdecker Jul 27, 2020
1da977a
db: Guard against accessing NULL partid and total_msat
cdecker Jul 27, 2020
d7cca07
jsonrpc: Add `msatoshi` argument to `sendonion` to annotate
cdecker Jul 27, 2020
311594b
jsonrpc: Add amount received by recipient to `listpays` result
cdecker Jul 27, 2020
14d08b7
doc: Document the `msatoshi` parameter for `sendonion`
cdecker Jul 27, 2020
4517435
pytest: fix flake in tests/test_pay.py::test_pay_exclude_node
rustyrussell Jul 29, 2020
65c2bac
hsmd/wallet: pass the bip32_key down into migrations
niftynei Jul 29, 2020
90b393c
hsmd/db: backfill pubkey information so that psbts signing works
niftynei Jul 29, 2020
d87f31f
utxo: clean up NULL handling of scriptpubkey
niftynei Jul 29, 2020
d968041
release: Add changes since v0.9.0rc3 to changelog
cdecker Jul 28, 2020
9894676
Merge remote-tracking branch 'upstream/master' into 0.9.0
gruve-p Jul 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*.po
*.pyc
.cppcheck-suppress
.mypy_cache
TAGS
tags
ccan/tools/configurator/configurator
Expand All @@ -19,6 +20,7 @@ gen_*
cli/lightning-cli
tools/check-bolt
tools/hsmtool
tools/lightning-hsmtool
coverage
ccan/config.h
__pycache__
Expand All @@ -30,6 +32,8 @@ config.vars
external/libbacktrace-build/
external/libbacktrace.a
external/libbacktrace.la
external/libbase58/
external/libbase58.a
test/test_protocol
test/test_sphinx
tests/.pytest.restart
Expand All @@ -45,3 +49,4 @@ contrib/pyln-*/build/
contrib/pyln-*/dist/
contrib/pyln-*/pyln_*.egg-info/
plugins/keysend
release/
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
url = https://github.com/ianlancetaylor/libbacktrace.git
[submodule "external/libwally-core"]
path = external/libwally-core
url = https://github.com/ElementsProject/libwally-core.git
url = https://github.com/niftynei/libwally-core.git
ignore = dirty
branch = nifty/blessed-branch
30 changes: 17 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,27 @@ env:
# - VALGRIND=1 ARCH=64 DEVELOPER=0 COMPILER=gcc TEST_GROUP=2 TEST_GROUP_COUNT=3 SOURCE_CHECK_ONLY=false
# - VALGRIND=1 ARCH=64 DEVELOPER=0 COMPILER=gcc TEST_GROUP=3 TEST_GROUP_COUNT=3 SOURCE_CHECK_ONLY=false
- VALGRIND=0 ARCH=64 DEVELOPER=1 COMPILER=clang SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=1 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=2 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=3 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=4 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=5 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=6 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=7 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=8 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=9 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=10 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=11 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=12 TEST_GROUP_COUNT=12 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=1 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=2 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=3 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=4 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=5 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=6 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=7 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=8 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=9 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=10 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=11 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=12 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=13 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=14 TEST_GROUP_COUNT=14 SOURCE_CHECK_ONLY=false
- VALGRIND=0 ARCH=arm32v7 DEVELOPER=1 TARGET_HOST=arm-linux-gnueabihf
- VALGRIND=0 ARCH=arm64v8 DEVELOPER=1 TARGET_HOST=aarch64-linux-gnu
cache:
directories:
- dependencies
- external/x86_64-linux-gnu
- external/aarch64-linux-gnu
- external/arm-linux-gnueabihf

script:
.travis/build.sh
36 changes: 22 additions & 14 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ 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 PYTEST_SENTRY_ALWAYS_REPORT=1

# 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
# Allow up to 4 concurrent tests when not under valgrind, which might run out of memory.
if [ "$VALGRIND" = 0 ]; then
PYTEST_PAR=4
fi

Expand All @@ -40,6 +40,10 @@ pip3 install --user -U --quiet --progress-bar off \
-r contrib/pyln-proto/requirements.txt \
-r contrib/pyln-testing/requirements.txt

pip3 install --user -U --quiet --progress-bar off \
pytest-sentry \
pytest-rerunfailures

echo "Configuration which is going to be built:"
echo -en 'travis_fold:start:script.1\\r'
./configure CC="$CC"
Expand All @@ -48,42 +52,45 @@ echo -en 'travis_fold:end:script.1\\r'

cat > pytest.ini << EOF
[pytest]
addopts=-p no:logging --color=no --force-flaky
addopts=-p no:logging --color=no --reruns=5
EOF

if [ "$TARGET_HOST" == "arm-linux-gnueabihf" ] || [ "$TARGET_HOST" == "arm-linux-gnueabihf" ]
if [ "$TARGET_HOST" == "arm-linux-gnueabihf" ] || [ "$TARGET_HOST" == "aarch64-linux-gnu" ]
then
export QEMU_LD_PREFIX=/usr/"$TARGET_HOST"/
export MAKE_HOST="$TARGET_HOST"
export BUILD=x86_64-pc-linux-gnu
export AR="$TARGET_HOST"-ar
export AS="$TARGET_HOST"-as
export CC="$TARGET_HOST"-gcc
export CXX="$TARGET_HOST"-g++
export LD="$TARGET_HOST"-ld
export STRIP="$TARGET_HOST"-strip
export CONFIGURATION_WRAPPER=qemu-"${TARGET_HOST%%-*}"-static

wget -q https://zlib.net/zlib-1.2.11.tar.gz \
&& tar xvf zlib-1.2.11.tar.gz \
&& tar xf zlib-1.2.11.tar.gz \
&& cd zlib-1.2.11 \
&& ./configure --prefix="$QEMU_LD_PREFIX" \
&& make \
&& sudo make install
&& sudo make install
cd .. && rm zlib-1.2.11.tar.gz && rm -rf zlib-1.2.11

wget -q https://www.sqlite.org/2018/sqlite-src-3260000.zip \
&& unzip sqlite-src-3260000.zip \
&& unzip -q sqlite-src-3260000.zip \
&& cd sqlite-src-3260000 \
&& automake --add-missing --force-missing --copy || true \
&& ./configure --disable-tcl --enable-static --disable-readline --disable-threadsafe --disable-load-extension --host="$TARGET_HOST" --prefix="$QEMU_LD_PREFIX" \
&& make \
&& sudo make install
&& sudo make install
cd .. && rm sqlite-src-3260000.zip && rm -rf sqlite-src-3260000

wget -q https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz \
&& tar xvf gmp-6.1.2.tar.xz \
&& tar xf gmp-6.1.2.tar.xz \
&& cd gmp-6.1.2 \
&& ./configure --disable-assembly --prefix="$QEMU_LD_PREFIX" --host="$TARGET_HOST" \
&& make \
&& sudo make install
&& sudo make install
cd .. && rm gmp-6.1.2.tar.xz && rm -rf gmp-6.1.2

./configure --enable-static
Expand All @@ -92,9 +99,10 @@ then
make -j3 > /dev/null
echo -en 'travis_fold:end:script.2\\r'

echo -en 'travis_fold:start:script.3\\r'
make -j$PYTEST_PAR check-units
echo -en 'travis_fold:end:script.3\\r'
# Tests would need to be wrapped with qemu-<arch>-static
#echo -en 'travis_fold:start:script.3\\r'
#make -j$PYTEST_PAR check-units
#echo -en 'travis_fold:end:script.3\\r'
elif [ "$SOURCE_CHECK_ONLY" == "false" ]; then
echo -en 'travis_fold:start:script.2\\r'
make -j3 > /dev/null
Expand Down
74 changes: 74 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,77 @@ 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.9.0rc4] - 2020-07-28

### Added

- plugin: `pay` was rewritten to use the new payment flow. See `legacypay` for old version ([3809](https://github.com/ElementsProject/lightning/pull/3809))
- plugin: `pay` will split payments that are failing due to their size into smaller parts, if recipient supports the `basic_mpp` option ([3809](https://github.com/ElementsProject/lightning/pull/3809))
- plugin: `pay` will split large payments into parts of approximately 10k sat if the recipient supports the `basic_mpp` option ([3809](https://github.com/ElementsProject/lightning/pull/3809))
- plugin: The pay plugin has a new `--disable-mpp` flag that allows opting out of the above two multi-part payment addition. ([3809](https://github.com/ElementsProject/lightning/pull/3809))
- JSON-RPC: new low-level coin selection `fundpsbt` routine. ([3825](https://github.com/ElementsProject/lightning/pull/3825))
- JSON-RPC: The `pay` command now uses the new payment flow, the new `legacypay` command can be used to issue payment with the legacy code if required. ([3826](https://github.com/ElementsProject/lightning/pull/3826))
- JSON-RPC: The `keysend` command allows sending to a node without requiring an invoice first. ([3792](https://github.com/ElementsProject/lightning/pull/3792))
- JSON-RPC: `listfunds` now has a 'scriptpubkey' field. ([3821](https://github.com/ElementsProject/lightning/pull/3821))
- docker: Docker build now includes `LIGHTNINGD_NETWORK` ENV variable which defaults to "bitcoin". An user can override this (e.g. by `-e` option in `docker run`) to run docker container in regtest or testnet or any valid argument to `--network`. ([3813](https://github.com/ElementsProject/lightning/pull/3813))
- cli: We now install `lightning-hsmtool` for your `hsm_secret` needs. ([3802](https://github.com/ElementsProject/lightning/pull/3802))
- JSON-RPC: new call `signpsbt` which will add the wallet's signatures to a provided psbt ([3775](https://github.com/ElementsProject/lightning/pull/3775))
- JSON-RPC: new call `sendpsbt` which will finalize and send a signed PSBT ([3775](https://github.com/ElementsProject/lightning/pull/3775))
- JSON-RPC: Adds two new rpc methods, `reserveinputs` and `unreserveinputs`, which allow for reserving or unreserving wallet UTXOs ([3775](https://github.com/ElementsProject/lightning/pull/3775))
- Python: `pyln.spec.bolt{1,2,4,7}` packages providing python versions of the spec text and defined messages. ([3777](https://github.com/ElementsProject/lightning/pull/3777))
- pyln: new module `pyln.proto.message.bolts` ([3733](https://github.com/ElementsProject/lightning/pull/3733))
- cli: New `--flat` mode for easy grepping of `lightning-cli` output. ([3722](https://github.com/ElementsProject/lightning/pull/3722))
- plugins: new notification type, `coin_movement`, which tracks all fund movements for a node ([3614](https://github.com/ElementsProject/lightning/pull/3614))
- plugin: Added a new `commitment_revocation` hook that provides the plugin with penalty transactions for all revoked transactions, e.g., to push them to a watchtower. ([3659](https://github.com/ElementsProject/lightning/pull/3659))
- JSON-API: `listchannels` now shows channel `features`. ([3685](https://github.com/ElementsProject/lightning/pull/3685))
- plugin: New `invoice_creation` plugin event ([3658](https://github.com/ElementsProject/lightning/pull/3658))
- docs: Install documentation now has information about building for Alpine linux ([3660](https://github.com/ElementsProject/lightning/pull/3660))
- plugin: Plugins can opt out of having an RPC connection automatically initialized on startup. ([3857](https://github.com/ElementsProject/lightning/pull/3857))
- JSON-RPC: `sendonion` has a new optional `bolt11` argument for when it's used to pay an invoice. ([3878](https://github.com/ElementsProject/lightning/pull/3878))
- JSON-RPC: `sendonion` has a new optional `msatoshi` that is used to annotate the payment with the amount received by the destination. ([3878](https://github.com/ElementsProject/lightning/pull/3881))

### Changed

- JSON-RPC: `fundchannel_cancel` no longer requires its undocumented `channel_id` argument after `fundchannel_complete`. ([3787](https://github.com/ElementsProject/lightning/pull/3787))
- JSON-RPC: `fundchannel_cancel` will now succeed even when executed while a `fundchannel_complete` is ongoing; in that case, it will be considered as cancelling the funding *after* the `fundchannel_complete` succeeds. ([3778](https://github.com/ElementsProject/lightning/pull/3778))
- JSON-RPC: `listfunds` 'outputs' now includes reserved outputs, designated as 'reserved' = true ([3764](https://github.com/ElementsProject/lightning/pull/3764))
- JSON-RPC: `txprepare` now prepares transactions whose `nLockTime` is set to the tip blockheight, instead of using 0. `fundchannel` will use `nLockTime` set to the tip blockheight as well. ([3797](https://github.com/ElementsProject/lightning/pull/3797))
- build: default compile output is prettier and much less verbose ([3686](https://github.com/ElementsProject/lightning/pull/3686))
- config: the `plugin-disable` option now works even if specified before the plugin is found. ([3679](https://github.com/ElementsProject/lightning/pull/3679))
- plugins: The `autoclean` plugin is no longer dynamic (you cannot manage it with the `plugin` RPC command anymore). ([3788](https://github.com/ElementsProject/lightning/pull/3788))
- plugin: The `paystatus` output changed as a result of the payment flow rework ([3809](https://github.com/ElementsProject/lightning/pull/3809))

### Deprecated

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

- JSON-RPC: the `legacypay` method from the pay plugin will be removed after `pay` proves stable ([3809](https://github.com/ElementsProject/lightning/pull/3809))

### Removed

- protocol: support for optional fields of the reestablish message are now compulsory. ([3782](https://github.com/ElementsProject/lightning/pull/3782))

### Fixed

- JSON-RPC: Reject some bad JSON at parsing. ([3761](https://github.com/ElementsProject/lightning/pull/3761))
- JSON-RPC: The `feerate` parameters now correctly handle the standardness minimum when passed as `perkb`. ([3772](https://github.com/ElementsProject/lightning/pull/3772))
- JSON-RPC: `listtransactions` now displays all txids as little endian ([3741](https://github.com/ElementsProject/lightning/pull/3741))
- JSON-RPC: `pay` now respects maxfeepercent, even for tiny amounts. ([3693](https://github.com/ElementsProject/lightning/pull/3693))
- JSON-RPC: `withdraw` and `txprepare` `feerate` can be a JSON number. ([3821](https://github.com/ElementsProject/lightning/pull/3821))
- bitcoin: `lightningd` now always exits if the Bitcoin backend failed unexpectedly. ([3675](https://github.com/ElementsProject/lightning/pull/3675))
- cli: Bash completion on `lightning-cli` now works again ([3719](https://github.com/ElementsProject/lightning/pull/3719))
- config: we now take the `--commit-fee` parameter into account. ([3732](https://github.com/ElementsProject/lightning/pull/3732))
- db: Fixed a failing assertion if we reconnect to a peer that we had a channel with before, and then attempt to insert the peer into the DB twice. ([3801](https://github.com/ElementsProject/lightning/pull/3801))
- hsmtool: Make the password argument optional for `guesstoremote` and `dumpcommitments` sub-commands, as shown in our documentation and help text. ([3822](https://github.com/ElementsProject/lightning/pull/3822))
- macOS: Build for macOS Catalina / Apple clang v11.0.3 fixed ([3756](https://github.com/ElementsProject/lightning/pull/3756))
- protocol: Fixed a deviation from BOLT#2: if both nodes advertised `option_upfront_shutdown_script` feature: MUST include ... a zero-length `shutdown_scriptpubkey`. ([3816](https://github.com/ElementsProject/lightning/pull/3816))
- wumbo: negotiate successfully with Eclair nodes. ([3712](https://github.com/ElementsProject/lightning/pull/3712))
- plugin: `bcli` no longer logs a harmless warning about being unable to connect to the JSON-RPC interface. ([3857](https://github.com/ElementsProject/lightning/pull/3857))

### Security



## [0.8.2] - 2020-04-30: "A Scalable Ethereum Blockchain"

This release was named by @arowser.
Expand Down Expand Up @@ -400,6 +471,8 @@ changes.

### Security

- Fixes CVE-2019-12998 ([Full Disclosure](https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-September/002174.html)).

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

This release was named by Mark Beckwith @wythe.
Expand Down Expand Up @@ -712,6 +785,7 @@ 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"

[0.9.0rc4]: https://github.com/ElementsProject/lightning/releases/tag/v0.9.0rc4
[0.8.2]: https://github.com/ElementsProject/lightning/releases/tag/v0.8.2
[0.8.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.8.1
[0.8.0]: https://github.com/ElementsProject/lightning/releases/tag/v0.8.0
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ 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 \
RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools python3 python3-pip \
&& rm -rf /var/lib/apt/lists/*

ENV LIGHTNINGD_DATA=/root/.lightning
ENV LIGHTNINGD_RPC_PORT=9835
ENV LIGHTNINGD_PORT=9735
ENV LIGHTNINGD_NETWORK=bitcoin

RUN mkdir $LIGHTNINGD_DATA && \
touch $LIGHTNINGD_DATA/config
Expand Down
Loading