Documentation ¶
Index ¶
- Variables
- func GeneratePathProof(from, to *Node) []common.Hash
- func GetConflictAncestor(n1, n2 *Node) (*Node, *Node, error)
- func Link(nd *Node, prev *Node) error
- func NewExecutionAssertionStubFromAssertion(a *protocol.ExecutionAssertion, beforeInboxHash common.Hash, ...) *valprotocol.ExecutionAssertionStub
- func NewExecutionAssertionStubFromWholeAssertion(a *protocol.ExecutionAssertion, beforeInboxHash common.Hash, ...) *valprotocol.ExecutionAssertionStub
- type ExecutionAssertionBuf
- func (*ExecutionAssertionBuf) Descriptor() ([]byte, []int)deprecated
- func (x *ExecutionAssertionBuf) GetAfterHash() *common.HashBuf
- func (x *ExecutionAssertionBuf) GetDidInboxInsn() bool
- func (x *ExecutionAssertionBuf) GetLogs() []*common.HashBuf
- func (x *ExecutionAssertionBuf) GetMessages() []*common.HashBuf
- func (x *ExecutionAssertionBuf) GetNumGas() uint64
- func (*ExecutionAssertionBuf) ProtoMessage()
- func (x *ExecutionAssertionBuf) ProtoReflect() protoreflect.Message
- func (x *ExecutionAssertionBuf) Reset()
- func (x *ExecutionAssertionBuf) String() string
- type Inbox
- type InboxBuf
- func (*InboxBuf) Descriptor() ([]byte, []int)deprecated
- func (x *InboxBuf) GetHashOfRest() *common.HashBuf
- func (x *InboxBuf) GetItems() []*common.HashBuf
- func (x *InboxBuf) GetTopCount() *common.BigIntegerBuf
- func (*InboxBuf) ProtoMessage()
- func (x *InboxBuf) ProtoReflect() protoreflect.Message
- func (x *InboxBuf) Reset()
- func (x *InboxBuf) String() string
- func (x *InboxBuf) UnmarshalFromCheckpoint(ctx ckptcontext.RestoreContext) (*MessageStack, error)
- type MessageStack
- func (ms *MessageStack) DeliverMessage(msg inbox.InboxMessage) error
- func (ms *MessageStack) Equals(ms2 *MessageStack) bool
- func (ms *MessageStack) GenerateBisection(startItemHash common.Hash, segments, count uint64) ([]common.Hash, error)
- func (ms *MessageStack) GetAllMessages() []inbox.InboxMessage
- func (ms *MessageStack) GetAllMessagesAfter(olderAcc common.Hash) ([]inbox.InboxMessage, error)
- func (ms *MessageStack) GetAssertionMessages(beforeInboxHash common.Hash, afterInboxHash common.Hash) ([]inbox.InboxMessage, error)
- func (ms *MessageStack) GetHashAtIndex(height *big.Int) (common.Hash, error)
- func (ms *MessageStack) GetMaxAtHeight(maxHeight *common.TimeBlocks) (bool, *big.Int)
- func (ms *MessageStack) GetMessages(olderAcc common.Hash, count uint64) ([]inbox.InboxMessage, error)
- func (ms *MessageStack) GetTopHash() common.Hash
- func (ms *MessageStack) InboxMessageAfter(startItemHash common.Hash) (inbox.InboxMessage, error)
- func (ms *MessageStack) MarshalForCheckpoint(ctx *ckptcontext.CheckpointContext) *InboxBuf
- func (ms *MessageStack) String() string
- func (ms *MessageStack) TopCount() *big.Int
- type Node
- func NewInitialNode(mach machine.Machine) *Node
- func NewInvalidNodeFromPrev(prev *Node, disputable *valprotocol.DisputableNode, kind valprotocol.ChildType, ...) *Node
- func NewNodeFromPrev(prev *Node, disputable *valprotocol.DisputableNode, kind valprotocol.ChildType, ...) *Node
- func NewRandomInvalidNodeFromValidPrev(prev *Node, stub *valprotocol.ExecutionAssertionStub, ...) *Node
- func NewRandomNodeFromValidPrev(prev *Node, inboxStack *MessageStack, messageCount uint64) *Node
- func NewValidNodeFromPrev(prev *Node, disputable *valprotocol.DisputableNode, ...) *Node
- func (node *Node) AddStaker()
- func (node *Node) Assertion() *protocol.ExecutionAssertion
- func (node *Node) ChallengeNodeData(params valprotocol.ChainParams) (common.Hash, common.TimeTicks)
- func (node *Node) ClearPrev()
- func (node *Node) Deadline() common.TimeTicks
- func (node *Node) Depth() uint64
- func (node *Node) Disputable() *valprotocol.DisputableNode
- func (node *Node) Equals(node2 *Node) bool
- func (node *Node) EqualsFull(n2 *Node) bool
- func (node *Node) HasAncestor() bool
- func (node *Node) Hash() common.Hash
- func (node *Node) LinkSuccessor(successor *Node) error
- func (node *Node) LinkType() valprotocol.ChildType
- func (node *Node) Machine() machine.Machine
- func (node *Node) MarshalForCheckpoint(ctx *ckptcontext.CheckpointContext, includeMachine bool) *NodeBuf
- func (node *Node) NodeDataHash() common.Hash
- func (node *Node) NumStakers() uint64
- func (node *Node) Prev() *Node
- func (node *Node) PrevHash() common.Hash
- func (node *Node) RemoveStaker()
- func (node *Node) String() string
- func (node *Node) SuccessorHashes() [valprotocol.MaxChildType + 1]common.Hash
- func (node *Node) UnlinkPrev() bool
- func (node *Node) UpdateInvalidOpinion() error
- func (node *Node) UpdateValidOpinion(machine machine.Machine, assertion *protocol.ExecutionAssertion) error
- func (node *Node) VMProtoData() *valprotocol.VMProtoData
- type NodeBuf
- func (*NodeBuf) Descriptor() ([]byte, []int)deprecated
- func (x *NodeBuf) GetAssertion() *protocol.ExecutionAssertion
- func (x *NodeBuf) GetDeadline() *common.TimeTicksBuf
- func (x *NodeBuf) GetDepth() uint64
- func (x *NodeBuf) GetDisputableNode() *valprotocol.DisputableNodeBuf
- func (x *NodeBuf) GetHash() *common.HashBuf
- func (x *NodeBuf) GetInnerHash() *common.HashBuf
- func (x *NodeBuf) GetLinkType() uint32
- func (x *NodeBuf) GetMachineHash() *common.HashBuf
- func (x *NodeBuf) GetNodeDataHash() *common.HashBuf
- func (x *NodeBuf) GetPrevHash() *common.HashBuf
- func (x *NodeBuf) GetVmProtoData() *valprotocol.VMProtoDataBuf
- func (*NodeBuf) ProtoMessage()
- func (x *NodeBuf) ProtoReflect() protoreflect.Message
- func (x *NodeBuf) Reset()
- func (x *NodeBuf) String() string
- func (x *NodeBuf) UnmarshalFromCheckpoint(ctx ckptcontext.RestoreContext) (*Node, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var File_structures_proto protoreflect.FileDescriptor
Functions ¶
func GeneratePathProof ¶
func NewExecutionAssertionStubFromAssertion ¶
func NewExecutionAssertionStubFromAssertion( a *protocol.ExecutionAssertion, beforeInboxHash common.Hash, beforeLogsHash common.Hash, beforeMessagesHash common.Hash, inboxStack *MessageStack, ) *valprotocol.ExecutionAssertionStub
func NewExecutionAssertionStubFromWholeAssertion ¶
func NewExecutionAssertionStubFromWholeAssertion( a *protocol.ExecutionAssertion, beforeInboxHash common.Hash, inboxStack *MessageStack, ) *valprotocol.ExecutionAssertionStub
Types ¶
type ExecutionAssertionBuf ¶
type ExecutionAssertionBuf struct { AfterHash *common.HashBuf `protobuf:"bytes,1,opt,name=afterHash,proto3" json:"afterHash,omitempty"` DidInboxInsn bool `protobuf:"varint,2,opt,name=didInboxInsn,proto3" json:"didInboxInsn,omitempty"` NumGas uint64 `protobuf:"varint,3,opt,name=numGas,proto3" json:"numGas,omitempty"` Messages []*common.HashBuf `protobuf:"bytes,4,rep,name=messages,proto3" json:"messages,omitempty"` Logs []*common.HashBuf `protobuf:"bytes,5,rep,name=logs,proto3" json:"logs,omitempty"` // contains filtered or unexported fields }
func (*ExecutionAssertionBuf) Descriptor
deprecated
func (*ExecutionAssertionBuf) Descriptor() ([]byte, []int)
Deprecated: Use ExecutionAssertionBuf.ProtoReflect.Descriptor instead.
func (*ExecutionAssertionBuf) GetAfterHash ¶
func (x *ExecutionAssertionBuf) GetAfterHash() *common.HashBuf
func (*ExecutionAssertionBuf) GetDidInboxInsn ¶
func (x *ExecutionAssertionBuf) GetDidInboxInsn() bool
func (*ExecutionAssertionBuf) GetLogs ¶
func (x *ExecutionAssertionBuf) GetLogs() []*common.HashBuf
func (*ExecutionAssertionBuf) GetMessages ¶
func (x *ExecutionAssertionBuf) GetMessages() []*common.HashBuf
func (*ExecutionAssertionBuf) GetNumGas ¶
func (x *ExecutionAssertionBuf) GetNumGas() uint64
func (*ExecutionAssertionBuf) ProtoMessage ¶
func (*ExecutionAssertionBuf) ProtoMessage()
func (*ExecutionAssertionBuf) ProtoReflect ¶
func (x *ExecutionAssertionBuf) ProtoReflect() protoreflect.Message
func (*ExecutionAssertionBuf) Reset ¶
func (x *ExecutionAssertionBuf) Reset()
func (*ExecutionAssertionBuf) String ¶
func (x *ExecutionAssertionBuf) String() string
type InboxBuf ¶
type InboxBuf struct { TopCount *common.BigIntegerBuf `protobuf:"bytes,1,opt,name=topCount,proto3" json:"topCount,omitempty"` Items []*common.HashBuf `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` HashOfRest *common.HashBuf `protobuf:"bytes,3,opt,name=hashOfRest,proto3" json:"hashOfRest,omitempty"` // contains filtered or unexported fields }
func (*InboxBuf) Descriptor
deprecated
func (*InboxBuf) GetHashOfRest ¶
func (*InboxBuf) GetTopCount ¶
func (x *InboxBuf) GetTopCount() *common.BigIntegerBuf
func (*InboxBuf) ProtoMessage ¶
func (*InboxBuf) ProtoMessage()
func (*InboxBuf) ProtoReflect ¶
func (x *InboxBuf) ProtoReflect() protoreflect.Message
func (*InboxBuf) UnmarshalFromCheckpoint ¶
func (x *InboxBuf) UnmarshalFromCheckpoint(ctx ckptcontext.RestoreContext) (*MessageStack, error)
type MessageStack ¶
type MessageStack struct {
// contains filtered or unexported fields
}
func NewMessageStack ¶
func NewMessageStack() *MessageStack
func NewRandomMessageStack ¶
func NewRandomMessageStack(count int) *MessageStack
func (*MessageStack) DeliverMessage ¶
func (ms *MessageStack) DeliverMessage(msg inbox.InboxMessage) error
func (*MessageStack) Equals ¶
func (ms *MessageStack) Equals(ms2 *MessageStack) bool
func (*MessageStack) GenerateBisection ¶
func (*MessageStack) GetAllMessages ¶
func (ms *MessageStack) GetAllMessages() []inbox.InboxMessage
func (*MessageStack) GetAllMessagesAfter ¶
func (ms *MessageStack) GetAllMessagesAfter(olderAcc common.Hash) ([]inbox.InboxMessage, error)
func (*MessageStack) GetAssertionMessages ¶
func (ms *MessageStack) GetAssertionMessages(beforeInboxHash common.Hash, afterInboxHash common.Hash) ([]inbox.InboxMessage, error)
func (*MessageStack) GetHashAtIndex ¶
func (*MessageStack) GetMaxAtHeight ¶
func (ms *MessageStack) GetMaxAtHeight(maxHeight *common.TimeBlocks) (bool, *big.Int)
func (*MessageStack) GetMessages ¶
func (ms *MessageStack) GetMessages(olderAcc common.Hash, count uint64) ([]inbox.InboxMessage, error)
func (*MessageStack) GetTopHash ¶
func (ms *MessageStack) GetTopHash() common.Hash
func (*MessageStack) InboxMessageAfter ¶
func (ms *MessageStack) InboxMessageAfter(startItemHash common.Hash) (inbox.InboxMessage, error)
func (*MessageStack) MarshalForCheckpoint ¶
func (ms *MessageStack) MarshalForCheckpoint(ctx *ckptcontext.CheckpointContext) *InboxBuf
func (*MessageStack) String ¶
func (ms *MessageStack) String() string
func (*MessageStack) TopCount ¶
func (ms *MessageStack) TopCount() *big.Int
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func NewInitialNode ¶
func NewInvalidNodeFromPrev ¶
func NewInvalidNodeFromPrev( prev *Node, disputable *valprotocol.DisputableNode, kind valprotocol.ChildType, params valprotocol.ChainParams, currentTime *common.TimeBlocks, ) *Node
func NewNodeFromPrev ¶
func NewNodeFromPrev( prev *Node, disputable *valprotocol.DisputableNode, kind valprotocol.ChildType, params valprotocol.ChainParams, currentTime *common.TimeBlocks, vmProtoData *valprotocol.VMProtoData, ) *Node
func NewRandomInvalidNodeFromValidPrev ¶
func NewRandomInvalidNodeFromValidPrev(prev *Node, stub *valprotocol.ExecutionAssertionStub, kind valprotocol.ChildType, params valprotocol.ChainParams) *Node
func NewRandomNodeFromValidPrev ¶
func NewRandomNodeFromValidPrev(prev *Node, inboxStack *MessageStack, messageCount uint64) *Node
func NewValidNodeFromPrev ¶
func NewValidNodeFromPrev( prev *Node, disputable *valprotocol.DisputableNode, params valprotocol.ChainParams, currentTime *common.TimeBlocks, ) *Node
func (*Node) Assertion ¶
func (node *Node) Assertion() *protocol.ExecutionAssertion
func (*Node) ChallengeNodeData ¶
func (node *Node) ChallengeNodeData(params valprotocol.ChainParams) (common.Hash, common.TimeTicks)
func (*Node) Disputable ¶
func (node *Node) Disputable() *valprotocol.DisputableNode
func (*Node) EqualsFull ¶
func (*Node) HasAncestor ¶
func (*Node) LinkSuccessor ¶
func (*Node) LinkType ¶
func (node *Node) LinkType() valprotocol.ChildType
func (*Node) MarshalForCheckpoint ¶
func (node *Node) MarshalForCheckpoint(ctx *ckptcontext.CheckpointContext, includeMachine bool) *NodeBuf
func (*Node) NodeDataHash ¶
func (*Node) NumStakers ¶
func (*Node) RemoveStaker ¶
func (node *Node) RemoveStaker()
func (*Node) SuccessorHashes ¶
func (node *Node) SuccessorHashes() [valprotocol.MaxChildType + 1]common.Hash
func (*Node) UnlinkPrev ¶
func (*Node) UpdateInvalidOpinion ¶
func (*Node) UpdateValidOpinion ¶
func (*Node) VMProtoData ¶
func (node *Node) VMProtoData() *valprotocol.VMProtoData
type NodeBuf ¶
type NodeBuf struct { PrevHash *common.HashBuf `protobuf:"bytes,1,opt,name=prevHash,proto3" json:"prevHash,omitempty"` Deadline *common.TimeTicksBuf `protobuf:"bytes,2,opt,name=deadline,proto3" json:"deadline,omitempty"` DisputableNode *valprotocol.DisputableNodeBuf `protobuf:"bytes,3,opt,name=disputableNode,proto3" json:"disputableNode,omitempty"` LinkType uint32 `protobuf:"varint,4,opt,name=linkType,proto3" json:"linkType,omitempty"` VmProtoData *valprotocol.VMProtoDataBuf `protobuf:"bytes,5,opt,name=vmProtoData,proto3" json:"vmProtoData,omitempty"` MachineHash *common.HashBuf `protobuf:"bytes,6,opt,name=machineHash,proto3" json:"machineHash,omitempty"` Assertion *protocol.ExecutionAssertion `protobuf:"bytes,7,opt,name=assertion,proto3" json:"assertion,omitempty"` Depth uint64 `protobuf:"varint,8,opt,name=depth,proto3" json:"depth,omitempty"` NodeDataHash *common.HashBuf `protobuf:"bytes,9,opt,name=nodeDataHash,proto3" json:"nodeDataHash,omitempty"` InnerHash *common.HashBuf `protobuf:"bytes,10,opt,name=innerHash,proto3" json:"innerHash,omitempty"` Hash *common.HashBuf `protobuf:"bytes,11,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*NodeBuf) Descriptor
deprecated
func (*NodeBuf) GetAssertion ¶
func (x *NodeBuf) GetAssertion() *protocol.ExecutionAssertion
func (*NodeBuf) GetDeadline ¶
func (x *NodeBuf) GetDeadline() *common.TimeTicksBuf
func (*NodeBuf) GetDisputableNode ¶
func (x *NodeBuf) GetDisputableNode() *valprotocol.DisputableNodeBuf
func (*NodeBuf) GetInnerHash ¶
func (*NodeBuf) GetLinkType ¶
func (*NodeBuf) GetMachineHash ¶
func (*NodeBuf) GetNodeDataHash ¶
func (*NodeBuf) GetPrevHash ¶
func (*NodeBuf) GetVmProtoData ¶
func (x *NodeBuf) GetVmProtoData() *valprotocol.VMProtoDataBuf
func (*NodeBuf) ProtoMessage ¶
func (*NodeBuf) ProtoMessage()
func (*NodeBuf) ProtoReflect ¶
func (x *NodeBuf) ProtoReflect() protoreflect.Message
func (*NodeBuf) UnmarshalFromCheckpoint ¶
func (x *NodeBuf) UnmarshalFromCheckpoint(ctx ckptcontext.RestoreContext) (*Node, error)
Click to show internal directories.
Click to hide internal directories.