Skip to content

staticaddr: neutrino fixes #967

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
merged 6 commits into from
Jun 25, 2025
Merged

Conversation

starius
Copy link
Collaborator

@starius starius commented Jun 23, 2025

Recovered withdrawal transactions are now published in parallel to speed-up starting Loop.
Also increased the timeout given for this startup (including the withdrawals' recovery) from 10s to 1m.

Also added logging and removed an unused method in an interface.

Pull Request Checklist

  • Update release_notes.md if your PR contains major features, breaking changes or bugfixes

@starius starius requested a review from hieblmi June 23, 2025 04:06
@starius starius self-assigned this Jun 23, 2025
@starius starius marked this pull request as ready for review June 23, 2025 04:23
Copy link
Collaborator

@hieblmi hieblmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvement. Only see one issue, otherwise looks good to go.

@starius
Copy link
Collaborator Author

starius commented Jun 23, 2025

I pushed another commit staticaddr: use tx hash not *wire.MsgTx as a key. Noticed that recoverWithdrawals relies on GetActiveDepositsInState reusing the same *wire.MsgTx pointer for a unique transaction. Reworked this using txid to remove this assumption.

@starius starius requested review from hieblmi and bhandras June 23, 2025 13:05
@@ -227,15 +227,18 @@ func (m *Manager) recoverWithdrawals(ctx context.Context) error {
}

// Group the deposits by their finalized withdrawal transaction.
depositsByWithdrawalTx := make(map[*wire.MsgTx][]*deposit.Deposit)
depositsByWithdrawalTx := make(map[chainhash.Hash][]*deposit.Deposit)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix!

starius added 6 commits June 24, 2025 01:44
Use errgroup to publish each transaction in a separate goroutine.
Publishing a transaction can take a while in neutrino mode.
Do not rely on GetActiveDepositsInState reusing the same *wire.MsgTx
pointer for a unique transaction.
@starius
Copy link
Collaborator Author

starius commented Jun 24, 2025

Rebased and pushed another commit with logging fix "staticaddr: fix error formatting in the log".

Copy link
Member

@bhandras bhandras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⚡

@hieblmi hieblmi self-requested a review June 25, 2025 14:11
Copy link
Collaborator

@hieblmi hieblmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@starius starius merged commit fab4a64 into lightninglabs:master Jun 25, 2025
4 checks passed
@starius starius deleted the neutrino-fixes branch June 25, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants