erigon-pulse/consensus/misc/eip4788.go
Andrew Ashikhmin 1fd9d20e14
EIP-4788 v2 (no precompile) (#8038)
See https://github.com/ethereum/EIPs/pull/7456 &
https://github.com/ethereum/go-ethereum/pull/27849. Also set the gas
limit for system calls to 30M (previously 2^64-1), which is in line with
the [Gnosis
spec](https://github.com/gnosischain/specs/blob/master/execution/withdrawals.md#specification),
but should be doubled checked for Gnosis Chain.
2023-08-24 17:10:50 +02:00

17 lines
458 B
Go

package misc
import (
"github.com/ledgerwatch/log/v3"
libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon/consensus"
"github.com/ledgerwatch/erigon/params"
)
func ApplyBeaconRootEip4788(parentBeaconBlockRoot *libcommon.Hash, syscall consensus.SystemCall) {
_, err := syscall(params.BeaconRootsAddress, parentBeaconBlockRoot.Bytes())
if err != nil {
log.Warn("Failed to call beacon roots contract", "err", err)
}
}