-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove support for push_amount
#697
Conversation
8c41b22
to
1e8e148
Compare
1e8e148
to
31732b8
Compare
With the updated on-the-fly funding protocol, we're using liquidity ads instead of an unofficial `push_amount` TLV. We can thus remove usage of `push_amount`s everywhere, which simplifies the codebase.
31732b8
to
13f3819
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tested against eclair
readNumber() | ||
readNumber() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this state, the initial LocalCommit
/RemoteCommit
objects were already fully generated, and we don't need local/remote push_msat
to validate signatures.
We would only need local/remote push_msat
if we were to do a rbf, which we are not doing in Phoenix due to zeroconf.
So we can safely discard those values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you're saying at all...if we update the app and read data that was generated by the previous version of the app, we have to skip over the local_push_amount
and remote_push_amount
to be able to read the rest of the state data? If I remove those two lines, the rest of the decoding will fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are just review notes confirming that it is okay to discard those two fields after reading, which is not obvious. In particular it wasn't obvious that we wouldn't need this information to validate the signatures received in that state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I thought you were saying I could remove those two lines!
src/commonMain/kotlin/fr/acinq/lightning/serialization/v4/Deserialization.kt
Show resolved
Hide resolved
readNumber() | ||
readNumber() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark as above, those are safe to discard.
With the updated on-the-fly funding protocol, we're using liquidity ads instead of an unofficial
push_amount
TLV. We can thus remove usage ofpush_amount
s everywhere, which simplifies the codebase.