1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-24 06:47:46 +01:00
Commit graph

1478 commits

Author SHA1 Message Date
Andrea
e75f93c012
Hey 2019-03-26 14:52:30 +01:00
Andrea
f3480016ce
publish: Add documentation
generated from commit 8e04fd32c7
2019-03-26 14:49:37 +01:00
Andrea
8e04fd32c7
Add documentation 2019-03-26 14:45:19 +01:00
Andrea
ffa86a032a
Add documentation 2019-03-26 14:38:18 +01:00
Andrea
cfe5778055
Update readmes and rename docs/slate -> docs/source 2019-03-26 14:15:07 +01:00
Andrea
e1d8d6cb8e
Add missing eclair-cli examples 2019-03-26 13:29:24 +01:00
Andrea
54c8a19a89
Update doc 2019-03-26 13:19:42 +01:00
Andrea
53e2dd23d5
Highlight keywords in doc 2019-03-26 13:12:05 +01:00
Andrea
1ca92e8780
Merge branch 'api_revamp' into api_docs 2019-03-26 13:02:38 +01:00
Andrea
0078d62e27
Update README for the new docs and the new api, move old doc in a separate readme. 2019-03-26 12:56:37 +01:00
Andrea
e8914adc39
Update README for building the docs 2019-03-26 11:31:04 +01:00
Andrea
e95d571d43
Add README for building the docs 2019-03-26 11:12:56 +01:00
Andrea
f7bb439383
Add better logo 2019-03-26 11:00:22 +01:00
Andrea
c984292c93
Move curl example parameters 2019-03-25 18:40:42 +01:00
dpad85
9c9afe4799
Fixed eclair cli error parsing, added commands to eclair cli completion 2019-03-25 18:39:17 +01:00
Andrea
2527e506c2
Improve curl suggestions in docs 2019-03-25 18:35:59 +01:00
Andrea
09a3661425
Add HTTP verb to curl examples 2019-03-25 18:28:03 +01:00
Andrea
01acce961a
Update example domain in documentation 2019-03-25 18:18:40 +01:00
Andrea
f02ff03a00
Add examples for eclair-cli 2019-03-25 18:17:30 +01:00
Andrea
5c7da65c0e
Add initial version of the doc 2019-03-25 17:13:08 +01:00
Andrea
8e4706abc6
Initial version of the new API docs 2019-03-25 12:56:02 +01:00
Andrea
caa056eaf3
Merge remote-tracking branch 'origin/api_revamp' into api_revamp 2019-03-25 11:41:56 +01:00
Andrea
2f37cdc5e3
Formatting 2019-03-25 11:41:48 +01:00
dpad85
f3715fd90e
Removed help, we will instead point to an online documentation 2019-03-25 11:39:12 +01:00
Andrea
e663dbcc63
Use a mock Eclair in ApiServiceSpec 2019-03-25 11:36:01 +01:00
dpad85
00b357ab58
Wip improving the help message in eclair-cli 2019-03-22 18:39:24 +01:00
Andrea
9ca19bccde
Rename EclairApiImpl to EclairImpl 2019-03-22 18:08:40 +01:00
Andrea
e07e9f6d46
Rename named parameters for better readability 2019-03-22 17:35:34 +01:00
Andrea
6d5a25ca29
Encapsule errors in a JSON response 2019-03-22 17:19:53 +01:00
Andrea
d6f2434349
Support -h in eclair-cli 2019-03-22 16:48:45 +01:00
Andrea
4787f0a497
Remove 'help' method 2019-03-22 16:40:07 +01:00
Andrea
7bf1cd8dfa
Merge branch 'master' into api_revamp 2019-03-22 16:36:02 +01:00
Andrea
7f631045e9
Include help response in eclair-cli 2019-03-22 16:34:17 +01:00
Andrea
6441590b2c
Merge remote-tracking branch 'origin/api_revamp' into api_revamp 2019-03-22 15:55:41 +01:00
Andrea
1e15c92e7b
Set blockHeight during test for getinfo 2019-03-22 15:55:27 +01:00
dpad85
27c2c83c2c
Updated eclair-cli to work with the revamped API
File is a bit longer, but with simpler logic since parameters are now
named, and order does not matter anymore.

Command and its parameters are transformed into endpoint + url encoded
body (param1=xxx&param2=yyy...).

Removed verbose option and added a -c option which prints colored JSON
(off by default).

Help message does not rely on API /help endpoint anymore and contains a
list of all the available commands.
2019-03-22 15:38:53 +01:00
Andrea
26cc39e467
Standardize method names (all lowercase) 2019-03-22 14:46:59 +01:00
Andrea
3bf00fb5b2
Rename EclairApi into Eclair and move it to root package 2019-03-22 14:39:05 +01:00
Fabrice Drouin
32d8a08ad1 Improve unit tests (#908)
* Bitcoin tests: generate 150 blocks instead of 500

We don't need to generate 432 blocks to activate segwit but we still need to have
spendable coins and coinbase maturity is 100 blocks even on regtest.

* Electrum client: test against mainnet Electrum servers

Previous test against testnet servers was flaky because testnet Electrum
servers are unrelable. Here we test against our own server on mainnet (and
2 servers from our list for the pool test).
2019-03-22 13:26:55 +01:00
Andrea
8567979a85
Remove getInfo parameter from EclairApi, remove 'port' from GetInfoResponse 2019-03-22 11:30:44 +01:00
Andrea
709298998b
Remove MetaService in favor of a shorter syntax 2019-03-22 11:06:24 +01:00
Andrea
f07741cfbf
Renaming Service -> OldService, NewService -> Service 2019-03-22 10:17:35 +01:00
araspitzu
1c9ac1d62d Ensure the cost function in path-finding is monotonic (#904)
Make sure the cost function in path-finding is monotonic
2019-03-20 10:43:48 +01:00
Fabrice Drouin
4aa7a1ca9f Upgrade to bitcoin 0.17.1 (#826)
Bitcoin Core 0.18 is about to enter RC cycle and should be release soon (initial target was April). It is not compatible with 0.16 (some of the RPC calls that we use have been removed. They're still available in 0.17 but tagged as deprecated). 

With this PR, eclair will be compatible with 0.17 and the upcoming 0.18, but not with 0.16 any more so it will be a breaking change for some of our users. Supporting the last 2 versions is the right option and we should be ready before 0.18 is actually released (its initial target was April).
2019-03-19 14:57:03 +01:00
Andrea
bd02e8ccfe
Add comment to MetaService 2019-03-19 13:17:16 +01:00
Andrea
3e285d131b
Merge branch 'master' into api_revamp 2019-03-19 11:41:05 +01:00
Andrea
db15e2bb01
Revert "Merge remote-tracking branch 'origin/use-bitcoin-0.17.1' into api_revamp"
This reverts commit b52ba9c05e, reversing
changes made to 837ac03dd9.
2019-03-19 11:40:10 +01:00
Pierre-Marie Padiou
cc3395a5bb
Better logic for sending channel_updates (#888)
* don't spam with channel_updates at startup

Previous logic was very simple but naive:
- every time a channel_update changed we would send it out
- we would always make a new channel_update with the disabled flag set
at startup.

In case our node was simply restarted, this resulted in us re-sending a
channel_update with the disabled flag set, then a second one with the
disabled flag unset a few seconds later, for each public channel.

On top of that, this opened way to a bug: if reconnection is very fast,
then the two successive channel_update will have the same timestamp,
causing the router to not send the second one, which means that the
channel would be considered disabled by the network, and excluded from
payments.

The new logic is as follows:
- when we do NORMAL->NORMAL or NORMAL->OFFLINE or OFFLINE->NORMAL, we
send out the new channel_update if it has changed
- in all other case (e.g. WAIT_FOR_INIT_INTERNAL->OFFLINE) we do nothing

As a side effect, if we were connected to a peer, then we shut down
eclair, then the peer goes down, then we restart eclair: we will make a
new channel_update with the disabled flag set but we won't broadcast it.
If someone tries to make a payment to that node, we will return the
new channel_update with disabled flag set (and maybe the payer will then
broadcast that channel_update). So even in that corner case we are good.

* quick reconnection: bump channel_update timestamp

In case of a disconnection-reconnection, we first generate a
channel_update with disabled bit set, then after we reconnect we
generate a second channel_update with disabled bit not set.

If this happens very quickly, then both channel_updates will have the
same timestamp, and the second one will get ignored by the network.

A simple fix is to bump the second timestamp in this case.

* set channel_update refresh timer at reconnection

We only care about this timer when connected anyway. We also cancel it
when disconnecting.

This has several advantages:
- having a static task resulted in unnecessary refresh if the channel
got disconnected/reconnected in between 2 weeks
- better repartition of the channel_update refresh over time because at
startup all channels were generated at the same time causing all refresh
tasks to be synchronized
- less overhead for the scheduler (because we cancel refresh task for
offline channels (minor, but still)
2019-03-18 14:39:29 +01:00
Andrea
56f910cf5b
Formatting commands in eclair-cli 2019-03-18 10:03:08 +01:00
Andrea
961bf3c1dd
Remove custom rejections 2019-03-15 18:23:09 +01:00