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

[3.1] plugin_http_api_test - fix timing issue #387

Merged
merged 2 commits into from
Jun 16, 2022

Conversation

heifner
Copy link
Member

@heifner heifner commented Jun 15, 2022

Backports: EOSIO/eos#10103

From EOSIO/eos#10103:
Consider the following scenario:

The overall plan is to activate a total of 17 protocol features.

The first 5 protocol features are activated and added to some block (let's say block 18).
While still on block 18, the remaining 12 protocol features transactions are executed (and they will be added to block 19, and the features will be active on block 20), and the check for waitForHeadToAdvance also gets executed while we are still on this block 18.
When the chain advances to block 19, the waitForHeadToAdvance method returns, but only 5 protocol features are really activated, leading to a state on the chain where we return from this method, but the protocol features are in realityy still not activated, leading to some failure on some further asserts that assume that this is the case after we return from preactivateAllBuiltinProtocolFeature.
Solution:

To handle this edge case, we wait 2 blocks, instead of 1, to make sure that all the transactions for protocol feature activations are executed and activated, also modify the timeout of the check for head advance to be proportional to the number of blocks we want to wait to advance.

Resolves #386

@heifner heifner added OCI OCI working this issue... 3.1 RC2 labels Jun 15, 2022
@heifner heifner changed the base branch from main to release/3.1.x June 15, 2022 03:16
Copy link
Member

@linh2931 linh2931 left a comment

Choose a reason for hiding this comment

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

Backport the PR in the original form. A new issue #406 was created to revisit activating the hardcoded list of protocol features.

@heifner heifner merged commit 0724f04 into release/3.1.x Jun 16, 2022
@heifner heifner deleted the fix-plugin-http-api-test branch June 16, 2022 22:28
@arhag arhag changed the title plugin_http_api_test - fix timing issue [3.1] plugin_http_api_test - fix timing issue Jul 1, 2022
@arhag arhag linked an issue Jul 1, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.1 RC2 OCI OCI working this issue...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants