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

Add the ascending bootstrap client #4158

Merged
merged 5 commits into from
Mar 14, 2023

Conversation

clemahieu
Copy link
Contributor

@clemahieu clemahieu commented Feb 27, 2023

This branch adds the ascending bootstrap client to the nano node. The associated server components and network messages were added in V24.

The client is an improvement in several categories compared to the legacy version.

  • Uses smaller message bundles instead of streams which reduces socket usage
  • Pulls blocks in an ascending manner rather than descending which lightens the burden on the "unchecked" table.
  • Reduce database deletes since now the unchecked table can exist entirely in memory.
  • Reduces bandwidth consumption from more efficient retry logic.
  • Simplifies and isolates bootstrap logic from the rest of the node

The client uses a priority-weighted tracing algorithm to pull successive iterations of blocks from peers.

The overall time from 0 blocks to a full block count has been significantly reduced.

@clemahieu clemahieu force-pushed the bootstrap_ascending_client branch 6 times, most recently from 0ae674f to 077538e Compare March 6, 2023 10:54
@thsfs thsfs added this to the V25.0 milestone Mar 6, 2023
@thsfs thsfs added the major This item indicates the need for or supplies a major or notable change label Mar 6, 2023
@clemahieu clemahieu force-pushed the bootstrap_ascending_client branch 5 times, most recently from 7d55ced to 095df2c Compare March 14, 2023 22:04
clemahieu and others added 5 commits March 14, 2023 22:19
With the ascending bootstrap process the number of blocks needing to be tracked can be limited and remain in memory.

The maximum number of blocks is set to 64k though typically far fewer are actually needed.

Co-authored-by: Piotr Wójcik <3044353+pwojcikdev@users.noreply.github.com>
Co-authored-by: gr0vity-dev <85646666+gr0vity-dev@users.noreply.github.com>
- Pulls blocks in an ascending order making use of network messages added in v24.
- Since blocks need to be inserted in an ascending order, this greatly decreases the number of unchecked blocks needing to be tracked.
- The client uses a priority-weighted tracing algorithm to pull successive iterations of blocks from peers.

Co-authored-by: Piotr Wójcik <3044353+pwojcikdev@users.noreply.github.com>
Co-authored-by: gr0vity-dev <85646666+gr0vity-dev@users.noreply.github.com>
Co-authored-by: Piotr Wójcik <3044353+pwojcikdev@users.noreply.github.com>
Co-authored-by: gr0vity-dev <85646666+gr0vity-dev@users.noreply.github.com>
Co-authored-by: Piotr Wójcik <3044353+pwojcikdev@users.noreply.github.com>
Co-authored-by: gr0vity-dev <85646666+gr0vity-dev@users.noreply.github.com>
Co-authored-by: Piotr Wójcik <3044353+pwojcikdev@users.noreply.github.com>
Co-authored-by: gr0vity-dev <85646666+gr0vity-dev@users.noreply.github.com>
@clemahieu clemahieu merged commit 022a10f into nanocurrency:develop Mar 14, 2023
@thsfs thsfs added the documentation This item indicates the need for or supplies updated or expanded documentation label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This item indicates the need for or supplies updated or expanded documentation major This item indicates the need for or supplies a major or notable change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants