-
Notifications
You must be signed in to change notification settings - Fork 126
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
Update lnd compile-time dependency to v0.19 #1422
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 13822880107Details
💛 - Coveralls |
be66843
to
12575eb
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! Thanks for this - huge lift fosho 🙏
Left comments on 2 spots where the logging init can be simplified now that the rotating log writer and std-out logger have been divorced
@@ -569,10 +572,16 @@ func (a *AuxSweeper) createAndSignSweepVpackets( | |||
return lfn.Ok(vPkts) | |||
} | |||
|
|||
return lfn.AndThen2( | |||
return lfn.FlatMapResult( |
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.
nice 🙏 glad we didnt need to do AndThen(AndThen())
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.
We kind of had to... Just that AndThen
is now called FlatMapResult
😅
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 🍰
seems like we need to do some bump in LiT too?
LiT itest failure log
@GeorgeTsagk - see the PR description |
77fe4c2
to
7f57edc
Compare
Since this will break the |
opened this pr against this branch: #1427 |
321a9e1
to
8d4b4d0
Compare
We no longer need our custom action for adding Go module caching, since that functionality is now included in version 5 of the setup-go action. We also bump the checkout action to the latest one.
To reduce the size of the diff in the next commit, we update all usages of the lnd fn package where they are independent from lnd (meaning we don't use the results to interact with lnd). Anywhere we interact with lnd, we need to use the same version as lnd, so we'll need to do it in the next commit where we bump the lnd dependency.
Currently (*AuxTrafficShaper).ProduceHtlcExtraData exits early if the htlcCustomRecords are empty. However, we need to cater for the case when htlc custom records exist from other contexts (such as endorsement signaling) and so we change this check to be more strict and to check that the records dont contain any asset records.
Because GetInfo now (lnd 0.19) waits for all subsystems to be synced to the latest block, we might get into a deadlock situation if we call GetInfo downstream of an aux component call (which might happen in case of a force closure): Observed deadlock case: force closure of custom channel -> lnd detects force closure during block beat -> calls into aux component to resolve -> resolution involves registering a transfer in the chain porter -> chain porter gets CurrentHeight from chain bridge -> chain bridge calls into lnd's GetInfo -> GetInfo is blocked because the block beat sync is still waiting for the resolution of the aux channel. By diverting the call to the chain backend directly, we resolve this circular dependency.
Until we've merged the litd version bump PR for lnd (which in term requires this PR to be merged), we resolve the circular dependency by just pointing to that branch to prove the changes in this PR work.
Because spew.Sdump will iterate through the whole struct, it will also access maps, such as the underlying sync.Map. Which can then lead to concurrent map access, because that access isn't protected by the mutex.
This updates the compile-time dependency of
lnd
to the currentmaster
branch, which will be 0.19 RC1 very soon.The diff is quite large because of the following major changes in
lnd
:lnd/fn
was updated tolnd/fn/v2
which included some breaking API changesgithub.com/btcsuite/btclog/v2
lnd
itest framework removed the standby nodesNOTE: The
LiT
integration test is expected to fail for this PR, since this PR is required forlitd
to update. So we have a circular dependency here.