Documentation
¶
Index ¶
- Constants
- Variables
- func Check(program []byte, params EvalParams) error
- func CheckStateful(program []byte, params EvalParams) error
- func ComputeMinTealVersion(group []transactions.SignedTxn) uint64
- func Disassemble(program []byte) (text string, err error)
- func Eval(program []byte, params EvalParams) (pass bool, err error)
- func EvalStateful(program []byte, params EvalParams) (pass bool, err error)
- func GetProgramID(program []byte) string
- func GlobalFieldDocs() map[string]string
- func HasStatefulOps(program []byte) (bool, error)
- func HashProgram(program []byte) crypto.Digest
- func OnCompletionDescription(value uint64) string
- func OpDoc(opName string) string
- func OpDocExtra(opName string) string
- func OpImmediateNote(opName string) string
- func TxnFieldDocs() map[string]string
- func TxnFieldToTealValue(txn *transactions.Transaction, groupIndex int, field TxnField, ...) (basics.TealValue, error)
- type AssetHoldingField
- type AssetParamsField
- type DebugState
- type DebuggerHook
- type EvalParams
- type EvalSideEffects
- type GlobalField
- type LedgerForLogic
- type Msg
- type OnCompletionConstType
- type OpCost
- type OpSpec
- type OpStream
- func (ops *OpStream) ByteLiteral(val []byte)
- func (ops *OpStream) Bytec(constIndex uint)
- func (ops *OpStream) GetVersion() uint64
- func (ops *OpStream) Intc(constIndex uint)
- func (ops *OpStream) RecordSourceLine()
- func (ops *OpStream) ReferToLabel(pc int, label string)
- func (ops *OpStream) ReportProblems(fname string)
- func (ops *OpStream) Uint(val uint64)
- type PCOffset
- type PanicError
- type Program
- type StackType
- type StackTypes
- type TxnField
- type WebDebuggerHook
- type Writer
Constants ¶
const AssemblerDefaultVersion = 1
AssemblerDefaultVersion what version of code do we emit by default AssemblerDefaultVersion is set to 1 on puprose to prevent accidental building of v1 official templates with version 2 because these templates are not aware of rekeying.
const AssemblerMaxVersion = LogicVersion
AssemblerMaxVersion is a maximum supported assembler version
const EvalMaxScratchSize = 255
EvalMaxScratchSize is the maximum number of scratch slots.
const EvalMaxVersion = LogicVersion
EvalMaxVersion is the max version we can interpret and run
const LogicVersion = 4
LogicVersion defines default assembler and max eval versions
const MaxByteMathSize = 64
MaxByteMathSize is the limit of byte strings supplied as input to byte math opcodes
const MaxStackDepth = 1000
MaxStackDepth should move to consensus params
const MaxStringSize = 4096
MaxStringSize is the limit of byte strings created by `concat`
const OnCompletionPreamble = "" /* 184-byte string literal not displayed */
OnCompletionPreamble describes what the OnCompletion constants represent.
Variables ¶
var AssetHoldingFieldDocs = map[string]string{
"AssetBalance": "Amount of the asset unit held by this account",
"AssetFrozen": "Is the asset frozen or not",
}
AssetHoldingFieldDocs are notes on fields available in `asset_holding_get`
var AssetHoldingFieldNames []string
AssetHoldingFieldNames are arguments to the 'asset_holding_get' opcode
var AssetHoldingFieldTypes []StackType
AssetHoldingFieldTypes is StackUint64 StackBytes in parallel with AssetHoldingFieldNames
var AssetParamsFieldDocs = map[string]string{
"AssetTotal": "Total number of units of this asset",
"AssetDecimals": "See AssetParams.Decimals",
"AssetDefaultFrozen": "Frozen by default or not",
"AssetUnitName": "Asset unit name",
"AssetName": "Asset name",
"AssetURL": "URL with additional info about the asset",
"AssetMetadataHash": "Arbitrary commitment",
"AssetManager": "Manager commitment",
"AssetReserve": "Reserve address",
"AssetFreeze": "Freeze address",
"AssetClawback": "Clawback address",
}
AssetParamsFieldDocs are notes on fields available in `asset_params_get`
var AssetParamsFieldNames []string
AssetParamsFieldNames are arguments to the 'asset_holding_get' opcode
var AssetParamsFieldTypes []StackType
AssetParamsFieldTypes is StackUint64 StackBytes in parallel with AssetParamsFieldNames
var GlobalFieldNames []string
GlobalFieldNames are arguments to the 'global' opcode
var GlobalFieldTypes []StackType
GlobalFieldTypes is StackUint64 StackBytes in parallel with GlobalFieldNames
var OnCompletionNames []string
OnCompletionNames is the string names of Txn.OnCompletion, array index is the const value
var OpGroups = map[string][]string{
"Arithmetic": {"sha256", "keccak256", "sha512_256", "ed25519verify", "+", "-", "/", "*", "<", ">", "<=", ">=", "&&", "||", "shl", "shr", "sqrt", "bitlen", "exp", "==", "!=", "!", "len", "itob", "btoi", "%", "|", "&", "^", "~", "mulw", "addw", "divmodw", "expw", "getbit", "setbit", "getbyte", "setbyte", "concat", "substring", "substring3"},
"Byteslice Arithmetic": {"b+", "b-", "b/", "b*", "b<", "b>", "b<=", "b>=", "b==", "b!=", "b%"},
"Byteslice Logic": {"b|", "b&", "b^", "b~"},
"Loading Values": {"intcblock", "intc", "intc_0", "intc_1", "intc_2", "intc_3", "pushint", "bytecblock", "bytec", "bytec_0", "bytec_1", "bytec_2", "bytec_3", "pushbytes", "bzero", "arg", "arg_0", "arg_1", "arg_2", "arg_3", "txn", "gtxn", "txna", "gtxna", "gtxns", "gtxnsa", "global", "load", "store", "gload", "gloads"},
"Flow Control": {"err", "bnz", "bz", "b", "return", "pop", "dup", "dup2", "dig", "swap", "select", "assert", "callsub", "retsub"},
"State Access": {"balance", "min_balance", "app_opted_in", "app_local_get", "app_local_get_ex", "app_global_get", "app_global_get_ex", "app_local_put", "app_global_put", "app_local_del", "app_global_del", "asset_holding_get", "asset_params_get"},
}
OpGroups is groupings of ops for documentation purposes.
var OpSpecs = []OpSpec{}/* 119 elements not displayed */
OpSpecs is the table of operations that can be assembled and evaluated.
Any changes should be reflected in README_in.md which serves as the language spec.
Note: assembly can specialize an Any return type if known at assembly-time, with ops.returns()
var OpsByName [LogicVersion + 1]map[string]OpSpec
OpsByName map for each each version, mapping opcode name to OpSpec
var TxnFieldNames []string
TxnFieldNames are arguments to the 'txn' and 'txnById' opcodes
var TxnFieldTypes []StackType
TxnFieldTypes is StackBytes or StackUint64 parallel to TxnFieldNames
var TxnTypeNames = []string{ string(protocol.UnknownTx), string(protocol.PaymentTx), string(protocol.KeyRegistrationTx), string(protocol.AssetConfigTx), string(protocol.AssetTransferTx), string(protocol.AssetFreezeTx), string(protocol.ApplicationCallTx), }
TxnTypeNames is the values of Txn.Type in enum order
var TxnaFieldNames = []string{ApplicationArgs.String(), Accounts.String()}
TxnaFieldNames are arguments to the 'txna' opcode It is a subset of txn transaction fields so initialized here in-place
var TxnaFieldTypes = []StackType{ txnaFieldSpecByField[ApplicationArgs].ftype, txnaFieldSpecByField[Accounts].ftype, txnaFieldSpecByField[Assets].ftype, txnaFieldSpecByField[Applications].ftype, }
TxnaFieldTypes is StackBytes or StackUint64 parallel to TxnFieldNames
var TypeNameDescriptions = map[string]string{ string(protocol.UnknownTx): "Unknown type. Invalid transaction", string(protocol.PaymentTx): "Payment", string(protocol.KeyRegistrationTx): "KeyRegistration", string(protocol.AssetConfigTx): "AssetConfig", string(protocol.AssetTransferTx): "AssetTransfer", string(protocol.AssetFreezeTx): "AssetFreeze", string(protocol.ApplicationCallTx): "ApplicationCall", }
TypeNameDescriptions contains extra description about a low level protocol transaction Type string, and provide a friendlier type constant name in assembler.
Functions ¶
func Check ¶
func Check(program []byte, params EvalParams) error
Check should be faster than Eval. It can perform static checks and reject programs that are invalid. Prior to v4, these static checks include a cost estimate that must be low enough (controlled by params.Proto).
func CheckStateful ¶
func CheckStateful(program []byte, params EvalParams) error
CheckStateful should be faster than EvalStateful. It can perform static checks and reject programs that are invalid. Prior to v4, these static checks include a cost estimate that must be low enough (controlled by params.Proto).
func ComputeMinTealVersion ¶
func ComputeMinTealVersion(group []transactions.SignedTxn) uint64
ComputeMinTealVersion calculates the minimum safe TEAL version that may be used by a transaction in this group. It is important to prevent newly-introduced transaction fields from breaking assumptions made by older versions of TEAL. If one of the transactions in a group will execute a TEAL program whose version predates a given field, that field must not be set anywhere in the transaction group, or the group will be rejected.
func Disassemble ¶
Disassemble produces a text form of program bytes. AssembleString(Disassemble()) should result in the same program bytes.
func Eval ¶
func Eval(program []byte, params EvalParams) (pass bool, err error)
Eval checks to see if a transaction passes logic A program passes successfully if it finishes with one int element on the stack that is non-zero.
func EvalStateful ¶
func EvalStateful(program []byte, params EvalParams) (pass bool, err error)
EvalStateful executes stateful TEAL program
func GetProgramID ¶
GetProgramID returns program or execution ID that is string representation of sha256 checksum. It is used later to link program on the user-facing side of the debugger with TEAL evaluator.
func GlobalFieldDocs ¶
GlobalFieldDocs are notes on fields available in `global` with extra versioning info if any
func HasStatefulOps ¶
HasStatefulOps checks if the program has stateful opcodes
func HashProgram ¶
HashProgram takes program bytes and returns the Digest This Digest can be used as an Address for a logic controlled account.
func OnCompletionDescription ¶
OnCompletionDescription returns extra description about OnCompletion constants
func OpDocExtra ¶
OpDocExtra returns extra documentation text about an op
func OpImmediateNote ¶
OpImmediateNote returns a short string about immediate data which follows the op byte
func TxnFieldDocs ¶
TxnFieldDocs are notes on fields available by `txn` and `gtxn` with extra versioning info if any
func TxnFieldToTealValue ¶
func TxnFieldToTealValue(txn *transactions.Transaction, groupIndex int, field TxnField, arrayFieldIdx uint64) (basics.TealValue, error)
TxnFieldToTealValue is a thin wrapper for txnFieldToStack for external use
Types ¶
type AssetHoldingField ¶
type AssetHoldingField int
AssetHoldingField is an enum for `asset_holding_get` opcode
const ( // AssetBalance AssetHolding.Amount AssetBalance AssetHoldingField = iota // AssetFrozen AssetHolding.Frozen AssetFrozen )
func (AssetHoldingField) String ¶
func (i AssetHoldingField) String() string
type AssetParamsField ¶
type AssetParamsField int
AssetParamsField is an enum for `asset_params_get` opcode
const ( // AssetTotal AssetParams.Total AssetTotal AssetParamsField = iota // AssetDecimals AssetParams.Decimals AssetDecimals // AssetDefaultFrozen AssetParams.AssetDefaultFrozen AssetDefaultFrozen // AssetUnitName AssetParams.UnitName AssetUnitName // AssetName AssetParams.AssetName AssetName // AssetURL AssetParams.URL AssetURL // AssetMetadataHash AssetParams.MetadataHash AssetMetadataHash // AssetManager AssetParams.Manager AssetManager // AssetReserve AssetParams.Reserve AssetReserve // AssetFreeze AssetParams.Freeze AssetFreeze // AssetClawback AssetParams.Clawback AssetClawback )
func (AssetParamsField) String ¶
func (i AssetParamsField) String() string
type DebugState ¶
type DebugState struct { // fields set once on Register ExecID string `codec:"execid"` Disassembly string `codec:"disasm"` PCOffset []PCOffset `codec:"pctooffset"` TxnGroup []transactions.SignedTxn `codec:"txngroup"` GroupIndex int `codec:"gindex"` Proto *config.ConsensusParams `codec:"proto"` Globals []basics.TealValue `codec:"globals"` // fields updated every step PC int `codec:"pc"` Line int `codec:"line"` Stack []basics.TealValue `codec:"stack"` Scratch []basics.TealValue `codec:"scratch"` Error string `codec:"error"` // global/local state changes are updated every step. Stateful TEAL only. basics.EvalDelta }
DebugState is a representation of the evaluation context that we encode to json and send to tealdbg
func (*DebugState) LineToPC ¶
func (d *DebugState) LineToPC(line int) int
LineToPC converts line to pc Return 0 on unsuccess
func (*DebugState) PCToLine ¶
func (d *DebugState) PCToLine(pc int) int
PCToLine converts pc to line Return 0 on unsuccess
type DebuggerHook ¶
type DebuggerHook interface { // Register is fired on program creation Register(state *DebugState) error // Update is fired on every step Update(state *DebugState) error // Complete is called when the program exits Complete(state *DebugState) error }
DebuggerHook functions are called by eval function during TEAL program execution if provided
type EvalParams ¶
type EvalParams struct { // the transaction being evaluated Txn *transactions.SignedTxn Proto *config.ConsensusParams Trace io.Writer TxnGroup []transactions.SignedTxn // GroupIndex should point to Txn within TxnGroup GroupIndex int PastSideEffects []EvalSideEffects Logger logging.Logger Ledger LedgerForLogic // optional debugger Debugger DebuggerHook // MinTealVersion is the minimum allowed TEAL version of this program. // The program must reject if its version is less than this version. If // MinTealVersion is nil, we will compute it ourselves MinTealVersion *uint64 // contains filtered or unexported fields }
EvalParams contains data that comes into condition evaluation.
type EvalSideEffects ¶
type EvalSideEffects struct {
// contains filtered or unexported fields
}
EvalSideEffects contains data returned from evaluation
func MakePastSideEffects ¶
func MakePastSideEffects(size int) (pastSideEffects []EvalSideEffects)
MakePastSideEffects allocates and initializes a slice of EvalSideEffects of length `size`
type GlobalField ¶
type GlobalField uint64
GlobalField is an enum for `global` opcode
const ( // MinTxnFee ConsensusParams.MinTxnFee MinTxnFee GlobalField = iota // MinBalance ConsensusParams.MinBalance MinBalance // MaxTxnLife ConsensusParams.MaxTxnLife MaxTxnLife // ZeroAddress [32]byte{0...} ZeroAddress // GroupSize len(txn group) GroupSize // LogicSigVersion ConsensusParams.LogicSigVersion LogicSigVersion // Round basics.Round Round // LatestTimestamp uint64 LatestTimestamp // CurrentApplicationID uint64 CurrentApplicationID // CreatorAddress [32]byte CreatorAddress )
func (GlobalField) String ¶
func (i GlobalField) String() string
type LedgerForLogic ¶
type LedgerForLogic interface { Balance(addr basics.Address) (basics.MicroAlgos, error) MinBalance(addr basics.Address, proto *config.ConsensusParams) (basics.MicroAlgos, error) Round() basics.Round LatestTimestamp() int64 AssetHolding(addr basics.Address, assetIdx basics.AssetIndex) (basics.AssetHolding, error) AssetParams(aidx basics.AssetIndex) (basics.AssetParams, error) ApplicationID() basics.AppIndex CreatorAddress() basics.Address OptedIn(addr basics.Address, appIdx basics.AppIndex) (bool, error) GetLocal(addr basics.Address, appIdx basics.AppIndex, key string, accountIdx uint64) (value basics.TealValue, exists bool, err error) SetLocal(addr basics.Address, key string, value basics.TealValue, accountIdx uint64) error DelLocal(addr basics.Address, key string, accountIdx uint64) error GetGlobal(appIdx basics.AppIndex, key string) (value basics.TealValue, exists bool, err error) SetGlobal(key string, value basics.TealValue) error DelGlobal(key string) error GetDelta(txn *transactions.Transaction) (evalDelta basics.EvalDelta, err error) }
LedgerForLogic represents ledger API for Stateful TEAL program
type Msg ¶
type Msg struct { ProgramHash crypto.Digest `codec:"p"` Data []byte `codec:"d"` // contains filtered or unexported fields }
Msg is data meant to be signed and then verified with the ed25519verify opcode.
type OnCompletionConstType ¶
type OnCompletionConstType transactions.OnCompletion
OnCompletionConstType is the same as transactions.OnCompletion
const ( // NoOp = transactions.NoOpOC NoOp OnCompletionConstType = OnCompletionConstType(transactions.NoOpOC) // OptIn = transactions.OptInOC OptIn OnCompletionConstType = OnCompletionConstType(transactions.OptInOC) // CloseOut = transactions.CloseOutOC CloseOut OnCompletionConstType = OnCompletionConstType(transactions.CloseOutOC) // ClearState = transactions.ClearStateOC ClearState OnCompletionConstType = OnCompletionConstType(transactions.ClearStateOC) // UpdateApplication = transactions.UpdateApplicationOC UpdateApplication OnCompletionConstType = OnCompletionConstType(transactions.UpdateApplicationOC) // DeleteApplication = transactions.DeleteApplicationOC DeleteApplication OnCompletionConstType = OnCompletionConstType(transactions.DeleteApplicationOC) )
func (OnCompletionConstType) String ¶
func (i OnCompletionConstType) String() string
type OpCost ¶
OpCost indicates the cost of an operation over the range of LogicVersions from From to To.
func OpAllCosts ¶
OpAllCosts returns an array of the cost score for an op by version. Each entry indicates the cost over a range of versions, so if the cost has remained constant, there is only one result, otherwise each entry shows the cost for a consecutive range of versions, inclusive.
type OpSpec ¶
type OpSpec struct { Opcode byte Name string Args StackTypes // what gets popped from the stack Returns StackTypes // what gets pushed to the stack Version uint64 // TEAL version opcode introduced Modes runMode // if non-zero, then (mode & Modes) != 0 to allow Details opDetails // Special cost or bytecode layout considerations // contains filtered or unexported fields }
OpSpec defines an opcode
func OpcodesByVersion ¶
OpcodesByVersion returns list of opcodes available in a specific version of TEAL by copying v1 opcodes to v2, and then on to v3 to create a full list
type OpStream ¶
type OpStream struct { Version uint64 Trace io.Writer Warnings []error // informational warnings, shouldn't stop assembly Errors []*lineError // errors that should prevent final assembly Program []byte // Final program bytes. Will stay nil if any errors // map opcode offsets to source line OffsetToLine map[int]int HasStatefulOps bool // contains filtered or unexported fields }
OpStream is destination for program and scratch space
func AssembleString ¶
AssembleString takes an entire program in a string and assembles it to bytecode using AssemblerDefaultVersion
func AssembleStringWithVersion ¶
AssembleStringWithVersion takes an entire program in a string and assembles it to bytecode using the assembler version specified. If version is assemblerNoVersion it uses #pragma version or fallsback to AssemblerDefaultVersion. OpStream is returned to allow access to warnings, (multiple) errors, or the PC to source line mapping. Note that AssemblerDefaultVersion is not the latest supported version, and therefore we might need to pass in explicitly a higher version.
func (*OpStream) ByteLiteral ¶
ByteLiteral writes opcodes and data for loading a []byte literal Values are accumulated so that they can be put into a bytecblock
func (*OpStream) GetVersion ¶
GetVersion returns the LogicSigVersion we're building to
func (*OpStream) RecordSourceLine ¶
func (ops *OpStream) RecordSourceLine()
RecordSourceLine adds an entry to pc to line mapping
func (*OpStream) ReferToLabel ¶
ReferToLabel records an opcode label refence to resolve later
func (*OpStream) ReportProblems ¶
ReportProblems issues accumulated warnings and errors to stderr.
type PCOffset ¶
PCOffset stores the mapping from a program counter value to an offset in the disassembly of the bytecode
type PanicError ¶
type PanicError struct { PanicValue interface{} StackTrace string }
PanicError wraps a recover() catching a panic()
func (PanicError) Error ¶
func (pe PanicError) Error() string
type Program ¶
type Program []byte
Program is byte code to be interpreted for validating transactions.
type StackType ¶
type StackType byte
StackType describes the type of a value on the operand stack
const StackAny StackType = 1
StackAny in an OpSpec shows that the op pops or yield any type
const StackBytes StackType = 3
StackBytes in an OpSpec shows that the op pops or yields a []byte
const StackNone StackType = 0
StackNone in an OpSpec shows that the op pops or yields nothing
const StackUint64 StackType = 2
StackUint64 in an OpSpec shows that the op pops or yields a uint64
type StackTypes ¶
type StackTypes []StackType
StackTypes is an alias for a list of StackType with syntactic sugar
type TxnField ¶
type TxnField int
TxnField is an enum type for `txn` and `gtxn`
const ( // Sender Transaction.Sender Sender TxnField = iota // Fee Transaction.Fee Fee // FirstValid Transaction.FirstValid FirstValid // FirstValidTime panic FirstValidTime // LastValid Transaction.LastValid LastValid // Note Transaction.Note Note // Lease Transaction.Lease Lease // Receiver Transaction.Receiver Receiver // Amount Transaction.Amount Amount // CloseRemainderTo Transaction.CloseRemainderTo CloseRemainderTo // VotePK Transaction.VotePK VotePK // SelectionPK Transaction.SelectionPK SelectionPK // VoteFirst Transaction.VoteFirst VoteFirst // VoteLast Transaction.VoteLast VoteLast // VoteKeyDilution Transaction.VoteKeyDilution VoteKeyDilution // Type Transaction.Type Type // TypeEnum int(Transaction.Type) TypeEnum // XferAsset Transaction.XferAsset XferAsset // AssetAmount Transaction.AssetAmount AssetAmount // AssetSender Transaction.AssetSender AssetSender // AssetReceiver Transaction.AssetReceiver AssetReceiver // AssetCloseTo Transaction.AssetCloseTo AssetCloseTo // GroupIndex i for txngroup[i] == Txn GroupIndex // TxID Transaction.ID() TxID // ApplicationID basics.AppIndex ApplicationID // OnCompletion OnCompletion OnCompletion // ApplicationArgs [][]byte ApplicationArgs // NumAppArgs len(ApplicationArgs) NumAppArgs // Accounts []basics.Address Accounts // NumAccounts len(Accounts) NumAccounts // ApprovalProgram []byte ApprovalProgram // ClearStateProgram []byte ClearStateProgram // RekeyTo basics.Address RekeyTo // ConfigAsset basics.AssetIndex ConfigAsset // ConfigAssetTotal AssetParams.Total ConfigAssetTotal // ConfigAssetDecimals AssetParams.Decimals ConfigAssetDecimals // ConfigAssetDefaultFrozen AssetParams.AssetDefaultFrozen ConfigAssetDefaultFrozen // ConfigAssetUnitName AssetParams.UnitName ConfigAssetUnitName // ConfigAssetName AssetParams.AssetName ConfigAssetName // ConfigAssetURL AssetParams.URL ConfigAssetURL // ConfigAssetMetadataHash AssetParams.MetadataHash ConfigAssetMetadataHash // ConfigAssetManager AssetParams.Manager ConfigAssetManager // ConfigAssetReserve AssetParams.Reserve ConfigAssetReserve // ConfigAssetFreeze AssetParams.Freeze ConfigAssetFreeze // ConfigAssetClawback AssetParams.Clawback ConfigAssetClawback //FreezeAsset basics.AssetIndex FreezeAsset // FreezeAssetAccount basics.Address FreezeAssetAccount // FreezeAssetFrozen bool FreezeAssetFrozen // Assets []basics.AssetIndex Assets // NumAssets len(ForeignAssets) NumAssets // Applications []basics.AppIndex Applications // NumApplications len(ForeignApps) NumApplications // GlobalNumUint uint64 GlobalNumUint // GlobalNumByteSlice uint64 GlobalNumByteSlice // LocalNumUint uint64 LocalNumUint // LocalNumByteSlice uint64 LocalNumByteSlice // AppProgramExtraPages AppParams.ExtraProgramPages AppProgramExtraPages )
type WebDebuggerHook ¶
type WebDebuggerHook struct {
URL string
}
WebDebuggerHook represents a connection to tealdbg
func (*WebDebuggerHook) Complete ¶
func (dbg *WebDebuggerHook) Complete(state *DebugState) error
Complete sends state to remote debugger
func (*WebDebuggerHook) Register ¶
func (dbg *WebDebuggerHook) Register(state *DebugState) error
Register sends state to remote debugger
func (*WebDebuggerHook) Update ¶
func (dbg *WebDebuggerHook) Update(state *DebugState) error
Update sends state to remote debugger