We now use [akka tcp pull mode](https://doc.akka.io/docs/akka/2.5.3/scala/io-tcp.html#read-back-pressure-with-pull-mode) for both incoming and outgoing connections.
In combination with setting a relatively low value for `akka.io.tcp.max-received-message-size`, this results in less RAM consumption, in particular when validating a whole routing table.
Also improved the router:
- Removed the grouping of `channel_announcement` because batching is done lower in the stack, in the bitcoin json-rpc client. Channels are now validated as they arrive.
- Keep track of all origin peers for every announcement (instead of the first one), in order not to send back the same announcements to peers.
- Better choice of data structures, which increases constant time operation (but don't completely eliminate less efficient access)
- Reworked management of private/not-yet-announced channels
* TCPException sets a message when extending RuntimeException
If no message was set for the exception, a 'null' message was displayed to
the user when TCPException is thrown. Instead, we now display the exception class name.
This fixes#399.
* (gui) Added funding tx id to channel panel
fixes#335
* (gui) close channel button hidden when CLOSING or CLOSED
fixes#332
* (gui) User can define a preferred display unit
On startup FxApp reads the configuration from `eclair.conf` and sets
a unit to which all the amounts in the UI must be converted.
This unit is a CoinUnit object. Only `sat`, `mbtc` and `btc` are accepted.
`msat` is not accepted because it's an internal accounting unit which
should be invisible to the user. Default unit is `btc`
The gui does not expose any ui feature to update this unit at runtime.
* (gui) Notification message wraps and can now be copied
Notification message should be readable especially when an error occurs.
The message can be copied for easier issue reporting.
* Payment attempts is limited to 1
* (gui) consistent order in status bar contextual actions
* (gui) fixed unit parsing
* (gui) added menu shortcuts
fixes#347
* Revert "Payment attempts is limited to 1"
This reverts commit 1f4168aacb.
* (gui) BtcAmount are convertible to raw big decimal without loss
Fix issue where the decimal part of a BtcAmount could be lost.
Millisatoshi is now accepted as a user preferred unit.
* Set a minimum htlc amount of 1 mSat by default
By default, the node configuration should be permissive and accept low
value payments. It is up to the node admin to set up a restrictive
configuration if he needs it.
* (gui) port in node uri is optional
* (gui) added reactive errors in open channel window
* (gui) format max pr amount to user preferred unit
* (gui) Payment Request QR should be uppercased
see #375
* (gui) added a conf for the gui module
* Added eclair.gui.unit option in README
* always print `shortChannelId` in hex
* fixed logs in `ThrottleForwarder`
* logs the `paymentHash` when relaying an htlc
* don't print all channel data when restoring a channel
* added logs to relayer
* reduced log level in Peer
* cleaned up switchboard logs
* fixed `id`/`channelId` mixup in relayer logs
* slight changes in log levels
* do not log as warning when tx generation is simply skipped
* streamlined relayer logs
* improved router logs
* don't display errors when witness can't be parsed
* don't log connection errors as warnings
* reduce amount of logs in case of local known error
* removed reconnection message to deadletter
* try a cleaner way of displaying channel errors
* put some reconnection-related logs from info to debug
* peer: ignore `Rebroadcast` messages in `INITIALIZING`
* less verbose exception logging in channel
* display friendlier close type
* reduced default log level to INFO
Dependency to `git` has been removed, we now use `notag` when building without
a git directory.
In order to reliably fetch all dependencies, we do a first blank build
(with no source files), then we copy the sources and do a real commit.
This is a simpler and more robust approach.
Also, fixed the .dockerignore to filter out IDE files.
This is a rework of #184 with numerous improvements and bugfixes.
* re-enabled `WatchSpentBasic`
* fixed several issues in watcher
* fixed pattern matching for INPUT_RECONNECTED event in CLOSING
* reduced logback_colors log level
* connect txes even if they arrive out of order
* wallet: send confidence event as soon as a tx is confirmed
* fixed 5985148f2f and improve events
* added `NewWalletReceiveAddress` event
* cleaned up electrum testnet seeds
* added a test on dumping routing state
* removed WAIT_FOR_FUNDING_PUBLISHED state and clarified funding tx publish assumptions
* wallet: use BIP49 derivation and 24 words mnemonic codes
we use segwit with p2sh-of-p2wkh so we should use BIP49 derivation
instead of BIP44 (same path with m/49'/... instead of m/44'/...)
* added a rollback function to `EclairWallet`
This rollback is called whenever we know we won't publish the funding tx,
so that we tell the wallet to release locks on utxos.
* fundee now checks feerates at `open_channel` reception
* proper handling of electrum connection/disconnection
* moved bitcoinj test to its own package
* make electrum wallet advertise address at startup
* set version to 0.2-SNAPSHOT
* Renamed eclair-node-javafx module to eclair-node-gui
* (build) javafx installer uses project version
* (build) Streamlined capsule names
* (build) mvn generates installer only with `installer` profile. The windows installer does not need to be created in common cases. Decreases `eclair-node-gui` module building time by ~ 1 min
* (readme) updated the `run eclair` commands with the new capsule names
Eclair wasn't stopping anymore when two instances were started with the
same ports.
Note: we should probably go one step further and put a lock in the datadir
directory. For now we just check if the main TCP port is in use and fail fast.
* 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
* 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
* 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
* 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)
* 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
* 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
* (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
* integ tests: removed sleeps, waiting for watches before generating blocks
* fixed a (rarely occuring) race condition related to bulk-generation of test blocks
* 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
* 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
* fixed uncaught escape key hiding notification scene
* message notification should be straightforward and as brief as possible
* updated notifications icons
* 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
* using scodec for failure messages
* we now update routing info and retry payments in case of Update failure
* properly implemented BOLT4/'Receiving Failure Codes' (also fixed a bug with UnknownPaymentHash)
* added integration tests on htlc timeout
* relayer now sends an UpdateFail to downstream when an htlc timeout hits the blockchain
* added integration tests on extracting preimage from blockchain
* cleaning up of htlc bindings in relayer
* router now doesn't send a 2nd request to bitcoind when it is notified of a new channel twice in a short amount of time
* peerclient now asks for witness when retrieving blocks from bitcoind
* getTxBlockHash now returns None instead of an error when tx is in the mempool
* we now look into the mempool when checking for WatchSpent
* fixed FundingSigned been sent twice when deferring an early FundingLocked
* added zeromq listener, removed predefined eclair.conf files in test, limited concurrent rpc calls to 5 for the router
* Update README.md with ZMQ configuration
* Added a warning and link to alpha2 install instructions
* removed PeerClient
* improved PeerWatcher performance
* use chain getblockchaininfo.chain to infer the magic value, remove bitcoind.network conf parameter (closes#43)
* minor: renamed socket->socketAddress, also rebased
* using scodec for failure messages
* we now update routing info and retry payments in case of Update failure
* properly implemented BOLT4/'Receiving Failure Codes' (also fixed a bug with UnknownPaymentHash)
* Added help option in command line; added version in logs
* Version and commit id added in manifest (use Specification-Version for commitId)
* (gui) version in about is now dynamic; ESC key closes about
* Excluded unused protobuf dependency
* Update README.md