Fix stale BP rotation duplicate schedules#61
Open
TheJudii wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root Cause
A previous rotation can leave
bp_currently_outandsbp_currently_inset. If the producer set later shrinks to exactly 21 active voted producers, the standby producer can move into the top 21. The old code skipped range validation whentotal_active_voted_prods <= TOP_PRODUCERS, so it reused the stale SBP and proposed a duplicate producer schedule.Validation
git diff --check HEAD~1 HEADapm2006/leap:v3.2.5-cdt4.0.1,cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=yes -Dleap_DIR=/opt/leap/build/lib/cmake/leap ..make -j 4 VERBOSE=1ctest -R telos_system_unit_test --output-on-failurepassed./unit_test --run_test=telos_system_tests/rotation_clears_when_standby_moves_into_top_21 --report_level=detailedpassed, 84/84 assertionsLocal Test Note
Full local
ctest -j 4 --output-on-failurewas also attempted under the amd64 Docker image on Apple Silicon.telos_system_unit_test,eosio_system_unit_test,eosio_system_limitauth_unit_test, andeosio_system_blockinfo_unit_testpassed. Three unrelated suites failed at startup with the same WASM access violation:eosio_msig_unit_test,eosio_token_unit_test, andeosio_wrap_unit_test. Those failures occur outside this touched area and appear to be local emulation/container related.