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

Run Consensus Tests on MuirGlacier #648

Merged
merged 6 commits into from
Jan 9, 2020

Conversation

holgerd77
Copy link
Member

@holgerd77 holgerd77 commented Jan 9, 2020

The HF comparison error fixed in #647 by @s1na was one of the most severe bugs in recent times, it actually makes the whole MuirGlacier pretty much unusable (this needs a bug fix release ASAP).

I am actually still amazed that this could slip through, this might need some further postmortem analysis. One major reason is actually the lack of consensus tests for the MuirGlacier HF.

This PR allows the VM to be tested with the MuirGlacier HF setting by falling back to the Istanbul tests. I also did some cleanup of the fork configuration in the test runner so to have a better distinction between the fork names/aliases used in the VM and the test runner.

I tested this with the pre #647 state of the VM (so what was actually released as the MuirGlacier release). Most of the consensus tests fail here.

@holgerd77 holgerd77 requested review from evertonfraga and s1na January 9, 2020 12:41
@codecov
Copy link

codecov bot commented Jan 9, 2020

Codecov Report

Merging #648 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #648   +/-   ##
======================================
  Coverage    91.4%   91.4%           
======================================
  Files          31      31           
  Lines        1978    1978           
  Branches      326     326           
======================================
  Hits         1808    1808           
  Misses         90      90           
  Partials       80      80
Flag Coverage Δ
#vm 91.4% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d9c923...910df45. Read the comment docs.

@holgerd77
Copy link
Member Author

Update: State tests really take too much time now which is impractical. I've now added a new test:state:selectedForks command - leaving Byzantium and Petersburg aside, test:state:allForks will still be run on a nightly basis.

Copy link
Contributor

@evertonfraga evertonfraga left a comment

Choose a reason for hiding this comment

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

I left two comments that might lead to changes. But i'm approving — these tests really take a long time to run! 👀

@@ -403,6 +403,11 @@ exports.setupPreConditions = function (state, testData, done) {
* @returns {String} Either an alias of the forkConfig param, or the forkConfig param itself
*/
exports.getRequiredForkConfigAlias = function (forkConfig) {
// Run the Istanbul tests for MuirGlacier since there are no dedicated tests
if (String(forkConfig).match(/^muirGlacier/i)) {
return 'Istanbul'
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the core of the PR. LGTM 👍

@@ -138,7 +141,7 @@ function runTests(name, runnerArgs, cb) {
testGetterArgs.skipTests = getSkipTests(argv.skip, argv.runSkipped ? 'NONE' : 'ALL')
testGetterArgs.runSkipped = getSkipTests(argv.runSkipped, 'NONE')
testGetterArgs.skipVM = skipVM
testGetterArgs.forkConfig = getRequiredForkConfigAlias(FORK_CONFIG)
testGetterArgs.forkConfig = FORK_CONFIG_TEST_SUITE
Copy link
Contributor

Choose a reason for hiding this comment

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

DRY-ing. 👍

@@ -178,7 +182,7 @@ function runTests(name, runnerArgs, cb) {
const runner = require(`./${name}Runner.js`)
// Tests for HFs before Istanbul have been moved under `LegacyTests/Constantinople`:
// https://github.com/ethereum/tests/releases/tag/v7.0.0-beta.1
if (runnerArgs.forkConfig !== 'Istanbul') {
if (testGetterArgs.forkConfig !== 'Istanbul') {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should safeguard this conditional with lteHardfork() instead, so Berlin HF tests aren't searched for in LegacyTests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I thought about that as well, just left it out for timing reasons.

@holgerd77 holgerd77 merged commit fcf1f90 into master Jan 9, 2020
@holgerd77 holgerd77 deleted the run-consensus-tests-on-muirglacier branch January 9, 2020 15:57
@holgerd77
Copy link
Member Author

@evertonfraga @s1na If one of you can prepare a short release PR on this in the next 1-2 hours, that would also be nice, won't make it in the next 4-5 hours. But also just if it fits in for you.

@evertonfraga evertonfraga added this to the VM v5 milestone Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants