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

[1.0-beta1 -> main] P2P: Fix switch from lib catchup to head catchup #149

Merged
merged 6 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3118,7 +3118,7 @@ namespace eosio {
if( my_impl->dispatcher.have_block( blk_id ) ) {
peer_dlog( this, "canceling wait, already received block ${num}, id ${id}...",
("num", blk_num)("id", blk_id.str().substr(8,16)) );
my_impl->sync_master->sync_recv_block( shared_from_this(), blk_id, blk_num, true, fc::microseconds::maximum() );
my_impl->sync_master->sync_recv_block( shared_from_this(), blk_id, blk_num, false, fc::microseconds::maximum() );
cancel_wait();

pending_message_buffer.advance_read_ptr( message_length );
Expand Down
17 changes: 14 additions & 3 deletions tests/nodeos_startup_catchup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,20 @@
cluster.setWalletMgr(walletMgr)

Print("Stand up cluster")
if cluster.launch(prodCount=prodCount, activateIF=activateIF, onlyBios=False, pnodes=pnodes, totalNodes=totalNodes, totalProducers=pnodes*prodCount,
unstartedNodes=catchupCount, loadSystemContract=True,
maximumP2pPerHost=totalNodes+trxGeneratorCnt) is False:
specificExtraNodeosArgs = {}
specificExtraNodeosArgs[pnodes+1] = f' --sync-fetch-span 1 '
specificExtraNodeosArgs[pnodes+2] = f' --sync-fetch-span 5 '
specificExtraNodeosArgs[pnodes+3] = f' --sync-fetch-span 21 '
specificExtraNodeosArgs[pnodes+4] = f' --sync-fetch-span 89 '
specificExtraNodeosArgs[pnodes+5] = f' --sync-fetch-span 377 '
specificExtraNodeosArgs[pnodes+6] = f' --sync-fetch-span 1597 '
specificExtraNodeosArgs[pnodes+7] = f' --sync-fetch-span 1597 '
specificExtraNodeosArgs[pnodes+8] = f' --sync-fetch-span 6765 '
specificExtraNodeosArgs[pnodes+9] = f' --sync-fetch-span 28657 '
specificExtraNodeosArgs[pnodes+10] = f' --sync-fetch-span 89 '
if cluster.launch(prodCount=prodCount, specificExtraNodeosArgs=specificExtraNodeosArgs, activateIF=activateIF, onlyBios=False,
pnodes=pnodes, totalNodes=totalNodes, totalProducers=pnodes*prodCount, unstartedNodes=catchupCount,
loadSystemContract=True, maximumP2pPerHost=totalNodes+trxGeneratorCnt) is False:
Utils.errorExit("Failed to stand up eos cluster.")

Print("Create test wallet")
Expand Down
Loading