flashbots/suave-geth

parameterize `genesisForkVersion` in `buildEthBlockTo`

zeroXbrock opened this issue · 2 comments

Describe the feature you would like

Currently we have this value hardcoded to Holesky's genesis fork version.
Add a new parameter chainId uint64 to BuildBlockArgs that maps the given chainId to that chain's genesisForkVersion to allow suapps to sign blocks for all currently-live ethereum networks, including mainnet, sepolia, and holesky.

For example, if chainId was set to 1, the genesisForkVersion should be phase0.Version{0x00, 0x00, 0x00, 0x00}.

Additional context

No response

The block is constructed by suave-execution-geth that is already linked to a specific chain, and this node has access to eth_chainId via its API. Instead of introducing a new parameter, suave-geth could utilize eth_chainId to dynamically determine the appropriate chain for each block. This would streamline the process by eliminating the need for users to specify an additional parameter.

Furthermore, since chain_id will already be queried by suave-geth, incorporating it directly into the initial build block response could enhance efficiency. However, this change would require modifying the existing interface.
An alternative could be to delegate the signing responsibility to suave-execution-geth. However, this might blur the functional boundaries within the suave-execution-geth architecture.