Documentation ¶
Index ¶
- func GetAccessAPIBlockHeader(client access.AccessAPIClient, ctx context.Context, blockID flow.Identifier) (*flow.Header, error)
- func GetExecutionAPIBlockHeader(client execution.ExecutionAPIClient, ctx context.Context, ...) (*flow.Header, error)
- func GetHeapAllocsBytes() uint64
- type ExecutionDataStorageSnapshot
- type ExecutionNodeStorageSnapshot
- type FileRegisterCache
- type InMemoryRegisterCache
- type RegisterCache
- type RemoteDebugger
- func (d *RemoteDebugger) RunScript(code []byte, arguments [][]byte, snapshot StorageSnapshot, ...) (value cadence.Value, scriptError error, processError error)
- func (d *RemoteDebugger) RunTransaction(txBody *flow.TransactionBody, snapshot StorageSnapshot, ...) (resultSnapshot *snapshot.ExecutionSnapshot, txErr error, processError error)
- type StorageSnapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccessAPIBlockHeader ¶
func GetAccessAPIBlockHeader( client access.AccessAPIClient, ctx context.Context, blockID flow.Identifier, ) ( *flow.Header, error, )
func GetExecutionAPIBlockHeader ¶
func GetExecutionAPIBlockHeader( client execution.ExecutionAPIClient, ctx context.Context, blockID flow.Identifier, ) ( *flow.Header, error, )
func GetHeapAllocsBytes ¶ added in v0.27.0
func GetHeapAllocsBytes() uint64
GetHeapAllocsBytes returns the value of /gc/heap/allocs:bytes.
Types ¶
type ExecutionDataStorageSnapshot ¶
type ExecutionDataStorageSnapshot struct { Client executiondata.ExecutionDataAPIClient Cache RegisterCache BlockHeight uint64 }
ExecutionDataStorageSnapshot provides a storage snapshot connected to an access node to read the registers (via its execution data API).
func NewExecutionDataStorageSnapshot ¶
func NewExecutionDataStorageSnapshot( client executiondata.ExecutionDataAPIClient, cache RegisterCache, blockHeight uint64, ) ( *ExecutionDataStorageSnapshot, error, )
func (*ExecutionDataStorageSnapshot) Close ¶
func (snapshot *ExecutionDataStorageSnapshot) Close() error
func (*ExecutionDataStorageSnapshot) Get ¶
func (snapshot *ExecutionDataStorageSnapshot) Get( id flow.RegisterID, ) ( flow.RegisterValue, error, )
type ExecutionNodeStorageSnapshot ¶
type ExecutionNodeStorageSnapshot struct { Client execution.ExecutionAPIClient Cache RegisterCache BlockID flow.Identifier }
ExecutionNodeStorageSnapshot provides a storage snapshot connected to an execution node to read the registers.
func NewExecutionNodeStorageSnapshot ¶
func NewExecutionNodeStorageSnapshot( client execution.ExecutionAPIClient, cache RegisterCache, blockID flow.Identifier, ) ( *ExecutionNodeStorageSnapshot, error, )
func (*ExecutionNodeStorageSnapshot) Close ¶
func (snapshot *ExecutionNodeStorageSnapshot) Close() error
func (*ExecutionNodeStorageSnapshot) Get ¶
func (snapshot *ExecutionNodeStorageSnapshot) Get( id flow.RegisterID, ) ( flow.RegisterValue, error, )
type FileRegisterCache ¶
type FileRegisterCache struct {
// contains filtered or unexported fields
}
func NewFileRegisterCache ¶
func NewFileRegisterCache(filePath string) *FileRegisterCache
func (*FileRegisterCache) Persist ¶
func (c *FileRegisterCache) Persist() error
func (*FileRegisterCache) Set ¶
func (f *FileRegisterCache) Set(owner, key string, value []byte)
type InMemoryRegisterCache ¶
type InMemoryRegisterCache struct {
// contains filtered or unexported fields
}
func NewInMemoryRegisterCache ¶
func NewInMemoryRegisterCache() *InMemoryRegisterCache
func (*InMemoryRegisterCache) Get ¶
func (c *InMemoryRegisterCache) Get(owner, key string) ([]byte, bool)
func (*InMemoryRegisterCache) Persist ¶
func (c *InMemoryRegisterCache) Persist() error
func (*InMemoryRegisterCache) Set ¶
func (c *InMemoryRegisterCache) Set(owner, key string, value []byte)
type RegisterCache ¶
type RemoteDebugger ¶ added in v0.23.1
type RemoteDebugger struct {
// contains filtered or unexported fields
}
func NewRemoteDebugger ¶ added in v0.23.1
func NewRemoteDebugger( chain flow.Chain, logger zerolog.Logger, ) *RemoteDebugger
NewRemoteDebugger creates a new remote debugger. NOTE: Make sure to use the same version of flow-go as the network you are collecting registers from, otherwise the execution might differ from the way it runs on the network
func (*RemoteDebugger) RunScript ¶ added in v0.23.1
func (d *RemoteDebugger) RunScript( code []byte, arguments [][]byte, snapshot StorageSnapshot, blockHeader *flow.Header, ) ( value cadence.Value, scriptError error, processError error, )
RunScript runs the script using the given storage snapshot.
func (*RemoteDebugger) RunTransaction ¶ added in v0.23.1
func (d *RemoteDebugger) RunTransaction( txBody *flow.TransactionBody, snapshot StorageSnapshot, blockHeader *flow.Header, ) ( resultSnapshot *snapshot.ExecutionSnapshot, txErr error, processError error, )
RunTransaction runs the transaction using the given storage snapshot.
type StorageSnapshot ¶
type StorageSnapshot interface { snapshot.StorageSnapshot }