Closed robmcl4 closed 1 year ago
We do have a release for support under the alpha tag: https://github.com/trufflesuite/ganache/releases/tag/v7.4.4-alpha.0
You can track our progress getting it to stable here: https://github.com/trufflesuite/ganache/issues/3693#issuecomment-1284540912
Current Situation
ganache
only supports up to thegrayGlacier
ethereum hardfork (seesrc/chains/ethereum/options/src/chain-options.ts:5
).However, the Paris hardfork (aka 'The Merge') has been active for several weeks now. Critically, this makes for odd behavior regarding EIP-4399 "Supplant DIFFICULTY opcode with PREVRANDAO".
Proposal
I propose the following changes.
ganache
set theprevRandao
header field to0b100...00
, with an option inevm_mine
to set the value manually. The first bit is set to1
so that EVM applications may test for Paris hardfork activation by checking that thePREVRANDAO
value is greater than2**64
, as suggested in EIP-4399 (ctrl+f "The probability of RANDAO value").@ethereumjs/vm
dependency to supportBlock.prevRandao
, and update all invocations of the EVM to use theprevRandao
value as appropriate, if the Paris hardfork is active. Note that this will require a major version bump from v5 to v6 -- I am not sure how much work this would be.Caveat: although
@ethereumjs/evm
does advertise support for EIP-4399, it is currently marked as experimental (see their README)