1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-22 22:25:26 +01:00
Commit graph

575 commits

Author SHA1 Message Date
pm47
80281bbf78 (minor) ignoring Reconnect messages when peer is a listener 2017-04-28 17:54:52 +02:00
pm47
aafa3f63a6 fixed race condition when registering tcp client listener 2017-04-28 17:54:52 +02:00
pm47
b981c67d37 now using SecureRandom instead of Random 2017-04-28 17:54:52 +02:00
pm47
2366804ff7 peer is now stopped and cleaned up upon reconnect timeout if there are no channels 2017-04-28 17:54:52 +02:00
pm47
d8e4af95fa quick and dirty fix to updates the node announcement on startup 2017-04-28 17:54:52 +02:00
pm47
6c196f8733 peer now reconnects on new/restored channels instead of relying on initial stateTimeout 2017-04-28 17:54:52 +02:00
sstone
cadf0bf4e9 use hash of block #0 as chain hash 2017-04-28 17:16:23 +02:00
Pierre-Marie Padiou
4c6f8695cb Make router not broadcast announcements back to sender (#82)
* replaced system scheduler by FSM timers
* added a basic way of not sending routing messages to origin peer when broadcasting
2017-04-28 17:03:25 +02:00
anton
cd9cf95643 Combine sigs in a more conscise way 2017-04-28 16:16:47 +02:00
dpad85
4f9b964bae Fixed type cast issue with peers rpc service (#79)
* (gui) fixed inconsistency with channel id copy
* Fixed cast issue with `peers` rpc service
* also renamed `channelIdHex` to `channelId`
2017-04-26 16:37:29 +02:00
pm47
097f51f1c5 back to SNAPSHOT 2017-04-25 18:37:26 +02:00
pm47
598c7a99ee set version to 0.2-alpha3 2017-04-25 18:04:48 +02:00
pm47
8d9ed6de8f client must die when transport dies (regression caused in 75e4923002) 2017-04-25 18:00:42 +02:00
sstone
645cb657d5 funding: remove redundant address test 2017-04-25 13:06:13 +02:00
pm47
8589294933 fixed naming inconsistencies pubkey->nodeId 2017-04-25 10:33:41 +02:00
Fabrice Drouin
14cdf8f345 BOLT4: update Sphinx to match the latest specs (#76)
* Sphinx: implement BOLT PR 145
see https://github.com/lightningnetwork/lightning-rfc/pull/145
* Sphinx: use simplified onion proposed in PR145
address and hop-payload fields have fused, and we are now routing based on channel short ids
* Updated relayer to take advantage of shortChannelId
* Sphinx: use more meaningful class names
* BOLT 4: use 32 bytes MAC in reply error packet
instead of 20
2017-04-24 15:57:13 +02:00
Fabrice Drouin
50429da0ed Wire: add chainHash field to open message (#69)
* wire: add chainHash field to open message (see https://github.com/lightningnetwork/lightning-rfc/pull/135)
* split validateParams() into "funder" and "fundee" versions (fundee also needs to check the chain hash funder sent in their open message)
2017-04-20 17:27:53 +02:00
dpad85
fe22572976 New PaymentRequest object + HTLC verification (#72)
* Added a PaymentRequest object
* A `PaymentRequest` can be serialized/deserialized with `write`/`read`
  static functions in companion
* Amount validation is handled in constructor
* `ReceivePayment` message in payment handler generates a `PaymentRequest`
* Updated tests
* HTLC succeeds if amount is equal or greater than requested amount
* If the amount paid is more than twice the amount expected, the HTLC fails
* (gui) display payment failed cause in notification
* Improved payment request validation messages
2017-04-20 17:26:30 +02:00
Fabrice Drouin
75e4923002 BOLT 4: use proper cipher stream for reply messages (#75)
* more logs on connection establishment, added initialize() to FSMs
2017-04-20 17:08:23 +02:00
Pierre-Marie Padiou
da78ae5356 Better router/channel exception handling (#71)
* added specific channel exceptions
* added specific router exceptions
* retry payment when an error occurs at the first channel
2017-04-20 11:47:38 +02:00
Anton Kumaigorodski
2eded652e5 Validity of remote final script is not checked when a Shutdown was already sent (#74)
* Superfluous mapping as we're only interested in collection sizes
* Add a shutdown with invalid final script test
2017-04-20 11:12:12 +02:00
Anton Kumaigorodski
12ca54bc90 both localCommit & remoteCommit htlcs are now checked on Shutdown (#73) 2017-04-19 16:50:01 +02:00
Fabrice Drouin
378a332954 LocalParams should not include maxFeerateMismatch (#70)
as it is not a direct protocol parameter
2017-04-12 15:17:01 +02:00
Pierre-Marie Padiou
102f76e401 Automatic reconnection (#64)
* automatically reconnect every minute (optional, enabled by default)
* (gui) removed reconnect
* use stateTimeout to send ping messages
2017-04-11 17:17:26 +02:00
pm47
7885acd4af fatal error messages are now sent to stderr in headless mode 2017-04-11 17:05:03 +02:00
dpad85
3f404025da Added a receive method to the API to generate payment requests (#63) 2017-04-11 16:47:09 +02:00
Fabrice Drouin
fd56d35073 make max-feerate-mismatch configurable and set default value to 500% (#62)
* make max-feerate-mismatch configurable and set default value to 500%
there can be a significant gap between the fee rate estimated by different bitcoin
clients (see estimatesmartfee) so we must set a reasonably high value for the threshold
above which we consider htat local and remote fee rates are too different and close the
channel.

* use difference/average to compare feerate
it becomes symmetrical and easier to reason with, and also more forgiving.

* make "UpdateFee" minimum ratio configurable
2017-04-11 16:45:03 +02:00
pm47
e2350ca8b1 added tests for state WAIT_FOR_FUNDING_PARENT 2017-04-11 16:43:38 +02:00
dpad85
9a2bdb31a1 (GUI) Added an option in the GUI to open a simple connection to a node (#68)
* (gui) added option to open a simple connection to a node in gui
* added checkbox in open channel modal window
* when the 'simple connection' checkbox is selected, the `fundingSatoshis`
  and `pushMsat` fields are ignored
* (gui) channelid is displayed as hexa
* (gui) fixed testnet color
* (gui) increased the inital size of the main window
* (gui) display the node alias in channel pane when the node is announced: alias is appended to node id; using option to open channel
2017-04-11 12:07:09 +02:00
pm47
5bcf2f4ae7 setting watches when restoring in CLOSING state 2017-04-11 10:18:12 +02:00
pm47
c94972f7ce made transport actor a FSM instead of a LoggingFSM 2017-04-11 10:11:39 +02:00
Pierre-Marie Padiou
47310c1534 Fixed racing issues in integration tests making travis fail (#61)
* integ tests: removed sleeps, waiting for watches before generating blocks
* fixed a (rarely occuring) race condition related to bulk-generation of test blocks
2017-04-10 16:58:17 +02:00
pm47
8fedd5acd9 back to SNAPSHOT 2017-04-07 11:48:10 +02:00
pm47
1e792f63d7 set version to 0.2-alpha2 2017-04-07 11:27:05 +02:00
pm47
e8485128e5 increased integration test timeouts 2017-04-07 11:26:28 +02:00
pm47
6be1644bb4 improved route calculation errors 2017-04-07 11:26:17 +02:00
Fabrice Drouin
54a8b56c3d Mitigate testnet malleability attacks (#59)
* malleability fix: we wait the parent of the funding tx or its malleated version to be confirmed,
then we create the funding tx

* set default min depth to 2

* disconnection during WAIT_FOR_FUNDING_CREATED now closes the channel
2017-04-06 17:55:16 +02:00
pm47
4991a3bc96 reduced log verbosity 2017-04-05 18:30:29 +02:00
Fabrice Drouin
07a1cb0b99 add ping and pong messages (#56)
* add ping and pong messages
* add setting for ping interval to configuration file
* channels can now be restored when peer is connected
2017-04-05 18:06:09 +02:00
pm47
a1b9860483 added timestamp to test logging 2017-04-05 15:30:31 +02:00
dpad85
e18fcbab47 ZMQ connection monitoring (#57)
* made zeromq listener non-blocking and monitors connection status
* now throwing an exception at startup in case of zmq connection issues
* (gui) added a blocking modal in main window for ZMQ events
* made boot error exit the application in headless mode
2017-04-05 15:24:05 +02:00
pm47
edefb8d235 increased connection timeout in tests 2017-04-05 15:02:26 +02:00
pm47
bcbc40e7ad sending a sig on reconnection, because last CMD_SIGN might have been ignored 2017-04-04 15:51:17 +02:00
pm47
9125742900 removed another debug log line 2017-04-04 14:47:58 +02:00
pm47
70d62a5c78 removed debug log line 2017-04-04 14:45:09 +02:00
Pierre-Marie Padiou
1d53e53dd2 channel validation is now made in batch, using parallel JsonRPC requests (#53) 2017-04-04 14:26:50 +02:00
Fabrice Drouin
e8be919fe5 fix fuzzy test (#54)
* re-enabled fuzzy test
* fix fuzzy test: Bob was using his own public key instead of Alice's  when sending HTLCs to Alice
2017-04-04 11:22:39 +02:00
dpad85
00c9aa6200 (gui) Shortened notification and emphasized message (#55)
* fixed uncaught escape key hiding notification scene
* message notification should be straightforward and as brief as possible
* updated notifications icons
2017-04-04 10:43:41 +02:00
Fabrice Drouin
3e53a1fc2c Use CPFP to create our funding tx (#50)
* use CPFP to create our funding tx
ask bitcoin-core to fund a standard tx which has a segwit output, and spend it to
create our funding tx. the parent and the funding tx are published at the same time
and should end up in the same block.
this should give us some protection against malleability attacks: it should improve the chances
of our funding tx being mined, and if the parent tx loses the race against it malleated version
then our fuding tx will not be published, which is much better than having a conflicted funding
tx

* set default fee-rate-per-kw to 10000

* guestimate that feerate-per-kw is feerate-per-kb / 2 for a standard commit tx

* channel: estimate the fee for the parent of our funding tx
instead of hardcoding it

* integration test: increase channel capacities
because we use a larger feerate-per-kw now

* added a feerateKB2Kw method
2017-03-31 20:28:51 +02:00
dpad85
34677f0ed6 Added an activity tab to the GUI (#52)
* (gui) added Activity tab (payment sent, received, relayed)
* GUIUpdater listens to PaymentEvent
* payments are listed in separate tableviews (sent, received, relayed)
* added Payment[Sent, Relayed, Received] events
* (gui) Handling Relayed and Sent payments in Activity Tab
* (gui) fixed amount columns in activity
* (gui) Added formatting to monetary columns of activity tables
* (gui) payments are prepended to activity tables
2017-03-31 20:03:36 +02:00