-
Notifications
You must be signed in to change notification settings - Fork 6
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
Guarantee net_plugin processes votes after it has has processed the block the vote was for #3
Comments
arhag
changed the title
IF: Guarantee net_plugin processes votes after it has has processed the block the vote was for
Guarantee net_plugin processes votes after it has has processed the block the vote was for
Apr 10, 2024
atomic<uint32_t> latest_block_num;
atomic<uint32_t> lib;
set_lib(lib) { lib = lib; notify_one(); }
add_vote( v ) { append(v); latest_block_num = std::max(latest_block_num, v.block_num); notify_one(); }
each thread:
while (true) {
_cond.wait([]() {
if (stopped || !empty) return true;
}
if (stopped) break;
remove_votes_before_lib();
uint32_t block_num = latest_block_num;
block_state_ptr bsp = forkdb.get(block_num);
for each connection by latency {
if( block_num != latest_block_num) {
block_num = latest_block_num;
bsp = forkdb.get(block_num);
}
process_votes_for_block(conn_id, bsp);
block_num = idx.get_latest_block_num();
}
}
process_votes_for_block(conn_id, bsp) {
for bsp->finalizer_size():
process_vote(conn_id, bsp);
} |
heifner
added a commit
that referenced
this issue
Apr 10, 2024
heifner
added a commit
that referenced
this issue
Apr 11, 2024
heifner
added a commit
that referenced
this issue
Apr 11, 2024
heifner
added a commit
that referenced
this issue
Apr 11, 2024
heifner
added a commit
that referenced
this issue
Apr 11, 2024
heifner
added a commit
that referenced
this issue
Apr 11, 2024
heifner
added a commit
that referenced
this issue
Apr 11, 2024
heifner
added a commit
that referenced
this issue
Apr 11, 2024
heifner
added a commit
that referenced
this issue
Apr 12, 2024
heifner
added a commit
that referenced
this issue
Apr 12, 2024
heifner
added a commit
that referenced
this issue
Apr 12, 2024
heifner
added a commit
that referenced
this issue
Apr 12, 2024
heifner
added a commit
that referenced
this issue
Apr 12, 2024
…at time of C production it will not get a block until A turn. Need to wait at least 7 seconds. Used 10 here to provide a bit of buffer.
heifner
added a commit
that referenced
this issue
Apr 12, 2024
heifner
added a commit
that referenced
this issue
Apr 12, 2024
heifner
added a commit
that referenced
this issue
Apr 16, 2024
heifner
added a commit
that referenced
this issue
Apr 16, 2024
heifner
added a commit
that referenced
this issue
Apr 16, 2024
heifner
added a commit
that referenced
this issue
Apr 16, 2024
heifner
added a commit
that referenced
this issue
Apr 16, 2024
heifner
added a commit
that referenced
this issue
Apr 16, 2024
heifner
added a commit
that referenced
this issue
Apr 16, 2024
heifner
added a commit
that referenced
this issue
Apr 17, 2024
heifner
added a commit
that referenced
this issue
Apr 17, 2024
heifner
added a commit
that referenced
this issue
Apr 18, 2024
heifner
added a commit
that referenced
this issue
Apr 18, 2024
heifner
added a commit
that referenced
this issue
Apr 18, 2024
heifner
added a commit
that referenced
this issue
Apr 18, 2024
heifner
added a commit
that referenced
this issue
Apr 19, 2024
IF: Process votes in a dedicated thread pool
systemzax
added a commit
that referenced
this issue
Jul 25, 2024
… leave room for additional test covering joint finalizer policies
systemzax
added a commit
that referenced
this issue
Aug 8, 2024
systemzax
added a commit
that referenced
this issue
Aug 8, 2024
systemzax
added a commit
that referenced
this issue
Aug 21, 2024
systemzax
added a commit
that referenced
this issue
Aug 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Depends on AntelopeIO/leap#2102.
The net_plugin will be responsible for respecting this order per connection. It can leverage the existing cache of block IDs received and sent per connection to know when it is the appropriate time to process the votes per each connection.
We also need to make sure we process the block (add to fork database) before we process the votes for that block, otherwise they will be dropped.
The text was updated successfully, but these errors were encountered: