-
Notifications
You must be signed in to change notification settings - Fork 68
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
Optimize block start time #867
Conversation
|
||
add_executable( test_block_timing_util test_block_timing_util.cpp ) | ||
target_link_libraries( test_block_timing_util producer_plugin eosio_testing ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this have been add_test()
ed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed by 6ee7e1f
|
plugins/producer_plugin/include/eosio/producer_plugin/block_timing_util.hpp
Outdated
Show resolved
Hide resolved
plugins/producer_plugin/include/eosio/producer_plugin/producer_plugin.hpp
Show resolved
Hide resolved
# Conflicts: # plugins/producer_plugin/producer_plugin.cpp
# Conflicts: # plugins/producer_plugin/producer_plugin.cpp
This PR optimizes the start times for block producing. Before this PR, a producer always starts producing each block at the time point of the multiple of config::block_interval_us (i.e. 500 ms) and spend at most
cpu-effort-percent
(i.e. 80 by default, so it is 400 ms out of 500 ms) to produce each block. Therefore it leaves 100 ms idle time in between each block producing. In this PR, we leave no gap in between block producing so that the last block in each production round can reach the next producer earlier so that the next producer can start producing on schedule.Removed configuration options:
The schema for Runtime_Options has changed to
Resolves #726