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

Basic confirmation request loop enhancements #2327

Conversation

guilhermelawless
Copy link
Contributor

@guilhermelawless guilhermelawless commented Oct 7, 2019

This is split 1/? (a safe one) from #2306

  • Rename variables with suffix _l for local variables in request_confirm as it's a large function
  • Rename some variables so their purpose is obvious
  • Add callbacks to allow throttling broadcasting. It could happen that more broadcasts would be queued while the previous ones hadn't finished, especially under load
  • Add condition node.ledger.block_count_cache > node.ledger.cemented_count + roots.size () + pending_confirmation_height_size before checking frontiers as that can read the disk for 2 seconds when not necessary. It's still not perfect, per the in-file comment, as e.g., 10 roots can be added and they're transformed into a single frontier by the confirmation height processor. Open to ideas on making this condition more consistent.

@guilhermelawless guilhermelawless added the blocker Some future items cannot be completed until this is merged. label Oct 7, 2019
nano/node/network.cpp Outdated Show resolved Hide resolved
@guilhermelawless guilhermelawless removed the request for review from wezrule October 8, 2019 15:07
@guilhermelawless guilhermelawless merged commit 903391e into nanocurrency:master Oct 9, 2019
@guilhermelawless guilhermelawless deleted the network/throttle-confirm-loop branch October 9, 2019 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Some future items cannot be completed until this is merged. enhancement networking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants