-
Notifications
You must be signed in to change notification settings - Fork 406
Implement and document Channel/ChannelManager (de)serialization #223
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
Merged
TheBlueMatt
merged 28 commits into
lightningdevkit:master
from
TheBlueMatt:2018-10-chanmanager-serialize
Oct 27, 2018
Merged
Implement and document Channel/ChannelManager (de)serialization #223
TheBlueMatt
merged 28 commits into
lightningdevkit:master
from
TheBlueMatt:2018-10-chanmanager-serialize
Oct 27, 2018
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87b62e0
to
a56e717
Compare
think there is a bug in one condition checking in fn send_commitment(). was not sure comment on the closed pr get notified. |
Hmm, github doesn't auto-open files so your like is actually busted. Can you comment on the line you think is wrong? |
da37a9b
to
7fd3f11
Compare
this link works? |
Oops, indeed, will fix in #226. |
Extend KeyStorage with delayed_payment_base_key and per_commitment_point to derive local_delayed private key
Move ChannelKeys into keysinterface for generate a set of it from master_seed and change return type to panic on bogus data
Drop channel_close_key from ChannelKeys
…nnel Drop channel_monitor_claim_key from ChannelKeys
This greatly simplifies clients of PeerHandler, and because almost all response messages have already been moved to process_events this doesn't change much effeciency-wise.
During normal operation we should never need to take this, so we use a RwLock that allows normal parallelism until we want to serialize out our ChannelManager, at which point we can take the write-mode lock.
This slightly changes the serialization format, but we're still early enough that that's OK.
Also make block_connected take a &mut self to ensure serialized state will always be self-consistent.
7fd3f11
to
3b18677
Compare
3b18677
to
7f91572
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #217 and #222.
I'm sure there are bugs hiding in various state transitions and interaction with serialize/deserialize, and definitely need to think harder about potential for funds loss on deserializing old states with pending HTLC closure due to conflicts between deserialized ChannelManager/ChannelMonitors, but need to get the big API changes landed here first.