Documentation ¶
Index ¶
- Constants
- Variables
- func FetchLatestEthereumClientDockerImageVersionIfNeed(dockerImageWithVersion string) (string, error)
- func FormatHttpUrl(host string, port string) string
- func FormatWsUrl(host string, port string) string
- func GetEndpoint(ctx context.Context, container tc.Container, endpointType string) (string, error)
- func GetHost(ctx context.Context, container tc.Container) (string, error)
- func IsDockerImageVersionSupported(imageWithVersion string) (bool, string, error)
- func NatPort(port string) nat.Port
- func NatPortFormat(port string) string
- func UniqueStringSlice(slice []string) []string
- type AfterGenesisHelper
- type Besu
- func (g *Besu) GetContainer() *tc.Container
- func (g *Besu) GetContainerName() string
- func (g *Besu) GetEthereumVersion() config_types.EthereumVersion
- func (g *Besu) GetExternalExecutionURL() string
- func (g *Besu) GetExternalHttpUrl() string
- func (g *Besu) GetExternalWsUrl() string
- func (g *Besu) GetInternalExecutionURL() string
- func (g *Besu) GetInternalHttpUrl() string
- func (g *Besu) GetInternalWsUrl() string
- func (g *Besu) GethConsensusMechanism() ConsensusMechanism
- func (g *Besu) StartContainer() (blockchain.EVMNetwork, error)
- func (g *Besu) WaitUntilChainIsReady(ctx context.Context, waitTime time.Duration) error
- func (g *Besu) WithTestInstance(t *testing.T) ExecutionClient
- type ConsensusMechanism
- type EnvComponent
- func (ec EnvComponent) ChaosNetworkDelay(l zerolog.Logger, duration time.Duration, delay time.Duration, ...) error
- func (ec EnvComponent) ChaosNetworkLoss(l zerolog.Logger, duration time.Duration, lossPercentage int, ...) error
- func (ec EnvComponent) ChaosPause(l zerolog.Logger, duration time.Duration) error
- func (ec *EnvComponent) GetImageWithVersion() string
- func (ec *EnvComponent) SetDefaultHooks()
- type EnvComponentOption
- func WithContainerImageWithVersion(imageWithVersion string) EnvComponentOption
- func WithContainerName(name string) EnvComponentOption
- func WithLogLevel(logLevel string) EnvComponentOption
- func WithLogStream(ls *logstream.LogStream) EnvComponentOption
- func WithPostStartsHooks(hooks ...tc.ContainerHook) EnvComponentOption
- func WithPostStopsHooks(hooks ...tc.ContainerHook) EnvComponentOption
- func WithPreTerminatesHooks(hooks ...tc.ContainerHook) EnvComponentOption
- func WithStartupTimeout(timeout time.Duration) EnvComponentOption
- type Erigon
- func (g *Erigon) GetContainer() *tc.Container
- func (g *Erigon) GetContainerName() string
- func (g *Erigon) GetEthereumVersion() config_types.EthereumVersion
- func (g *Erigon) GetExternalExecutionURL() string
- func (g *Erigon) GetExternalHttpUrl() string
- func (g *Erigon) GetExternalWsUrl() string
- func (g *Erigon) GetInternalExecutionURL() string
- func (g *Erigon) GetInternalHttpUrl() string
- func (g *Erigon) GetInternalWsUrl() string
- func (g *Erigon) GethConsensusMechanism() ConsensusMechanism
- func (g *Erigon) StartContainer() (blockchain.EVMNetwork, error)
- func (g *Erigon) WaitUntilChainIsReady(ctx context.Context, waitTime time.Duration) error
- func (g *Erigon) WithTestInstance(t *testing.T) ExecutionClient
- type EthGenesisGenerator
- type EthereumNetwork
- type EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) Build() (EthereumNetwork, error)
- func (b *EthereumNetworkBuilder) WithConsensusLayer(consensusLayer config.ConsensusLayer) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithConsensusType(consensusType config.ConsensusType) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithCustomDockerImages(newImages map[config.ContainerType]string) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithDockerNetworks(networks []string) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithEthereumChainConfig(config config.EthereumChainConfig) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithEthereumVersion(ethereumVersion config_types.EthereumVersion) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithExecutionLayer(executionLayer config_types.ExecutionLayer) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithExistingConfig(config config.EthereumNetworkConfig) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithExistingConfigFromEnvVar() *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithLogStream(ls *logstream.LogStream) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithNodeLogLevel(nodeLogLevel string) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithTest(t *testing.T) *EthereumNetworkBuilder
- func (b *EthereumNetworkBuilder) WithWaitingForFinalization() *EthereumNetworkBuilder
- type ExecutionClient
- type ExitCodeStrategy
- func (w *ExitCodeStrategy) WaitUntilReady(ctx context.Context, target tcwait.StrategyTarget) (err error)
- func (w *ExitCodeStrategy) WithExitCode(exitCode int) *ExitCodeStrategy
- func (w *ExitCodeStrategy) WithPollInterval(pollInterval time.Duration) *ExitCodeStrategy
- func (w *ExitCodeStrategy) WithTimeout(timeout time.Duration) *ExitCodeStrategy
- type Geth
- func (g *Geth) GetContainer() *tc.Container
- func (g *Geth) GetContainerName() string
- func (g *Geth) GetEthereumVersion() config_types.EthereumVersion
- func (g *Geth) GetExternalExecutionURL() string
- func (g *Geth) GetExternalHttpUrl() string
- func (g *Geth) GetExternalWsUrl() string
- func (g *Geth) GetInternalExecutionURL() string
- func (g *Geth) GetInternalHttpUrl() string
- func (g *Geth) GetInternalWsUrl() string
- func (g *Geth) GethConsensusMechanism() ConsensusMechanism
- func (g *Geth) StartContainer() (blockchain.EVMNetwork, error)
- func (g *Geth) WaitUntilChainIsReady(ctx context.Context, waitTime time.Duration) error
- func (g *Geth) WithTestInstance(t *testing.T) ExecutionClient
- type HTTPStrategy
- type Kafka
- func (k *Kafka) CreateLocalTopics() error
- func (k *Kafka) StartContainer() error
- func (k *Kafka) WithContainerName(name string) *Kafka
- func (k *Kafka) WithEnvVars(envVars map[string]string) *Kafka
- func (k *Kafka) WithTestInstance(t *testing.T) *Kafka
- func (k *Kafka) WithTopics(topics []KafkaTopicConfig) *Kafka
- func (k *Kafka) WithZookeeper(zookeeperUrl string) *Kafka
- type KafkaTopicConfig
- type Killgrave
- func (k *Killgrave) AddImposter(imposters []KillgraveImposter) error
- func (k *Killgrave) GetReceivedRequests() ([]RequestData, error)
- func (k *Killgrave) SetAdapterBasedAnyValuePath(path string, methods []string, v interface{}) error
- func (k *Killgrave) SetAdapterBasedIntValuePath(path string, methods []string, v int) error
- func (k *Killgrave) SetAnyValueResponse(path string, methods []string, v interface{}) error
- func (k *Killgrave) SetStringValuePath(path string, methods []string, headers map[string]string, v string) error
- func (k *Killgrave) StartContainer() error
- func (k *Killgrave) WithTestInstance(t *testing.T) *Killgrave
- type KillgraveAdapterResponse
- type KillgraveAdapterResult
- type KillgraveImposter
- type KillgraveRequest
- type KillgraveResponse
- type KillgraveResponseDelay
- type MockServer
- type Nethermind
- func (g *Nethermind) GetContainer() *tc.Container
- func (g *Nethermind) GetContainerName() string
- func (g *Nethermind) GetEthereumVersion() config_types.EthereumVersion
- func (g *Nethermind) GetExternalExecutionURL() string
- func (g *Nethermind) GetExternalHttpUrl() string
- func (g *Nethermind) GetExternalWsUrl() string
- func (g *Nethermind) GetInternalExecutionURL() string
- func (g *Nethermind) GetInternalHttpUrl() string
- func (g *Nethermind) GetInternalWsUrl() string
- func (g *Nethermind) GethConsensusMechanism() ConsensusMechanism
- func (g *Nethermind) StartContainer() (blockchain.EVMNetwork, error)
- func (g *Nethermind) WaitUntilChainIsReady(ctx context.Context, waitTime time.Duration) error
- func (g *Nethermind) WithTestInstance(t *testing.T) ExecutionClient
- type PostgresDb
- type PostgresDbOption
- func WithContainerEnv(key, value string) PostgresDbOption
- func WithPostgresDbContainerName(name string) PostgresDbOption
- func WithPostgresDbLogStream(ls *logstream.LogStream) PostgresDbOption
- func WithPostgresDbName(name string) PostgresDbOption
- func WithPostgresImageName(imageName string) PostgresDbOption
- func WithPostgresImageVersion(version string) PostgresDbOption
- type PrysmBeaconChain
- type PrysmValidator
- type RequestData
- type Reth
- func (g *Reth) GetContainer() *tc.Container
- func (g *Reth) GetContainerName() string
- func (g *Reth) GetEthereumVersion() config_types.EthereumVersion
- func (g *Reth) GetExternalExecutionURL() string
- func (g *Reth) GetExternalHttpUrl() string
- func (g *Reth) GetExternalWsUrl() string
- func (g *Reth) GetInternalExecutionURL() string
- func (g *Reth) GetInternalHttpUrl() string
- func (g *Reth) GetInternalWsUrl() string
- func (g *Reth) GethConsensusMechanism() ConsensusMechanism
- func (g *Reth) StartContainer() (blockchain.EVMNetwork, error)
- func (g *Reth) WaitUntilChainIsReady(ctx context.Context, waitTime time.Duration) error
- func (g *Reth) WithTestInstance(t *testing.T) ExecutionClient
- type RpcProvider
- type SchemaRegistry
- func (r *SchemaRegistry) StartContainer() error
- func (r *SchemaRegistry) WithContainerName(name string) *SchemaRegistry
- func (r *SchemaRegistry) WithEnvVars(envVars map[string]string) *SchemaRegistry
- func (r *SchemaRegistry) WithKafka(kafkaUrl string) *SchemaRegistry
- func (r *SchemaRegistry) WithTestInstance(t *testing.T) *SchemaRegistry
- type UnsupportedVersion
- type ValKeysGenerator
- type WebSocketStrategy
- type Zookeeper
Constants ¶
const ( RootFundingAddr = `0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266` RootFundingWallet = `` /* 491-byte string literal not displayed */ DEFAULT_EVM_NODE_HTTP_PORT = "8544" DEFAULT_EVM_NODE_WS_PORT = "8545" )
const ( PRYSM_QUERY_RPC_PORT = "3500" PRYSM_NODE_RPC_PORT = "4000" )
const AUTOMATIC_LATEST_TAG = "latest_available"
const AUTOMATIC_STABLE_LATEST_TAG = "latest_stable"
const (
BaseCMD = `docker run -i --rm -v /var/run/docker.sock:/var/run/docker.sock --network %s gaiaadm/pumba --log-level=info`
)
const (
CONFIG_ENV_VAR_NAME = "PRIVATE_ETHEREUM_NETWORK_CONFIG_PATH"
)
Variables ¶
var ( ETH2_EXECUTION_PORT = "8551" WALLET_PASSWORD = "password" GENERATED_VALIDATOR_KEYS_DIR_INSIDE_CONTAINER = "/keys" NODE_0_DIR_INSIDE_CONTAINER = fmt.Sprintf("%s/node-0", GENERATED_VALIDATOR_KEYS_DIR_INSIDE_CONTAINER) VALIDATOR_BIP39_MNEMONIC = "" /* 152-byte string literal not displayed */ )
var ( ErrMissingConsensusLayer = errors.New("consensus layer is required for PoS") ErrTestConfigNotSaved = errors.New("could not save test env config") )
var FundingAddresses = map[string]string{
"f39fd6e51aad88f6f4ce6ab8827279cfffb92266": `{"address":"f39fd6e51aad88f6f4ce6ab8827279cfffb92266","crypto":{"cipher":"aes-128-ctr","ciphertext":"c36afd6e60b82d6844530bd6ab44dbc3b85a53e826c3a7f6fc6a75ce38c1e4c6","cipherparams":{"iv":"f69d2bb8cd0cb6274535656553b61806"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"80d5f5e38ba175b6b89acfc8ea62a6f163970504af301292377ff7baafedab53"},"mac":"f2ecec2c4d05aacc10eba5235354c2fcc3776824f81ec6de98022f704efbf065"},"id":"e5c124e9-e280-4b10-a27b-d7f3e516b408","version":3}`,
"70997970c51812dc3a010c7d01b50e0d17dc79c8": `{"address":"70997970c51812dc3a010c7d01b50e0d17dc79c8","crypto":{"cipher":"aes-128-ctr","ciphertext":"f8183fa00bc112645d3e23e29a233e214f7c708bf49d72750c08af88ad76c980","cipherparams":{"iv":"796d08e3e1f71bde89ed826abda96cda"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"03c864a22a1f7b06b1da12d8b93e024ac144f898285907c58b2abc135fc8a35c"},"mac":"5fe91b1a1821c0d9f85dfd582354ead9612e9a7e9adc38b06a2beff558c119ac"},"id":"d2cab765-5e30-42ae-bb91-f090d9574fae","version":3}`,
"3c44cdddb6a900fa2b585dd299e03d12fa4293bc": `{"address":"3c44cdddb6a900fa2b585dd299e03d12fa4293bc","crypto":{"cipher":"aes-128-ctr","ciphertext":"2cd6ab87086c47f343f2c4d957eace7986f3b3c87fc35a2aafbefb57a06d9f1c","cipherparams":{"iv":"4e16b6cd580866c1aa642fb4d7312c9b"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"0cabde93877f6e9a59070f9992f7a01848618263124835c90d4d07a0041fc57c"},"mac":"94b7776ea95b0ecd8406c7755acf17b389b7ebe489a8942e32082dfdc1f04f57"},"id":"ade1484b-a3bb-426f-9223-a1f5e3bde2e8","version":3}`,
"90f79bf6eb2c4f870365e785982e1f101e93b906": `{"address":"90f79bf6eb2c4f870365e785982e1f101e93b906","crypto":{"cipher":"aes-128-ctr","ciphertext":"15144214d323871e00f7b205368128061c91b77a27b7deec935f8f5b734f0d42","cipherparams":{"iv":"bb22ba8051ef9f60abded7a9f4f2c6ae"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"07331ef3035567c00830b4e50d5dd68bc877974b4ce38cd42fef755be01556c9"},"mac":"2294eacadaf2761851814451d8c7dcca20a606a0344335d98f09403aba4e82ca"},"id":"96af8cc7-97e1-4bba-8968-632b034986c2","version":3}`,
"15d34aaf54267db7d7c367839aaf71a00a2c6a65": `{"address":"15d34aaf54267db7d7c367839aaf71a00a2c6a65","crypto":{"cipher":"aes-128-ctr","ciphertext":"057878284a6c74d3ad99910adddd6b477b383837dbf2280efea585f0f0fdb012","cipherparams":{"iv":"e6eab29d60b526f305f8d47badf48687"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"dfdca8066d2486da5cb9a909d03744e2a8c6537930271e85e7cd8a5d952c0f22"},"mac":"f8352be41c9a06d69111ca4d8fcff0eef079b68b1173cad99803538991716c5d"},"id":"a35bb452-0d57-42d5-8d25-5a00a40a4db8","version":3}`,
"9965507d1a55bcc2695c58ba16fb37d819b0a4dc": `{"address":"9965507d1a55bcc2695c58ba16fb37d819b0a4dc","crypto":{"cipher":"aes-128-ctr","ciphertext":"5a73201500307c6aa98edd44d962b344a893768331454a61595ec848e738e9d2","cipherparams":{"iv":"5282de2b3e2b305019a2fed5c62f3383"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"6ad001831d097f175fff7d6cf61301e9620b32afd9a7a6437e6030af14576a96"},"mac":"0a55eddbd13c713aa8b8c4106b2fb62bc1d1e18e7177207a444f83a4d8426ed5"},"id":"27aed2b2-cb94-4d37-8819-b15219187bb5","version":3}`,
"976ea74026e726554db657fa54763abd0c3a0aa9": `{"address":"976ea74026e726554db657fa54763abd0c3a0aa9","crypto":{"cipher":"aes-128-ctr","ciphertext":"a6edf11e81b38e60a549696236cb9efc026e87adc45a9521ea7b2c45a2a9fbb9","cipherparams":{"iv":"82f4c79cd4b28a8585a9c78d758f832b"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"87400e16ecc320dadff85eccbf4dbaaea2dd91e50047e4aa391799bb319c1fd8"},"mac":"80c83dad05998db6c673a97096fcfad54636458f4a3c82483686b253f8cc9b69"},"id":"fc7d7694-6206-48fc-bb25-36b523f90df6","version":3}`,
"14dc79964da2c08b23698b3d3cc7ca32193d9955": `{"address":"14dc79964da2c08b23698b3d3cc7ca32193d9955","crypto":{"cipher":"aes-128-ctr","ciphertext":"410f258bc8b12a0250cba22cbc5e413534fcf90bf322ced6943189ad9e43b4b9","cipherparams":{"iv":"1dd6077a8bee9b3bf2ca90e6abc8a237"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"5d3358bf99bbcb82354f40e5501abf4336bc141ee05d8feed4fbe7eb8c08c917"},"mac":"9cd959fa1e8129a8deb86e0264ec81d6cde79b5a19ae259b7d00543c9037908a"},"id":"689d7ad2-fe46-4c09-9c2a-a50e607989b8","version":3}`,
"23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f": `{"address":"23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f","crypto":{"cipher":"aes-128-ctr","ciphertext":"13dccac740314edea20d44e6f3592575bbcb739ec5892d635326cff3c386eb86","cipherparams":{"iv":"bf42d811cd41fa97ddcae3425f8c3211"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"d2fa67cbb5e86d5bf9a90e27b8747bac493614b45778d43e9da1c14e06b2401d"},"mac":"7d2797cf344704d8f36265238d3938e06952c78ab7dfcbac53dc7f472c93d933"},"id":"4c8e899e-80f0-4417-9b1e-c5e29049f1e7","version":3}`,
"a0ee7a142d267c1f36714e4a8f75612f20a79720": `{"address":"a0ee7a142d267c1f36714e4a8f75612f20a79720","crypto":{"cipher":"aes-128-ctr","ciphertext":"56bc8766f47aeafae74eea333e1e890a3776d7fae6c48cbdbffb270655ce050d","cipherparams":{"iv":"a66129e6a110b3ddf93b4355aa147c58"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"15c4e8bcc80920139eb236d91194825f1fce27dd2af281e0f2752d8a5dbc48bd"},"mac":"db01e720866ce8bb7897dfc7773e064003ad53429a79732ee769cf6d02273570"},"id":"87b2d76f-1b70-4e4f-8b2a-5d1915c1177c","version":3}`,
"bcd4042de499d14e55001ccbb24a551f3b954096": `{"address":"bcd4042de499d14e55001ccbb24a551f3b954096","crypto":{"cipher":"aes-128-ctr","ciphertext":"e455eda6e38d246c03b930f845adfc8721ca75e9f47135cd4c18dbc3e5c5440a","cipherparams":{"iv":"0b1a0a24acc1ad25b0f170f751c2cb27"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"69f324ed0787794878bf5f84d4dbbc70dec1274cad666399edc48640605f64c8"},"mac":"f07da09c460a69f943f5639545d2b3f72c1e9789f0421ad41d3078ea3db12c96"},"id":"7ec7bb3c-c486-4785-a4fc-f8f4b2fc7764","version":3}`,
"71be63f3384f5fb98995898a86b02fb2426c5788": `{"address":"71be63f3384f5fb98995898a86b02fb2426c5788","crypto":{"cipher":"aes-128-ctr","ciphertext":"4194377a05fd3d13e0a3155dad974a003fe5f7a3b5acb35d7d97c50daa8990d4","cipherparams":{"iv":"607670778baf62b1e86394cf1980487a"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"d63b890ad7f4fcc857681faabe9319dffc53893966ef0810bf64c4f319b0ffc5"},"mac":"bfaf924959e65c8030ece259d52ed52d5d21bd74f1a67ae545d4bb289a479e16"},"id":"0c6af842-384f-49b6-b5b7-199a1e05486b","version":3}`,
}
var MsgMismatchedExecutionClient = "" /* 147-byte string literal not displayed */
var UNSUPPORTED_VERSIONS = []UnsupportedVersion{ {DockerImage: fmt.Sprintf("%s:1.20.0", ethereum.NethermindBaseImageName), Reason: "1.20.0 was replaced with 1.20.1, for more info check https://github.com/NethermindEth/nethermind/releases/tag/1.20.0", }, {DockerImage: fmt.Sprintf("%s:v1.9.0", ethereum.GethBaseImageName), Reason: "v1.9.0 randomly drops websocket connections, for more info check https://github.com/ethereum/go-ethereum/issues/19001", }, }
Functions ¶
func FetchLatestEthereumClientDockerImageVersionIfNeed ¶ added in v1.27.0
func FetchLatestEthereumClientDockerImageVersionIfNeed(dockerImageWithVersion string) (string, error)
FetchLatestEthereumClientDockerImageVersionIfNeed fetches the latest release version from Github if the version is set to AUTOMATIC_LATEST_TAG or AUTOMATIC_STABLE_LATEST_TAG and returns the full docker image with the latest version. Works only for supported Ethereum clients: Geth, Erigon, Besu and Nethermind.
func FormatHttpUrl ¶ added in v1.18.6
func FormatWsUrl ¶ added in v1.18.6
func GetEndpoint ¶ added in v1.17.11
GetEndpoint returns the endpoint of a container, if localhost then force ipv4 localhost to avoid ipv6 docker bugs https://github.com/moby/moby/issues/42442 https://github.com/moby/moby/issues/42375
func GetHost ¶ added in v1.17.11
GetHost returns the host of a container, if localhost then force ipv4 localhost to avoid ipv6 docker bugs https://github.com/moby/moby/issues/42442 https://github.com/moby/moby/issues/42375
func IsDockerImageVersionSupported ¶ added in v1.27.0
IsDockerImageVersionSupported checks if the given docker image version is supported and if not returns the reason why
func NatPortFormat ¶ added in v1.17.3
func UniqueStringSlice ¶ added in v1.27.0
UniqueStringSlice returns a deduplicated slice of strings
Types ¶
type AfterGenesisHelper ¶ added in v1.22.0
type AfterGenesisHelper struct { EnvComponent // contains filtered or unexported fields }
func NewInitHelper ¶ added in v1.22.0
func NewInitHelper(chainConfig config.EthereumChainConfig, generatedDataHostDir, generatedDataContainerDir string, opts ...EnvComponentOption) *AfterGenesisHelper
func (*AfterGenesisHelper) StartContainer ¶ added in v1.22.0
func (g *AfterGenesisHelper) StartContainer() error
func (*AfterGenesisHelper) WithTestInstance ¶ added in v1.22.0
func (g *AfterGenesisHelper) WithTestInstance(t *testing.T) *AfterGenesisHelper
type Besu ¶ added in v1.22.0
type Besu struct { EnvComponent ExternalHttpUrl string InternalHttpUrl string ExternalWsUrl string InternalWsUrl string InternalExecutionURL string ExternalExecutionURL string // contains filtered or unexported fields }
func NewBesuEth1 ¶ added in v1.27.0
func NewBesuEth1(networks []string, chainConfig *config.EthereumChainConfig, opts ...EnvComponentOption) (*Besu, error)
NewBesuEth1 starts a new Besu Eth1 node running in Docker
func NewBesuEth2 ¶ added in v1.27.0
func NewBesuEth2(networks []string, chainConfig *config.EthereumChainConfig, generatedDataHostDir, generatedDataContainerDir string, consensusLayer config.ConsensusLayer, opts ...EnvComponentOption) (*Besu, error)
NewBesuEth2 starts a new Besu Eth2 node running in Docker
func (*Besu) GetContainer ¶ added in v1.22.0
func (*Besu) GetContainerName ¶ added in v1.22.0
func (*Besu) GetEthereumVersion ¶ added in v1.27.0
func (g *Besu) GetEthereumVersion() config_types.EthereumVersion
func (*Besu) GetExternalExecutionURL ¶ added in v1.22.0
func (*Besu) GetExternalHttpUrl ¶ added in v1.22.0
func (*Besu) GetExternalWsUrl ¶ added in v1.22.0
func (*Besu) GetInternalExecutionURL ¶ added in v1.22.0
func (*Besu) GetInternalHttpUrl ¶ added in v1.22.0
func (*Besu) GetInternalWsUrl ¶ added in v1.22.0
func (*Besu) GethConsensusMechanism ¶ added in v1.27.0
func (g *Besu) GethConsensusMechanism() ConsensusMechanism
func (*Besu) StartContainer ¶ added in v1.22.0
func (g *Besu) StartContainer() (blockchain.EVMNetwork, error)
func (*Besu) WaitUntilChainIsReady ¶ added in v1.22.0
func (*Besu) WithTestInstance ¶ added in v1.22.0
func (g *Besu) WithTestInstance(t *testing.T) ExecutionClient
type ConsensusMechanism ¶ added in v1.27.0
type ConsensusMechanism string
const ( ConsensusMechanism_PoW ConsensusMechanism = "pow" ConsensusMechanism_PoS ConsensusMechanism = "pos" ConsensusMechanism_PoA ConsensusMechanism = "poa" )
type EnvComponent ¶
type EnvComponent struct { ContainerName string `json:"containerName"` ContainerImage string `json:"containerImage"` ContainerVersion string `json:"containerVersion"` ContainerEnvs map[string]string `json:"containerEnvs"` WasRecreated bool `json:"wasRecreated"` Networks []string `json:"networks"` Container tc.Container `json:"-"` LogStream *logstream.LogStream `json:"-"` PostStartsHooks []tc.ContainerHook `json:"-"` PostStopsHooks []tc.ContainerHook `json:"-"` PreTerminatesHooks []tc.ContainerHook `json:"-"` LogLevel string `json:"-"` StartupTimeout time.Duration `json:"-"` }
func (EnvComponent) ChaosNetworkDelay ¶ added in v1.18.5
func (ec EnvComponent) ChaosNetworkDelay( l zerolog.Logger, duration time.Duration, delay time.Duration, targetInterfaceName string, targetIPs []string, targetIngressPorts []string, targetEgressPorts []string, ) error
ChaosNetworkDelay delays the container's network traffic for the specified duration
func (EnvComponent) ChaosNetworkLoss ¶ added in v1.18.5
func (ec EnvComponent) ChaosNetworkLoss( l zerolog.Logger, duration time.Duration, lossPercentage int, targetInterfaceName string, targetIPs []string, targetIngressPorts []string, targetEgressPorts []string, ) error
ChaosNetworkLoss causes the container to lose the specified percentage of network traffic for the specified duration
func (EnvComponent) ChaosPause ¶ added in v1.18.5
ChaosPause pauses the container for the specified duration
func (*EnvComponent) GetImageWithVersion ¶ added in v1.23.0
func (ec *EnvComponent) GetImageWithVersion() string
func (*EnvComponent) SetDefaultHooks ¶ added in v1.22.5
func (ec *EnvComponent) SetDefaultHooks()
type EnvComponentOption ¶
type EnvComponentOption = func(c *EnvComponent)
func WithContainerImageWithVersion ¶ added in v1.23.0
func WithContainerImageWithVersion(imageWithVersion string) EnvComponentOption
func WithContainerName ¶
func WithContainerName(name string) EnvComponentOption
func WithLogLevel ¶ added in v1.28.10
func WithLogLevel(logLevel string) EnvComponentOption
func WithLogStream ¶ added in v1.22.5
func WithLogStream(ls *logstream.LogStream) EnvComponentOption
func WithPostStartsHooks ¶ added in v1.22.5
func WithPostStartsHooks(hooks ...tc.ContainerHook) EnvComponentOption
func WithPostStopsHooks ¶ added in v1.22.5
func WithPostStopsHooks(hooks ...tc.ContainerHook) EnvComponentOption
func WithPreTerminatesHooks ¶ added in v1.22.5
func WithPreTerminatesHooks(hooks ...tc.ContainerHook) EnvComponentOption
func WithStartupTimeout ¶ added in v1.32.0
func WithStartupTimeout(timeout time.Duration) EnvComponentOption
type Erigon ¶ added in v1.22.0
type Erigon struct { EnvComponent ExternalHttpUrl string InternalHttpUrl string ExternalWsUrl string InternalWsUrl string InternalExecutionURL string ExternalExecutionURL string // contains filtered or unexported fields }
func NewErigonEth1 ¶ added in v1.27.0
func NewErigonEth1(networks []string, chainConfig *config.EthereumChainConfig, opts ...EnvComponentOption) (*Erigon, error)
NewErigonEth1 starts a new Erigon Eth1 node running in Docker
func NewErigonEth2 ¶ added in v1.27.0
func NewErigonEth2(networks []string, chainConfig *config.EthereumChainConfig, generatedDataHostDir, generatedDataContainerDir string, consensusLayer config.ConsensusLayer, opts ...EnvComponentOption) (*Erigon, error)
NewErigonEth2 starts a new Erigon Eth2 node running in Docker
func (*Erigon) GetContainer ¶ added in v1.22.0
func (*Erigon) GetContainerName ¶ added in v1.22.0
func (*Erigon) GetEthereumVersion ¶ added in v1.27.0
func (g *Erigon) GetEthereumVersion() config_types.EthereumVersion
func (*Erigon) GetExternalExecutionURL ¶ added in v1.22.0
func (*Erigon) GetExternalHttpUrl ¶ added in v1.22.0
func (*Erigon) GetExternalWsUrl ¶ added in v1.22.0
func (*Erigon) GetInternalExecutionURL ¶ added in v1.22.0
func (*Erigon) GetInternalHttpUrl ¶ added in v1.22.0
func (*Erigon) GetInternalWsUrl ¶ added in v1.22.0
func (*Erigon) GethConsensusMechanism ¶ added in v1.27.0
func (g *Erigon) GethConsensusMechanism() ConsensusMechanism
func (*Erigon) StartContainer ¶ added in v1.22.0
func (g *Erigon) StartContainer() (blockchain.EVMNetwork, error)
func (*Erigon) WaitUntilChainIsReady ¶ added in v1.22.0
func (*Erigon) WithTestInstance ¶ added in v1.22.0
func (g *Erigon) WithTestInstance(t *testing.T) ExecutionClient
type EthGenesisGenerator ¶ added in v1.34.0
type EthGenesisGenerator struct { EnvComponent // contains filtered or unexported fields }
func NewEthGenesisGenerator ¶ added in v1.22.0
func NewEthGenesisGenerator(chainConfig config.EthereumChainConfig, generatedDataHostDir string, lastFork ethereum.Fork, opts ...EnvComponentOption) (*EthGenesisGenerator, error)
func (*EthGenesisGenerator) GetGeneratedDataContainerDir ¶ added in v1.34.0
func (g *EthGenesisGenerator) GetGeneratedDataContainerDir() string
func (*EthGenesisGenerator) StartContainer ¶ added in v1.34.0
func (g *EthGenesisGenerator) StartContainer() error
func (*EthGenesisGenerator) WithTestInstance ¶ added in v1.34.0
func (g *EthGenesisGenerator) WithTestInstance(t *testing.T) *EthGenesisGenerator
type EthereumNetwork ¶ added in v1.18.6
type EthereumNetwork struct { config.EthereumNetworkConfig // contains filtered or unexported fields }
func NewPrivateChainEnvConfigFromFile ¶ added in v1.22.0
func NewPrivateChainEnvConfigFromFile(path string) (EthereumNetwork, error)
func (*EthereumNetwork) Save ¶ added in v1.22.0
func (en *EthereumNetwork) Save() error
func (*EthereumNetwork) Start ¶ added in v1.18.6
func (en *EthereumNetwork) Start() (blockchain.EVMNetwork, RpcProvider, error)
type EthereumNetworkBuilder ¶ added in v1.18.6
type EthereumNetworkBuilder struct {
// contains filtered or unexported fields
}
func NewEthereumNetworkBuilder ¶ added in v1.18.6
func NewEthereumNetworkBuilder() EthereumNetworkBuilder
func (*EthereumNetworkBuilder) Build ¶ added in v1.18.6
func (b *EthereumNetworkBuilder) Build() (EthereumNetwork, error)
func (*EthereumNetworkBuilder) WithConsensusLayer ¶ added in v1.18.6
func (b *EthereumNetworkBuilder) WithConsensusLayer(consensusLayer config.ConsensusLayer) *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithConsensusType ¶ added in v1.18.6
func (b *EthereumNetworkBuilder) WithConsensusType(consensusType config.ConsensusType) *EthereumNetworkBuilder
WithConsensusType sets the consensus type for the network Deprecated: use WithEthereumVersion() instead
func (*EthereumNetworkBuilder) WithCustomDockerImages ¶ added in v1.23.0
func (b *EthereumNetworkBuilder) WithCustomDockerImages(newImages map[config.ContainerType]string) *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithDockerNetworks ¶ added in v1.18.6
func (b *EthereumNetworkBuilder) WithDockerNetworks(networks []string) *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithEthereumChainConfig ¶ added in v1.22.0
func (b *EthereumNetworkBuilder) WithEthereumChainConfig(config config.EthereumChainConfig) *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithEthereumVersion ¶ added in v1.27.0
func (b *EthereumNetworkBuilder) WithEthereumVersion(ethereumVersion config_types.EthereumVersion) *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithExecutionLayer ¶ added in v1.18.6
func (b *EthereumNetworkBuilder) WithExecutionLayer(executionLayer config_types.ExecutionLayer) *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithExistingConfig ¶ added in v1.18.6
func (b *EthereumNetworkBuilder) WithExistingConfig(config config.EthereumNetworkConfig) *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithExistingConfigFromEnvVar ¶ added in v1.28.8
func (b *EthereumNetworkBuilder) WithExistingConfigFromEnvVar() *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithLogStream ¶ added in v1.28.1
func (b *EthereumNetworkBuilder) WithLogStream(ls *logstream.LogStream) *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithNodeLogLevel ¶ added in v1.28.10
func (b *EthereumNetworkBuilder) WithNodeLogLevel(nodeLogLevel string) *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithTest ¶ added in v1.18.6
func (b *EthereumNetworkBuilder) WithTest(t *testing.T) *EthereumNetworkBuilder
func (*EthereumNetworkBuilder) WithWaitingForFinalization ¶ added in v1.22.0
func (b *EthereumNetworkBuilder) WithWaitingForFinalization() *EthereumNetworkBuilder
type ExecutionClient ¶ added in v1.22.0
type ExecutionClient interface { GetContainerName() string StartContainer() (blockchain.EVMNetwork, error) GetContainer() *tc.Container GetInternalExecutionURL() string GetExternalExecutionURL() string GetInternalHttpUrl() string GetInternalWsUrl() string GetExternalHttpUrl() string GetExternalWsUrl() string GetEthereumVersion() config_types.EthereumVersion GethConsensusMechanism() ConsensusMechanism WaitUntilChainIsReady(ctx context.Context, waitTime time.Duration) error WithTestInstance(t *testing.T) ExecutionClient }
type ExitCodeStrategy ¶ added in v1.22.0
type ExitCodeStrategy struct {
// contains filtered or unexported fields
}
func NewExitCodeStrategy ¶ added in v1.22.0
func NewExitCodeStrategy() *ExitCodeStrategy
func (*ExitCodeStrategy) WaitUntilReady ¶ added in v1.22.0
func (w *ExitCodeStrategy) WaitUntilReady(ctx context.Context, target tcwait.StrategyTarget) (err error)
WaitUntilReady implements Strategy.WaitUntilReady
func (*ExitCodeStrategy) WithExitCode ¶ added in v1.22.0
func (w *ExitCodeStrategy) WithExitCode(exitCode int) *ExitCodeStrategy
func (*ExitCodeStrategy) WithPollInterval ¶ added in v1.22.0
func (w *ExitCodeStrategy) WithPollInterval(pollInterval time.Duration) *ExitCodeStrategy
func (*ExitCodeStrategy) WithTimeout ¶ added in v1.22.0
func (w *ExitCodeStrategy) WithTimeout(timeout time.Duration) *ExitCodeStrategy
type Geth ¶ added in v1.16.1
type Geth struct { EnvComponent ExternalHttpUrl string InternalHttpUrl string ExternalWsUrl string InternalWsUrl string InternalExecutionURL string ExternalExecutionURL string // contains filtered or unexported fields }
func NewGethEth1 ¶ added in v1.27.0
func NewGethEth1(networks []string, chainConfig *config.EthereumChainConfig, opts ...EnvComponentOption) *Geth
NewGethEth1 starts a new Geth Eth1 node running in Docker
func NewGethEth2 ¶ added in v1.27.0
func NewGethEth2(networks []string, chainConfig *config.EthereumChainConfig, generatedDataHostDir, generatedDataContainerDir string, consensusLayer config.ConsensusLayer, opts ...EnvComponentOption) (*Geth, error)
NewGethEth2 starts a new Geth Eth2 node running in Docker
func (*Geth) GetContainer ¶ added in v1.27.0
func (*Geth) GetContainerName ¶ added in v1.27.0
func (*Geth) GetEthereumVersion ¶ added in v1.27.0
func (g *Geth) GetEthereumVersion() config_types.EthereumVersion
func (*Geth) GetExternalExecutionURL ¶ added in v1.27.0
func (*Geth) GetExternalHttpUrl ¶ added in v1.27.0
func (*Geth) GetExternalWsUrl ¶ added in v1.27.0
func (*Geth) GetInternalExecutionURL ¶ added in v1.27.0
func (*Geth) GetInternalHttpUrl ¶ added in v1.27.0
func (*Geth) GetInternalWsUrl ¶ added in v1.27.0
func (*Geth) GethConsensusMechanism ¶ added in v1.27.0
func (g *Geth) GethConsensusMechanism() ConsensusMechanism
func (*Geth) StartContainer ¶ added in v1.16.1
func (g *Geth) StartContainer() (blockchain.EVMNetwork, error)
func (*Geth) WaitUntilChainIsReady ¶ added in v1.27.0
func (*Geth) WithTestInstance ¶ added in v1.22.0
func (g *Geth) WithTestInstance(t *testing.T) ExecutionClient
type HTTPStrategy ¶ added in v1.17.11
type HTTPStrategy struct { Path string Port nat.Port RetryDelay time.Duration ExpectedStatusCode int // contains filtered or unexported fields }
func NewHTTPStrategy ¶ added in v1.17.11
func NewHTTPStrategy(path string, port nat.Port) *HTTPStrategy
func (*HTTPStrategy) WaitUntilReady ¶ added in v1.17.11
func (w *HTTPStrategy) WaitUntilReady(ctx context.Context, target tcwait.StrategyTarget) (err error)
WaitUntilReady implements Strategy.WaitUntilReady
func (*HTTPStrategy) WithStatusCode ¶ added in v1.17.11
func (w *HTTPStrategy) WithStatusCode(statusCode int) *HTTPStrategy
func (*HTTPStrategy) WithTimeout ¶ added in v1.17.11
func (w *HTTPStrategy) WithTimeout(timeout time.Duration) *HTTPStrategy
type Kafka ¶ added in v1.17.11
type Kafka struct { EnvComponent TopicConfigs []KafkaTopicConfig EnvVars map[string]string BootstrapServerUrl string InternalUrl string ExternalUrl string // contains filtered or unexported fields }
func (*Kafka) CreateLocalTopics ¶ added in v1.17.11
func (*Kafka) StartContainer ¶ added in v1.17.11
func (*Kafka) WithContainerName ¶ added in v1.17.11
func (*Kafka) WithEnvVars ¶ added in v1.17.11
func (*Kafka) WithTestInstance ¶ added in v1.22.0
func (*Kafka) WithTopics ¶ added in v1.17.11
func (k *Kafka) WithTopics(topics []KafkaTopicConfig) *Kafka
func (*Kafka) WithZookeeper ¶ added in v1.17.11
type KafkaTopicConfig ¶ added in v1.17.11
type Killgrave ¶ added in v1.17.5
type Killgrave struct { EnvComponent ExternalEndpoint string InternalPort string InternalEndpoint string // contains filtered or unexported fields }
func NewKillgrave ¶ added in v1.17.5
func NewKillgrave(networks []string, impostersDirectoryPath string, opts ...EnvComponentOption) *Killgrave
func (*Killgrave) AddImposter ¶ added in v1.17.5
func (k *Killgrave) AddImposter(imposters []KillgraveImposter) error
AddImposter adds an imposter to the killgrave container
func (*Killgrave) GetReceivedRequests ¶ added in v1.31.2
func (k *Killgrave) GetReceivedRequests() ([]RequestData, error)
func (*Killgrave) SetAdapterBasedAnyValuePath ¶ added in v1.17.5
SetAdapterBasedAnyValuePath sets a path to return a value as though it was from an adapter
func (*Killgrave) SetAdapterBasedIntValuePath ¶ added in v1.17.5
SetAdapterBasedAnyValuePathObject sets a path to return a value as though it was from an adapter
func (*Killgrave) SetAnyValueResponse ¶ added in v1.22.7
func (*Killgrave) SetStringValuePath ¶ added in v1.17.5
func (k *Killgrave) SetStringValuePath(path string, methods []string, headers map[string]string, v string) error
SetStringValuePath sets a path to return a string value
func (*Killgrave) StartContainer ¶ added in v1.17.5
type KillgraveAdapterResponse ¶ added in v1.17.5
type KillgraveAdapterResponse struct { Id string `json:"id"` Data KillgraveAdapterResult `json:"data"` Error interface{} `json:"error"` }
AdapterResponse represents a response from an adapter
type KillgraveAdapterResult ¶ added in v1.17.5
type KillgraveAdapterResult struct {
Result interface{} `json:"result"`
}
AdapterResult represents an int result for an adapter
type KillgraveImposter ¶ added in v1.17.5
type KillgraveImposter struct { Request KillgraveRequest `json:"request"` Response KillgraveResponse `json:"response"` }
Imposter define an imposter structure
type KillgraveRequest ¶ added in v1.17.5
type KillgraveResponse ¶ added in v1.17.5
type KillgraveResponse struct { Status int `json:"status"` Body string `json:"body,omitempty"` BodyFile *string `json:"bodyFile,omitempty"` Headers *map[string]string `json:"headers,omitempty"` Delay *KillgraveResponseDelay `json:"delay,omitempty"` }
Response represent the structure of real response
type KillgraveResponseDelay ¶ added in v1.17.5
type KillgraveResponseDelay struct { Delay int64 `json:"delay,omitempty"` Offset int64 `json:"offset,omitempty"` }
ResponseDelay represent time delay before server responds.
type MockServer ¶ added in v1.16.1
type MockServer struct { EnvComponent Client *ctfClient.MockserverClient Endpoint string InternalEndpoint string EAMockUrls []*url.URL // contains filtered or unexported fields }
func NewMockServer ¶ added in v1.16.1
func NewMockServer(networks []string, opts ...EnvComponentOption) *MockServer
func (*MockServer) SetExternalAdapterMocks ¶ added in v1.16.1
func (ms *MockServer) SetExternalAdapterMocks(count int) error
func (*MockServer) StartContainer ¶ added in v1.16.1
func (ms *MockServer) StartContainer() error
func (*MockServer) WithTestInstance ¶ added in v1.22.0
func (ms *MockServer) WithTestInstance(t *testing.T) *MockServer
type Nethermind ¶ added in v1.22.0
type Nethermind struct { EnvComponent ExternalHttpUrl string InternalHttpUrl string ExternalWsUrl string InternalWsUrl string InternalExecutionURL string ExternalExecutionURL string // contains filtered or unexported fields }
func NewNethermindEth1 ¶ added in v1.27.0
func NewNethermindEth1(networks []string, chainConfig *config.EthereumChainConfig, opts ...EnvComponentOption) (*Nethermind, error)
NewNethermindEth1 starts a new Nethermind Eth1 node running in Docker
func NewNethermindEth2 ¶ added in v1.27.0
func NewNethermindEth2(networks []string, chainConfig *config.EthereumChainConfig, generatedDataHostDir, generatedDataContainerDir string, consensusLayer config.ConsensusLayer, opts ...EnvComponentOption) (*Nethermind, error)
NewNethermindEth2 starts a new Nethermin Eth2 node running in Docker
func (*Nethermind) GetContainer ¶ added in v1.22.0
func (g *Nethermind) GetContainer() *tc.Container
func (*Nethermind) GetContainerName ¶ added in v1.22.0
func (g *Nethermind) GetContainerName() string
func (*Nethermind) GetEthereumVersion ¶ added in v1.27.0
func (g *Nethermind) GetEthereumVersion() config_types.EthereumVersion
func (*Nethermind) GetExternalExecutionURL ¶ added in v1.22.0
func (g *Nethermind) GetExternalExecutionURL() string
func (*Nethermind) GetExternalHttpUrl ¶ added in v1.22.0
func (g *Nethermind) GetExternalHttpUrl() string
func (*Nethermind) GetExternalWsUrl ¶ added in v1.22.0
func (g *Nethermind) GetExternalWsUrl() string
func (*Nethermind) GetInternalExecutionURL ¶ added in v1.22.0
func (g *Nethermind) GetInternalExecutionURL() string
func (*Nethermind) GetInternalHttpUrl ¶ added in v1.22.0
func (g *Nethermind) GetInternalHttpUrl() string
func (*Nethermind) GetInternalWsUrl ¶ added in v1.22.0
func (g *Nethermind) GetInternalWsUrl() string
func (*Nethermind) GethConsensusMechanism ¶ added in v1.27.0
func (g *Nethermind) GethConsensusMechanism() ConsensusMechanism
func (*Nethermind) StartContainer ¶ added in v1.22.0
func (g *Nethermind) StartContainer() (blockchain.EVMNetwork, error)
func (*Nethermind) WaitUntilChainIsReady ¶ added in v1.22.0
func (*Nethermind) WithTestInstance ¶ added in v1.22.0
func (g *Nethermind) WithTestInstance(t *testing.T) ExecutionClient
type PostgresDb ¶ added in v1.16.1
type PostgresDb struct { EnvComponent User string `json:"user"` Password string `json:"password"` DbName string `json:"dbName"` InternalPort string `json:"internalPort"` ExternalPort string `json:"-"` InternalURL *url.URL `json:"-"` ExternalURL *url.URL `json:"-"` // contains filtered or unexported fields }
func NewPostgresDb ¶ added in v1.16.1
func NewPostgresDb(networks []string, opts ...PostgresDbOption) (*PostgresDb, error)
func (*PostgresDb) ExecPgDumpFromContainer ¶ added in v1.34.2
func (pg *PostgresDb) ExecPgDumpFromContainer(writer io.Writer) error
ExecPgDumpFromContainer executed pg_dump from inside the container. It dumps it to temporary file inside the container and then writes to the writer.
func (*PostgresDb) ExecPgDumpFromLocal ¶ added in v1.34.2
func (pg *PostgresDb) ExecPgDumpFromLocal(stdout io.Writer) error
ExecPgDumpFromLocal executes pg_dump from local machine by connecting to external Postgres port. For it to work pg_dump needs to be installed on local machine.
func (*PostgresDb) RestartContainer ¶ added in v1.27.0
func (pg *PostgresDb) RestartContainer() error
func (*PostgresDb) StartContainer ¶ added in v1.16.1
func (pg *PostgresDb) StartContainer() error
func (*PostgresDb) WithTestInstance ¶ added in v1.22.0
func (pg *PostgresDb) WithTestInstance(t *testing.T) *PostgresDb
type PostgresDbOption ¶ added in v1.16.1
type PostgresDbOption = func(c *PostgresDb)
func WithContainerEnv ¶ added in v1.18.6
func WithContainerEnv(key, value string) PostgresDbOption
func WithPostgresDbContainerName ¶ added in v1.16.1
func WithPostgresDbContainerName(name string) PostgresDbOption
Sets custom container name if name is not empty
func WithPostgresDbLogStream ¶ added in v1.30.2
func WithPostgresDbLogStream(ls *logstream.LogStream) PostgresDbOption
func WithPostgresDbName ¶ added in v1.17.9
func WithPostgresDbName(name string) PostgresDbOption
func WithPostgresImageName ¶ added in v1.18.6
func WithPostgresImageName(imageName string) PostgresDbOption
func WithPostgresImageVersion ¶ added in v1.17.8
func WithPostgresImageVersion(version string) PostgresDbOption
type PrysmBeaconChain ¶ added in v1.18.6
type PrysmBeaconChain struct { EnvComponent InternalBeaconRpcProvider string InternalQueryRpcUrl string ExternalBeaconRpcProvider string ExternalQueryRpcUrl string // contains filtered or unexported fields }
func NewPrysmBeaconChain ¶ added in v1.18.6
func NewPrysmBeaconChain(networks []string, chainConfig *config.EthereumChainConfig, generatedDataHostDir, generatedDataContainerDir, gethExecutionURL string, baseEthereumFork ethereum.Fork, opts ...EnvComponentOption) (*PrysmBeaconChain, error)
func (*PrysmBeaconChain) StartContainer ¶ added in v1.18.6
func (g *PrysmBeaconChain) StartContainer() error
func (*PrysmBeaconChain) WithTestInstance ¶ added in v1.22.0
func (g *PrysmBeaconChain) WithTestInstance(t *testing.T) *PrysmBeaconChain
type PrysmValidator ¶ added in v1.18.6
type PrysmValidator struct { EnvComponent // contains filtered or unexported fields }
func NewPrysmValidator ¶ added in v1.18.6
func NewPrysmValidator(networks []string, chainConfig *config.EthereumChainConfig, generatedDataHostDir, generatedDataContainerDir, valKeysDir, internalBeaconRpcProvider string, baseEthereumFork ethereum.Fork, opts ...EnvComponentOption) (*PrysmValidator, error)
func (*PrysmValidator) StartContainer ¶ added in v1.18.6
func (g *PrysmValidator) StartContainer() error
func (*PrysmValidator) WithTestInstance ¶ added in v1.22.0
func (g *PrysmValidator) WithTestInstance(t *testing.T) *PrysmValidator
type RequestData ¶ added in v1.31.2
type Reth ¶ added in v1.32.0
type Reth struct { EnvComponent ExternalHttpUrl string InternalHttpUrl string ExternalWsUrl string InternalWsUrl string InternalExecutionURL string ExternalExecutionURL string // contains filtered or unexported fields }
func NewRethEth2 ¶ added in v1.32.0
func NewRethEth2(networks []string, chainConfig *config.EthereumChainConfig, generatedDataHostDir, generatedDataContainerDir string, consensusLayer config.ConsensusLayer, opts ...EnvComponentOption) (*Reth, error)
NewRethEth2 starts a new Reth Eth2 node running in Docker
func (*Reth) GetContainer ¶ added in v1.32.0
func (*Reth) GetContainerName ¶ added in v1.32.0
func (*Reth) GetEthereumVersion ¶ added in v1.32.0
func (g *Reth) GetEthereumVersion() config_types.EthereumVersion
func (*Reth) GetExternalExecutionURL ¶ added in v1.32.0
func (*Reth) GetExternalHttpUrl ¶ added in v1.32.0
func (*Reth) GetExternalWsUrl ¶ added in v1.32.0
func (*Reth) GetInternalExecutionURL ¶ added in v1.32.0
func (*Reth) GetInternalHttpUrl ¶ added in v1.32.0
func (*Reth) GetInternalWsUrl ¶ added in v1.32.0
func (*Reth) GethConsensusMechanism ¶ added in v1.32.0
func (g *Reth) GethConsensusMechanism() ConsensusMechanism
func (*Reth) StartContainer ¶ added in v1.32.0
func (g *Reth) StartContainer() (blockchain.EVMNetwork, error)
func (*Reth) WaitUntilChainIsReady ¶ added in v1.32.0
func (*Reth) WithTestInstance ¶ added in v1.32.0
func (g *Reth) WithTestInstance(t *testing.T) ExecutionClient
type RpcProvider ¶ added in v1.18.6
type RpcProvider struct {
// contains filtered or unexported fields
}
RpcProvider holds all necessary URLs to connect to a simulated chain or a real RPC provider connected to a live chain maybe only store ports here and depending on where the test is executed return different URLs? maybe 3 different constructors for each "perspective"? (docker, k8s with local runner, k8s with remote runner)
func NewRPCProvider ¶ added in v1.27.6
func NewRPCProvider( privateHttpUrls, privateWsUrls, publiclHttpUrls, publicWsUrls []string, ) RpcProvider
NewRPCProvider creates a new RpcProvider, and should only be used for custom network connections e.g. to a live testnet chain
func (*RpcProvider) PrivateHttpUrls ¶ added in v1.18.6
func (s *RpcProvider) PrivateHttpUrls() []string
func (*RpcProvider) PrivateWsUrsl ¶ added in v1.18.6
func (s *RpcProvider) PrivateWsUrsl() []string
func (*RpcProvider) PublicHttpUrls ¶ added in v1.18.6
func (s *RpcProvider) PublicHttpUrls() []string
func (*RpcProvider) PublicWsUrls ¶ added in v1.19.0
func (s *RpcProvider) PublicWsUrls() []string
type SchemaRegistry ¶ added in v1.17.11
type SchemaRegistry struct { EnvComponent EnvVars map[string]string InternalUrl string ExternalUrl string // contains filtered or unexported fields }
func NewSchemaRegistry ¶ added in v1.17.11
func NewSchemaRegistry(networks []string) *SchemaRegistry
func (*SchemaRegistry) StartContainer ¶ added in v1.17.11
func (r *SchemaRegistry) StartContainer() error
func (*SchemaRegistry) WithContainerName ¶ added in v1.17.11
func (r *SchemaRegistry) WithContainerName(name string) *SchemaRegistry
func (*SchemaRegistry) WithEnvVars ¶ added in v1.17.11
func (r *SchemaRegistry) WithEnvVars(envVars map[string]string) *SchemaRegistry
func (*SchemaRegistry) WithKafka ¶ added in v1.17.11
func (r *SchemaRegistry) WithKafka(kafkaUrl string) *SchemaRegistry
func (*SchemaRegistry) WithTestInstance ¶ added in v1.22.0
func (r *SchemaRegistry) WithTestInstance(t *testing.T) *SchemaRegistry
type UnsupportedVersion ¶ added in v1.27.0
type ValKeysGenerator ¶ added in v1.27.0
type ValKeysGenerator struct { EnvComponent // contains filtered or unexported fields }
func NewValKeysGeneretor ¶ added in v1.22.0
func NewValKeysGeneretor(chainConfig *config.EthereumChainConfig, valKeysHostDataDir string, opts ...EnvComponentOption) (*ValKeysGenerator, error)
func (*ValKeysGenerator) StartContainer ¶ added in v1.27.0
func (g *ValKeysGenerator) StartContainer() error
func (*ValKeysGenerator) WithTestInstance ¶ added in v1.27.0
func (g *ValKeysGenerator) WithTestInstance(t *testing.T) *ValKeysGenerator
type WebSocketStrategy ¶ added in v1.16.1
type WebSocketStrategy struct { Port nat.Port RetryDelay time.Duration // contains filtered or unexported fields }
func NewWebSocketStrategy ¶ added in v1.16.1
func NewWebSocketStrategy(port nat.Port, l zerolog.Logger) *WebSocketStrategy
func (*WebSocketStrategy) WaitUntilReady ¶ added in v1.16.1
func (w *WebSocketStrategy) WaitUntilReady(ctx context.Context, target tcwait.StrategyTarget) (err error)
func (*WebSocketStrategy) WithTimeout ¶ added in v1.16.2
func (w *WebSocketStrategy) WithTimeout(timeout time.Duration) *WebSocketStrategy
type Zookeeper ¶ added in v1.17.11
type Zookeeper struct { EnvComponent InternalUrl string // contains filtered or unexported fields }
func NewZookeeper ¶ added in v1.17.11
func (*Zookeeper) StartContainer ¶ added in v1.17.11
func (*Zookeeper) WithContainerName ¶ added in v1.17.11
Source Files ¶
- besu_base.go
- besu_eth1.go
- besu_eth2.go
- env_component.go
- erigon_base.go
- erigon_eth1.go
- erigon_eth2.go
- eth1_common.go
- eth2_common.go
- eth2_init_helpers.go
- eth_common.go
- ethereum_env.go
- genesis_generator.go
- genesis_generator_helpers.go
- geth_base.go
- geth_eth1.go
- geth_eth2.go
- github_utils.go
- kafka.go
- killgrave.go
- mockserver.go
- nethermind_base.go
- nethermind_eth1.go
- nethermind_eth2.go
- postgres.go
- prysm.go
- reth_base.go
- reth_eth2.go
- schema_registry.go
- test_utils.go
- utils.go
- validator_keys_generator.go
- wait_strategy.go
- zookeeper.go