1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-03-14 11:58:19 +01:00
Commit graph

1494 commits

Author SHA1 Message Date
sstone
e4b5fd8c5d
Merge branch 'wip-routing-sync' into android 2018-06-22 21:40:25 +02:00
sstone
a90dd69de8
peer: add remote node id to messages sent to the router
this will improve logging and debugging and will help if we implement
banning strategies for mis-behaving peers
2018-06-22 15:14:05 +02:00
sstone
50d52b48ed
set version to 0.2-android-beta7 2018-06-21 13:31:51 +02:00
sstone
624fb4d286
Merge branch 'wip-routing-sync' into android 2018-06-21 13:28:44 +02:00
sstone
ea2532cabb
peer: forward all routing messages to the router
and not just channel range queries. this should not break anything and if
it does it would reveal a problem
2018-06-20 17:43:52 +02:00
sstone
1f52577ddc
channel range queries: add gossip filtering test 2018-06-20 17:28:10 +02:00
sstone
d6da9861d2
channel range queries: rename GossipTimeRange to GossipTimestampFilter 2018-06-20 13:31:49 +02:00
sstone
cd6524e25b
set version to 0.2-SNAPSHOT 2018-06-20 09:45:09 +02:00
sstone
8aa51f4e02
set version to 0.2-beta5 2018-06-20 09:21:05 +02:00
Pierre-Marie Padiou
a9348f0774
Check when relay fee is insufficient (#634)
We should return a `FeeInsufficient` error when an incoming htlc doesn't
pay us what we require in our latest `channel_update`.

Note that the spec encourages us to being a bit more lax than that (BOLT
7):

> SHOULD accept HTLCs that pay an older fee, for some reasonable time
after sending channel_update.

>    Note: this allows for any propagation delay.
2018-06-19 16:58:40 +02:00
n1bor
b7b9f4929a Add api call to update channel relay fees (#620)
* add api call to update channel relay fees

* fixed bug in GUI, as channel can had different fees in each direction!

* fire transitions on `TickRefreshChannelUpdate` (fixes #621)

* make router publish `channel_update`s on startup

* (gui) Channel info fees are now options and case where channels have no known fees data is now properly handled.
2018-06-19 14:09:37 +02:00
n1bor
b3731adabd Adding ability to set expiry when creating a new invoice (#632) 2018-06-19 13:13:07 +02:00
Fabrice Drouin
5afd9fa035
Add missing BOLT 2 checks (fixes #613) (#618)
* rename InvalidDustLimit to DustLimitTooSmall
* make sure that our reserve is above our dust limit
* check that their accept message is valid

see BOLT 2:
- their channel reserve must be above their dust limit
- their channel reserve must be above our dust limit
- their dust limit must be below our reserve

* channel: check to_local and to_remote amounts againt channel_reserve_satoshis

see BOLT 2: The receiving node MUST fail the channel if both to_local and to_remote amounts for
the initial commitment transaction are less than or equal to channel_reserve_satoshis (see BOLT 3).

* channel: check that their open.max_accepted_htlcs is valid
2018-06-18 19:06:14 +02:00
sstone
7e5361a6e4
Merge branch 'master' into wip-routing-sync 2018-06-18 16:08:41 +02:00
Fabrice Drouin
3a38c734ed
Routing: remove final CLTV expiry check on outgoing HTLCs (#627)
Checking the final CLTV expiry makes sense when we receive a payment, but
not when we're sending one
2018-06-14 10:28:45 +02:00
sstone
f61778a0b5
channel range queries: handle query_channel_range cleanly
add an explicit test when we have no matching channel ids and send back a reply with an
empty (uncompressed) channel ids payload
2018-06-13 17:50:47 +02:00
sstone
f3a5024c0d set version to 0.2-android-beta6 2018-06-11 16:24:39 +02:00
sstone
9e9451a50d Merge remote-tracking branch 'origin/wip-routing-sync' into android 2018-06-11 12:20:59 +02:00
sstone
684004fef3 set version to 0.2-android-SNAPSHOT 2018-06-11 12:08:37 +02:00
sstone
2babf67989 channel range queries: make sure we send at least one reply to query_channel_range
reply to `query_channel_range` messages for which we have no matching channel ids
with a single `reply_channel_range` that contains no channel ids.
2018-06-10 23:19:03 +02:00
sstone
6b0c04f701 channel range queries: use uint32 for 4-byte integers (and not int32) 2018-06-10 22:41:53 +02:00
pm47
bacf871d76
publish channel update event on router startup 2018-06-08 15:00:33 +02:00
pm47
37a3333876
always use keySet instead of keys
`SortedMap`.`keySet` returns a `SortedSet`, whereas `SortedMap`.`keys`
returns an `Iterable`. This is a critical difference because channel
range queries has requirements on ordering of channel ids.

Using the former allows us to rely on type guarantees instead of on
assumptions that the `Iterable` is sorted in `ChannelRangeQueries`.

There is no cost difference as internally the `Iterator` is actually a
`SortedSet`.

Also, explicitely specified the type instead of relying on comments in
`Router`.
2018-06-08 11:48:20 +02:00
sstone
9c06ca8a74
router: make sure that channel ids are sorted
For channel range queries to work properly, channel ids need to be sorted.
It is then much more efficient to use a sorted map in our router state.
2018-06-07 20:31:21 +02:00
sstone
8c4ecebf2d set version to 0.2-android-beta5 2018-06-05 17:55:28 +02:00
sstone
2a9348a7a2 Merge remote-tracking branch 'origin/wip-routing-sync' into android 2018-06-05 17:53:18 +02:00
sstone
0612e50089
channel range queries: use their compression format to query channels
when we query channels with `query_short_channel_ids`, we now use the same compression
format as in their `repy_channel_range` message. So we should be able to communicate
with peers that have not implemented all compression formats.
2018-06-05 16:32:09 +02:00
sstone
f2f32331f6 Merge branch 'json-upickle' into android 2018-05-31 11:13:55 +02:00
sstone
6b73113a76 Merge branch 'master' into android 2018-05-31 10:50:20 +02:00
sstone
f6c35211d0
provide cleaner json serializer for ShaChain objects 2018-05-31 10:33:52 +02:00
sstone
86c1c8dc8f
remove useless test 2018-05-31 10:33:52 +02:00
sstone
064f864dcd
serialize all channel states 2018-05-31 10:33:52 +02:00
sstone
763191d52b
use upickle for JSON serialization
json4s does not work on Android
2018-05-31 10:33:52 +02:00
sstone
d9a82f6351
use upickle for JSON serializatoin 2018-05-31 10:33:52 +02:00
sstone
bf26272b86 Set version to 0.2-android-beta4 2018-05-31 10:25:12 +02:00
sstone
92462c35f9
Merge branch 'master' into wip-routing-sync 2018-05-30 19:16:33 +02:00
sstone
a85ba9ceef
set version to 0.2-SNAPSHOT 2018-05-30 19:15:06 +02:00
sstone
e6fe077582
set version to 0.2-beta4 2018-05-30 19:11:44 +02:00
Dominique
e1b884c58d Add server address in ElectrumReady object (#556)
* Added server address in ElectrumReady object

* Assigned remote address to variable to improve readability

* Checking that the master address exists in the addresses map
2018-05-30 18:53:07 +02:00
Anton Kumaigorodski
d75788039a Inform clients about incoming payments via websocket connection (#610) 2018-05-30 15:20:55 +02:00
Fabrice Drouin
3bf8db3f26
Set a minimum feerate-per-kw of 253 (fixes #602) (#608)
* set a minimum feerate-per-kw of 253 (fixes #602)

why 253 and not 250 since feerate-per-kw is feerate-per-kb / 250 and the minimum relay fee rate is 1000 satoshi/Kb ?

because bitcoin core uses neither the actual tx size in bytes or the tx weight to check fees, but a "virtual size" which is (3 * weight) / 4 ...

so we want :
fee > 1000 * virtual size
feerate-per-kw * weight > 1000 * (3 * weight / 4)
feerate_per-kw > 250 + 3000 / (4 * weight)

with a conservative minimum weight of 400, we get a minimum feerate_per-kw of 253

* set minimum fee rate to 2 satoshi/byte

users can still change it to 1 satoshi/byte

* use better weight estimations when computing fees

* test that tx fees are above min-relay-fee

* check that remote fee updates are above acceptable minimum

we need to check that their fee rate is always above our absolute minimum threshold
or we will end up with unrelayable txs

* fix ClaimHtlcSuccessTx weight computation

* channel tests: use actual minimum fee rate

test with our absolute minimum fee rate (253), it should be valid and anything below
sould be invalid and trigger and specific error
2018-05-30 13:38:40 +02:00
sstone
55ff5d993f
channel range queries: properly handle case where there is no data
we will just receive on byte (compression format)
2018-05-29 17:58:29 +02:00
sstone
db816983f2
Merge branch 'master' into wip-routing-sync 2018-05-25 17:39:03 +02:00
Fabrice Drouin
7b5b665fe9
Update electrum testnet server list, and fix flaky client pool tests (#609)
* electrum: update testnet server list

* electrum: filter out onion addresses

* electrum pool test: wait until we have a stable master server
2018-05-25 11:47:23 +02:00
araspitzu
d875007862 Fix maven version to 3.3.9 in docker build (#604)
* downgrade maven version to 3.3.9 in Dockerfile

* update java version in docker base images

Fixes #603
2018-05-22 15:54:29 +02:00
araspitzu
db43747d2b Filter out non-spendable outputs from bitcoind 'listunspent' call during setup (#605)
Fixes #599
2018-05-22 12:36:01 +02:00
pm47
644b4a2a98
back to SNAPSHOT 2018-05-18 15:53:02 +02:00
pm47
1dd8aa5aab
set version to 0.2-beta3 2018-05-18 15:14:52 +02:00
Fabrice Drouin
75437cbe81
electrum wallet: fix balance computation issue (#600)
Electrum wallet: fix balance computation issue
2018-05-18 12:58:48 +02:00
Gustavo Fernandes
f983160288 Increase startup timeout (#577) (#590) 2018-05-18 11:55:53 +02:00