Documentation
¶
Index ¶
- Constants
- Variables
- type EngineClient
- func (c *EngineClient) ExecuteTxs(ctx context.Context, txs [][]byte, blockHeight uint64, timestamp time.Time, ...) (updatedStateRoot []byte, maxBytes uint64, err error)
- func (c *EngineClient) GetTxs(ctx context.Context) ([][]byte, error)
- func (c *EngineClient) InitChain(ctx context.Context, genesisTime time.Time, initialHeight uint64, ...) ([]byte, uint64, error)
- func (c *EngineClient) SetFinal(ctx context.Context, blockHeight uint64) error
- func (c *EngineClient) SetLogger(l zerolog.Logger)
Constants ¶
View Source
const ( FlagEvmEthURL = "evm.eth-url" FlagEvmEngineURL = "evm.engine-url" FlagEvmJWTSecret = "evm.jwt-secret" FlagEvmGenesisHash = "evm.genesis-hash" FlagEvmFeeRecipient = "evm.fee-recipient" )
Variables ¶
View Source
var ( // ErrInvalidPayloadStatus indicates that EVM returned status != VALID ErrInvalidPayloadStatus = errors.New("invalid payload status") )
Functions ¶
This section is empty.
Types ¶
type EngineClient ¶
type EngineClient struct {
// contains filtered or unexported fields
}
EngineClient represents a client that interacts with an Ethereum execution engine through the Engine API. It manages connections to both the engine and standard Ethereum APIs, and maintains state related to block processing.
func NewEngineExecutionClient ¶
func NewEngineExecutionClient( ethURL, engineURL string, jwtSecret string, genesisHash common.Hash, feeRecipient common.Address, ) (*EngineClient, error)
NewEngineExecutionClient creates a new instance of EngineAPIExecutionClient
func (*EngineClient) ExecuteTxs ¶
func (c *EngineClient) ExecuteTxs(ctx context.Context, txs [][]byte, blockHeight uint64, timestamp time.Time, prevStateRoot []byte) (updatedStateRoot []byte, maxBytes uint64, err error)
ExecuteTxs executes the given transactions at the specified block height and timestamp
func (*EngineClient) GetTxs ¶
func (c *EngineClient) GetTxs(ctx context.Context) ([][]byte, error)
GetTxs retrieves transactions from the current execution payload
func (*EngineClient) InitChain ¶
func (c *EngineClient) InitChain(ctx context.Context, genesisTime time.Time, initialHeight uint64, chainID string) ([]byte, uint64, error)
InitChain initializes the blockchain with the given genesis parameters
func (*EngineClient) SetFinal ¶
func (c *EngineClient) SetFinal(ctx context.Context, blockHeight uint64) error
SetFinal marks the block at the given height as finalized
func (*EngineClient) SetLogger ¶
func (c *EngineClient) SetLogger(l zerolog.Logger)
SetLogger allows callers to attach a structured logger.
Click to show internal directories.
Click to hide internal directories.