Documentation
¶
Index ¶
- Constants
- Variables
- func CleanLogMessage(msg string) string
- func ExportDefaultLimitsJSON() []byte
- func FormatCapability(capabilityID string) string
- func FormatStepRef(stepRef string) string
- func FormatTimestamp(timestamp string) string
- func GetLogLevel(msg string) string
- func GetStyle(status string) lipgloss.Style
- func HighlightLogLevels(msg string, levelStyle lipgloss.Style) string
- func MapCapabilityStatus(status string) string
- func New(runtimeContext *runtime.Context) *cobra.Command
- func NewFakeActionCapabilities(ctx context.Context, lggr logger.Logger, registry *capabilities.Registry, ...) ([]services.Service, error)
- func ReplaceSecretNamesWithEnvVars(secrets []byte) ([]byte, error)
- type ChainConfig
- type ChainSelector
- type DataPoint
- type Inputs
- type LimitedConfidentialHTTPAction
- func (l *LimitedConfidentialHTTPAction) Close() error
- func (l *LimitedConfidentialHTTPAction) Description() string
- func (l *LimitedConfidentialHTTPAction) HealthReport() map[string]error
- func (l *LimitedConfidentialHTTPAction) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error
- func (l *LimitedConfidentialHTTPAction) Name() string
- func (l *LimitedConfidentialHTTPAction) Ready() error
- func (l *LimitedConfidentialHTTPAction) SendRequest(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*confidentialhttp.HTTPResponse], ...)
- func (l *LimitedConfidentialHTTPAction) Start(ctx context.Context) error
- type LimitedConsensusNoDAG
- func (l *LimitedConsensusNoDAG) Close() error
- func (l *LimitedConsensusNoDAG) Description() string
- func (l *LimitedConsensusNoDAG) HealthReport() map[string]error
- func (l *LimitedConsensusNoDAG) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error
- func (l *LimitedConsensusNoDAG) Name() string
- func (l *LimitedConsensusNoDAG) Ready() error
- func (l *LimitedConsensusNoDAG) Report(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*sdkpb.ReportResponse], caperrors.Error)
- func (l *LimitedConsensusNoDAG) Simple(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*valuespb.Value], caperrors.Error)
- func (l *LimitedConsensusNoDAG) Start(ctx context.Context) error
- type LimitedEVMChain
- func (l *LimitedEVMChain) AckEvent(ctx context.Context, triggerId string, eventId string, method string) caperrors.Error
- func (l *LimitedEVMChain) BalanceAt(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*evmcappb.BalanceAtReply], caperrors.Error)
- func (l *LimitedEVMChain) CallContract(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*evmcappb.CallContractReply], caperrors.Error)
- func (l *LimitedEVMChain) ChainSelector() uint64
- func (l *LimitedEVMChain) Close() error
- func (l *LimitedEVMChain) Description() string
- func (l *LimitedEVMChain) EstimateGas(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*evmcappb.EstimateGasReply], caperrors.Error)
- func (l *LimitedEVMChain) FilterLogs(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*evmcappb.FilterLogsReply], caperrors.Error)
- func (l *LimitedEVMChain) GetTransactionByHash(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*evmcappb.GetTransactionByHashReply], ...)
- func (l *LimitedEVMChain) GetTransactionReceipt(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*evmcappb.GetTransactionReceiptReply], ...)
- func (l *LimitedEVMChain) HeaderByNumber(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*evmcappb.HeaderByNumberReply], caperrors.Error)
- func (l *LimitedEVMChain) HealthReport() map[string]error
- func (l *LimitedEVMChain) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error
- func (l *LimitedEVMChain) Name() string
- func (l *LimitedEVMChain) Ready() error
- func (l *LimitedEVMChain) RegisterLogTrigger(ctx context.Context, triggerID string, metadata commonCap.RequestMetadata, ...) (<-chan commonCap.TriggerAndId[*evmcappb.Log], caperrors.Error)
- func (l *LimitedEVMChain) Start(ctx context.Context) error
- func (l *LimitedEVMChain) UnregisterLogTrigger(ctx context.Context, triggerID string, metadata commonCap.RequestMetadata, ...) caperrors.Error
- func (l *LimitedEVMChain) WriteReport(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*evmcappb.WriteReportReply], caperrors.Error)
- type LimitedHTTPAction
- func (l *LimitedHTTPAction) Close() error
- func (l *LimitedHTTPAction) Description() string
- func (l *LimitedHTTPAction) HealthReport() map[string]error
- func (l *LimitedHTTPAction) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error
- func (l *LimitedHTTPAction) Name() string
- func (l *LimitedHTTPAction) Ready() error
- func (l *LimitedHTTPAction) SendRequest(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*customhttp.Response], caperrors.Error)
- func (l *LimitedHTTPAction) Start(ctx context.Context) error
- type LogLevel
- type ManualTriggerCapabilitiesConfig
- type ManualTriggers
- type Metric
- type MetricAttribute
- type MetricData
- type MetricsLog
- type MetricsScope
- type ResourceAttribute
- type ScopeMetrics
- type SimulationLimits
- func (l *SimulationLimits) ChainWriteEVMGasLimit() uint64
- func (l *SimulationLimits) ChainWriteReportSizeLimit() int
- func (l *SimulationLimits) ConfHTTPRequestSizeLimit() int
- func (l *SimulationLimits) ConfHTTPResponseSizeLimit() int
- func (l *SimulationLimits) ConsensusObservationSizeLimit() int
- func (l *SimulationLimits) HTTPRequestSizeLimit() int
- func (l *SimulationLimits) HTTPResponseSizeLimit() int
- func (l *SimulationLimits) LimitsSummary() string
- func (l *SimulationLimits) WASMBinarySize() int
- func (l *SimulationLimits) WASMCompressedBinarySize() int
- type SimulationLogger
- func (s *SimulationLogger) Debug(message string, fields ...interface{})
- func (s *SimulationLogger) Error(message string, fields ...interface{})
- func (s *SimulationLogger) Info(message string, fields ...interface{})
- func (s *SimulationLogger) PrintStepLog(timestamp, component, stepRef, capability, status string)
- func (s *SimulationLogger) PrintTimestampedLog(timestamp, prefix, message string, prefixStyle lipgloss.Style)
- func (s *SimulationLogger) PrintTimestampedLogWithStatus(timestamp, prefix, message, status string)
- func (s *SimulationLogger) PrintWorkflowMetadata(metadata interface{})
- func (s *SimulationLogger) Warn(message string, fields ...interface{})
- type TelemetryLog
- type TriggerInfoAndBeforeStart
Constants ¶
const WorkflowExecutionTimeout = 5 * time.Minute
Variables ¶
var ( StyleBlue = lipgloss.NewStyle().Foreground(lipgloss.Color(ui.ColorBlue500)) StyleBrightCyan = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color(ui.ColorTeal400)) StyleYellow = lipgloss.NewStyle().Foreground(lipgloss.Color(ui.ColorYellow400)) StyleRed = lipgloss.NewStyle().Foreground(lipgloss.Color(ui.ColorRed400)) StyleGreen = lipgloss.NewStyle().Foreground(lipgloss.Color(ui.ColorGreen400)) StyleMagenta = lipgloss.NewStyle().Foreground(lipgloss.Color(ui.ColorPurple400)) )
Style instances for consistent styling (using Chainlink Blocks palette)
var SupportedEVM = []ChainConfig{ {Selector: chainselectors.ETHEREUM_TESTNET_SEPOLIA.Selector, Forwarder: "0x15fC6ae953E024d975e77382eEeC56A9101f9F88"}, {Selector: chainselectors.ETHEREUM_MAINNET.Selector, Forwarder: "0xa3d1ad4ac559a6575a114998affb2fb2ec97a7d9"}, {Selector: chainselectors.ETHEREUM_TESTNET_SEPOLIA_BASE_1.Selector, Forwarder: "0x82300bd7c3958625581cc2f77bc6464dcecdf3e5"}, {Selector: chainselectors.ETHEREUM_MAINNET_BASE_1.Selector, Forwarder: "0x5e342a8438b4f5d39e72875fcee6f76b39cce548"}, {Selector: chainselectors.AVALANCHE_TESTNET_FUJI.Selector, Forwarder: "0x2e7371a5d032489e4f60216d8d898a4c10805963"}, {Selector: chainselectors.AVALANCHE_MAINNET.Selector, Forwarder: "0xdc21e279934ff6721cadfdd112dafb3261f09a2c"}, {Selector: chainselectors.POLYGON_TESTNET_AMOY.Selector, Forwarder: "0x3675a5eb2286a3f87e8278fc66edf458a2e3bb74"}, {Selector: chainselectors.POLYGON_MAINNET.Selector, Forwarder: "0xf458d621885e29a5003ea9bbba5280d54e19b1ce"}, {Selector: chainselectors.BINANCE_SMART_CHAIN_TESTNET.Selector, Forwarder: "0xa238e42cb8782808dbb2f37e19859244ec4779b0"}, {Selector: chainselectors.BINANCE_SMART_CHAIN_MAINNET.Selector, Forwarder: "0x6f3239bbb26e98961e1115aba83f8a282e5508c8"}, {Selector: chainselectors.ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1.Selector, Forwarder: "0xd41263567ddfead91504199b8c6c87371e83ca5d"}, {Selector: chainselectors.ETHEREUM_MAINNET_ARBITRUM_1.Selector, Forwarder: "0xd770499057619c9a76205fd4168161cf94abc532"}, {Selector: chainselectors.ETHEREUM_TESTNET_SEPOLIA_OPTIMISM_1.Selector, Forwarder: "0xa2888380dff3704a8ab6d1cd1a8f69c15fea5ee3"}, {Selector: chainselectors.ETHEREUM_MAINNET_OPTIMISM_1.Selector, Forwarder: "0x9119a1501550ed94a3f2794038ed9258337afa18"}, {Selector: chainselectors.PRIVATE_TESTNET_ANDESITE.Selector, Forwarder: "0xcF4629d8DC7a5fa17F4D77233F5b953225669821"}, {Selector: chainselectors.ETHEREUM_MAINNET_ZKSYNC_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_TESTNET_SEPOLIA_ZKSYNC_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.JOVAY_TESTNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.JOVAY_MAINNET.Selector, Forwarder: "0x2B3068C4B288A2CD1f8B3613b8f33ef7cEecadC4"}, {Selector: chainselectors.PHAROS_ATLANTIC_TESTNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.PHAROS_MAINNET.Selector, Forwarder: "0x2B3068C4B288A2CD1f8B3613b8f33ef7cEecadC4"}, {Selector: chainselectors.ETHEREUM_TESTNET_SEPOLIA_WORLDCHAIN_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_MAINNET_WORLDCHAIN_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.PLASMA_TESTNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.PLASMA_MAINNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_TESTNET_SEPOLIA_LINEA_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_MAINNET_LINEA_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.INK_TESTNET_SEPOLIA.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_MAINNET_INK_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.HYPERLIQUID_TESTNET.Selector, Forwarder: "0xB27fA1c28288c50542527F64BCda22C9FbAc24CB"}, {Selector: chainselectors.APECHAIN_TESTNET_CURTIS.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ARC_TESTNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.XLAYER_TESTNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_MAINNET_XLAYER_1.Selector, Forwarder: "0x2B3068C4B288A2CD1f8B3613b8f33ef7cEecadC4"}, {Selector: chainselectors.MEGAETH_TESTNET_2.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.MEGAETH_MAINNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.CELO_MAINNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.GNOSIS_CHAIN_MAINNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.CRONOS_TESTNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_TESTNET_SEPOLIA_MANTLE_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_MAINNET_MANTLE_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.TAC_TESTNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_TESTNET_SEPOLIA_UNICHAIN_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_TESTNET_SEPOLIA_SCROLL_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.ETHEREUM_MAINNET_SCROLL_1.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.SONIC_TESTNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.SONIC_MAINNET.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, {Selector: chainselectors.DTCC_TESTNET_ANDESITE.Selector, Forwarder: "0x6E9EE680ef59ef64Aa8C7371279c27E496b5eDc1"}, }
SupportedEVM is the canonical list you can range over.
Functions ¶
func CleanLogMessage ¶
CleanLogMessage removes structured log patterns from messages
func ExportDefaultLimitsJSON ¶ added in v1.6.0
func ExportDefaultLimitsJSON() []byte
ExportDefaultLimitsJSON returns the embedded default limits JSON.
func FormatCapability ¶
FormatCapability formats capability ID for display
func FormatStepRef ¶
FormatStepRef formats step reference, handling the -1 case
func FormatTimestamp ¶
FormatTimestamp converts RFC3339Nano timestamp to simple format
func GetLogLevel ¶
GetLogLevel extracts log level from a message
func HighlightLogLevels ¶
HighlightLogLevels highlights INFO, WARN, ERROR in log messages
func MapCapabilityStatus ¶
MapCapabilityStatus maps capability status to display format
func NewFakeActionCapabilities ¶
func NewFakeActionCapabilities(ctx context.Context, lggr logger.Logger, registry *capabilities.Registry, secretsPath string, limits *SimulationLimits) ([]services.Service, error)
NewFakeCapabilities builds faked capabilities, then registers them with the capability registry.
func ReplaceSecretNamesWithEnvVars ¶
ReplaceSecretNamesWithEnvVars resolves env var references in the secrets YAML, returning a new YAML with the env var names replaced by their actual values. It rebuilds the YAML from the parsed structure to avoid substring corruption.
Types ¶
type ChainConfig ¶
type ChainConfig struct {
Selector ChainSelector
Forwarder string
}
type ChainSelector ¶
type ChainSelector = uint64
type DataPoint ¶
type DataPoint struct {
Attributes []MetricAttribute `json:"Attributes"`
StartTime string `json:"StartTime"`
Time string `json:"Time"`
Value interface{} `json:"Value"`
}
type Inputs ¶
type Inputs struct {
WasmPath string `validate:"omitempty,file,ascii,max=97" cli:"--wasm"`
WorkflowPath string `validate:"required,workflow_path_read"`
ConfigPath string `validate:"omitempty,file,ascii,max=97"`
SecretsPath string `validate:"omitempty,file,ascii,max=97"`
EngineLogs bool `validate:"omitempty" cli:"--engine-logs"`
Broadcast bool `validate:"-"`
EVMClients map[uint64]*ethclient.Client `validate:"omitempty"` // multichain clients keyed by selector (or chain ID for experimental)
EthPrivateKey *ecdsa.PrivateKey `validate:"omitempty"`
WorkflowName string `validate:"required"`
// Non-interactive mode options
NonInteractive bool `validate:"-"`
TriggerIndex int `validate:"-"`
HTTPPayload string `validate:"-"` // JSON string or @/path/to/file.json
EVMTxHash string `validate:"-"` // 0x-prefixed
EVMEventIndex int `validate:"-"`
// Experimental chains support (for chains not in official chain-selectors)
ExperimentalForwarders map[uint64]common.Address `validate:"-"` // forwarders keyed by chain ID
// Limits enforcement
LimitsPath string `validate:"-"` // "default" or path to custom limits JSON
}
type LimitedConfidentialHTTPAction ¶ added in v1.6.0
type LimitedConfidentialHTTPAction struct {
// contains filtered or unexported fields
}
LimitedConfidentialHTTPAction wraps a confhttpserver.ClientCapability and enforces request/response size limits and connection timeout from SimulationLimits.
func NewLimitedConfidentialHTTPAction ¶ added in v1.6.0
func NewLimitedConfidentialHTTPAction(inner confhttpserver.ClientCapability, limits *SimulationLimits) *LimitedConfidentialHTTPAction
func (*LimitedConfidentialHTTPAction) Close ¶ added in v1.6.0
func (l *LimitedConfidentialHTTPAction) Close() error
func (*LimitedConfidentialHTTPAction) Description ¶ added in v1.6.0
func (l *LimitedConfidentialHTTPAction) Description() string
func (*LimitedConfidentialHTTPAction) HealthReport ¶ added in v1.6.0
func (l *LimitedConfidentialHTTPAction) HealthReport() map[string]error
func (*LimitedConfidentialHTTPAction) Initialise ¶ added in v1.6.0
func (l *LimitedConfidentialHTTPAction) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error
func (*LimitedConfidentialHTTPAction) Name ¶ added in v1.6.0
func (l *LimitedConfidentialHTTPAction) Name() string
func (*LimitedConfidentialHTTPAction) Ready ¶ added in v1.6.0
func (l *LimitedConfidentialHTTPAction) Ready() error
func (*LimitedConfidentialHTTPAction) SendRequest ¶ added in v1.6.0
func (l *LimitedConfidentialHTTPAction) SendRequest(ctx context.Context, metadata commonCap.RequestMetadata, input *confidentialhttp.ConfidentialHTTPRequest) (*commonCap.ResponseAndMetadata[*confidentialhttp.HTTPResponse], caperrors.Error)
type LimitedConsensusNoDAG ¶ added in v1.6.0
type LimitedConsensusNoDAG struct {
// contains filtered or unexported fields
}
LimitedConsensusNoDAG wraps a consensusserver.ConsensusCapability and enforces observation size limits from SimulationLimits.
func NewLimitedConsensusNoDAG ¶ added in v1.6.0
func NewLimitedConsensusNoDAG(inner consensusserver.ConsensusCapability, limits *SimulationLimits) *LimitedConsensusNoDAG
func (*LimitedConsensusNoDAG) Close ¶ added in v1.6.0
func (l *LimitedConsensusNoDAG) Close() error
func (*LimitedConsensusNoDAG) Description ¶ added in v1.6.0
func (l *LimitedConsensusNoDAG) Description() string
func (*LimitedConsensusNoDAG) HealthReport ¶ added in v1.6.0
func (l *LimitedConsensusNoDAG) HealthReport() map[string]error
func (*LimitedConsensusNoDAG) Initialise ¶ added in v1.6.0
func (l *LimitedConsensusNoDAG) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error
func (*LimitedConsensusNoDAG) Name ¶ added in v1.6.0
func (l *LimitedConsensusNoDAG) Name() string
func (*LimitedConsensusNoDAG) Ready ¶ added in v1.6.0
func (l *LimitedConsensusNoDAG) Ready() error
func (*LimitedConsensusNoDAG) Report ¶ added in v1.6.0
func (l *LimitedConsensusNoDAG) Report(ctx context.Context, metadata commonCap.RequestMetadata, input *sdkpb.ReportRequest) (*commonCap.ResponseAndMetadata[*sdkpb.ReportResponse], caperrors.Error)
func (*LimitedConsensusNoDAG) Simple ¶ added in v1.6.0
func (l *LimitedConsensusNoDAG) Simple(ctx context.Context, metadata commonCap.RequestMetadata, input *sdkpb.SimpleConsensusInputs) (*commonCap.ResponseAndMetadata[*valuespb.Value], caperrors.Error)
type LimitedEVMChain ¶ added in v1.6.0
type LimitedEVMChain struct {
// contains filtered or unexported fields
}
LimitedEVMChain wraps an evmserver.ClientCapability and enforces chain write report size and gas limits from SimulationLimits.
func NewLimitedEVMChain ¶ added in v1.6.0
func NewLimitedEVMChain(inner evmserver.ClientCapability, limits *SimulationLimits) *LimitedEVMChain
func (*LimitedEVMChain) BalanceAt ¶ added in v1.6.0
func (l *LimitedEVMChain) BalanceAt(ctx context.Context, metadata commonCap.RequestMetadata, input *evmcappb.BalanceAtRequest) (*commonCap.ResponseAndMetadata[*evmcappb.BalanceAtReply], caperrors.Error)
func (*LimitedEVMChain) CallContract ¶ added in v1.6.0
func (l *LimitedEVMChain) CallContract(ctx context.Context, metadata commonCap.RequestMetadata, input *evmcappb.CallContractRequest) (*commonCap.ResponseAndMetadata[*evmcappb.CallContractReply], caperrors.Error)
All other methods delegate to the inner capability.
func (*LimitedEVMChain) ChainSelector ¶ added in v1.6.0
func (l *LimitedEVMChain) ChainSelector() uint64
func (*LimitedEVMChain) Close ¶ added in v1.6.0
func (l *LimitedEVMChain) Close() error
func (*LimitedEVMChain) Description ¶ added in v1.6.0
func (l *LimitedEVMChain) Description() string
func (*LimitedEVMChain) EstimateGas ¶ added in v1.6.0
func (l *LimitedEVMChain) EstimateGas(ctx context.Context, metadata commonCap.RequestMetadata, input *evmcappb.EstimateGasRequest) (*commonCap.ResponseAndMetadata[*evmcappb.EstimateGasReply], caperrors.Error)
func (*LimitedEVMChain) FilterLogs ¶ added in v1.6.0
func (l *LimitedEVMChain) FilterLogs(ctx context.Context, metadata commonCap.RequestMetadata, input *evmcappb.FilterLogsRequest) (*commonCap.ResponseAndMetadata[*evmcappb.FilterLogsReply], caperrors.Error)
func (*LimitedEVMChain) GetTransactionByHash ¶ added in v1.6.0
func (l *LimitedEVMChain) GetTransactionByHash(ctx context.Context, metadata commonCap.RequestMetadata, input *evmcappb.GetTransactionByHashRequest) (*commonCap.ResponseAndMetadata[*evmcappb.GetTransactionByHashReply], caperrors.Error)
func (*LimitedEVMChain) GetTransactionReceipt ¶ added in v1.6.0
func (l *LimitedEVMChain) GetTransactionReceipt(ctx context.Context, metadata commonCap.RequestMetadata, input *evmcappb.GetTransactionReceiptRequest) (*commonCap.ResponseAndMetadata[*evmcappb.GetTransactionReceiptReply], caperrors.Error)
func (*LimitedEVMChain) HeaderByNumber ¶ added in v1.6.0
func (l *LimitedEVMChain) HeaderByNumber(ctx context.Context, metadata commonCap.RequestMetadata, input *evmcappb.HeaderByNumberRequest) (*commonCap.ResponseAndMetadata[*evmcappb.HeaderByNumberReply], caperrors.Error)
func (*LimitedEVMChain) HealthReport ¶ added in v1.6.0
func (l *LimitedEVMChain) HealthReport() map[string]error
func (*LimitedEVMChain) Initialise ¶ added in v1.6.0
func (l *LimitedEVMChain) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error
func (*LimitedEVMChain) Name ¶ added in v1.6.0
func (l *LimitedEVMChain) Name() string
func (*LimitedEVMChain) Ready ¶ added in v1.6.0
func (l *LimitedEVMChain) Ready() error
func (*LimitedEVMChain) RegisterLogTrigger ¶ added in v1.6.0
func (l *LimitedEVMChain) RegisterLogTrigger(ctx context.Context, triggerID string, metadata commonCap.RequestMetadata, input *evmcappb.FilterLogTriggerRequest) (<-chan commonCap.TriggerAndId[*evmcappb.Log], caperrors.Error)
func (*LimitedEVMChain) Start ¶ added in v1.6.0
func (l *LimitedEVMChain) Start(ctx context.Context) error
func (*LimitedEVMChain) UnregisterLogTrigger ¶ added in v1.6.0
func (l *LimitedEVMChain) UnregisterLogTrigger(ctx context.Context, triggerID string, metadata commonCap.RequestMetadata, input *evmcappb.FilterLogTriggerRequest) caperrors.Error
func (*LimitedEVMChain) WriteReport ¶ added in v1.6.0
func (l *LimitedEVMChain) WriteReport(ctx context.Context, metadata commonCap.RequestMetadata, input *evmcappb.WriteReportRequest) (*commonCap.ResponseAndMetadata[*evmcappb.WriteReportReply], caperrors.Error)
type LimitedHTTPAction ¶ added in v1.6.0
type LimitedHTTPAction struct {
// contains filtered or unexported fields
}
LimitedHTTPAction wraps an httpserver.ClientCapability and enforces request/response size limits and connection timeout from SimulationLimits.
func NewLimitedHTTPAction ¶ added in v1.6.0
func NewLimitedHTTPAction(inner httpserver.ClientCapability, limits *SimulationLimits) *LimitedHTTPAction
func (*LimitedHTTPAction) Close ¶ added in v1.6.0
func (l *LimitedHTTPAction) Close() error
func (*LimitedHTTPAction) Description ¶ added in v1.6.0
func (l *LimitedHTTPAction) Description() string
func (*LimitedHTTPAction) HealthReport ¶ added in v1.6.0
func (l *LimitedHTTPAction) HealthReport() map[string]error
func (*LimitedHTTPAction) Initialise ¶ added in v1.6.0
func (l *LimitedHTTPAction) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error
func (*LimitedHTTPAction) Name ¶ added in v1.6.0
func (l *LimitedHTTPAction) Name() string
func (*LimitedHTTPAction) Ready ¶ added in v1.6.0
func (l *LimitedHTTPAction) Ready() error
func (*LimitedHTTPAction) SendRequest ¶ added in v1.6.0
func (l *LimitedHTTPAction) SendRequest(ctx context.Context, metadata commonCap.RequestMetadata, input *customhttp.Request) (*commonCap.ResponseAndMetadata[*customhttp.Response], caperrors.Error)
type ManualTriggers ¶
type ManualTriggers struct {
ManualCronTrigger *fakes.ManualCronTriggerService
ManualHTTPTrigger *fakes.ManualHTTPTriggerService
ManualEVMChains map[uint64]*fakes.FakeEVMChain
}
func NewManualTriggerCapabilities ¶
func NewManualTriggerCapabilities( ctx context.Context, lggr logger.Logger, registry *capabilities.Registry, cfg ManualTriggerCapabilitiesConfig, dryRunChainWrite bool, limits *SimulationLimits, ) (*ManualTriggers, error)
func (*ManualTriggers) Close ¶
func (m *ManualTriggers) Close() error
type Metric ¶
type Metric struct {
Name string `json:"Name"`
Description string `json:"Description"`
Unit string `json:"Unit"`
Data MetricData `json:"Data"`
}
type MetricAttribute ¶
type MetricData ¶
type MetricData struct {
DataPoints []DataPoint `json:"DataPoints"`
}
type MetricsLog ¶
type MetricsLog struct {
Resource []ResourceAttribute `json:"Resource"`
ScopeMetrics []ScopeMetrics `json:"ScopeMetrics"`
}
MetricsLog represents OpenTelemetry metrics logs
type MetricsScope ¶
type ResourceAttribute ¶
type ScopeMetrics ¶
type ScopeMetrics struct {
Scope MetricsScope `json:"Scope"`
Metrics []Metric `json:"Metrics"`
}
type SimulationLimits ¶ added in v1.6.0
type SimulationLimits struct {
Workflows cresettings.Workflows
}
SimulationLimits holds the workflow-level limits applied during simulation.
func DefaultLimits ¶ added in v1.6.0
func DefaultLimits() (*SimulationLimits, error)
DefaultLimits returns simulation limits populated from the embedded defaults.
func LoadLimits ¶ added in v1.6.0
func LoadLimits(path string) (*SimulationLimits, error)
LoadLimits reads a limits JSON file from disk and returns parsed SimulationLimits.
func ResolveLimits ¶ added in v1.6.0
func ResolveLimits(limitsFlag string) (*SimulationLimits, error)
ResolveLimits resolves a --limits flag value to SimulationLimits. Returns nil if limitsFlag is "none" (no limits enforcement).
func (*SimulationLimits) ChainWriteEVMGasLimit ¶ added in v1.6.0
func (l *SimulationLimits) ChainWriteEVMGasLimit() uint64
ChainWriteEVMGasLimit returns the default EVM gas limit.
func (*SimulationLimits) ChainWriteReportSizeLimit ¶ added in v1.6.0
func (l *SimulationLimits) ChainWriteReportSizeLimit() int
ChainWriteReportSizeLimit returns the chain write report size limit in bytes.
func (*SimulationLimits) ConfHTTPRequestSizeLimit ¶ added in v1.6.0
func (l *SimulationLimits) ConfHTTPRequestSizeLimit() int
ConfHTTPRequestSizeLimit returns the confidential HTTP request size limit in bytes.
func (*SimulationLimits) ConfHTTPResponseSizeLimit ¶ added in v1.6.0
func (l *SimulationLimits) ConfHTTPResponseSizeLimit() int
ConfHTTPResponseSizeLimit returns the confidential HTTP response size limit in bytes.
func (*SimulationLimits) ConsensusObservationSizeLimit ¶ added in v1.6.0
func (l *SimulationLimits) ConsensusObservationSizeLimit() int
ConsensusObservationSizeLimit returns the consensus observation size limit in bytes.
func (*SimulationLimits) HTTPRequestSizeLimit ¶ added in v1.6.0
func (l *SimulationLimits) HTTPRequestSizeLimit() int
HTTPRequestSizeLimit returns the HTTP action request size limit in bytes.
func (*SimulationLimits) HTTPResponseSizeLimit ¶ added in v1.6.0
func (l *SimulationLimits) HTTPResponseSizeLimit() int
HTTPResponseSizeLimit returns the HTTP action response size limit in bytes.
func (*SimulationLimits) LimitsSummary ¶ added in v1.6.0
func (l *SimulationLimits) LimitsSummary() string
LimitsSummary returns a human-readable summary of key limits.
func (*SimulationLimits) WASMBinarySize ¶ added in v1.6.0
func (l *SimulationLimits) WASMBinarySize() int
WASMBinarySize returns the WASM binary size limit in bytes.
func (*SimulationLimits) WASMCompressedBinarySize ¶ added in v1.6.0
func (l *SimulationLimits) WASMCompressedBinarySize() int
WASMCompressedBinarySize returns the WASM compressed binary size limit in bytes.
type SimulationLogger ¶
type SimulationLogger struct {
// contains filtered or unexported fields
}
SimulationLogger provides an easy interface for formatted simulation logs
func NewSimulationLogger ¶
func NewSimulationLogger(verbosity bool) *SimulationLogger
NewSimulationLogger creates a new simulation logger with verbosity control
func (*SimulationLogger) Debug ¶
func (s *SimulationLogger) Debug(message string, fields ...interface{})
Debug logs a debug level message with colored formatting (only if verbosity is enabled)
func (*SimulationLogger) Error ¶
func (s *SimulationLogger) Error(message string, fields ...interface{})
Error logs an error level message with colored formatting
func (*SimulationLogger) Info ¶
func (s *SimulationLogger) Info(message string, fields ...interface{})
Info logs an info level message with colored formatting
func (*SimulationLogger) PrintStepLog ¶
func (s *SimulationLogger) PrintStepLog(timestamp, component, stepRef, capability, status string)
PrintStepLog prints a capability step log with timestamp and styled status
func (*SimulationLogger) PrintTimestampedLog ¶
func (s *SimulationLogger) PrintTimestampedLog(timestamp, prefix, message string, prefixStyle lipgloss.Style)
PrintTimestampedLog prints a log with timestamp and styled prefix
func (*SimulationLogger) PrintTimestampedLogWithStatus ¶
func (s *SimulationLogger) PrintTimestampedLogWithStatus(timestamp, prefix, message, status string)
PrintTimestampedLogWithStatus prints a log with timestamp, prefix, and styled status
func (*SimulationLogger) PrintWorkflowMetadata ¶
func (s *SimulationLogger) PrintWorkflowMetadata(metadata interface{})
PrintWorkflowMetadata prints workflow metadata with proper indentation
func (*SimulationLogger) Warn ¶
func (s *SimulationLogger) Warn(message string, fields ...interface{})
Warn logs a warning level message with colored formatting
type TelemetryLog ¶
type TelemetryLog struct {
Severity int `json:"Severity"`
Body struct {
Type string `json:"Type"`
Value string `json:"Value"` // Base64 encoded protobuf
} `json:"Body"`
Attributes []struct {
Key string `json:"Key"`
Value struct {
Type string `json:"Type"`
Value string `json:"Value"`
} `json:"Value"`
} `json:"Attributes"`
}
TelemetryLog represents the JSON structure of telemetry logs from beholder
type TriggerInfoAndBeforeStart ¶
type TriggerInfoAndBeforeStart struct {
TriggerFunc func() error
TriggerToRun *pb.TriggerSubscription
BeforeStart func(ctx context.Context, cfg simulator.RunnerConfig, registry *capabilities.Registry, services []services.Service, triggerSub []*pb.TriggerSubscription)
}