Documentation ¶
Index ¶
- func SetProfilerEnabled(enabled bool)
- type AutoProfiler
- type RemoteDebugger
- func (d *RemoteDebugger) RunScript(code []byte, arguments [][]byte) (value cadence.Value, scriptError, processError error)
- func (d *RemoteDebugger) RunScriptAtBlockID(code []byte, arguments [][]byte, blockID flow.Identifier) (value cadence.Value, scriptError, processError error)
- func (d *RemoteDebugger) RunTransaction(txBody *flow.TransactionBody) (txErr, processError error)
- func (d *RemoteDebugger) RunTransactionAtBlockID(txBody *flow.TransactionBody, blockID flow.Identifier, regCachePath string) (txErr, processError error)
- type RemoteView
- func (v *RemoteView) AllRegisters() []flow.RegisterID
- func (v *RemoteView) Delete(owner, controller, key string) error
- func (v *RemoteView) Done()
- func (v *RemoteView) DropDelta()
- func (v *RemoteView) Get(owner, controller, key string) (flow.RegisterValue, error)
- func (v *RemoteView) MergeView(o state.View) error
- func (v *RemoteView) NewChild() state.View
- func (v *RemoteView) RegisterUpdates() ([]flow.RegisterID, []flow.RegisterValue)
- func (v *RemoteView) Set(owner, controller, key string, value flow.RegisterValue) error
- func (v *RemoteView) Touch(owner, controller, key string) error
- type RemoteViewOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetProfilerEnabled ¶ added in v0.25.0
func SetProfilerEnabled(enabled bool)
SetProfilerEnabled enable or disable generating profiler data
Types ¶
type AutoProfiler ¶
type AutoProfiler struct {
// contains filtered or unexported fields
}
func NewAutoProfiler ¶
func (*AutoProfiler) Done ¶
func (p *AutoProfiler) Done() <-chan struct{}
func (*AutoProfiler) Ready ¶
func (p *AutoProfiler) Ready() <-chan struct{}
type RemoteDebugger ¶ added in v0.23.1
type RemoteDebugger struct {
// contains filtered or unexported fields
}
func NewRemoteDebugger ¶ added in v0.23.1
Warning : make sure you use the proper flow-go version, same version as the network you are collecting registers from, otherwise the execution might differ from the way runs on the network
func (*RemoteDebugger) RunScriptAtBlockID ¶ added in v0.23.1
func (d *RemoteDebugger) RunScriptAtBlockID(code []byte, arguments [][]byte, blockID flow.Identifier) (value cadence.Value, scriptError, processError error)
func (*RemoteDebugger) RunTransaction ¶ added in v0.23.1
func (d *RemoteDebugger) RunTransaction(txBody *flow.TransactionBody) (txErr, processError error)
RunTransaction runs the transaction given the latest sealed block data
func (*RemoteDebugger) RunTransactionAtBlockID ¶ added in v0.23.1
func (d *RemoteDebugger) RunTransactionAtBlockID(txBody *flow.TransactionBody, blockID flow.Identifier, regCachePath string) (txErr, processError error)
RunTransaction runs the transaction and tries to collect the registers at the given blockID note that it would be very likely that block is far in the past and you can't find the trie to read the registers from if regCachePath is empty, the register values won't be cached
type RemoteView ¶ added in v0.23.1
type RemoteView struct { Parent *RemoteView Delta map[string]flow.RegisterValue Cache registerCache BlockID []byte BlockHeader *flow.Header // contains filtered or unexported fields }
RemoteView provides a view connected to a live execution node to read the registers writen values are kept inside a map
TODO implement register touches
func NewRemoteView ¶ added in v0.23.1
func NewRemoteView(grpcAddress string, opts ...RemoteViewOption) *RemoteView
func (*RemoteView) AllRegisters ¶ added in v0.23.1
func (v *RemoteView) AllRegisters() []flow.RegisterID
returns all the registers that has been touched
func (*RemoteView) Delete ¶ added in v0.23.1
func (v *RemoteView) Delete(owner, controller, key string) error
func (*RemoteView) Done ¶ added in v0.23.1
func (v *RemoteView) Done()
func (*RemoteView) DropDelta ¶ added in v0.23.1
func (v *RemoteView) DropDelta()
func (*RemoteView) Get ¶ added in v0.23.1
func (v *RemoteView) Get(owner, controller, key string) (flow.RegisterValue, error)
func (*RemoteView) NewChild ¶ added in v0.23.1
func (v *RemoteView) NewChild() state.View
func (*RemoteView) RegisterUpdates ¶ added in v0.23.1
func (v *RemoteView) RegisterUpdates() ([]flow.RegisterID, []flow.RegisterValue)
func (*RemoteView) Set ¶ added in v0.23.1
func (v *RemoteView) Set(owner, controller, key string, value flow.RegisterValue) error
func (*RemoteView) Touch ¶ added in v0.23.1
func (v *RemoteView) Touch(owner, controller, key string) error
type RemoteViewOption ¶ added in v0.23.1
type RemoteViewOption func(view *RemoteView) *RemoteView
A RemoteViewOption sets a configuration parameter for the remote view
func WithBlockID ¶ added in v0.23.1
func WithBlockID(blockID flow.Identifier) RemoteViewOption
WithBlockID sets the blockID for the remote view, if not used remote view will use the latest sealed block
func WithCache ¶ added in v0.23.1
func WithCache(cache registerCache) RemoteViewOption
WithFileCache sets the output path to store register values so can be fetched from a file cache it loads the values from the cache upon object construction