Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

config: fix atlantis mainnet block number #63

Merged
merged 9 commits into from
Jun 19, 2019

Conversation

soc1c
Copy link
Contributor

@soc1c soc1c commented Jun 17, 2019

we should not release any fork-block number unless there is one agreed upon.

@soc1c
Copy link
Contributor Author

soc1c commented Jun 17, 2019

I have no clue why this fails now

@GregTheGreek
Copy link

@austinabell @steviezhang

@meowsbits
Copy link

meowsbits commented Jun 17, 2019

Tests failure possibly rel #66
Also possibly rel #67

@meowsbits
Copy link

meowsbits commented Jun 17, 2019

Although I have a feeling that

--- FAIL: TestAccumulateRewards1 (0.00s)
    state_processor_test.go:270: Unexpected era value, want 1 < e < 5, got: 430
--- FAIL: TestAccumulateRewards2_2Uncles (0.00s)
    state_processor_test.go:270: Unexpected era value, want 1 < e < 5, got: 430
--- FAIL: TestAccumulateRewards3_1Uncle (0.00s)
    state_processor_test.go:270: Unexpected era value, want 1 < e < 5, got: 430
--- FAIL: TestAccumulateRewards4_0Uncles (0.00s)
    state_processor_test.go:270: Unexpected era value, want 1 < e < 5, got: 430
FAIL

is just a bad test...

https://circleci.com/gh/eth-classic/go-ethereum/415?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

@austinabell
Copy link
Contributor

AccumulateRewards tests fail due to the clause in state_processor_test.go:

// expectedEraFromBlockNumber is similar to GetBlockEra, but it
// returns a 1-indexed version of the number of type expectedEraForTesting
func expectedEraFromBlockNumber(i, eralen *big.Int, t *testing.T) expectedEraForTesting {
	e := GetBlockEra(i, eralen)
	ePlusOne := new(big.Int).Add(e, big.NewInt(1)) // since expectedEraForTesting is not 0-indexed; iota + 1
	ei := ePlusOne.Int64()
	expEra := int(ei)
	if expEra > 4 || expEra < 1 {
		t.Fatalf("Unexpected era value, want 1 < e < 5, got: %d", expEra)
	}
	return expectedEraForTesting(expEra)
}

just because it is expecting a certain era for testing

Other tests are failing because there is one final test in the TestCalcDifficulty1{Mainnet, Morden} tests that the block number is less than the number you are changing the config to:

big.NewInt(10000000): calcDifficultyAtlantis(time, &types.Header{Number: big.NewInt(10000000), Time: new(big.Int).SetUint64(parentTime), Difficulty: parentDiff}),

both are just existing tests that are not set up well and I had previously pushed back the block number in the test when I set the config to 8500000 for the difficulty tests

@austinabell austinabell mentioned this pull request Jun 18, 2019
@meowsbits
Copy link

are we wanting to remove f1b5ab5, or ignore (since included w/ #73) if we'll squash on merge?

@GregTheGreek
Copy link

@soc1c can you rebase to include changes from #73

@soc1c
Copy link
Contributor Author

soc1c commented Jun 19, 2019

it's already rebased and the checks passed

@GregTheGreek GregTheGreek merged commit f98e308 into development Jun 19, 2019
@soc1c soc1c deleted the s1-config-atlantis branch June 19, 2019 16:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants