Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

validate-chainspecs: check istanbul eips are in the foundation spec #11305

Merged
merged 2 commits into from
Dec 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ethcore/res/ethereum/foundation.json
Original file line number Diff line number Diff line change
@@ -164,11 +164,13 @@
"eip145Transition": "0x6f1580",
"eip1014Transition": "0x6f1580",
"eip1052Transition": "0x6f1580",
"eip1283Transition": "0x8a61c8",
"eip1283Transition": "0x0",
"eip1283DisableTransition": "0x0",
"eip1283ReenableTransition": "0x8a61c8",
"eip1344Transition": "0x8a61c8",
"eip1706Transition": "0x8a61c8",
"eip1884Transition": "0x8a61c8",
"eip2028Transition": "0x8a61c8",
"eip1344Transition": "0x8a61c8"
"eip2028Transition": "0x8a61c8"
},
"genesis": {
"seal": {
9 changes: 9 additions & 0 deletions scripts/gitlab/validate-chainspecs.sh
Original file line number Diff line number Diff line change
@@ -15,6 +15,15 @@ done
for spec in ethcore/res/ethereum/*.json; do
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
done

echo "________Mainnet contains Istanbul EIPs________"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't have to be addressed in this PR but would be good to run this on the other testing network (hard forks) such as Contantinople and so on.

In order to make sure that we are not breaking anything.

Copy link
Member Author

Choose a reason for hiding this comment

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

good point, but I think since we're running tests with istanbul_test spec, it should be caught there

for eip in $(grep --only-matching "eip.*Transition" ethcore/res/ethereum/istanbul_test.json); do
Copy link
Collaborator

@niklasad1 niklasad1 Dec 5, 2019

Choose a reason for hiding this comment

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

how to deal with re-enable transitions?

Copy link
Member Author

Choose a reason for hiding this comment

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

Add them to the chain spec?
#11228 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah, I guess that is easiest solution even though they are redundant in this case.

if ! grep -q $eip ethcore/res/ethereum/foundation.json; then
echo "ERROR: $eip is missing in the foundation json spec"
ERR=1
fi
done

#show sccache statistics
sccache --show-stats
exit $ERR