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

[WIP] grs use wally sha256 and warp to v.0.7.1 #16

Merged
merged 640 commits into from Jul 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
640 commits
Select commit Hold shift + click to select a range
db57d9c
lightningd: suppress IO_OUT logging for getlog command
SimonVrouwe May 23, 2019
b261c5b
chaintopology: add REORG to logline when tx watch is fired after reorg
SimonVrouwe Mar 21, 2019
eb3495c
chaintopology: add log line when we remove stale block from topo->tip
SimonVrouwe Mar 24, 2019
245807a
pytest: tighten a log test `Owning output...` with address type and c…
SimonVrouwe Mar 18, 2019
24f43e5
pytest: fundwallet tighten up, make sure we see `CONFIRMED` in log line
SimonVrouwe Mar 25, 2019
7726681
pytest: added BitcoinD.simple_reorg() method, which can change tx hei…
SimonVrouwe Mar 26, 2019
8c1bbf3
lightningd: funding_lockin_cb, handle reorgs that change short_channe…
SimonVrouwe Apr 30, 2019
54a67c2
channeld: rephrase depth_togo line in billboard_update
SimonVrouwe May 3, 2019
5b0c174
pytest: add test_funding_reorg_private, reorg changes funding height
SimonVrouwe Mar 26, 2019
52c84b2
pytest: add test_funding_reorg_remote_lags
SimonVrouwe May 3, 2019
22600fa
manually added a list-forward manpage because I have no idea how a2x …
renepickhardt Jan 11, 2019
b41d529
DB: Store the remote channel announcement signatures into DB
May 15, 2019
a645fbd
run-wallet: Add the check of case that channel received ann_sigs
May 1, 2019
d93f614
Channeld: Add new wire type:channel_got_announcement
Apr 25, 2019
1141243
Channeld: init channel with remote announcement info when restart
May 14, 2019
37440e9
lightningd/subd.c: Return NULL from subd_shutdown.
ZmnSCPxj May 30, 2019
3466261
lightningd/channel.c: Transfer peer to connectd only if connectd alive.
ZmnSCPxj May 30, 2019
883d4b4
pytest: Add a test that reproduces #2687
cdecker May 31, 2019
48df6c8
lightningd/io_loop_with_timers.c: Move mainloop to its own source fil…
ZmnSCPxj May 30, 2019
8f9c482
plugins: do I/O logging.
rustyrussell May 31, 2019
695bec5
plugin: fix printing of bad plugin responses.
rustyrussell May 31, 2019
0c189fe
devtools/decode-iolog: tool to decode hexstrings from io logging.
rustyrussell May 31, 2019
323adb4
jsonrpc: Add a category field to commands.
darosior May 22, 2019
5b0bf0b
jsonrpc: allow to set the command category plugin side
darosior May 22, 2019
9d34121
libplugin.c: Handle command categories then set them in pay and autoc…
darosior May 22, 2019
b1bbafb
cli: Sort human_readable output by categories
darosior May 23, 2019
78326a8
Pylightning: Allow a plugin to set the category of the RPC commands i…
darosior May 27, 2019
fba050e
CHANGELOG: Add some informations about the new category field in comm…
darosior May 27, 2019
a6753fd
Plugins: accept options of different types
darosior May 25, 2019
3775a32
Pylightning: allow to specify the option type at its creation
darosior May 25, 2019
4640d18
Plugins: allow to specify plugin option type in libplugin.c, then spe…
darosior May 26, 2019
3f035cb
gossipd: fix uninitialized free on short_route in goto path
jb55 May 24, 2019
6f635b4
gossipstore: fix uninitialized input fd
jb55 May 24, 2019
fae593c
lightningd: fix uninitialized variable in DEVELOPER path
rustyrussell May 25, 2019
c091a4e
gossipd: fix spurious gcc warning.
rustyrussell May 25, 2019
9820d06
connectd: handle IPv6 correctly.
rustyrussell May 26, 2019
c233fc5
gossipd: fix spurious unused error with gcc-9 -O3.
rustyrussell May 26, 2019
5b7776c
wire/test: remove unused padding code.
rustyrussell May 26, 2019
ed08ca6
configure: handle --reconfigure better.
rustyrussell May 25, 2019
7092d21
configure: detect modern gcc, and only suppress necessary errors.
rustyrussell May 25, 2019
7961a81
travis: add compilation to SOURCE_CHECK_ONLY.
rustyrussell May 25, 2019
107381a
test: fix flakyness of funding_reorg_private openchannel_hook
m-schmoock May 31, 2019
45645e3
test: fix flakyness test_no_fee_estimate
m-schmoock May 31, 2019
a40fe40
pytest: catch more gossip-related errors.
rustyrussell May 28, 2019
1147e65
pytest: make test_gossip_notices_close more reliable.
rustyrussell May 28, 2019
048a650
pytest: more comprehensive tests for test_gossip_store_compact.
rustyrussell May 29, 2019
21fe518
gossip_store: fix 'bad node_announcement' by allowing node_announceme…
rustyrussell May 29, 2019
763697e
gossipd: fix gossip_store calling delete.
rustyrussell May 29, 2019
80b3d8a
json: Add some more methods to add integers of various size to json
cdecker May 29, 2019
9a4cf7d
pytest: Mark test_option_upfront_shutdown_script as flaky
cdecker May 21, 2019
7499f7d
plugin: Add the htlc_accepted hook
cdecker Jan 3, 2019
b545770
pytest: Add a simple test for the hooks
cdecker Jan 3, 2019
bf53821
plugin: Populate the request for the htlc_accepted hook
cdecker Jan 9, 2019
2b81e02
plugin: Parse response for htlc_accepted hook
cdecker Jan 9, 2019
9fd8be6
pytest: Add tests for htlc_accepted_hook
cdecker Jan 11, 2019
1561ffa
hooks: Add cltv_expiry_delta to the htlc_accepted hook
cdecker Feb 21, 2019
adb984d
hooks: Add the raw payload to the htlc_accepted call
cdecker Feb 21, 2019
f7bfe16
startup: Reorder HTLC wiring on startup after the topology init
cdecker May 21, 2019
909913c
htlc: Replay unprocessed HTLCs loaded from the DB
cdecker May 21, 2019
6db1e76
startup: Tell peer_accepted_htlc whether we are replaying
cdecker May 21, 2019
dd26a01
pytest: Add a test for htlc_accepted hook replay on startup
cdecker May 21, 2019
2db4f19
plugin: Cleanup the htlc_accepted_hook_deserialize interface
cdecker May 30, 2019
a57fdf2
plugin: Added CHANGELOG entry and docs for the htlc_accepted hook
cdecker May 30, 2019
180a552
gossip_store: mark private updates separately from normal ones.
rustyrussell Jun 3, 2019
0fc97ed
devtools/dump-gossipstore: print offsets.
rustyrussell Jun 3, 2019
43f2cbd
gossipd: track gossip_store locations of local channels.
rustyrussell Jun 3, 2019
696dc6b
gossipd: disable gossip_store upgrade.
rustyrussell Jun 3, 2019
df00f20
gossipd: erase old entries from the store, don't just append.
rustyrussell Jun 3, 2019
f1b4b14
channeld: don't queue gossip msgs while waiting for foreign_channel_u…
rustyrussell Jun 3, 2019
38d2899
common/per_per_state: generalize lightningd/peer_comm Part 1
rustyrussell Jun 3, 2019
a5f6ef3
gossipd: don't wrap messages when we send them to the peer.
rustyrussell Jun 3, 2019
4399faf
gossipd: make writes to gossip_store atomic.
rustyrussell Jun 3, 2019
a40f45a
connectd: generate message for lightningd inside peer_connected().
rustyrussell Jun 3, 2019
5591c0b
gossipd: don't send gossip stream, let per-peer daemons read it thems…
rustyrussell Jun 3, 2019
bad9734
gossip_store: remove redundant copy_message.
rustyrussell Jun 3, 2019
948490e
gossipd: add timestamp in gossip store header.
rustyrussell Jun 3, 2019
2abae05
devtools/create-gossipstore: write timestamps to the gossip_store.
rustyrussell Jun 3, 2019
728bb4e
common/gossip_store: handle timestamp filtering.
rustyrussell Jun 3, 2019
5161b79
gossipd/gossip_store: keep count of deleted entries, don't use bs->co…
rustyrussell Jun 3, 2019
dd83453
gossipd/gossip_store: fix compacting, don't use broadcast ordering.
rustyrussell Jun 3, 2019
3e733af
gossipd: remove broadcast map altogether.
rustyrussell Jun 3, 2019
34c113a
gossipd: trivial clean up of routing_add_channel_update.
rustyrussell Jun 3, 2019
f8b98e0
gossipd: Don't abort() on duplicate entries in gossip_store.
rustyrussell Jun 3, 2019
628b65f
gossip_store: don't leave dangling channel_announce if we truncate.
rustyrussell Jun 3, 2019
e902d9a
cli/lightning-cli: free eveything on exit.
rustyrussell Jun 3, 2019
ba036b7
newaddr: fix return value for deprecated "address" field.
rustyrussell Jun 5, 2019
dd87024
test: adds wait mempool param to generate_block
m-schmoock Jun 4, 2019
c40250a
test: adds wait mempool to flaky tests
m-schmoock Jun 4, 2019
a4a1938
json: add a param parser for a txid
niftynei Jun 5, 2019
09d9abf
bitcoin/tx: script arg should be const.
rustyrussell Jun 5, 2019
92da5ef
common/withdraw_tx: tell caller where we put the change output.
rustyrussell Jun 5, 2019
aa21eea
bip32_pubkey: use more widely, don't open-code.
rustyrussell Jun 5, 2019
7e02fbe
lightningd: add json_add_tx helper.
rustyrussell Jun 5, 2019
663315c
wallet: make withdraw parsing more strict.
rustyrussell Jun 5, 2019
3b91a6f
wtx_select_utxos: use wallet_tx as our allocation context for utxos.
rustyrussell Jun 5, 2019
0543149
pytest: move wallet tests into new file tests/test_wallet.py
rustyrussell Jun 5, 2019
ffa8463
common/utxo: don't memleak script.
rustyrussell Jun 5, 2019
1a3886c
wallet: keep a list of unreleased transactions.
rustyrussell Jun 5, 2019
985048e
wallet: new commands 'txprepare', 'txsend' and 'txdiscard'.
rustyrussell Jun 5, 2019
403b861
pylightning: interfaces for txprepare/txsend/txdiscard.
rustyrussell Jun 5, 2019
cdab75e
pytest: test txprepare/txdiscard/txsend.
rustyrussell Jun 5, 2019
65505ad
pytest: test that we unreserve txprepare inputs across shutdown/crash.
rustyrussell Jun 5, 2019
e1dbc0b
wallet: clean reserved inputs on startup.
rustyrussell Jun 5, 2019
bbedd38
plugins/pay.c: add curly braces arround JSON data field
SimonVrouwe Jun 4, 2019
aaf41ad
Travis: set all vars inside build.sh, and increase parallelism for DE…
rustyrussell Jun 6, 2019
231703c
plugin: Add new notification type: warning
Jun 3, 2019
96135da
log: add 'warning' notification when log
Jun 6, 2019
4d08ed2
pytest: Add a test for the 'warning' subscription and notification
Jun 4, 2019
1ca0eef
doc: Add the description for 'warning' notification and add a CHANGEL…
Jun 5, 2019
a3b646b
pytest: fix test_hlcs_cltv_only_difference
rustyrussell Jun 4, 2019
a9dd690
lightningd/channel_control: fix reached_announce_depth counting in pe…
SimonVrouwe Jun 3, 2019
b1058df
pytest: add test_reconnect_remote_sends_no_sigs, which tests PR2619
SimonVrouwe Jun 3, 2019
ea8a508
pytest: cleanup test_funding_reorg_remote_lags
SimonVrouwe Jun 3, 2019
44d64c1
lightningd/channel_control logline fixup
SimonVrouwe Jun 3, 2019
54b66f0
configure: fix --reconfigure, improve style, set defaults in one place.
rustyrussell Jun 6, 2019
d65946a
CHANGELOG: Fix typo in @cdecker's name.
rustyrussell Jun 4, 2019
0e7b26d
devtools/credit: script to highlight contributions for this commit.
rustyrussell Jun 4, 2019
ec2ced1
txfilter: Migrate the list of owned scriptPubKeys into a hashset
cdecker Jun 6, 2019
9e98d01
feat: pass htlc amount exceeded to exception
m-schmoock May 30, 2019
1e2291c
db: Add channel_id and type to the transactions table
cdecker May 23, 2019
ad4b920
wallet: Add function to annotate transactions aposteriori
cdecker May 23, 2019
4c57d44
channel: Along with the last_tx also remember its type
cdecker May 28, 2019
771ff1f
chaintopology: Annotate transactions as deposits if we owned outputs
cdecker May 23, 2019
04c255f
wallet: Store and annotate withdrawals in the DB
cdecker May 23, 2019
7f898aa
wallet: Annotate funding transaction in the database
cdecker May 23, 2019
05dbf1a
onchaind: Store and annotate close transaction when we drop to chain
cdecker May 24, 2019
ae0bc4a
onchaind: Store and annotate transactions we broadcast ourselves
cdecker May 27, 2019
a54b7da
onchaind: Allow onchaind to annotate transactions we watch
cdecker May 27, 2019
94e024a
onchaind: Have onchaind annotate htlc-{succes,failure} and penalties
cdecker May 27, 2019
49a0de7
onchaind: Annotate their sweep transactions
cdecker May 27, 2019
61a28cc
openingd: Annotate our own funding transaction
cdecker May 27, 2019
605358f
onchaind: Have onchaind annotate unilateral, cheat and mutual closes
cdecker May 28, 2019
6efb1c0
wallet: Add function to retrieve transactions from the wallet
cdecker May 28, 2019
3c777fa
json-rpc: Add `listtransactions` RPC method
cdecker May 28, 2019
b6b548a
wallet: Rip out the txtypes type in favor of enum wallet_tx_type
cdecker Jun 7, 2019
d344f9d
pytest: test for duplicate update_fee spam.
rustyrussell Jun 8, 2019
6f015b6
channeld: don't send feerate spam if we can't set it as high as we want.
rustyrussell Jun 8, 2019
c91483f
json: Add wrapper to add a secret to a JSON result
cdecker Jun 8, 2019
9e511cb
plugin: Use the json_add_secret wrapper to add the shared_secret
cdecker Jun 8, 2019
42d6bf5
test: fix flaky test_gossip_notices_close with wait_for_mempool
m-schmoock Jun 9, 2019
db0a285
gossip: bump version to remove lingering issues with master.
rustyrussell Jun 8, 2019
4a242ed
test: drains a channel to crash the daemon
m-schmoock May 29, 2019
b48c644
listchannels: add `htlc_minimum_msat` and `htlc_maximum_msat` fields.
rustyrussell May 31, 2019
380c044
tests: add plugin for simple invoice delay.
rustyrussell May 31, 2019
409368e
pytest: move test_channel_drainage to test_pay.py
rustyrussell May 31, 2019
7b7d46c
pytest: extract separate tests that spendable_msat is accurate.
rustyrussell May 31, 2019
e7778a0
channeld: extract HTLC trim logic into common.
rustyrussell May 31, 2019
ad24d94
lightningd: make 'spendable_msatoshi' more realistic.
rustyrussell May 31, 2019
ab31f40
gossipd: don't charge ourselves fees when calculating route.
rustyrussell May 31, 2019
bb6c34f
lightningd: take into account outstanding HTLCs for 'spendable_msat'
rustyrussell May 31, 2019
0448608
lightningd: don't let spendable_msat go wumbo.
rustyrussell May 31, 2019
431401a
channeld: don't subtract both reserves from advertized htlc_max.
rustyrussell May 31, 2019
1275928
channeld: don't add HTLCs if that would drive us negative.
rustyrussell May 31, 2019
db22d2b
pytest: simplify and annotate test_channel_drainage.
rustyrussell May 31, 2019
ca4b07c
json: add a helper to split a json token given a specific character
darosior Jun 11, 2019
ac038b3
fundchannel: Add a new 'utxo' parameter
darosior Jun 11, 2019
1b29b06
fundchannel: Update the manpage and Pylightning's method
darosior Jun 8, 2019
2436214
fundchannel: Add some tests to fund channels by utxos
darosior Jun 8, 2019
7ce4fcd
Added a CHANGELOG brag line about 'fundchannel' accepting an utxo list
darosior Jun 3, 2019
0d2a483
ccan: update to faster and correct crc32c implementation.
rustyrussell Jun 11, 2019
21c920a
gossipd: note if loaded store seems reasonably up-to-date.
rustyrussell Jun 11, 2019
5ef7aa7
gossipd: prepare for internally-generated short-channel-id queries.
rustyrussell Jun 11, 2019
18069ab
gossipd: APIs return more information about routing message handling.
rustyrussell Jun 11, 2019
b905376
gossipd: query unknown short_channel_ids, note if they were really mi…
rustyrussell Jun 11, 2019
f5ea57d
gossipd: reset gossip_missing if no reports for 10 minutes.
rustyrussell Jun 11, 2019
6830233
gossipd: control gossip level so we don't get flooded by peers.
rustyrussell Jun 11, 2019
1e32b4a
gossipd: adjust gossip filters if we discover we're missing gossip.
rustyrussell Jun 11, 2019
260febd
plugins/pay: fix attempt counter on failure message.
rustyrussell Jun 12, 2019
26cdf9d
plugins/pay: don't retry routehint if it contains already-eliminated …
rustyrussell Jun 12, 2019
220449e
ccan: import ccan/json_out and ccan/json_escape.
rustyrussell Jun 12, 2019
c77e29c
libplugin: use json_out internally.
rustyrussell Jun 12, 2019
c585f22
libplugin: update API to use json_out.
rustyrussell Jun 12, 2019
0e336ac
plugins/pay: use proper JSON construction for failure paths.
rustyrussell Jun 12, 2019
bb7bbd0
lightningd: have json_stream_success start the "result" object.
rustyrussell Jun 12, 2019
adc4bf1
pylightning: remove 0.6.2 JSON compat wedge.
rustyrussell Jun 12, 2019
7f75043
lightningd: tighten interal json_stream API.
rustyrussell Jun 12, 2019
d817735
lightningd: use ccan/json_out.
rustyrussell Jun 12, 2019
c6ec944
jsonrpc: don't return "stop" until we actually have freed resources.
rustyrussell Jun 12, 2019
5a520f4
plugin: don't call notification after free.
rustyrussell Jun 12, 2019
a9d0550
common: pull out scriptPubkey address method
niftynei May 22, 2019
eb0b3d7
json: correct error message for param parser
niftynei May 25, 2019
1b2a593
tests: default all addresses to bech32
niftynei May 31, 2019
846bc9c
openingd: allow funding_failed to complete successfully
niftynei May 31, 2019
8103acd
opening: add entry point for `funding_start rpc command
niftynei May 21, 2019
685aa47
openingd: pull out setup funder checks into separate method
niftynei May 22, 2019
5920e65
opening: wire up walking through open channel up thru accept
niftynei May 22, 2019
23e7846
pylightning: add fundchannel_start
niftynei May 22, 2019
6e5928a
openingd: update billboard with funding info
niftynei May 23, 2019
52042bd
opening: stash amount outside of the wtx
niftynei May 24, 2019
dd11d3b
lightningd: add start for fundchannel_continue
niftynei May 25, 2019
b0b813a
test: add initial tests for starting an external fundchannel
niftynei May 22, 2019
7ea21c3
fundchannel: add txout field to RPC/API
niftynei May 31, 2019
8a60caa
funding: add a 'inflight' marker
niftynei May 31, 2019
478762d
funding: wire up funding_continue
niftynei May 31, 2019
5aad642
opening: add fundchannel_cancel command
niftynei May 31, 2019
3ae78a6
tests: finish up test for external funding flow
niftynei May 31, 2019
c00e0d2
funding: rename fundchannel_continue -> _complete
niftynei Jun 5, 2019
388f31a
funding: update CHANGELOG with new RPC calls
niftynei Jun 5, 2019
c0475d0
doc: add manpages for fundchannel_[start,complete,cancel]
niftynei Jun 5, 2019
4c118bc
openingd: fix compile error caused by merge.
rustyrussell Jun 12, 2019
e9ff8e4
openingd_control: fix merge error with json_stream_success.
rustyrussell Jun 12, 2019
67eb26c
lightningd: fix bogus channel iteration on setchannelfee
rustyrussell Jun 12, 2019
745634d
gossipd: don't catch pending node_announcements more than once.
rustyrussell Jun 13, 2019
bbbe2f5
CHANGELOG.md: reorder with most impactful changes at top.
rustyrussell Jun 12, 2019
ea1c52f
CHANGELOG: Unreleased -> rc1
rustyrussell Jun 12, 2019
12a523f
pytest: add (xfail) test for store load miscount.
rustyrussell Jun 14, 2019
eb5cc47
gossipd: count deleted records correctly when loading gossip_store.
rustyrussell Jun 14, 2019
24cc371
gossipd: gossip_store errors after rewrite are fatal.
rustyrussell Jun 14, 2019
57405d7
CHANGELOG.md: v0.7.1rc2
rustyrussell Jun 14, 2019
8edf55b
doc: Correct preimage field name in pay return value
darosior Jun 14, 2019
909f22f
pytest: gossip_store test for node_announcement before update.
rustyrussell Jun 14, 2019
a35ab51
pytest: gossip_store test for channel_amount truncated.
rustyrussell Jun 14, 2019
adc52b6
pytest: add test for dangling channel_announcement/node_announcement …
rustyrussell Jun 14, 2019
10c503b
gossip_store: clean up a truncated store.
rustyrussell Jun 14, 2019
5e3690b
gossipd: delete channel_amount from the store when we delete channel_…
rustyrussell Jun 14, 2019
da676ba
plugins doc: remove the 'only string options' warning
darosior Jun 16, 2019
841fba7
lightningd: restore ' ' before '}' for older pylightning.
rustyrussell Jun 17, 2019
77018e6
CHANGELOG.md: note the db_write hook and listtransactions command.
rustyrussell Jun 17, 2019
92bd3a3
connect test: use wait_for_log in test_funding_external_wallet
niftynei Jun 17, 2019
47b5f2e
gossipd: truncate gossip_store.tmp for compaction.
rustyrussell Jun 20, 2019
711762e
bitcoin/tx: separate assertions.
rustyrussell Jun 21, 2019
f1b5706
bitcoin/tx: use fromwire_fail in pull_bitcoin_tx.
rustyrussell Jun 21, 2019
adcb664
common/gossip_store: handle short reads.
rustyrussell Jun 13, 2019
9bf0467
pytest: fix test_gossip_store_load_no_channel_update
rustyrussell Jun 20, 2019
fc27250
gossipd: be more verbose and less assert()ive on bad node_announcement.
rustyrussell Jun 20, 2019
8ce3b86
gossipd: tighter correctness checks during gossip_store load.
rustyrussell Jun 20, 2019
8928f0b
gossipd: remove gossip entirely if we hit a problem on load.
rustyrussell Jun 20, 2019
c15d9ed
gossip_store: make copy of corrupt gossip_store on failure.
rustyrussell Jun 20, 2019
c303d7d
gossipd: only do (automatic) store compaction at startup.
rustyrussell Jun 22, 2019
86b5b84
bugfix: Proper json for listtransactions' response
jtimon Jun 22, 2019
83f2ccd
pylightning: Add new listtransactions command
jtimon Jun 22, 2019
ee587af
json-rpc: Disable `listtransactions` for the 0.7.1 release
cdecker Jun 23, 2019
c1328b3
CHANGELOG.md: v0.7.1rc3
rustyrussell Jun 23, 2019
960bfb8
lightningd: don't crash on old zero-output commitment_txs.
rustyrussell Jun 26, 2019
a450962
channeld/lightningd/hsmd: strengthen our checks against 0-output txs.
rustyrussell Jun 27, 2019
707ce4c
0.7.1rc4
rustyrussell Jun 27, 2019
f1bea55
lightningd: fix occasional missing txid detection.
rustyrussell Jun 28, 2019
fc6de94
v0.7.1rc5.
rustyrussell Jun 28, 2019
43d5492
v0.7.1
rustyrussell Jun 29, 2019
32e0c2c
Merge branch 'master' of https://github.com/dflatemaster/lightning
Jul 13, 2019
9ef7580
grs to wally-grs
Jul 13, 2019
904cce2
Signed-off-by: dflate <dflate@noreply.com>
Jul 13, 2019
56f4146
grs patch wally
Jul 13, 2019
412f9e8
legacy grs-address check
Jul 13, 2019
bc06214
allow static tor address to bind to unannounced hidden local address
Jul 13, 2019
b8a9973
fixup after merge to grs values for base58 addr prefix
Jul 14, 2019
18978eb
use in base58 to grs prefix 28
Jul 14, 2019
cf9aec8
use chainparams for base58
Jul 14, 2019
caa65d6
eclair <--> grs-c-lightning compat-mode
Jul 16, 2019
222e84f
use pure groestlhash for double_sha256
Jul 17, 2019
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ tools/headerversions
contrib/pylightning/build/
contrib/pylightning/dist/
contrib/pylightning/pylightning.egg-info/

devtools/create-gossipstore
contrib/compose/groestlcoin_datadir/
contrib/compose/clightning_groestlcoin_datadir/
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "daemon/jsmn"]
path = external/jsmn
url = https://github.com/zserge/jsmn
[submodule "bitcoin/libbase58"]
path = external/libbase58
url = https://github.com/bitcoin/libbase58.git
[submodule "libsodium"]
path = external/libsodium
url = https://github.com/jedisct1/libsodium.git
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ addons:
- gcc-4.8

env:
- ARCH=64 SOURCE_CHECK_ONLY=true CDEBUGFLAGS="-std=gnu11 -g -fstack-protector -O3 -flto" LDFLAGS="-O3 -flto"
- ARCH=64 SOURCE_CHECK_ONLY=true COPTFLAGS="-O3"
# - VALGRIND=0 ARCH=32 DEVELOPER=1 COMPILER=gcc TEST_GROUP=1 TEST_GROUP_COUNT=2 SOURCE_CHECK_ONLY=false
# - VALGRIND=0 ARCH=32 DEVELOPER=1 COMPILER=gcc TEST_GROUP=2 TEST_GROUP_COUNT=2 SOURCE_CHECK_ONLY=false
- VALGRIND=0 ARCH=64 DEVELOPER=1 COMPILER=gcc SOURCE_CHECK_ONLY=false
Expand Down
9 changes: 9 additions & 0 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ export DEVELOPER=${DEVELOPER:-1}
export SOURCE_CHECK_ONLY=${SOURCE_CHECK_ONLY:-"false"}
export COMPAT=${COMPAT:-1}
export PATH=$CWD/dependencies/bin:"$HOME"/.local/bin:"$PATH"
export TIMEOUT=180
export PYTEST_PAR=2
# If we're not in developer mode, tests spend a lot of time waiting for gossip!
if [ "$DEVELOPER" = 0 ]; then
PYTEST_PAR=4
fi

mkdir -p dependencies/bin || true

Expand Down Expand Up @@ -40,5 +46,8 @@ if [ "$SOURCE_CHECK_ONLY" == "false" ]; then
echo -en 'travis_fold:end:script.3\\r'
else
git clone https://github.com/lightningnetwork/lightning-rfc.git
echo -en 'travis_fold:start:script.2\\r'
make -j3 > /dev/null
echo -en 'travis_fold:end:script.2\\r'
make check-source BOLTDIR=lightning-rfc
fi
73 changes: 71 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,71 @@ 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.7.1] - 2019-06-29: "The Unfailing Twitter Consensus Algorithm"

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

### Added

- Protocol: we now enforce `option_upfront_shutdown_script` if a peer negotiates it.
- JSON API: New command `setchannelfee` sets channel specific routing fees.
- JSON API: new withdraw methods `txprepare`, `txsend` and `txdiscard`.
- JSON API: add three new RPC commands: `fundchannel_start`, `fundchannel_complete` and `fundchannel_cancel`. Allows a user to initiate and complete a channel open using funds that are in a external wallet.
- Plugin: new hooks `db_write` for intercepting database writes, `invoice_payment` for intercepting invoices before they're paid, `openchannel` for intercepting channel opens, and `htlc_accepted` to decide whether to resolve, reject or continue an incoming or forwarded payment..
- Plugin: new notification `warning` to report any `LOG_UNUSUAL`/`LOG_BROKEN` level event.
- Plugin: Added a default plugin directory : `lightning_dir/plugins`. Each plugin directory it contains will be added to lightningd on startup.
- Plugin: the `connected` hook can now send an `error_message` to the rejected peer.
- JSON API: `newaddr` outputs `bech32` or `p2sh-segwit`, or both with new `all` parameter (#2390)
- JSON API: `listpeers` status now shows how many confirmations until channel is open (#2405)
- Config: Adds parameter `min-capacity-sat` to reject tiny channels.
- JSON API: `listforwards` now includes the time an HTLC was received and when it was resolved. Both are expressed as UNIX timestamps to facilitate parsing (Issue [#2491](https://github.com/ElementsProject/lightning/issues/2491), PR [#2528](https://github.com/ElementsProject/lightning/pull/2528))
- JSON API: `listforwards` now includes the local_failed forwards with failcode (Issue [#2435](https://github.com/ElementsProject/lightning/issues/2435), PR [#2524](https://github.com/ElementsProject/lightning/pull/2524))
- DB: Store the signatures of channel announcement sent from remote peer into DB, and init channel with signatures from DB directly when reenable the channel.
(Issue [#2409](https://github.com/ElementsProject/lightning/issues/2409))
- JSON API: `listchannels` has new fields `htlc_minimum_msat` and `htlc_maximum_msat`.

### Changed

- Gossip: we no longer compact the `gossip_store` file dynamically, due to lingering bugs. Restart if it gets too large.
- Protocol: no longer ask for entire gossip flood from peers, unless we're missing gossip.
- JSON API: `invoice` expiry defaults to 7 days, and can have s/m/h/d/w suffixes.
- Config: Increased default amount for minimal channel capacity from 1k sat to 10k sat.
- JSON API: A new parameter is added to `fundchannel`, which now accepts an utxo array to use to fund the channel.
- Build: Non-developer builds are now done with "-Og" optimization.
- JSON API: `pay` will no longer return failure until it is no longer retrying; previously it could "timeout" but still make the payment.
- JSON API: the command objects that `help` outputs now contain a new string field : `category` (can be "bitcoin", "channels", "network", "payment", "plugins", "utility", "developer" for native commands, or any other new category set by a plugin).
- Plugin: a plugin can now set the category of a newly created RPC command. This possibility has been added to libplugin.c and pylightning.
- lightning-cli: the human readable help is now more human and more readable : commands are sorted alphabetically and ordered by categories.

### Deprecated

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

- JSON API: `newaddr` output field `address`: use `bech32` or `p2sh-segwit` instead.

### Removed

- JSON RPC: `global_features` and `local_features` fields and `listchannels`' `flags` field. (Deprecated since 0.6.2).
- pylightning: Remove RPC support for c-lightning before 0.6.3.

### Fixed

- Protocol: reconnection during closing negotiation now supports
`option_data_loss_protect` properly.
- `--bind-addr=<path>` fixed for nodes using local sockets (eg. testing).
- Unannounced local channels were forgotten for routing on restart until reconnection occurred.
- lightning-cli: arguments containing `"` now succeed, rather than causing JSON errors.
- Protocol: handle lnd sending more messages before `reestablish`; don't fail channel, and handle older lnd's spurious empty commitments.
- Fixed `fundchannel` crash when we have many UTXOs and we skip unconfirmed ones.
- lightningd: fixed occasional hang on `connect` when peer had sent error.
- JSON RPC: `decodeinvoice` and `pay` now handle unknown invoice fields properly.
- JSON API: `waitsendpay` (PAY_STOPPED_RETRYING) error handler now returns valid JSON
- protocol: don't send multiple identical feerate changes if we want the feerate higher than we can afford.
- JSON API: `stop` now only returns once lightningd has released all resources.

### Security

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

This release named by Mark Beckwith @wythe.
Expand Down Expand Up @@ -79,6 +144,9 @@ provide appropriate suffixes for JSON input fields.
- You can no longer make giant unpayable "wumbo" invoices.
- CLTV of total route now correctly evaluated when finding best route.
- `riskfactor` arguments to `pay` and `getroute` now have an effect.
- Fixed the version of bip32 private_key to BIP32_VER_MAIN_PRIVATE: we used
BIP32_VER_MAIN_PRIVATE for bitcoin/litecoin mainnet, and BIP32_VER_TEST_PRIVATE
for others. (PR #2436)

### Security

Expand Down Expand Up @@ -307,12 +375,13 @@ There predate the BOLT specifications, and are only of vague historic interest:
1. [0.1] - 2015-08-08: "MtGox's Cold Wallet" (named by Rusty Russell)
2. [0.2] - 2016-01-22: "Butterfly Labs' Timely Delivery" (named by Anthony Towns)
3. [0.3] - 2016-05-25: "Nakamoto's Genesis Coins" (named by Braydon Fuller)
4. [0.4] - 2016-08-19: "Wright's Cryptographic Proof" (named by Chrstian Decker)
4. [0.4] - 2016-08-19: "Wright's Cryptographic Proof" (named by Christian Decker)
5. [0.5] - 2016-10-19: "Bitcoin Savings & Trust Daily Interest" (named by Glenn Willen)
6. [0.5.1] - 2016-10-21
7. [0.5.2] - 2016-11-21: "Bitcoin Savings & Trust Daily Interest II"

[0.7.0]: https://github.com/ElementsProject/lightning/compare/v0.6.3...HEAD
[0.7.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.7.1
[0.7.0]: https://github.com/ElementsProject/lightning/releases/tag/v0.7.0
[0.6.3]: https://github.com/ElementsProject/lightning/releases/tag/v0.6.3
[0.6.2]: https://github.com/ElementsProject/lightning/releases/tag/v0.6.2
[0.6.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.6.1
Expand Down
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN git clone --recursive /tmp/lightning . && \
git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD)

ARG DEVELOPER=0
RUN ./configure && make -j3 DEVELOPER=${DEVELOPER} && cp lightningd/lightning* cli/lightning-cli /usr/bin/
RUN ./configure --prefix=/tmp/lightning_install && make -j3 DEVELOPER=${DEVELOPER} && make install

FROM debian:stretch-slim

Expand All @@ -52,12 +52,9 @@ RUN mkdir $LIGHTNINGD_DATA && \
touch $LIGHTNINGD_DATA/config

VOLUME [ "/root/.lightning" ]

COPY --from=builder /opt/lightningd/cli/lightning-cli /usr/bin
COPY --from=builder /opt/lightningd/lightningd/lightning* /usr/bin/
COPY --from=builder /opt/lightningd/plugins/pay /usr/libexec/c-lightning/plugins/
COPY --from=builder /tmp/lightning_install/ /usr/local/
COPY --from=builder /opt/groestlcoin/bin /usr/bin
COPY tools/docker-entrypoint.sh entrypoint.sh

EXPOSE 9735 9835
ENTRYPOINT [ "./entrypoint.sh" ]
ENTRYPOINT [ "/sbin/tini", "-g", "--", "./entrypoint.sh" ]
30 changes: 18 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ CCANDIR := ccan

# Where we keep the BOLT RFCs
BOLTDIR := ../lightning-rfc/
BOLTVERSION := 3fef98d10695462edecc63cba05e4a96374f4664
BOLTVERSION := da71867c840abe057d7a68f358dd9493e0e79110

-include config.vars

ifneq ($(VALGRIND),0)
VG=valgrind -q --error-exitcode=7
VG=VALGRIND=1 valgrind -q --error-exitcode=7
VG_TEST_ARGS = --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all
endif

Expand All @@ -31,7 +31,7 @@ SANITIZER_FLAGS=
endif

ifeq ($(DEVELOPER),1)
DEV_CFLAGS=-DCCAN_TAKE_DEBUG=1 -DCCAN_TAL_DEBUG=1
DEV_CFLAGS=-DCCAN_TAKE_DEBUG=1 -DCCAN_TAL_DEBUG=1 -DCCAN_JSON_OUT_DEBUG=1
else
DEV_CFLAGS=
endif
Expand All @@ -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
COMPAT_CFLAGS=-DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1
endif

# Timeout shortly before the 600 second travis silence timeout
Expand All @@ -63,7 +63,7 @@ CCAN_OBJS := \
ccan-bitmap.o \
ccan-bitops.o \
ccan-breakpoint.o \
ccan-crc.o \
ccan-crc32c.o \
ccan-crypto-hmac.o \
ccan-crypto-hkdf.o \
ccan-crypto-ripemd160.o \
Expand All @@ -81,6 +81,8 @@ CCAN_OBJS := \
ccan-io-fdpass.o \
ccan-isaac.o \
ccan-isaac64.o \
ccan-json_escape.o \
ccan-json_out.o \
ccan-list.o \
ccan-mem.o \
ccan-membuf.o \
Expand Down Expand Up @@ -123,7 +125,7 @@ CCAN_HEADERS := \
$(CCANDIR)/ccan/compiler/compiler.h \
$(CCANDIR)/ccan/container_of/container_of.h \
$(CCANDIR)/ccan/cppmagic/cppmagic.h \
$(CCANDIR)/ccan/crc/crc.h \
$(CCANDIR)/ccan/crc32c/crc32c.h \
$(CCANDIR)/ccan/crypto/hkdf_sha256/hkdf_sha256.h \
$(CCANDIR)/ccan/crypto/hmac_sha256/hmac_sha256.h \
$(CCANDIR)/ccan/crypto/ripemd160/ripemd160.h \
Expand All @@ -144,6 +146,8 @@ CCAN_HEADERS := \
$(CCANDIR)/ccan/io/io_plan.h \
$(CCANDIR)/ccan/isaac/isaac.h \
$(CCANDIR)/ccan/isaac/isaac64.h \
$(CCANDIR)/ccan/json_escape/json_escape.h \
$(CCANDIR)/ccan/json_out/json_out.h \
$(CCANDIR)/ccan/likely/likely.h \
$(CCANDIR)/ccan/list/list.h \
$(CCANDIR)/ccan/mem/mem.h \
Expand Down Expand Up @@ -185,14 +189,12 @@ WIRE_GEN := tools/generate-wire.py
ALL_PROGRAMS =

CPPFLAGS = -DBINTOPKGLIBEXECDIR='"'$(shell sh tools/rel.sh $(bindir) $(pkglibexecdir))'"'
CWARNFLAGS := -Werror -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition
CDEBUGFLAGS := -std=gnu11 -g -fstack-protector $(SANITIZER_FLAGS)
CFLAGS = $(CPPFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) -I $(CCANDIR) $(EXTERNAL_INCLUDE_FLAGS) -I . -I/usr/local/include $(FEATURES) $(COVFLAGS) $(DEV_CFLAGS) -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS $(PIE_CFLAGS) $(COMPAT_CFLAGS)
CFLAGS = $(CPPFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) $(COPTFLAGS) -I $(CCANDIR) $(EXTERNAL_INCLUDE_FLAGS) -I . -I/usr/local/include $(FEATURES) $(COVFLAGS) $(DEV_CFLAGS) -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS $(PIE_CFLAGS) $(COMPAT_CFLAGS)

# We can get configurator to run a different compile cmd to cross-configure.
CONFIGURATOR_CC := $(CC)

LDFLAGS = $(PIE_LDFLAGS) $(SANITIZER_FLAGS)
LDFLAGS = $(PIE_LDFLAGS) $(SANITIZER_FLAGS) $(COPTFLAGS)
ifeq ($(STATIC),1)
LDLIBS = -L/usr/local/lib -Wl,-dn -lgmp -lsqlite3 -lz -Wl,-dy -lm -lpthread -ldl $(COVFLAGS)
else
Expand Down Expand Up @@ -487,7 +489,7 @@ PKGLIBEXEC_PROGRAMS = \
lightningd/lightning_hsmd \
lightningd/lightning_onchaind \
lightningd/lightning_openingd
PLUGINS=plugins/pay
PLUGINS=plugins/pay plugins/autoclean

install-program: installdirs $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS)
@$(NORMAL_INSTALL)
Expand Down Expand Up @@ -603,7 +605,7 @@ ccan-noerr.o: $(CCANDIR)/ccan/noerr/noerr.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-str-hex.o: $(CCANDIR)/ccan/str/hex/hex.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-crc.o: $(CCANDIR)/ccan/crc/crc.c
ccan-crc32c.o: $(CCANDIR)/ccan/crc32c/crc32c.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-crypto-hmac.o: $(CCANDIR)/ccan/crypto/hmac_sha256/hmac_sha256.c
$(CC) $(CFLAGS) -c -o $@ $<
Expand Down Expand Up @@ -659,3 +661,7 @@ ccan-bitmap.o: $(CCANDIR)/ccan/bitmap/bitmap.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-membuf.o: $(CCANDIR)/ccan/membuf/membuf.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-json_escape.o: $(CCANDIR)/ccan/json_escape/json_escape.c
$(CC) $(CFLAGS) -c -o $@ $<
ccan-json_out.o: $(CCANDIR)/ccan/json_out/json_out.c
$(CC) $(CFLAGS) -c -o $@ $<
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ the file, for example:
```
alias=SLEEPYDRAGON
rgb=008000
port=9735
network=testnet
```

Expand Down
Loading