forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[1/3]: prepare blockbeat #7
Open
yyforyongyu
wants to merge
611
commits into
yy-itest-miner
Choose a base branch
from
yy-prepare-blockbeat
base: yy-itest-miner
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Pull reviewers statsStats of the last 30 days for lnd:
|
Pull Request Test Coverage Report for Build 9382071970Details
💛 - Coveralls |
yyforyongyu
force-pushed
the
yy-itest-miner
branch
from
June 11, 2024 04:02
2be0eb1
to
eab41d6
Compare
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
June 11, 2024 04:03
a203f49
to
055e150
Compare
yyforyongyu
force-pushed
the
yy-itest-miner
branch
from
June 13, 2024 09:59
eab41d6
to
1d2cbf7
Compare
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
June 13, 2024 10:00
055e150
to
df60558
Compare
Pull Request Test Coverage Report for Build 9497610191Details
💛 - Coveralls |
yyforyongyu
force-pushed
the
yy-itest-miner
branch
from
June 13, 2024 11:21
1d2cbf7
to
2b12d36
Compare
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
June 13, 2024 11:29
df60558
to
0712afa
Compare
Pull Request Test Coverage Report for Build 9498816450Details
💛 - Coveralls |
yyforyongyu
force-pushed
the
yy-itest-miner
branch
from
June 17, 2024 10:25
2b12d36
to
27f82d0
Compare
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
June 17, 2024 10:25
0712afa
to
8242ffd
Compare
Pull Request Test Coverage Report for Build 9546079138Details
💛 - Coveralls |
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
June 17, 2024 13:18
5762e85
to
8242ffd
Compare
Pull Request Test Coverage Report for Build 9548430627Details
💛 - Coveralls |
yyforyongyu
force-pushed
the
yy-itest-miner
branch
from
June 20, 2024 13:43
27f82d0
to
1e72278
Compare
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
June 20, 2024 13:43
8242ffd
to
bc13d54
Compare
Pull Request Test Coverage Report for Build 9598606296Details
💛 - Coveralls |
yyforyongyu
force-pushed
the
yy-itest-miner
branch
from
June 24, 2024 13:59
1e72278
to
3a91c55
Compare
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
June 24, 2024 13:59
bc13d54
to
01b173c
Compare
Pull Request Test Coverage Report for Build 9646711542Details
💛 - Coveralls |
yyforyongyu
force-pushed
the
yy-itest-miner
branch
from
June 24, 2024 17:39
3a91c55
to
d53be6a
Compare
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
June 25, 2024 13:13
01b173c
to
9224414
Compare
Pull Request Test Coverage Report for Build 9663141753Details
💛 - Coveralls |
yyforyongyu
force-pushed
the
yy-itest-miner
branch
from
June 27, 2024 01:28
d53be6a
to
1fecfe2
Compare
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
June 27, 2024 01:29
9224414
to
3b91244
Compare
yyforyongyu
force-pushed
the
yy-itest-miner
branch
from
June 27, 2024 18:21
1fecfe2
to
3309448
Compare
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
June 27, 2024 18:23
3b91244
to
fb67045
Compare
Pull Request Test Coverage Report for Build 9701688598Details
💛 - Coveralls |
It is used for sweeping time-locked outputs as well as non time-locked outputs.
This pure function creates signed commit transaction, using various inputs passed as struct TaprootSignedCommitTxInputs and a signer. This is needed to be able to store the inputs without a signature in SCB and sign the transaction in chantools scbforceclose. See https://github.com/lightningnetwork/lnd/pull/8183/files#r1423959791
Previous to this change taproot assets channels and simple taproot channels were considered the same in the context of chanbackup package, since they stored the same data. In the following commits we are adding the data needed to produce a signed commitment transaction from a SCB file and in order to do that we need to add more fields and a custom channel gets one additional field (TapscriptRoot) compared to a simple taproot channel. So now we have to distinguish these kinds of channels in chanbackup package. See PR lightningnetwork#8183 for more details.
The field is optional. It stores inputs needed to produce signed commit tx using chantools scbforceclose, which calls function GetSignedCommitTx. New backups have this field filled if commit tx is available (for all cases except when DLP is active). If a backup has this data, the field is filled from it, otherwise it is kept empty. Modified test function genRandomOpenChannelShell to cover new types of channels (simple taproot channel and custom channel) and to cover combinations of bits. Make sure that TapscriptRoot field is properly packed and unpacked.
This method inserts channel updates and waits for them to be processed. It will be used to update channel.backup upon LND shutdown.
This is needed to keep channel.backup up-to-date if the node is stopped.
Also updated release-notes.
…tic-backup chanbackup, server, rpcserver: put close unsigned tx, remote signature and commit height to SCB
In line with previous commits we are progressively removing the mutateState argument from this call stack for a more principled software design approach. NOTE FOR REVIEWERS: We take a naive approach to updating the tests here and simply take the functionality we are removing from evaluateHTLCView and run it directly after the function in the test suite. It's possible that we should instead remove this from the test suite altogether but I opted to take a more conservative approach with respect to reducing the scope of tests. If you have opinions here, please make them known.
This commit removes another raw boolean value and replaces it with a more clear type/name. This will also assist us when we later try and consolidate the logic of evaluateHTLCView into a single coherent computation.
This commit moves the collection of updates behind a Dual structure. This allows us in a later commit to index into it via a ChannelParty parameter which will simplify the loops in evaluateHTLCView.
This commit simplifies how we compute the commitment fee rate based off of the live updates. Prior to this commit we processed all of the FeeUpdate paymentDescriptors of both ChannelParty's. Now we only process the last FeeUpdate of the OpeningParty
We had four for-loops in evaluateHTLCView that were exact mirror images of each other. By making use of the new ChannelParty and Dual facilities introduced in prior commits, we consolidate these into two for-loops.
This further reduces loop complexity in evaluateHTLCView by using explicit filter steps rather than loop continue statements.
This commit observes that processAddEntry and processRemoveEntry are only invoked at a single call-site. Here we inline them at their call-sites, which will unlock further simplifications of the code that will allow us to remove pointer mutations in favor of explicit expression oriented programming. We also delete the tests associated with these functions, the overall functionality is implicitly tested by the TestEvaluateHTLCView tests.
Here we return the balance deltas from evaluateHTLCView rather than passing in references to variables that will be modified. It is a far cleaner and compositional approach which allows readers of this code to more effectively reason about the code without having to keep the whole codebase in their head.
…valuate-htlc-view [KILO]: DynComms Prefactor: Refactor/evaluate htlc view
So the block data can be used by subsystems without calling `GetBlock`.
Also updated the loggings. This new state will be used in the following commit.
This commit adds a new method `handleInitialBroadcast` to handle the initial broadcast. Previously we'd broadcast immediately inside `Broadcast`, which soon will not work after the `blockbeat` is implemented as the action to publish is now always triggered by a new block. Meanwhile, we still keep the option to bypass the block trigger so users can broadcast immediately by setting `Immediate` to true.
Previously in `markInputFailed`, we'd remove all inputs under the same group via `removeExclusiveGroup`. This is wrong as when the current sweep fails for this input, it shouldn't affect other inputs.
Also updated `handlePendingSweepsReq` to skip immature inputs so the returned results are the same as those in pre-0.18.0.
yyforyongyu
force-pushed
the
yy-prepare-blockbeat
branch
from
October 15, 2024 09:16
436aece
to
f6c5de6
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.
This PR prepares the incoming blockbeat PRs, the changes are,
BlockEpoch
now has the block data instead of block header. This block data is used in the incoming blockbeat PR to query spending transactions.TxError
. Inputs resulted in this state will be removed from the sweeper.