Documentation
¶
Index ¶
- Constants
- func CreateAndFundSendingKeys(client blockchain.EVMClient, node *VRFNode, chainlinkNodeFunding float64, ...) ([]string, error)
- func CreateBHFJob(chainlinkNode *client.ChainlinkClient, ...) (*client.Job, error)
- func CreateBHSJob(chainlinkNode *client.ChainlinkClient, ...) (*client.Job, error)
- func CreateFundAndGetSendingKeys(client blockchain.EVMClient, node *VRFNode, chainlinkNodeFunding float64, ...) ([]string, []common.Address, error)
- func CreateNodeTypeToNodeMap(cluster *test_env.ClCluster, nodesToCreate []VRFNodeType) (map[VRFNodeType]*VRFNode, error)
- func CreateVRFKeyOnVRFNode(vrfNode *VRFNode, l zerolog.Logger) (*client.VRFKey, string, error)
- func FundNodesIfNeeded(ctx context.Context, existingEnvConfig *vrf_common_config.ExistingEnvConfig, ...) error
- func LogFulfillmentDetailsLinkBilling(l zerolog.Logger, wrapperConsumerJuelsBalanceBeforeRequest *big.Int, ...)
- func LogFulfillmentDetailsNativeBilling(l zerolog.Logger, wrapperConsumerBalanceBeforeRequestWei *big.Int, ...)
- func LogRandomWordsForcedEvent(l zerolog.Logger, vrfOwner contracts.VRFOwner, ...)
- func LogRandomWordsFulfilledEvent(l zerolog.Logger, coordinator contracts.Coordinator, ...)
- func LogRandomnessRequestedEvent(l zerolog.Logger, coordinator contracts.Coordinator, ...)
- func LogSubDetails(l zerolog.Logger, subscription contracts.Subscription, subID string, ...)
- func SetupBHFNode(env *test_env.CLClusterTestEnv, config *vrf_common_config.General, ...) error
- func SetupBHSNode(env *test_env.CLClusterTestEnv, config *vrf_common_config.General, ...) error
- func WaitForRequestCountEqualToFulfilmentCount(ctx context.Context, consumer VRFLoadTestConsumer, timeout time.Duration, ...) (*big.Int, *big.Int, error)
- type NewEnvConfig
- type VRFContracts
- type VRFEncodedProvingKey
- type VRFJobSpecConfig
- type VRFKeyData
- type VRFLoadTestConsumer
- type VRFNode
- type VRFNodeType
- type VRFOwnerConfig
Constants ¶
View Source
const ( ErrGenericFormat = "%s, err %w" ErrNodePrimaryKey = "error getting node's primary ETH key" ErrNodeNewTxKey = "error creating node's EVM transaction key" ErrCreatingProvingKeyHash = "error creating a keyHash from the proving key" ErrRegisteringProvingKey = "error registering a proving key on Coordinator contract" ErrRegisterProvingKey = "error registering proving keys" ErrEncodingProvingKey = "error encoding proving key" ErrDeployBlockHashStore = "error deploying blockhash store" ErrDeployBatchBlockHashStore = "error deploying batch blockhash store" ErrDeployCoordinator = "error deploying VRF CoordinatorV2" ErrABIEncodingFunding = "error Abi encoding subscriptionID" ErrSendingLinkToken = "error sending Link token" ErrCreatingBHSJob = "error creating BHS job" ErrParseJob = "error parsing job definition" ErrSetVRFCoordinatorConfig = "error setting config for VRF Coordinator contract" ErrCreateVRFSubscription = "error creating VRF Subscription" ErrAddConsumerToSub = "error adding consumer to VRF Subscription" ErrFundSubWithLinkToken = "error funding subscription with Link tokens" ErrRestartCLNode = "error restarting CL node" ErrWaitTXsComplete = "error waiting for TXs to complete" ErrRequestRandomness = "error requesting randomness" ErrLoadingCoordinator = "error loading coordinator contract" ErrCreatingVRFKey = "error creating VRF key" ErrWaitRandomWordsRequestedEvent = "error waiting for RandomWordsRequested event" ErrWaitRandomWordsFulfilledEvent = "error waiting for RandomWordsFulfilled event" )
Variables ¶
This section is empty.
Functions ¶
func CreateBHFJob ¶
func CreateBHFJob( chainlinkNode *client.ChainlinkClient, bhfJobSpecConfig client.BlockHeaderFeederJobSpec, ) (*client.Job, error)
func CreateBHSJob ¶
func CreateBHSJob( chainlinkNode *client.ChainlinkClient, bhsJobSpecConfig client.BlockhashStoreJobSpec, ) (*client.Job, error)
func CreateNodeTypeToNodeMap ¶
func CreateNodeTypeToNodeMap(cluster *test_env.ClCluster, nodesToCreate []VRFNodeType) (map[VRFNodeType]*VRFNode, error)
func CreateVRFKeyOnVRFNode ¶
func FundNodesIfNeeded ¶
func FundNodesIfNeeded(ctx context.Context, existingEnvConfig *vrf_common_config.ExistingEnvConfig, client blockchain.EVMClient, l zerolog.Logger) error
func LogFulfillmentDetailsLinkBilling ¶
func LogFulfillmentDetailsLinkBilling( l zerolog.Logger, wrapperConsumerJuelsBalanceBeforeRequest *big.Int, wrapperConsumerJuelsBalanceAfterRequest *big.Int, consumerStatus vrfv2plus_wrapper_load_test_consumer.GetRequestStatus, randomWordsFulfilledEvent *contracts.CoordinatorRandomWordsFulfilled, )
func LogFulfillmentDetailsNativeBilling ¶
func LogFulfillmentDetailsNativeBilling( l zerolog.Logger, wrapperConsumerBalanceBeforeRequestWei *big.Int, wrapperConsumerBalanceAfterRequestWei *big.Int, consumerStatus vrfv2plus_wrapper_load_test_consumer.GetRequestStatus, randomWordsFulfilledEvent *contracts.CoordinatorRandomWordsFulfilled, )
func LogRandomWordsFulfilledEvent ¶
func LogRandomWordsFulfilledEvent( l zerolog.Logger, coordinator contracts.Coordinator, randomWordsFulfilledEvent *contracts.CoordinatorRandomWordsFulfilled, isNativeBilling bool, )
func LogRandomnessRequestedEvent ¶
func LogRandomnessRequestedEvent( l zerolog.Logger, coordinator contracts.Coordinator, randomWordsRequestedEvent *contracts.CoordinatorRandomWordsRequested, isNativeBilling bool, )
func LogSubDetails ¶
func LogSubDetails( l zerolog.Logger, subscription contracts.Subscription, subID string, coordinator contracts.Coordinator, )
func SetupBHFNode ¶
func SetupBHSNode ¶
Types ¶
type NewEnvConfig ¶
type NewEnvConfig struct {
NodesToCreate []VRFNodeType
NumberOfTxKeysToCreate int
UseVRFOwner bool
UseTestCoordinator bool
}
type VRFContracts ¶
type VRFContracts struct {
CoordinatorV2 contracts.VRFCoordinatorV2
CoordinatorV2Plus contracts.VRFCoordinatorV2_5
VRFOwner contracts.VRFOwner
BHS contracts.BlockHashStore
BatchBHS contracts.BatchBlockhashStore
VRFV2Consumers []contracts.VRFv2LoadTestConsumer
VRFV2PlusConsumer []contracts.VRFv2PlusLoadTestConsumer
LinkToken contracts.LinkToken
MockETHLINKFeed contracts.VRFMockETHLINKFeed
}
type VRFEncodedProvingKey ¶
type VRFJobSpecConfig ¶
type VRFJobSpecConfig struct {
ForwardingAllowed bool
CoordinatorAddress string
FromAddresses []string
EVMChainID string
MinIncomingConfirmations int
PublicKey string
BatchFulfillmentEnabled bool
BatchFulfillmentGasMultiplier float64
EstimateGasMultiplier float64
PollPeriod time.Duration
RequestTimeout time.Duration
VRFOwnerConfig *VRFOwnerConfig
SimulationBlock *string
}
type VRFKeyData ¶
type VRFKeyData struct {
VRFKey *client.VRFKey
EncodedProvingKey VRFEncodedProvingKey
KeyHash [32]byte
PubKeyCompressed string
}
VRFV2PlusKeyData defines a jobs into and proving key info
type VRFLoadTestConsumer ¶
type VRFLoadTestConsumer interface {
GetLoadTestMetrics(ctx context.Context) (*contracts.VRFLoadTestMetrics, error)
}
type VRFNodeType ¶
type VRFNodeType int
const ( VRF VRFNodeType = iota + 1 BHS BHF )
func (VRFNodeType) Index ¶
func (n VRFNodeType) Index() int
func (VRFNodeType) String ¶
func (n VRFNodeType) String() string
type VRFOwnerConfig ¶
Click to show internal directories.
Click to hide internal directories.