Conversation
Codecov Report
@@ Coverage Diff @@
## master #1253 +/- ##
=========================================
Coverage ? 77.11%
=========================================
Files ? 142
Lines ? 9892
Branches ? 394
=========================================
Hits ? 7628
Misses ? 2264
Partials ? 0
|
a7e49ba to
e37c413
Compare
eclair-core/src/test/scala/fr/acinq/eclair/payment/PaymentPacketSpec.scala
Outdated
Show resolved
Hide resolved
c7fde83 to
a9feba3
Compare
|
I took this opportunity to re-work |
ecd3f1b to
e2f156d
Compare
pm47
left a comment
There was a problem hiding this comment.
Nice change, a few nits, didn't review the tests yet.
For Init I disagree with your approach of changing the type instead of the codec. If you figure it out we could probably do the same for LocalParams/NodeParams.
|
I fixed the nits in
I'll investigate that. |
Implement lightning/bolts#666 We keep the global/local split in Commitments to avoid backwards incompatibility in the codec.
We instead rely on the MPP feature being set in nodeParams. That means MPP-enabled nodes need to update their reference.conf.
Add types to allow cleaner dependency validation. Most of the time we don't care whether a feature is activated as optional or mandatory, which caused duplicate code. This is now handled more cleanly. It also paves the way to annotate features with the places they should be advertised (Init vs NodeAnn vs ChannelAnn vs invoice).
This allows us to drop the global/local fields from the codebase. They are handled directly at the wire level.
aee1472 to
9c595e3
Compare
e894f17 to
1b2daaa
Compare
| trampoline-payments-enable = false // TODO: @t-bast: once spec-ed this should use a global feature flag | ||
| global-features = "0200" // variable_length_onion | ||
| local-features = "088a" // initial_routing_sync + option_data_loss_protect + option_channel_range_queries + option_channel_range_queries_ex | ||
| features = "0a8a" // initial_routing_sync + option_data_loss_protect + option_channel_range_queries + option_channel_range_queries_ex + variable_length_onion |
There was a problem hiding this comment.
I wonder if we should use a completely different method, using rfcName field:
features {
option_data_loss_protect = "mandatory"
initial_routing_sync = "optional"
gossip_queries = "mandatory"
...
}
Less error prone and more readable, but also less flexible.
There was a problem hiding this comment.
Would also affect the override-features attribute...
There was a problem hiding this comment.
I think it's a good idea if we really want to allow users to turn some features on and off.
The problem is there are quite a few features that we can't really turn off right now (some code paths will ignore the fact that a feature is turned off and still use it).
I think it makes sense to do that change once we've worked on making sure the code base really allows completely turning off all features.
eclair-core/src/main/scala/fr/acinq/eclair/wire/LightningMessageCodecs.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/wire/LightningMessageCodecsSpec.scala
Show resolved
Hide resolved
Due to changes in the features system (#1253), feature graph validation would fail with legacy 1.0.1 phoenix wallet. This check should be disabled as long as there are 1.0.1 Phoenix wallet in the wild.
Due to changes in the features system (#1253), feature graph validation would fail with legacy 1.0.1 Phoenix wallet. This check should be disabled as long as there are 1.0.1 Phoenix wallet in the wild.
This PR implements lightning/bolts#666
I removed the awkward
--allowMultiPartAPI parameter to instead rely onnodeParams.features.This feels cleaner and is how we'll integrate Trampoline support too.
Note that when we update our nodes, we'll need to update our
reference.conf:featuresformatfeaturesto advertise MPP supportCompatibility tests:
Not done in this PR (and should probably be done at some point):