1
0
mirror of https://github.com/ACINQ/eclair.git synced 2024-11-19 18:10:42 +01:00
Commit Graph

979 Commits

Author SHA1 Message Date
Pierre-Marie Padiou
d0a18c0649 improved reconnection logic and fuzzy tests (#123)
Most notably, we do not anymore discard previously signed updates.
Instead, we re-send them and re-send the exact same signature. For that to
work, we had to be careful to re-send rev/sig in the same order, because
that impacts whatever is signed.

NB: this breaks storage serialization backward compatibility
2017-08-10 16:24:05 +02:00
Pierre-Marie Padiou
0440096f95 Clarified node/node-javafx distinction in README 2017-07-26 19:11:44 +02:00
Pierre-Marie Padiou
c6dc33e8bf Bugfixes and minor improvements (#117)
* reworked payment lifecycle

* fixed retry logic (infinite loop in some cases)
* check update signature
* keep track of the list of errors and routes tried

* added support for sending bolt11 payment request in the API

* updated eclair-cli and deleted deprecated TESTING.md (closes #112)

* removed useless application.conf in eclair-node

* now handling CMD_CLOSE in shutdown/negotiating/closing states

* added no-op handlers for FundingLocked and CurrentFeeRate messages

* cleaning up stale announcements on restart

* more informative/less spam logs in Channel

* (gui) Wrapping payment events to display date of event

* Also added controls to item content in cell factory overrides. This
  should prevent prevent duplicates as reported in #115
2017-07-26 18:57:31 +02:00
Pierre-Marie Padiou
f321d3e4ec Fixed links in README 2017-07-23 17:11:08 +02:00
rem0g
75ef04ac23 API: Add description to receive in help menu (#114) 2017-07-22 18:16:17 +02:00
rem0g
f51be77ab1 Update README with description to receive method (closed #111) (#113)
Description is mandatory when using receive as method to generate payment request.
2017-07-22 18:14:52 +02:00
sstone
905aebebbd set version back to 0.2-SNAPSHOT 2017-07-19 17:15:04 +02:00
sstone
c85823f5b4 set version to 0.2-alpha4 2017-07-19 17:12:21 +02:00
sstone
ecce374e1b use bitcoin-lib 0.9.12 2017-07-19 16:33:19 +02:00
sstone
ec1cd2b9ff make sure we sign data that is 32 bytes long, with valid private keys 2017-07-19 16:32:10 +02:00
Pierre-Marie Padiou
8c00efb9b6 Parse max_htlc_value_in_flight_msat as an unsigned long (closes #103) (#109)
* handle overflow for field 'max-htlc-value-in-flight'
* moved serialization of uint64 to codecs class
* moved constraint check
* fix configuration (was using hard coded values)
* using UInt64.MaxValue in test constants
* added a default handler for 'ok' messages in Channel
2017-07-17 19:36:49 +02:00
Pierre-Marie Padiou
5c53bf5f4d Reproduced and fixed issue with different dust limits (closes #97) (#108) 2017-07-17 19:18:27 +02:00
Pierre-Marie Padiou
1c3b1bfed5 Added support for multiple external ip in node announcements (#106)
* supported (possibly empty) list of external ips
* fixed new conf value for integration tests
2017-07-17 15:41:46 +02:00
Pierre-Marie Padiou
7d669630ca Simplified computation of closing fee (#107) 2017-07-17 15:11:31 +02:00
Pierre-Marie Padiou
073705a957 Implement state-counter retransmission (#105) 2017-07-17 14:28:07 +02:00
Fabrice Drouin
21d1d7c667 Fix update_add_htlc encoding (#104)
* update_add_htlc wire message: swap expiry and payment hash fields
see BOLT 2

* fix accept_channel wire encoding
'min depth' and 'hlc min msat' fields we swapped

* gui: set ip to "unknown" when it has not been set in node announcements
2017-07-12 20:05:51 +02:00
Pierre-Marie Padiou
e7833055bd Added support for BOLT 11 payment request (#102)
* implement BOLT 11 (payment request)
* (javafx) Added QR Code in receive payment modal, using zxing to generate QR code
2017-07-12 20:03:41 +02:00
Fabrice Drouin
7427cdb27b Interpret feature bits as per rfc PR 156-169-178 (#101) 2017-07-11 17:41:14 +02:00
Fabrice Drouin
83238b6299 Use 8 bytes for msat amounts (#99)
(see RFC PR 175)
2017-06-27 10:48:56 +02:00
Pierre-Marie Padiou
53243b5e74 Use an exponential backoff timeout for connection retry (#96)
* reduced logging for Reconnect events
* peer is now able to switch transports, in case of undetected disconnection
* now using an exponential backoff retry when reconnecting to peers
* put the arguments of the 'open' http method in the same order as the uri
2017-06-27 10:47:35 +02:00
Fabrice Drouin
12c90a7efe api: add a simple getinfo method (closes #98) (#100)
* api: add a simple getinfo method returning node id, node alias, port, chain hash and current block height
* api: add short description of getinfo [ci skip]
2017-06-27 10:46:30 +02:00
Fabrice Drouin
c0ad616a32 Upgrade to bitcoin-lib 0.9.11 (#95)
we now use spongycastle instead of bouncycastle
2017-06-09 17:39:03 +02:00
Pierre-Marie Padiou
582c327e04 Minor tweaks (#94)
* using scodec BitVector for interpretation of features
* datadir is now a file instead of a string
* (minor) made option mapping more explicit
2017-06-08 18:47:59 +02:00
Pierre-Marie Padiou
1a81ab1945 Replaced java serialization by scodec (#92) 2017-06-08 15:21:07 +02:00
Pierre-Marie Padiou
d86dd72d78 Separate code into modules (#91) (closes #88) 2017-06-06 18:37:34 +02:00
Pierre-Marie Padiou
7f747d55fd Added support for channel_disabled flag and updated failure codes (#90)
* added support for 'disable' flag in announcements (see lightningnetwork/lightning-rfc/pull/143)
* now responding TemporaryChannelFailure errors to CMD_ADD_HTLC in OFFLINE
* added helper methods for interpreting ChannelAnnouncement flags
* (gui) added image depicting flags of announcement in channels table
* implemented all failures as per lightningnetwork/lightning-rfc/pull/167
* router: don't use channels that have been announced as disabled
2017-06-02 20:14:21 +02:00
pm47
6297054a79 added validation checks on payment hash 2017-05-16 14:57:52 +02:00
pm47
0a597adc5a peer now keeps track of both temporary and final channel ids 2017-05-12 13:27:20 +02:00
Pierre-Marie Padiou
766af1484e Update README.md 2017-05-02 11:12:57 +02:00
pm47
c7b5953b64 send INPUT_RECONNECTED right away when restoring a channel and peer is already connected 2017-04-28 18:40:07 +02:00
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
Pierre-Marie Padiou
66cb538ed3 clarify version requirement of bitcoin core 2017-04-25 10:20:21 +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