Remove interop genesis service from beacon node (#14417)

* Remove interop dependencies from production binary for beacon-chain. Specifically, remove the interop genesis service.

Finding links to pebble: 
bazel query 'somepath(//cmd/beacon-chain, @com_github_cockroachdb_pebble//...)' --notool_deps

* Update INTEROP.md

* Remove interop config

* Remove ancient interop script

* Add electra support for premine genesis

* Add example of --chain-config-file, test interop instructions

* Fixes

* Add binary size reduction

* Update binary size reduction

* Fix duplicate switch case

* Move CHANGELOG entries to unreleased section

* gofmt

* fix
This commit is contained in:
Preston Van Loon
2024-12-03 13:08:49 -06:00
committed by GitHub
parent d09885b7ce
commit ac72fe2e0e
18 changed files with 86 additions and 621 deletions

View File

@@ -342,7 +342,7 @@ func (s *PremineGenesisConfig) setFork(g state.BeaconState) error {
case version.Deneb:
pv, cv = params.BeaconConfig().CapellaForkVersion, params.BeaconConfig().DenebForkVersion
case version.Electra:
pv, cv = params.BeaconConfig().ElectraForkVersion, params.BeaconConfig().ElectraForkVersion
pv, cv = params.BeaconConfig().DenebForkVersion, params.BeaconConfig().ElectraForkVersion
default:
return errUnsupportedVersion
}
@@ -665,8 +665,8 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error {
BlockHash: gb.Hash().Bytes(),
Transactions: make([][]byte, 0),
Withdrawals: make([]*enginev1.Withdrawal, 0),
ExcessBlobGas: *gb.ExcessBlobGas(),
BlobGasUsed: *gb.BlobGasUsed(),
ExcessBlobGas: unwrapUint64Ptr(gb.ExcessBlobGas()),
BlobGasUsed: unwrapUint64Ptr(gb.BlobGasUsed()),
}
wep, err := blocks.WrappedExecutionPayloadDeneb(payload)
if err != nil {
@@ -718,6 +718,13 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error {
return g.SetLatestExecutionPayloadHeader(ed)
}
func unwrapUint64Ptr(u *uint64) uint64 {
if u == nil {
return 0
}
return *u
}
func nZeroRoots(n uint64) [][]byte {
roots := make([][]byte, n)
zh := params.BeaconConfig().ZeroHash[:]