Skip to content
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

proof courier: general cleanup and refactor, re-try after restart #734

Merged
merged 10 commits into from
Jan 4, 2024

Conversation

guggero
Copy link
Member

@guggero guggero commented Dec 11, 2023

Fixes #597.

This PR removes a bunch of TODOs around the way proof couriers are instantiated and receive their configuration.
After the refactor we then fix a bug where we didn't attempt to fetch a proof using a proof courier again after restarting the daemon.

@guggero guggero requested review from ffranr and jharveyb December 11, 2023 18:23
@guggero guggero linked an issue Dec 11, 2023 that may be closed by this pull request
@guggero guggero force-pushed the proof-courier-cleanup branch 3 times, most recently from 8439119 to 96dcb41 Compare December 12, 2023 16:33
Copy link
Contributor

@ffranr ffranr left a comment

Choose a reason for hiding this comment

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

Nice to see the disentangled proof courier configs. I don't think moving the custodian delay makes sense to me.

proof/courier.go Outdated Show resolved Hide resolved
proof/courier.go Outdated Show resolved Hide resolved
@guggero guggero force-pushed the proof-courier-cleanup branch from 96dcb41 to 5128588 Compare December 20, 2023 15:58
@guggero guggero requested a review from ffranr December 20, 2023 15:58
Copy link
Contributor

@jharveyb jharveyb left a comment

Choose a reason for hiding this comment

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

LGTM, nice to see the simpler courier handling + general cleanup.

tapgarden/custodian_test.go Show resolved Hide resolved
itest/tapd_harness.go Show resolved Hide resolved
@guggero guggero force-pushed the proof-courier-cleanup branch from 5128588 to 6247fc9 Compare December 21, 2023 16:51
@lightninglabs-deploy
Copy link

@ffranr: review reminder
@guggero, remember to re-request review from reviewers when ready

Now that we have enabled a proof courier for all integration tests, we
don't need to conditionally load the config anymore.
With this commit we disentangle the configurations for the two proof
couriers, so we can configure them individually in a proper way.
@guggero guggero force-pushed the proof-courier-cleanup branch from 6247fc9 to a7dca4e Compare January 3, 2024 13:03
tapcfg/server.go Outdated Show resolved Hide resolved
tapgarden/custodian_test.go Show resolved Hide resolved
@ffranr
Copy link
Contributor

ffranr commented Jan 3, 2024

@guggero just two nits, but otherwise I can approve quickly

Instead of needing to create a special proof courier address and then
creating a courier from that, we want to have a central dispatcher that
can hold on to the configuration for each of the different couriers.
A courier is then created through the dispatcher directly.
@guggero guggero force-pushed the proof-courier-cleanup branch from a7dca4e to f5937f0 Compare January 4, 2024 08:41
This commit switches the custodian and porter over to using the new
proof courier dispatcher.
This then allows us to delete a bunch of now unused code related to
proof courier addresses.
We didn't re-try using a proof courier to receive an asset after a
restart of the daemon.
This commit fixes #597.
This commit moves the notification for subscribers about a transfer
being complete from the proof courier only part to the general function
we end up in if a transfer is complete.
This commit makes sure we only start the proof courier once the on-chain
transaction has confirmed. Otherwise we'll run into backoffs for sure
until we get the first confirmation.
By reducing the hashmail proof receiver ACK timeout from 15 seconds to 5
seconds, we can save quite some time during the integration tests.
@guggero guggero force-pushed the proof-courier-cleanup branch from f5937f0 to 016016b Compare January 4, 2024 08:41
@guggero guggero requested a review from ffranr January 4, 2024 08:42
Copy link
Contributor

@ffranr ffranr left a comment

Choose a reason for hiding this comment

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

Nice!

@ffranr ffranr added this pull request to the merge queue Jan 4, 2024
Merged via the queue into main with commit f8843fa Jan 4, 2024
14 checks passed
@guggero guggero deleted the proof-courier-cleanup branch January 4, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[bug]: Proof file not transmitted upon confirmation for asset transfer
4 participants