Documentation ¶
Index ¶
- Constants
- func SendTransaction(client *rpc.Client, key *ecdsa.PrivateKey, f *filler.Filler, gasPrice *big.Int, ...) error
- func WaitForBlocks(web3 *ethclient.Client, keystore *keystore.Key, blocksToWait uint64) error
- type Miner
- func (m *Miner) ENR() string
- func (m *Miner) KeystorePath() 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 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 SendTransaction ¶
Types ¶
type Miner ¶
type Miner struct { e2etypes.ComponentRunner // contains filtered or unexported fields }
Miner represents an ETH1 node which mines blocks.
func (*Miner) KeystorePath ¶
KeystorePath returns the path of the keystore file.
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.
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 beacon 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 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.