-
Notifications
You must be signed in to change notification settings - Fork 43
Add petersburg aka constantinople fix support #44
Add petersburg aka constantinople fix support #44
Conversation
//cc @davidmurdoch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one suggested addition (in the hardforks tests) in my comments. All the rest looks good to me.
2, | ||
'should return 2 active HFs when restricted to supported HFs', | ||
3, | ||
'should return 3 active HFs when restricted to supported HFs', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add another test here that checks that activeHardforks
behaves correctly when Common
is instantiated with at least one non-supported hardfork and activeHardforks
is called with the onlySupported
option. This would fulfill the original purpose of the test. Could use dao
as done below with one of the hardforkGteHardfork
tests.
example:
c = new Common('ropsten', null, ['spuriousDragon', 'byzantium', 'dao'])
st.equal(
c.activeHardforks(null, { onlySupported: true }).length,
3,
'should return 3 active HFs when restricted to supported HFs',
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added the additional test (result of this should be 2 though, to match the two supported from the three restricted to).
Thanks for the review! 😄 Will directly merge on tests passing since this was the only change requested and changes are not production-code touching.
I am going to further validate these changes by running the tests on ethereumjs-vm once I get the proper changes applied. I will work on that next. |
b49a7da
to
6ea794b
Compare
First thought of directly do a release on this, but maybe let's wait for the core devs call from tomorrow, maybe there will be some late adjustments to fork naming or something. |
(should not prevent from working on it on the VM side I suppose) |
That makes sense. I am currently trying to get this branch installed in the vm... running into trouble, but hopefully will have it sorted soon. |
I had once deleted and then recreated the branch after thinking that you'll need it for development (sorry). Not sure if this can be the cause for your problems. You can for the moment also alternatively develop against the master branch. |
Addresses #41.
This PR adds a new HF file for the
petersburg
HF (akaconstantinopleFix
), adds HF numbers for mainnet and ropsten and fixes a bug on HF comparison along the way (see commit messages).