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

Start p2pool while base node is busy syncing #1545

Open
SWvheerden opened this issue Feb 19, 2025 · 0 comments
Open

Start p2pool while base node is busy syncing #1545

SWvheerden opened this issue Feb 19, 2025 · 0 comments

Comments

@SWvheerden
Copy link
Contributor

SWvheerden commented Feb 19, 2025

Description

Currently, Tari Universe startup is slower than necessary because P2Pool only begins loading blocks after the base node has fully synced. This results in additional delays, as P2Pool must complete its sync before pool mining can start.

To improve startup time, P2Pool should be allowed to start while the base node is still syncing. The primary dependency for P2Pool and the hash rate calculation benchmark is a block template from the base node. However, the base node can always provide a template while still syncing—setting the initial_sync_achieved flag to false in the gRPC request. At this stage, we are not concerned with mining actual blocks but only benchmarking the node.

By default, miners and the merge mining proxy will not mine when initial_sync_achieved is false. However, this restriction can be overridden by setting wait_for_initial_sync_at_startup = false.

In brief:

  • Change the startup sequence to take the benchmark for p2p tiers before the node is synced
  • Initiate p2pool as soon as the benchmark has been made, in parallel with the node sync

Concerns

The key question is whether anything else would prevent P2Pool from starting earlier when this setting is disabled. This needs to be confirmed.

Expectations

A lot of time is spent both in Node block sync, as well as p2pool connecting. If we can perform these tasks simultaneously we save the user time upfront, and our app starts quicker.

Assuming we find no additional problems with this idea, once complete we would like an un-scientific estimate of time saved. Let's compare how long setup takes on a machine with a known good connection against setup time when these two tasks are made parallel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants