Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
329 commits
Select commit Hold shift + click to select a range
ef9d8bc
dual-fund: reconnections were borked, this fixes them
niftynei May 6, 2021
de854fa
psbt: really hacky patch over libwally's 0-input txs parse fail
niftynei Apr 26, 2021
7a488cc
df-tests: remove df_accepter plugin
niftynei Apr 26, 2021
484d6bd
tests: move EXP_DF into the testing utils
niftynei May 7, 2021
b4e24ac
df: anchor outputs are on if EXP_DF
niftynei May 6, 2021
d0bbf07
tests: not DEVELOPER -> mark.developer
niftynei Apr 26, 2021
3a2d602
tests: add marker for v1/v2 channel opens
niftynei Apr 26, 2021
dc758f6
tests: mark as v1 or v2 openchannel required
niftynei Apr 26, 2021
558abe2
tests: explicitly mark tests to run both as v1+v2
niftynei May 7, 2021
342f783
df-tests: Turn on v2 tests on CI
niftynei May 7, 2021
6d3fb11
df-tests: patch for state == AWAITING_UNILATERAL problem
niftynei May 10, 2021
5ee4c9e
df: patch for valgrind error
niftynei May 10, 2021
4432672
df-bug: avoid referencing null channel->owner
niftynei May 10, 2021
ef333d5
df-callbacks: dont log as broken, just reconnect
niftynei May 10, 2021
5cac367
df-test: v2 has reconnects
niftynei May 10, 2021
efdc36c
tests: mark test as requiring developer
niftynei May 11, 2021
71a4a2e
df: rework closing logic
niftynei May 11, 2021
e375932
df-tests: test_coin_movement_notices, make work?
niftynei May 11, 2021
c75ca8c
df-bugs: if we've already got the funding_locked, dont renotify
niftynei May 11, 2021
ce1e5bd
df-test: make flakey test not as flakey
niftynei May 11, 2021
214fdcc
plugin notifications: minor cleanups.
rustyrussell May 3, 2021
7f15f86
libhsmd: First working build script for libhsmd-python
cdecker Apr 23, 2021
323b1a5
libhsmd: Add missing implementation of status functions
cdecker Apr 26, 2021
a4c19ba
libhsmd: Clean up the build descriptors for libhsmd_python
cdecker Apr 26, 2021
6c67afe
make: Add CPPCHECK_OPTS to allow excluding files from the check
cdecker Apr 28, 2021
0f2009c
make: Do not scan contrib for discouraged functions
cdecker Apr 28, 2021
e141b71
pytest: fix flake in test_reconnect_no_update
rustyrussell May 17, 2021
e17526f
gitignore more things.
May 16, 2021
0d68feb
reorganize .gitignore entries across subdirs.
May 16, 2021
11180e7
pytest: add test for HTLC timeout on failed htlcs.
rustyrussell May 21, 2021
33736b8
lightningd: attach HTLC timeout to htlc itself, fix gratuitous discon…
rustyrussell May 21, 2021
cc6f1fd
update-mocks: don't try to regenerate files.
rustyrussell May 21, 2021
25b5e1e
update-mocks: make sure we cover all test programs.
rustyrussell May 21, 2021
d868d44
Makefile: don't let update-mocks run unless DEVELOPER and EXPERIMENTA…
rustyrussell May 21, 2021
2e3e4a5
update-mocks: prefer to find function defs from local includes.
rustyrussell May 21, 2021
0682ad9
fetchinvoice: don't produce invalid JSON on sent_inv timeout.
rustyrussell May 21, 2021
088cfce
common/test/run-route and run-route-specific: modern gossmap tests
rustyrussell May 21, 2021
6f71aae
plugins/libplugin-pay: extreact route function so we can write unit t…
rustyrussell May 21, 2021
52e5ca3
plugins/libplugin: make headers update-mocks friendly.
rustyrussell May 21, 2021
7ef6dd0
plugins/test/run-route-overlong: modern overlong routing test.
rustyrussell May 22, 2021
cc19874
common/json_tok: hoist param_short_channel_id from inside lightningd/
rustyrussell May 22, 2021
eb370ab
gossmap: remembers when a channel is private.
rustyrussell May 22, 2021
d1f8a5f
gossmap: add gossmap_chan_get_capacity() helper.
rustyrussell May 22, 2021
770a328
gossmap: save the offset where the channel updates are, function for …
rustyrussell May 22, 2021
d54abd0
gossmap: function to get channel features bitmap.
rustyrussell May 22, 2021
167681c
gossmap: fix gossmap_chan_get_announce() and gossmap_node_get_announc…
rustyrussell May 22, 2021
0d4f014
gossip_store: create end marker for EOF.
rustyrussell May 22, 2021
c2a8891
common/gossmap: reload once we hit end marker.
rustyrussell May 22, 2021
9dadcc8
common/gossip_store: avoid fd pass for new store, use end marker.
rustyrussell May 22, 2021
e531a38
gossipd / plugin: clean up names in struct route_hop.
rustyrussell May 22, 2021
2bb365a
common/route: route_from_dijkstra returns route_hop array.
rustyrussell May 22, 2021
3832542
common/dijkstra: remove dijkstra_amount().
rustyrussell May 22, 2021
46b735c
dijkstra: add chan pointer argument to path scoring.
rustyrussell May 22, 2021
14febd4
pytest: disable mpp test which is blocking merges.
rustyrussell May 22, 2021
5e7695f
funder: add count of utxos we're signing to the logs
niftynei May 4, 2021
9a1041e
fundpsbt: dont add utxos that are a net-loss
niftynei May 4, 2021
f6186d5
funder: subtract the fee of the utxo from the available amount
niftynei May 4, 2021
c93bd5b
funder: test for adding utxos, calculating total available
niftynei May 4, 2021
4778320
funder: print reason that we don't contribute funds
niftynei May 5, 2021
4ae9e0c
CI: Re-enable experimental build.
rustyrussell May 11, 2021
260adb8
df: differentiate error message between
niftynei Apr 29, 2021
8908dd0
df-bugs: only include the `funding` if we're the opener
niftynei May 11, 2021
2d4939f
df-tests: re-write the funding wallet corners test for v2
niftynei May 11, 2021
e2867be
df-tests: re-write test_funding_cancel_race for v2 commands
niftynei May 12, 2021
bab5ef4
df-test: test for a failed rbf attempt, currently crashes
niftynei May 7, 2021
8ae9f6a
df-tests: add better explainer for test logic
niftynei May 7, 2021
82fa3fa
df-rbf: order inflights by funding_feerate
niftynei May 7, 2021
8925fc8
inflights: add checks that there's actually an inflight
niftynei May 7, 2021
024bc83
listpeers: add inflights info
niftynei May 19, 2021
727d7e9
df-rbf: test that, with enough bumps, we can eventually add to mempool
niftynei May 19, 2021
5f1ba02
rbf: on close, drop every inflight transaction's commitment
niftynei May 20, 2021
e6c7928
listpeers: show the inflight's 'commitment tx' txid
niftynei May 20, 2021
f468c20
listpeers: always show all the inflights
niftynei May 20, 2021
1d922bf
dev-sign-last-tx: include inflight signed txs
niftynei May 20, 2021
4247ec3
inflights: save the whole psbt to the database
niftynei May 20, 2021
dff9516
rbf-tests: check every inflight has signed commitment produced
niftynei May 20, 2021
d6bd6cc
open-rbf: we broadcast all the commitments for a channel when closed
niftynei May 20, 2021
e45b093
inflights: relax assertion channel funding_txid is last inflight txid
niftynei May 20, 2021
062bc12
rbf: update the channel's funding_txid to match what's mined
niftynei May 20, 2021
d04c373
rbf: when a channel is open, remove all the inflights
niftynei May 20, 2021
85ec604
rbf: when a peer is activated, also keep track of all of its inflights
niftynei May 20, 2021
b3565fe
nit: add another debug log
niftynei May 20, 2021
9d9fdfd
rbf-test: confirm that rbf'd inflight is opened and closed as expected
niftynei May 20, 2021
8c949be
dual-open: save our now updated info about broadcast state
niftynei May 20, 2021
cb7e7b2
added FAQ on getting a PSBT
dscotese May 10, 2021
f798fb1
Clearer RETURN VALUE
dscotese May 10, 2021
7bd6b5a
readme: fix ubuntu installation instructions
urza May 21, 2021
64199d9
"createonion" to accept an optional custom onion_size.
May 10, 2021
2c9cb8c
devtools/onion: handle onions which are not 1300 bytes long.
rustyrussell May 17, 2021
d70661d
pytest: check nonstandard onion generation.
rustyrussell May 17, 2021
7bf1757
wireaddr: fix indentation / line breaks for autotor parsing
darosior May 20, 2021
fe8074c
Refuse to parse v2 onion addresses without deprecated_apis
darosior May 20, 2021
e6527cc
options: deprecate v2 mode for autotor
darosior May 21, 2021
9a363c6
doc/TOR: remove references to deprecated v2 hidden services
darosior May 21, 2021
a4cb993
CI: give nicer names to Ci runners.
rustyrussell May 18, 2021
61d146a
pytest: fix gossip flake in test_restart_many_payments
rustyrussell May 24, 2021
b80b746
pay: don't wait forever if we're already past deadline.
rustyrussell May 25, 2021
df594be
pytest: add message check to test_blockheight_disagreement
rustyrussell May 25, 2021
ca3f601
CI: Disable dual-funded tests while they're hanging.
rustyrussell May 25, 2021
5aed2bc
This should hopefully alleviate the pain of figuring out how to prope…
urza May 18, 2021
96bd096
pay: fix corner case where we eliminate our own hint.
rustyrussell May 24, 2021
94419c7
common: Check chain hash in gossip_timestamp_filter
nalinbhardwaj May 8, 2021
f24dc91
wallet: add "reserved_to_block" field to listfunds.
rustyrussell May 26, 2021
95f77f1
pytest: test double-spending an opening tx input.
rustyrussell May 26, 2021
efe29c9
sendpsbt, fundpsbt, utxopsbt, reserveinputs, unreserveinputs: allow c…
rustyrussell May 26, 2021
14eddb9
fundchannel, multifundchannel: reserve inputs for two weeks, not 12 h…
rustyrussell May 26, 2021
6753b95
lightningd: respect anysegwit on dual-funding opens too.
rustyrussell May 25, 2021
b6223eb
lightningd: option_shutdown_anysegwit is no longer experimental.
rustyrussell May 26, 2021
57292dd
channeld: update test vectors for msat differentiation test.
rustyrussell May 26, 2021
d3f3709
Makefile: update to latest spec.
rustyrussell May 26, 2021
40b264c
Makefile: fix $(FORCE) in sub-Makefiles
rustyrussell May 26, 2021
bca8427
Makefile: allow postfixes to SHA256STAMP.
rustyrussell May 26, 2021
ebe8f37
doc: fix up mangled nroff from mkrd.
rustyrussell May 26, 2021
129d3f6
pytest: don't use command_success_str in test_libplugin.c
rustyrussell May 26, 2021
97b52ed
autoclean: don't return a raw string as result.
rustyrussell May 26, 2021
a4c7ff0
libplugin: remove command_success_str function.
rustyrussell May 26, 2021
fc9b24a
close: add "unopened" type if we simply discard channel.
rustyrussell May 26, 2021
8a67c4a
decode: always return "valid" field.
rustyrussell May 26, 2021
ea99a05
pytest: add schema support for JSON responses.
rustyrussell May 26, 2021
2c9eaed
tools/fromschema.py: tool to replace start/end markers in markdown wi…
rustyrussell May 26, 2021
fdb4953
doc/schemas: generate manpage section from schema.
rustyrussell May 26, 2021
3bc5d47
doc/schemas: add some simple schemas and generate manpages from them
rustyrussell May 26, 2021
0b48dd7
doc/schemas: add schema for autoclean.
rustyrussell May 26, 2021
5d7203e
doc/schemas: create close schema.
rustyrussell May 26, 2021
4b46190
doc/schemas: schema for connect.
rustyrussell May 26, 2021
d1b42cc
doc/schemas: decode, decodepay
rustyrussell May 26, 2021
fbc2672
doc/schemas: delexpiredinvoice, delinvoice, delpay.
rustyrussell May 26, 2021
ec83d7a
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundch…
rustyrussell May 26, 2021
a027b3a
plugins/test/Makefile: fix typo causing build race.
rustyrussell May 27, 2021
57935b2
lightningd: check closing tx signature
nalinbhardwaj May 29, 2021
4316832
libhsmd: Correctly wrap with `tmpctx` management in libhsmd-python
cdecker May 17, 2021
c6a3d30
libhsmd: Always use gcc to configure and compile
cdecker May 17, 2021
e27ce7d
libhsmd: Add a simple tx signature test
cdecker May 17, 2021
90ced7e
libhsmd: Do not use the message as the peer ID...
cdecker May 18, 2021
ce23910
Merge pull request #12 from chips-blockchain/tor
satindergrewal May 30, 2021
54cbc97
Merge pull request #14 from satindergrewal/tor
satindergrewal May 30, 2021
123ed6e
fixing merge conflict manually
satindergrewal May 30, 2021
c422f65
Merge pull request #15 from ElementsProject/master
satindergrewal May 30, 2021
2087122
Create Tor-setup-notes.md
satindergrewal May 30, 2021
0ed7c0d
Suggested code cleanup by TODO comment
vincenzopalazzo May 26, 2021
a88a6e6
wallet: sort listsendpays by ID
nalinbhardwaj May 26, 2021
23fada0
plugins/pay: sort output payments in listpays
nalinbhardwaj May 26, 2021
a794e87
pytest: test pay ordering.
rustyrussell May 31, 2021
0b01a8c
doc: document ordering of listpays/listsendpays.
rustyrussell May 31, 2021
f7adbd5
EXPERIMENTAL: import spec for quiescence.
rustyrussell May 31, 2021
40e2178
channeld: implement pending_updates()
rustyrussell May 31, 2021
e29c9c2
EXPERIMENTAL: handle receiving quiescence request.
rustyrussell May 31, 2021
03cfe0b
EXPERIMENTAL: dev-quiesce to initiate (and test) quiescence.
rustyrussell May 31, 2021
3b854ec
Update Tor-setup-notes.md
satindergrewal Jun 1, 2021
4f74dce
Update Tor-setup-notes.md
satindergrewal Jun 1, 2021
544feea
Merge pull request #16 from ElementsProject/master
satindergrewal Jun 1, 2021
3c4c8d4
libwally: update to release_0.8.3
niftynei Jun 1, 2021
5d69964
reqs: Remove wallycore, no longer needed for CI tests
niftynei Jun 1, 2021
b5aaee6
Revert "pytest: Skip hsm encryption test if we don't have a TTY"
darosior Jun 1, 2021
e95fc74
tests: cleanup any unfinished/hanging channel opens
niftynei Jun 1, 2021
cead5e1
openingd: return more informative error message for v2 opens
niftynei Jun 1, 2021
e424180
remove checking for unused "direction" property in sendpay.
May 16, 2021
7cffea1
connectd: new command to make us send message and close.
rustyrussell Jun 3, 2021
e2f225e
lightningd: use connectd to send the final error message, not opening…
rustyrussell Jun 3, 2021
bf0320a
openingd/dualopend: remove send_msg functionality.
rustyrussell Jun 3, 2021
e619bf0
pytest: show problem with pay when not enough HTLCs available.
rustyrussell May 28, 2021
05a3be1
pay: Fix use-after-free issue with routehints in shortlived payments
cdecker May 28, 2021
d4def7e
plugin/pay: prevent presplitter from dividing if max already tiny.
rustyrussell May 28, 2021
803c048
pay: Compute the number of HTLCs needed after presplit correctly
cdecker Jun 1, 2021
5e1fadf
pay: Skip the presplitter mod if it'd exhaust our HTLC budget
cdecker Jun 2, 2021
b97b650
corrected chips lightning config path
satindergrewal Jun 3, 2021
1511613
Added Chips tor network setup
satindergrewal Jun 3, 2021
980c233
reference tor setup guides used for Chips tor setup
satindergrewal Jun 3, 2021
c21f900
Update Tor-setup-notes.md
satindergrewal Jun 3, 2021
e5b54f6
Update Tor-setup-notes.md
satindergrewal Jun 3, 2021
28b6598
corrected onion address for seed/addnode
satindergrewal Jun 3, 2021
598c6b3
Tor monitoring service - nyx
satindergrewal Jun 3, 2021
d15a460
Merge pull request #16 from satindergrewal/tor
satindergrewal Jun 3, 2021
1525c6e
updated seed/add nodes
satindergrewal Jun 3, 2021
f4dee21
Update Tor-setup-notes.md
satindergrewal Jun 3, 2021
b72c05f
hsm_encryption: read from STDIN if not in a TTY
openoms Jun 1, 2021
c2e2234
lightningd: remove duplicate temp term creation
openoms Jun 1, 2021
b821de1
hsm_encryption.c: remove whitespace from line end
openoms Jun 3, 2021
fab1ed6
hsm_encryption.c: fix source include order
openoms Jun 3, 2021
2895325
stop requiring channel and direction on `sendonion` since they're not…
Jun 4, 2021
2fea448
gen/impl_template: fix generation of singleton varsize elements.
rustyrussell Jun 3, 2021
7d666e9
onchaind: don't rely on knowing option_static_remotekey for unknown c…
rustyrussell Jun 4, 2021
77ed0c2
onchaind: don't hand redundant commit_num to handle_unknown_commitment.
rustyrussell Jun 4, 2021
5473d66
onchaind: limp along if we cheat.
rustyrussell Jun 4, 2021
2ffd344
channeld: tweak function to allow testing for pending *uncommitted* c…
rustyrussell Jun 4, 2021
325d33a
common/features: helper to pretty-print feature bits.
rustyrussell Jun 4, 2021
45e6080
channel: import upgrade spec.
rustyrussell Jun 4, 2021
7e33e44
channeld: send next_to_send if EXPERIMENTAL_FEATURES
rustyrussell Jun 4, 2021
d2814a9
channeld: send current features (EXPERIMENTAL_FEATURES)
rustyrussell Jun 4, 2021
d305b8a
channeld: send upgradable types, add logging (EXPERIMENTAL_FEATURES)
rustyrussell Jun 4, 2021
220b612
wallet: save thresholds for option_static_remotekey.
rustyrussell Jun 4, 2021
fa0cd3c
onchaind: handle static_remotekey thresholds.
rustyrussell Jun 4, 2021
29f042d
channeld: handle upgrade match.
rustyrussell Jun 4, 2021
5526c67
channeld: set desired_type to upgrade `option_static_remotekey` if no…
rustyrussell Jun 4, 2021
ebcadc5
pytest: test onchaind handles unilateral and penalty txs on either si…
rustyrussell Jun 4, 2021
2f21435
pytest: test that both sides refuse upgrade if not quiescent.
rustyrussell Jun 4, 2021
67c03c0
pytest: speed up test_opening.py::test_funder_contribution_limits whe…
rustyrussell Jun 4, 2021
eeba75c
pay: Do not attempt to filter routehints if we can't find outselves
cdecker Jun 3, 2021
6062b40
plugin: Add the plugin we're serializing for in the serializer
cdecker Jun 2, 2021
a503032
lightning: Add status field to htlc_in
cdecker Jun 4, 2021
610d8a0
plugin: Add a status field to htlcs in listpeers
cdecker Jun 2, 2021
76b8eb3
plugin: Add debug log entries when calling and returning from hooks
cdecker Jun 3, 2021
49c9efa
added a chips onion node to list
satindergrewal Jun 6, 2021
8a7d8f6
added discover=1 to chips conf settings, so it becomes a serving node…
satindergrewal Jun 6, 2021
b5ebf22
Updated instructions to troubleshoot Proxmox Container tor issue
satindergrewal Jun 6, 2021
6cfc4e3
updated onion addresses
satindergrewal Jun 6, 2021
b2ce878
keysend plugin: make cltv_expiry for keysends slightly more conservative
valentinewallace May 20, 2021
d5f1515
chore: fix compile issue discovered by gcc
m-schmoock Jun 7, 2021
a4df2c7
lightning/pay: don't crash when trying to send payment down unconfirm…
rustyrussell Jun 9, 2021
4cc3eaf
common/bech32: update to bech32m reference.
rustyrussell Jun 8, 2021
8d38050
devtools/encodeaddr: tool to create regtest bech32m vectors.
rustyrussell Jun 9, 2021
8e74a50
common/json_tok: allow non-v0 segwit addresses.
rustyrussell Jun 9, 2021
3cf9808
tests: test future segwit versions for withdraw / close.
rustyrussell Jun 10, 2021
064ad48
close: check that destination is going to be accepted.
rustyrussell Jun 10, 2021
3aafe8c
Makefile: `pytest` target should depend on ALL_TEST_PROGRAMS.
rustyrussell Jun 10, 2021
1bda5ea
estimate fee modifications applied in upstream code with modified code
satindergrewal Jun 14, 2021
9bcc54e
Merge pull request #19 from ElementsProject/master
satindergrewal Jun 14, 2021
6a95db7
Merge pull request #17 from satindergrewal/grewal
satindergrewal Jun 14, 2021
11d24de
wire/Makefile: always generate non-exp files.
rustyrussell Jun 3, 2021
2910bb0
pytest: fix flake in test_misc.py::test_funding_reorg_* xxremote_lags
rustyrussell Jun 13, 2021
38fad0f
ccan: update to get RETURNS_NONNULL macro.
rustyrussell Jun 14, 2021
e784345
common: note that command_fail doesn't return NULL.
rustyrussell Jun 14, 2021
e81e640
topology: plugin to implement getroute command.
rustyrussell Jun 14, 2021
d1ab5e3
pyln-client: hack in test that getroute returns the same old/new.
rustyrussell Jun 14, 2021
63d97d2
plugins/topology: listchannels command.
rustyrussell Jun 14, 2021
1a7731c
plugins/topology: make listchannels mark disconnected local channels …
rustyrussell Jun 14, 2021
79299a4
pyln-client: hack in test that listchannels returns the same old/new.
rustyrussell Jun 14, 2021
e734097
common/wireaddr: fromwire_wireaddr_array helper.
rustyrussell Jun 14, 2021
280f5a7
plugins/topology: add listnodes command.
rustyrussell Jun 14, 2021
9a2d738
pyln-client: hack in test that listnodes returns the same old/new.
rustyrussell Jun 14, 2021
9e1b830
plugins/topology: listincoming function to help invoices.
rustyrussell Jun 14, 2021
cda8f81
invoice: overhaul routehints to use topology.listincoming, cleanup.
rustyrussell Jun 14, 2021
b6aa951
signmessage: use listnodes instead of gossipd_getnodes_request.
rustyrussell Jun 14, 2021
50cb810
pyln-client: revert old/new comparisons for getroute, listchannels, l…
rustyrussell Jun 14, 2021
8810ce7
gossipd/test: remove routing tests.
rustyrussell Jun 14, 2021
7e7ab4c
gossipd: remove routing, listchannels and listnodes infrastructure.
rustyrussell Jun 14, 2021
75720ad
lightningd: wait for gossipd to finish initalizing before starting pl…
rustyrussell Jun 14, 2021
4176756
common/test: test wireaddr parsing.
rustyrussell Jun 16, 2021
976a790
connectd: fix advertizing for Tor ports.
rustyrussell Jun 16, 2021
40544b7
plugins/bcli: fix uninitialized variable.
rustyrussell Jun 16, 2021
a53aa1a
pyln: adds a help text to start plugins manually
m-schmoock Jun 17, 2021
526e602
hsmtool: this is 'success', not 'succes'
darosior Jun 14, 2021
e19b67f
qa: test hsm encryption password provided from stdin
darosior Jun 14, 2021
d6f441b
hsm_encryption: merge getline() logic between stdin and non-stdin
darosior Jun 14, 2021
1643a61
pyln-testing: check if process died after having read all logs
darosior Jun 15, 2021
50ebdfb
invoice: allow creation of giant invoices.
rustyrussell Jun 17, 2021
2510bca
pay: Fix another instance of a crash when we can't find ourselves
cdecker Jun 17, 2021
262f90d
replace freenode with libera
Jun 20, 2021
684579c
Merge pull request #20 from ElementsProject/master
satindergrewal Jun 23, 2021
ffc7151
Merge pull request #19 from satindergrewal/grewal
satindergrewal Jun 23, 2021
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
  •  
  •  
  •  
124 changes: 97 additions & 27 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Continuous Integration
on: [pull_request]
jobs:
smoke-test:
name: Smoke Test Config ${{ matrix.cfg }}
name: Smoke Test ${{ matrix.cfg }}
runs-on: ubuntu-20.04
env:
DEVELOPER: 1
Expand All @@ -14,11 +14,18 @@ jobs:
fail-fast: true
matrix:
include:
# CFG us just an enumeration so we can refer to the configurations more easily
- {CFG: 1, TEST_CMD: "make"}
- {CFG: 2, TEST_CMD: "make check-source check-units installcheck check-gen-updated", COPTFLAGS: "-O3"}
- {CFG: 3, ARCH: 32, TEST_CMD: "make check-source check-units installcheck", DEVELOPER: 0}
- {CFG: 4, TEST_CMD: "make check-source check-units installcheck check-gen-updated", EXPERIMENTAL_FEATURES: 1}
- CFG: "make"
TEST_CMD: "make"
- CFG: "make-O3-check"
TEST_CMD: "make check-source check-units installcheck check-gen-updated"
COPTFLAGS: "-O3"
- CFG: "make-32-bit-nodev-check"
ARCH: 32
TEST_CMD: "make check-source check-units installcheck"
DEVELOPER: 0
- CFG: "make-EXPERIMENTAL-check"
TEST_CMD: "make check-source check-units installcheck check-gen-updated"
EXPERIMENTAL_FEATURES: 1
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
Expand Down Expand Up @@ -128,20 +135,40 @@ jobs:
matrix:
include:
# All of the following will just run `make pytest`
- {CFG: 5, COMPILER: clang, FUZZING: 1}
- {CFG: 6, COMPILER: gcc, TEST_CHECK_DBSTMTS: 1}
- {CFG: 7, DEVELOPER: 0, COMPAT: 0, TEST_GROUP: 1, TEST_GROUP_COUNT: 2}
- {CFG: 8, DEVELOPER: 0, COMPAT: 0, TEST_GROUP: 2, TEST_GROUP_COUNT: 2}

- CFG: "clang-fuzzing"
COMPILER: clang
FUZZING: 1
- CFG: "check-dbstmts"
COMPILER: gcc
TEST_CHECK_DBSTMTS: 1
- CFG: "non-DEVELOPER-non-COMPAT-1"
DEVELOPER: 0
COMPAT: 0
TEST_GROUP: 1
TEST_GROUP_COUNT: 2
- CFG: "non-DEVELOPER-non-COMPAT-2"
DEVELOPER: 0
COMPAT: 0
TEST_GROUP: 2
TEST_GROUP_COUNT: 2
# Various other configurations
- {CFG: 19, NETWORK: liquid-regtest}
- {CFG: 20, DB: postgres, PYTEST_PAR: 2}
- CFG: "Elements"
NETWORK: liquid-regtest
- CFG: "PostgreSQL"
DB: postgres
PYTEST_PAR: 2

# The cross-compiled versions
- {CFG: 21, ARCH: arm32v7, TARGET_HOST: arm-linux-gnueabihf}
- {CFG: 22, ARCH: arm64v8, TARGET_HOST: aarch64-linux-gnu}
# Disabled for 0.10.0-rc1
# - {CFG: 23, EXPERIMENTAL_FEATURES: 1}
- CFG: "cross-arm32"
ARCH: arm32v7
TARGET_HOST: arm-linux-gnueabihf
- CFG: "cross-arm64"
ARCH: arm64v8
TARGET_HOST: aarch64-linux-gnu

# The experimental feature test
- CFG: "EXPERIMENTAL"
EXPERIMENTAL_FEATURES: 1
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
Expand All @@ -160,6 +187,7 @@ jobs:
VALGRIND: ${{ matrix.VALGRIND }}
DEVELOPER: ${{ matrix.DEVELOPER }}
EXPERIMENTAL_FEATURES: ${{ matrix.EXPERIMENTAL_FEATURES }}
EXPERIMENTAL_DUAL_FUND: ${{ matrix.EXPERIMENTAL_DUAL_FUND }}
COMPILER: ${{ matrix.COMPILER }}
ARCH: ${{ matrix.ARCH }}
COMPAT: ${{ matrix.COMPAT }}
Expand Down Expand Up @@ -190,20 +218,61 @@ jobs:
COMPAT: 1
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
LABEL: "Valgrind-test"
strategy:
fail-fast: true
matrix:
include:
- {CFG: 9, VALGRIND: 1, TEST_GROUP: 1, TEST_GROUP_COUNT: 10, PYTEST_PAR: 3}
- {CFG: 10, VALGRIND: 1, TEST_GROUP: 2, TEST_GROUP_COUNT: 10, PYTEST_PAR: 3}
- {CFG: 11, VALGRIND: 1, TEST_GROUP: 3, TEST_GROUP_COUNT: 10, PYTEST_PAR: 3}
- {CFG: 12, VALGRIND: 1, TEST_GROUP: 4, TEST_GROUP_COUNT: 10, PYTEST_PAR: 3}
- {CFG: 13, VALGRIND: 1, TEST_GROUP: 5, TEST_GROUP_COUNT: 10, PYTEST_PAR: 3}
- {CFG: 14, VALGRIND: 1, TEST_GROUP: 6, TEST_GROUP_COUNT: 10, PYTEST_PAR: 3}
- {CFG: 15, VALGRIND: 1, TEST_GROUP: 7, TEST_GROUP_COUNT: 10, PYTEST_PAR: 3}
- {CFG: 16, VALGRIND: 1, TEST_GROUP: 8, TEST_GROUP_COUNT: 10, PYTEST_PAR: 3}
- {CFG: 17, VALGRIND: 1, TEST_GROUP: 9, TEST_GROUP_COUNT: 10, PYTEST_PAR: 3}
- {CFG: 18, VALGRIND: 1, TEST_GROUP: 10, TEST_GROUP_COUNT: 10, PYTEST_PAR: 3}
- CFG: "valgrind-1"
VALGRIND: 1
TEST_GROUP: 1
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
- CFG: "valgrind-2"
VALGRIND: 1
TEST_GROUP: 2
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
- CFG: "valgrind-3"
VALGRIND: 1
TEST_GROUP: 3
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
- CFG: "valgrind-4"
VALGRIND: 1
TEST_GROUP: 4
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
- CFG: "valgrind-5"
VALGRIND: 1
TEST_GROUP: 5
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
- CFG: "valgrind-6"
VALGRIND: 1
TEST_GROUP: 6
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
- CFG: "valgrind-7"
VALGRIND: 1
TEST_GROUP: 7
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
- CFG: "valgrind-8"
VALGRIND: 1
TEST_GROUP: 8
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
- CFG: "valgrind-9"
VALGRIND: 1
TEST_GROUP: 9
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
- CFG: "valgrind-10"
VALGRIND: 1
TEST_GROUP: 10
TEST_GROUP_COUNT: 10
PYTEST_PAR: 3
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
Expand All @@ -222,6 +291,7 @@ jobs:
VALGRIND: ${{ matrix.VALGRIND }}
DEVELOPER: ${{ matrix.DEVELOPER }}
EXPERIMENTAL_FEATURES: ${{ matrix.EXPERIMENTAL_FEATURES }}
EXPERIMENTAL_DUAL_FUND: ${{ matrix.EXPERIMENTAL_DUAL_FUND }}
COMPILER: ${{ matrix.COMPILER }}
ARCH: ${{ matrix.ARCH }}
COMPAT: ${{ matrix.COMPAT }}
Expand Down
66 changes: 48 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CCANDIR := ccan

# Where we keep the BOLT RFCs
BOLTDIR := ../lightning-rfc/
DEFAULT_BOLTVERSION := b201efe0546120c14bf154ce5f4e18da7243fe7a
DEFAULT_BOLTVERSION := 3508e4e85d26240ae7492c3d2e02770cdc360fe9
# Can be overridden on cmdline.
BOLTVERSION := $(DEFAULT_BOLTVERSION)

Expand Down Expand Up @@ -81,6 +81,12 @@ endif
# (method=thread to support xdist)
PYTEST_OPTS := -v -p no:logging $(PYTEST_OPTS)
PYTHONPATH=$(shell pwd)/contrib/pyln-client:$(shell pwd)/contrib/pyln-testing:$(shell pwd)/contrib/pyln-proto/:$(shell pwd)/external/lnprototest:$(shell pwd)/contrib/pyln-spec/bolt1:$(shell pwd)/contrib/pyln-spec/bolt2:$(shell pwd)/contrib/pyln-spec/bolt4:$(shell pwd)/contrib/pyln-spec/bolt7
# Collect generated python files to be excluded from lint checks
PYTHON_GENERATED=

# Options to pass to cppcheck. Mostly used to exclude files that are
# generated with external tools that we don't have control over
CPPCHECK_OPTS=-q --language=c --std=c11 --error-exitcode=1 --suppressions-list=.cppcheck-suppress --inline-suppr

# This is where we add new features as bitcoin adds them.
FEATURES :=
Expand Down Expand Up @@ -252,6 +258,11 @@ endif

default: show-flags all-programs all-test-programs doc-all

ifneq ($(SUPPRESS_GENERATION),1)
FORCE = FORCE
FORCE::
endif

show-flags: config.vars
@$(ECHO) "CC: $(CC) $(CFLAGS) -c -o"
@$(ECHO) "LD: $(LINK.o) $(filter-out %.a,$^) $(LOADLIBES) $(EXTERNAL_LDLIBS) $(LDLIBS) -o"
Expand All @@ -274,32 +285,38 @@ else
EXP :=
endif

# tools/update-mocks.sh does nasty recursive make, must not do this!
ifeq ($(SUPPRESS_GENERATION),1)
SHA256STAMP_CHANGED = false
SHA256STAMP = exit 1
else
# Git doesn't maintain timestamps, so we only regen if sources actually changed:
# We place the SHA inside some generated files so we can tell if they need updating.
# Usage: $(call SHA256STAMP_CHANGED)
SHA256STAMP_CHANGED = [ x"`sed -n 's/.*SHA256STAMP://p' $@ 2>/dev/null`" != x"`cat $(sort $(filter-out FORCE,$^)) | $(SHA256SUM) | cut -c1-64`" ]
# Usage: $(call SHA256STAMP,commentprefix)
SHA256STAMP = echo '$(1) SHA256STAMP:'`cat $(sort $(filter-out FORCE,$^)) | $(SHA256SUM) | cut -c1-64` >> $@
SHA256STAMP_CHANGED = [ x"`sed -n 's/.*SHA256STAMP:\([a-f0-9]*\).*/\1/p' $@ 2>/dev/null`" != x"`cat $(sort $(filter-out FORCE,$^)) | $(SHA256SUM) | cut -c1-64`" ]
# Usage: $(call SHA256STAMP,commentprefix,commentpostfix)
SHA256STAMP = echo "$(1) SHA256STAMP:"`cat $(sort $(filter-out FORCE,$^)) | $(SHA256SUM) | cut -c1-64`"$(2)" >> $@
endif

# generate-wire.py --page [header|impl] hdrfilename wirename < csv > file
%_wiregen.h: %_wire.csv $(WIRE_GEN_DEPS)
@if $(call SHA256STAMP_CHANGED); then if [ "$$NO_PYTHON" = 1 ]; then echo "Error: NO_PYTHON on $@"; exit 1; fi; \
$(call VERBOSE,"wiregen $@",tools/generate-wire.py --page header $($@_args) $@ `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); \
$(call VERBOSE,"wiregen $@",tools/generate-wire.py --page header $($@_args) $@ `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//,)); \
fi

%_wiregen.c: %_wire.csv $(WIRE_GEN_DEPS)
@if $(call SHA256STAMP_CHANGED); then if [ "$$NO_PYTHON" = 1 ]; then echo "Error: NO_PYTHON on $@"; exit 1; fi; \
$(call VERBOSE,"wiregen $@",tools/generate-wire.py --page impl $($@_args) ${@:.c=.h} `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); \
$(call VERBOSE,"wiregen $@",tools/generate-wire.py --page impl $($@_args) ${@:.c=.h} `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//,)); \
fi

%_printgen.h: %_wire.csv $(WIRE_GEN_DEPS)
@if $(call SHA256STAMP_CHANGED); then if [ "$$NO_PYTHON" = 1 ]; then echo "Error: NO_PYTHON on $@"; exit 1; fi; \
$(call VERBOSE,"printgen $@",tools/generate-wire.py -s -P --page header $($@_args) $@ `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); \
$(call VERBOSE,"printgen $@",tools/generate-wire.py -s -P --page header $($@_args) $@ `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//,)); \
fi

%_printgen.c: %_wire.csv $(WIRE_GEN_DEPS)
@if $(call SHA256STAMP_CHANGED); then if [ "$$NO_PYTHON" = 1 ]; then echo "Error: NO_PYTHON on $@"; exit 1; fi; \
$(call VERBOSE,"printgen $@",tools/generate-wire.py -s -P --page impl $($@_args) ${@:.c=.h} `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//)); \
$(call VERBOSE,"printgen $@",tools/generate-wire.py -s -P --page impl $($@_args) ${@:.c=.h} `basename $< .csv | sed 's/_exp_/_/'` < $< > $@ && $(call SHA256STAMP,//,)); \
fi

include external/Makefile
Expand All @@ -320,6 +337,7 @@ include devtools/Makefile
include tools/Makefile
include plugins/Makefile
include tests/plugins/Makefile
include contrib/libhsmd_python/Makefile
ifneq ($(FUZZING),0)
include tests/fuzz/Makefile
endif
Expand Down Expand Up @@ -356,7 +374,7 @@ ALL_OBJS := $(ALL_C_SOURCES:.c=.o)

# We always regen wiregen and printgen files, since SHA256STAMP protects against
# spurious rebuilds.
$(filter %printgen.h %printgen.c %wiregen.h %wiregen.c, $(ALL_C_HEADERS) $(ALL_C_SOURCES)): FORCE
$(filter %printgen.h %printgen.c %wiregen.h %wiregen.c, $(ALL_C_HEADERS) $(ALL_C_SOURCES)): $(FORCE)

ifneq ($(TEST_GROUP_COUNT),)
PYTEST_OPTS += --test-group=$(TEST_GROUP) --test-group-count=$(TEST_GROUP_COUNT)
Expand All @@ -380,10 +398,14 @@ check-protos: $(ALL_PROGRAMS)
ifeq ($(PYTEST),)
@echo "py.test is required to run the protocol tests, please install using 'pip3 install -r requirements.txt', and rerun 'configure'."; false
else
ifeq ($(DEVELOPER),1)
@(cd external/lnprototest && PYTHONPATH=$(PYTHONPATH) LIGHTNING_SRC=../.. $(PYTEST) --runner lnprototest.clightning.Runner $(PYTEST_OPTS))
else
@echo "lnprototest target requires DEVELOPER=1, skipping"
endif
endif

pytest: $(ALL_PROGRAMS)
pytest: $(ALL_PROGRAMS) $(ALL_TEST_PROGRAMS)
ifeq ($(PYTEST),)
@echo "py.test is required to run the integration tests, please install using 'pip3 install -r requirements.txt', and rerun 'configure'."
exit 1
Expand Down Expand Up @@ -454,7 +476,7 @@ check-python-flake8:
@# E501 line too long (N > 79 characters)
@# E731 do not assign a lambda expression, use a def
@# W503: line break before binary operator
@flake8 --ignore=E501,E731,W503 ${PYSRC}
@flake8 --ignore=E501,E731,W503 --exclude $(shell echo ${PYTHON_GENERATED} | sed 's/ \+/,/g') ${PYSRC}

check-pytest-pyln-proto:
PATH=$(PYLN_PATH) PYTHONPATH=$(PYTHONPATH) $(PYTEST) contrib/pyln-proto/tests/
Expand All @@ -464,10 +486,10 @@ check-includes: check-src-includes check-hdr-includes

# cppcheck gets confused by list_for_each(head, i, list): thinks i is uninit.
.cppcheck-suppress:
@git ls-files -- "*.c" "*.h" | grep -vE '^ccan/' | xargs grep -n '_for_each' | sed 's/\([^:]*:.*\):.*/uninitvar:\1/' > $@
@git ls-files -- "*.c" "*.h" | grep -vE '^(ccan|contrib)/' | xargs grep -n '_for_each' | sed 's/\([^:]*:.*\):.*/uninitvar:\1/' > $@

check-cppcheck: .cppcheck-suppress
@trap 'rm -f .cppcheck-suppress' 0; git ls-files -- "*.c" "*.h" | grep -vE '^ccan/' | xargs cppcheck -q --language=c --std=c11 --error-exitcode=1 --suppressions-list=.cppcheck-suppress --inline-suppr
@trap 'rm -f .cppcheck-suppress' 0; git ls-files -- "*.c" "*.h" | grep -vE '^ccan/' | xargs cppcheck ${CPPCHECK_OPTS}

check-shellcheck:
@git ls-files -- "*.sh" | xargs shellcheck
Expand All @@ -479,7 +501,7 @@ check-tmpctx:
@if git grep -n 'tal_free[(]tmpctx)' | grep -Ev '^ccan/|/test/|^common/setup.c:|^common/utils.c:'; then echo "Don't free tmpctx!">&2; exit 1; fi

check-discouraged-functions:
@if git grep -E "[^a-z_/](fgets|fputs|gets|scanf|sprintf)\(" -- "*.c" "*.h" ":(exclude)ccan/"; then exit 1; fi
@if git grep -E "[^a-z_/](fgets|fputs|gets|scanf|sprintf)\(" -- "*.c" "*.h" ":(exclude)ccan/" ":(exclude)contrib/"; then exit 1; fi

# Don't access amount_msat and amount_sat members directly without a good reason
# since it risks overflow.
Expand Down Expand Up @@ -516,17 +538,16 @@ ncc: ${TARGET_DIR}/libwally-core-build/src/libwallycore.la
$(MAKE) CC="ncc -ncgcc -ncld -ncfabs" AR=nccar LD=nccld

# Ignore test/ directories.
TAGS: FORCE
TAGS:
$(RM) TAGS; find * -name test -type d -prune -o -name '*.[ch]' -print -o -name '*.py' -print | xargs etags --append
FORCE::

ccan/ccan/cdump/tools/cdump-enumstr: ccan/ccan/cdump/tools/cdump-enumstr.o $(CDUMP_OBJS) $(CCAN_OBJS)

ALL_PROGRAMS += ccan/ccan/cdump/tools/cdump-enumstr
# Can't add to ALL_OBJS, as that makes a circular dep.
ccan/ccan/cdump/tools/cdump-enumstr.o: $(CCAN_HEADERS) Makefile

version_gen.h: FORCE
version_gen.h: $(FORCE)
@(echo "#define VERSION \"$(VERSION)\"" && echo "#define BUILD_FEATURES \"$(FEATURES)\"") > $@.new
@if cmp $@.new $@ >/dev/null 2>&1; then rm -f $@.new; else mv $@.new $@; $(ECHO) Version updated; fi

Expand Down Expand Up @@ -598,7 +619,16 @@ clean: obsclean
find . -name '*gcno' -delete
find . -name '*.nccout' -delete

update-mocks: $(ALL_GEN_HEADERS)
# These must both be enabled for update-mocks
ifeq ($(DEVELOPER)$(EXPERIMENTAL_FEATURES),11)
update-mocks: $(ALL_TEST_PROGRAMS:%=update-mocks/%.c)
else
update-mocks:
@echo Need DEVELOPER=1 and EXPERIMENTAL_FEATURES=1 to regenerate mocks >&2; exit 1
endif

$(ALL_TEST_PROGRAMS:%=update-mocks/%.c): $(ALL_GEN_HEADERS) $(EXTERNAL_LIBS) $(CCAN_OBJS) ccan/ccan/cdump/tools/cdump-enumstr config.vars

update-mocks/%: %
@MAKE=$(MAKE) tools/update-mocks.sh "$*" $(SUPPRESS_OUTPUT)

Expand Down
Loading