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

IF: Fix double confirming test failure #2054

Merged
merged 5 commits into from
Jan 8, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented Jan 8, 2024

Reference contracts: https://github.com/AntelopeIO/reference-contracts eosio system tests were failing do a double confirmation error. Port of tests from reference contracts to provide same coverage in leap.

Revert unneeded changes in block_header_state_legacy since it no longer contains instant finality logic.
Add controller::head_active_producers() needed by tester.

… not found in existing unittests. Most of these are likely redundant, but change_inflation, votepay_share_invariant, and votepay_transition2 triggered a producer_double-confirming error no other tests found.
@heifner heifner requested review from greg7mdp and linh2931 January 8, 2024 18:55
@heifner heifner linked an issue Jan 8, 2024 that may be closed by this pull request
//idump((confirm_count[i]));
if( result.confirm_count[i] == 0 )
{
--result.confirm_count[i];
Copy link
Member

Choose a reason for hiding this comment

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

Why is the space removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just copied over the 5.0 impl, including spaces

@heifner heifner added the OCI Work exclusive to OCI team label Jan 8, 2024
Comment on lines +7 to +16
#warning Add last_proposed_finalizer_policy_generation to snapshot_block_header_state_v3, see header file TODO

namespace detail {
uint32_t get_next_next_round_block_num( block_timestamp_type t, uint32_t block_num ) {
auto index = t.slot % config::producer_repetitions; // current index in current round
// (increment to the end of this round ) + next round
return block_num + (config::producer_repetitions - index) + config::producer_repetitions;
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I moved this in a new file in my PR so as not to duplicate, however we can checkin as-is and I'll remove in my PR.

@heifner heifner merged commit 73a0d6c into hotstuff_integration Jan 8, 2024
26 checks passed
@heifner heifner deleted the GH-2033-double-confirming branch January 8, 2024 22:08
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: INTERNALS
summary: Better support for system contracts by consolidating confirmations and exposing head_active_producers
Note: end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IF: Re-enable reference-contract tests
4 participants