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

Change default setup_policy of libtester to transition to Savanna #205

Merged
merged 33 commits into from
Jun 4, 2024

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented May 27, 2024

This PR fulfills the requirements set out by #202.

  • If the tester is constructed explicitly with a setup_policy it should still respect that. But if it a tester is default constructed, the new default setup_policy should be one that activates all protocol features and completes the transition to Savanna.

  • The behavior of the legacy version of tester under a full setup_policy should continue behaving as it currently does which is activating all the protocol features but not transition to Savanna consensus. Using the legacy version of the tester should require contract tests prior to Spring 1.0 to explicitly make changes to use the legacy version of the tester.

  • By default, contracts upgrading their libtester tests should be using the Savanna version of the tester (without any code changes required ideally). The behavior of the full setup_policy under the Savanna version of the tester is slightly different. It activates all the protocol features but then also transitions to Savanna consensus. It would be possible to stop short of transition to Savanna consensus by using a new setup_policy called full_except_do_not_transition_to_savanna.

  • The existing full_except_do_not_disable_deferred_trx setup_policy would also stop short of transitioning to the Savanna consensus (in both the legacy and Savanna versions of the tester).

  • As part of this work, also look at any remaining tests that use libtester but exist outside of the unittests directory. If these tests use an explicitly provided setup_policy, then they are not meant to exercise the tests under the environment of Savanna consensus and it is fine to keep these tests like this; they are not expected to fail. If the tests use the default setup_policy, the tests will now operate under Savanna consensus.

Notes:

@linh2931 linh2931 requested review from heifner and spoonincode May 27, 2024 15:36
@linh2931 linh2931 marked this pull request as draft May 27, 2024 15:41
@arhag arhag linked an issue May 28, 2024 that may be closed by this pull request
@linh2931 linh2931 marked this pull request as ready for review May 28, 2024 20:36
linh2931 and others added 2 commits May 28, 2024 16:38
…lt_tester to get around circular depenence between Spring and Reference Contracts
@ericpassmore
Copy link
Contributor

Note:start
group: STABILITY
category: TEST
summary: Enhance default setup policy default constructor to active all protocol features and switch to Savanna.
Note:end

@@ -4,6 +4,6 @@
"prerelease":true
},
"referencecontracts":{
"ref":"main"
"ref":"fix_failures_by_default_tester"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to change back after merge.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done by #233

tests/test_snapshot_information.cpp Outdated Show resolved Hide resolved
unittests/producer_schedule_if_tests.cpp Show resolved Hide resolved
unittests/producer_schedule_tests.cpp Outdated Show resolved Hide resolved
libraries/testing/include/eosio/testing/tester.hpp Outdated Show resolved Hide resolved
libraries/testing/include/eosio/testing/tester.hpp Outdated Show resolved Hide resolved
tests/test_snapshot_information.cpp Outdated Show resolved Hide resolved
unittests/finality_test_cluster.hpp Show resolved Hide resolved
unittests/forked_tests.cpp Show resolved Hide resolved
unittests/state_history_tests.cpp Show resolved Hide resolved
@linh2931 linh2931 merged commit d73eaf6 into main Jun 4, 2024
36 checks passed
@linh2931 linh2931 deleted the default_tester branch June 4, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants