Documentation ¶
Index ¶
- Constants
- func EncodeBlobs(data []byte) ([]kzg4844.Blob, []kzg4844.Commitment, []kzg4844.Proof, []common.Hash, error)
- func New4844Tx(nonce uint64, to *common.Address, gasLimit uint64, ...) *types.Transaction
- func RandomBlobTx(rpc *rpc.Client, f *filler.Filler, sender common.Address, nonce uint64, ...) (*types.Transaction, error)
- func SendTransaction(client *rpc.Client, key *ecdsa.PrivateKey, f *filler.Filler, gasPrice *big.Int, ...) error
- func WaitForBlocks(web3 *ethclient.Client, key *keystore.Key, blocksToWait uint64) error
- type DepositHistory
- type Depositor
- func (d *Depositor) History() *DepositHistory
- func (d *Depositor) SendAndMine(ctx context.Context, offset, nvals int, batch types.DepositBatch, partial bool) error
- func (d *Depositor) SendDeposit(dep *eth.Deposit, txo *bind.TransactOpts, batch types.DepositBatch) error
- func (d *Depositor) UnderlyingProcess() *os.Process
- type Miner
- func (*Miner) DataDir(sub ...string) string
- func (m *Miner) ENR() string
- func (*Miner) Password() string
- func (m *Miner) Pause() error
- func (m *Miner) Resume() error
- func (m *Miner) SetBootstrapENR(bootstrapEnr string)
- func (m *Miner) Start(ctx context.Context) error
- func (m *Miner) Started() <-chan struct{}
- func (m *Miner) Stop() error
- type Node
- type NodeSet
- func (s *NodeSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
- func (s *NodeSet) Pause() error
- func (s *NodeSet) PauseAtIndex(i int) error
- func (s *NodeSet) Resume() error
- func (s *NodeSet) ResumeAtIndex(i int) error
- func (s *NodeSet) SetMinerENR(enr string)
- func (s *NodeSet) Start(ctx context.Context) error
- func (s *NodeSet) Started() <-chan struct{}
- func (s *NodeSet) Stop() error
- func (s *NodeSet) StopAtIndex(i int) error
- type Proxy
- func (node *Proxy) AddRequestInterceptor(rpcMethodName string, responseGen func() interface{}, trigger func() bool)
- func (node *Proxy) Pause() error
- func (node *Proxy) ReleaseBackedUpRequests(rpcMethodName string)
- func (node *Proxy) RemoveRequestInterceptor(rpcMethodName string)
- func (node *Proxy) Resume() error
- func (node *Proxy) Start(ctx context.Context) error
- func (node *Proxy) Started() <-chan struct{}
- func (node *Proxy) Stop() error
- type ProxySet
- func (s *ProxySet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
- func (s *ProxySet) Pause() error
- func (s *ProxySet) PauseAtIndex(i int) error
- func (s *ProxySet) Resume() error
- func (s *ProxySet) ResumeAtIndex(i int) error
- func (s *ProxySet) Start(ctx context.Context) error
- func (s *ProxySet) Started() <-chan struct{}
- func (s *ProxySet) Stop() error
- func (s *ProxySet) StopAtIndex(i int) error
- type SentDeposit
- type TransactionGenerator
Constants ¶
const (
EthAddress = "0x878705ba3f8bc32fcf7f4caa1a35e72af65cf766"
)
const KeystorePassword = "password"
KeystorePassword is the password used to decrypt ETH1 keystores.
const NetworkId = 1337
NetworkId is the ID of the ETH1 chain.
Variables ¶
This section is empty.
Functions ¶
func EncodeBlobs ¶
func RandomBlobTx ¶
func SendTransaction ¶
Types ¶
type DepositHistory ¶
DepositHistory is a type used by Depositor to keep track of batches of deposit for test assertion purposes.
func (*DepositHistory) Balances ¶
func (h *DepositHistory) Balances(batch types.DepositBatch) map[[48]byte]uint64
Balances sums, by validator, all deposit amounts that were sent as part of the given batch. This can be used in e2e evaluators to check that the results of deposit transactions are visible on chain.
type Depositor ¶
type Depositor struct { // The EmptyComponent type is embedded in the Depositor so that it satisfies the ComponentRunner interface. // This allows other components or e2e set up code to block until its Start method has been called. types.EmptyComponent Key *keystore.Key Client *ethclient.Client ChainID *big.Int NetworkId *big.Int // contains filtered or unexported fields }
func (*Depositor) History ¶
func (d *Depositor) History() *DepositHistory
History exposes the DepositHistory value for a Depositor.
func (*Depositor) SendAndMine ¶
func (d *Depositor) SendAndMine(ctx context.Context, offset, nvals int, batch types.DepositBatch, partial bool) error
SendAndMine uses the deterministic validator generator to generate deposits for `nvals` (number of validators). To control which validators should receive deposits, so that we can generate deposits at different stages of e2e, the `offset` parameter skips the first N validators in the deterministic list. In order to test the requirement that our deposit follower is able to handle multiple partial deposits, the `partial` flag specifies that half of the deposits should be broken up into 2 transactions. Once the set of deposits has been generated, it submits a transaction for each deposit (using 2 transactions for partial deposits) and then uses WaitForBlocks (which spams the miner node with transactions to and from its own address) to advance the chain until it has moved forward ETH1_FOLLOW_DISTANCE blocks.
func (*Depositor) SendDeposit ¶
func (d *Depositor) SendDeposit(dep *eth.Deposit, txo *bind.TransactOpts, batch types.DepositBatch) error
SendDeposit sends a single deposit. A record of this deposit will be tracked for the life of the Depositor, allowing evaluators to use the deposit history to make assertions about those deposits.
func (*Depositor) UnderlyingProcess ¶
type Miner ¶
type Miner struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
Miner represents an ETH1 node which mines blocks.
func (*Miner) SetBootstrapENR ¶
SetBootstrapENR sets the bootstrap record.
func (*Miner) Start ¶
Start runs a mining ETH1 node. The miner is responsible for moving the ETH1 chain forward and for deploying the deposit contract.
type Node ¶
type Node struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
Node represents an ETH1 node.
func (*Node) Start ¶
Start runs a non-mining ETH1 node. To connect to a miner and start working properly, this node should be a part of a NodeSet.
func (*Node) Started ¶
func (node *Node) Started() <-chan struct{}
Started checks whether ETH1 node is started and ready to be queried.
func (*Node) UnderlyingProcess ¶
type NodeSet ¶
type NodeSet struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
NodeSet represents a set of Eth1 nodes, none of which is a mining node.
func (*NodeSet) ComponentAtIndex ¶
func (s *NodeSet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
ComponentAtIndex returns the component at the provided index.
func (*NodeSet) PauseAtIndex ¶
PauseAtIndex pauses the component and its underlying process at the desired index.
func (*NodeSet) ResumeAtIndex ¶
ResumeAtIndex resumes the component and its underlying process at the desired index.
func (*NodeSet) SetMinerENR ¶
SetMinerENR sets the miner's enode, used to connect to the miner through P2P.
func (*NodeSet) Started ¶
func (s *NodeSet) Started() <-chan struct{}
Started checks whether execution node set is started and all nodes are ready to be queried.
func (*NodeSet) StopAtIndex ¶
StopAtIndex stops the component and its underlying process at the desired index.
type Proxy ¶
type Proxy struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
Proxy represents an engine-api proxy.
func (*Proxy) AddRequestInterceptor ¶
func (node *Proxy) AddRequestInterceptor(rpcMethodName string, responseGen func() interface{}, trigger func() bool)
AddRequestInterceptor adds in a json-rpc request interceptor.
func (*Proxy) ReleaseBackedUpRequests ¶
ReleaseBackedUpRequests releases backed up http requests which were previously ignored due to our interceptors.
func (*Proxy) RemoveRequestInterceptor ¶
RemoveRequestInterceptor removes the request interceptor for the provided method.
type ProxySet ¶
type ProxySet struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
ProxySet represents a set of proxies for the engine-api.
func NewProxySet ¶
func NewProxySet() *ProxySet
NewProxySet creates and returns a set of engine-api proxies.
func (*ProxySet) ComponentAtIndex ¶
func (s *ProxySet) ComponentAtIndex(i int) (e2etypes.ComponentRunner, error)
ComponentAtIndex returns the component at the provided index.
func (*ProxySet) PauseAtIndex ¶
PauseAtIndex pauses the component and its underlying process at the desired index.
func (*ProxySet) ResumeAtIndex ¶
ResumeAtIndex resumes the component and its underlying process at the desired index.
func (*ProxySet) Started ¶
func (s *ProxySet) Started() <-chan struct{}
Started checks whether proxy set is started and all proxies are ready to be queried.
func (*ProxySet) StopAtIndex ¶
StopAtIndex stops the component and its underlying process at the desired index.
type SentDeposit ¶
type SentDeposit struct {
// contains filtered or unexported fields
}
SentDeposit is the record of an individual deposit which has been successfully submitted as a transaction.
type TransactionGenerator ¶
type TransactionGenerator struct {
// contains filtered or unexported fields
}
func NewTransactionGenerator ¶
func NewTransactionGenerator(keystore string, seed int64) *TransactionGenerator
func (*TransactionGenerator) Pause ¶
func (t *TransactionGenerator) Pause() error
Pause pauses the component and its underlying process.
func (*TransactionGenerator) Resume ¶
func (t *TransactionGenerator) Resume() error
Resume resumes the component and its underlying process.
func (*TransactionGenerator) Start ¶
func (t *TransactionGenerator) Start(ctx context.Context) error
func (*TransactionGenerator) Started ¶
func (s *TransactionGenerator) Started() <-chan struct{}
Started checks whether beacon node set is started and all nodes are ready to be queried.
func (*TransactionGenerator) Stop ¶
func (t *TransactionGenerator) Stop() error
Stop stops the component and its underlying process.