Versions in this module Expand all Collapse all v0 v0.1.0 Jun 4, 2019 Changes in this version + func CreateVMHash(data *CreateVMValidatorRequest) [32]byte + func LogProof(a *protocol.Assertion, index int) ([][32]byte, error) + func TranslateBisectionEvent(event *challengeRPC.ChallengeManagerBisectedAssertion) []*protocol.AssertionStub + func TranslateDisputableAssertionEvent(event *verifierRPC.VMTrackerDisputableAssertion) (*protocol.Precondition, *protocol.AssertionStub) + func UnanimousAssertHash(vmId [32]byte, sequenceNum uint64, beforeHash [32]byte, ...) ([32]byte, error) + type ArbAddresses struct + BalanceTrackerAddress string + ChallengeAddress string + OneStepAddress string + TrackerAddress string + type Client struct + Address common.Address + FromClient chan *FollowerResponse + ToClient chan *ValidatorRequest + func NewClient(cm *ClientManager, conn *websocket.Conn, address common.Address) *Client + type ClientManager struct + func NewClientManager(key *ecdsa.PrivateKey, vmId [32]byte, ...) *ClientManager + func (m *ClientManager) Run() + func (m *ClientManager) RunServer() error + func (m *ClientManager) WaitForFollowers(timeout time.Duration) bool + type CoordinatorCreateRequest struct + type CoordinatorDisputableRequest struct + type CoordinatorUnanimousRequest struct + type CreateVMFinalizedValidatorNotification struct + Approved bool + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*CreateVMFinalizedValidatorNotification) Descriptor() ([]byte, []int) + func (*CreateVMFinalizedValidatorNotification) ProtoMessage() + func (m *CreateVMFinalizedValidatorNotification) GetApproved() bool + func (m *CreateVMFinalizedValidatorNotification) Reset() + func (m *CreateVMFinalizedValidatorNotification) String() string + func (m *CreateVMFinalizedValidatorNotification) XXX_DiscardUnknown() + func (m *CreateVMFinalizedValidatorNotification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CreateVMFinalizedValidatorNotification) XXX_Merge(src proto.Message) + func (m *CreateVMFinalizedValidatorNotification) XXX_Size() int + func (m *CreateVMFinalizedValidatorNotification) XXX_Unmarshal(b []byte) error + type CreateVMFollowerResponse struct + Accepted bool + Signature *Signature + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*CreateVMFollowerResponse) Descriptor() ([]byte, []int) + func (*CreateVMFollowerResponse) ProtoMessage() + func (m *CreateVMFollowerResponse) GetAccepted() bool + func (m *CreateVMFollowerResponse) GetSignature() *Signature + func (m *CreateVMFollowerResponse) Reset() + func (m *CreateVMFollowerResponse) String() string + func (m *CreateVMFollowerResponse) XXX_DiscardUnknown() + func (m *CreateVMFollowerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CreateVMFollowerResponse) XXX_Merge(src proto.Message) + func (m *CreateVMFollowerResponse) XXX_Size() int + func (m *CreateVMFollowerResponse) XXX_Unmarshal(b []byte) error + type CreateVMValidatorRequest struct + ChallengeManagerNum uint32 + Config *valmessage.VMConfiguration + VmId *value.HashBuf + VmState *value.HashBuf + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*CreateVMValidatorRequest) Descriptor() ([]byte, []int) + func (*CreateVMValidatorRequest) ProtoMessage() + func (m *CreateVMValidatorRequest) GetChallengeManagerNum() uint32 + func (m *CreateVMValidatorRequest) GetConfig() *valmessage.VMConfiguration + func (m *CreateVMValidatorRequest) GetVmId() *value.HashBuf + func (m *CreateVMValidatorRequest) GetVmState() *value.HashBuf + func (m *CreateVMValidatorRequest) Reset() + func (m *CreateVMValidatorRequest) String() string + func (m *CreateVMValidatorRequest) XXX_DiscardUnknown() + func (m *CreateVMValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CreateVMValidatorRequest) XXX_Merge(src proto.Message) + func (m *CreateVMValidatorRequest) XXX_Size() int + func (m *CreateVMValidatorRequest) XXX_Unmarshal(b []byte) error + type EthConnection struct + BalanceTracker *verifierRPC.ArbBalanceTracker + Challenge *challengeRPC.ChallengeManager + OneStep *challengeRPC.OneStepProof + Tracker *verifierRPC.VMTracker + func NewEthConnection(serverAddress string, a ArbAddresses) (*EthConnection, error) + func (con *EthConnection) AsserterTimedOutChallenge(auth *bind.TransactOpts, vmId [32]byte, bisectionHash [32]byte, ...) (*types.Transaction, error) + func (con *EthConnection) BisectChallenge(auth *bind.TransactOpts, vmId [32]byte, deadline uint64, ...) (*types.Transaction, error) + func (con *EthConnection) ConfirmAsserted(auth *bind.TransactOpts, vmId [32]byte, precondition *protocol.Precondition, ...) (*types.Transaction, error) + func (con *EthConnection) ConfirmUnanimousAsserted(auth *bind.TransactOpts, vmId [32]byte, newInboxHash [32]byte, ...) (*types.Transaction, error) + func (con *EthConnection) ContinueChallenge(auth *bind.TransactOpts, vmId [32]byte, assertionToChallenge *big.Int, ...) (*types.Transaction, error) + func (con *EthConnection) CreateListeners(vmId [32]byte) (chan interface{}, chan error, error) + func (con *EthConnection) CreateVM(auth *bind.TransactOpts, data *CreateVMValidatorRequest, messageHash [32]byte, ...) (*types.Transaction, error) + func (con *EthConnection) DepositFunds(auth *bind.TransactOpts, amount *big.Int, dest [32]byte) (*types.Transaction, error) + func (con *EthConnection) DisputableAssert(auth *bind.TransactOpts, vmId [32]byte, precondition *protocol.Precondition, ...) (*types.Transaction, error) + func (con *EthConnection) InitiateChallenge(auth *bind.TransactOpts, vmId [32]byte, precondition *protocol.Precondition, ...) (*types.Transaction, error) + func (con *EthConnection) OneStepProof(auth *bind.TransactOpts, vmId [32]byte, precondition *protocol.Precondition, ...) (*types.Transaction, error) + func (con *EthConnection) ProposeUnanimousAssert(auth *bind.TransactOpts, vmId [32]byte, newInboxHash [32]byte, ...) (*types.Transaction, error) + func (con *EthConnection) SendEthMessage(auth *bind.TransactOpts, data value.Value, destination [32]byte, ...) (*types.Transaction, error) + func (con *EthConnection) SendMessage(auth *bind.TransactOpts, msg protocol.Message) (*types.Transaction, error) + func (con *EthConnection) UnanimousAssert(auth *bind.TransactOpts, vmId [32]byte, newInboxHash [32]byte, ...) (*types.Transaction, error) + type EthValidator struct + Bot *validator.Validator + CompletedCallChan chan valmessage.FinalizedAssertion + Validators map[common.Address]validatorInfo + VmId [32]byte + func NewEthValidator(name string, vmId [32]byte, machine *vm.Machine, key *ecdsa.PrivateKey, ...) (*EthValidator, error) + func (man *EthValidator) AdvanceBlockchain(blockCount int) error + func (man *EthValidator) AsserterTimedOutChallenge(bisectionHash [32]byte, deadline uint64) (*types.Transaction, error) + func (man *EthValidator) BisectChallenge(deadline uint64, precondition *protocol.Precondition, ...) (*types.Transaction, error) + func (man *EthValidator) ChallengerTimedOut(bisectionRoot [32]byte, deadline uint64) (*types.Transaction, error) + func (man *EthValidator) ConfirmAsserted(precondition *protocol.Precondition, assertion *protocol.Assertion) (*types.Transaction, error) + func (man *EthValidator) ConfirmUnanimousAsserted(newInboxHash [32]byte, assertion *protocol.Assertion) (*types.Transaction, error) + func (man *EthValidator) ContinueChallenge(assertionToChallenge *big.Int, bisectionProof []byte, bisectionRoot [32]byte, ...) (*types.Transaction, error) + func (man *EthValidator) CreateVM(createData *CreateVMValidatorRequest, signatures []valmessage.Signature) (*types.Transaction, error) + func (man *EthValidator) DepositEth(amount *big.Int) (*types.Transaction, error) + func (man *EthValidator) DisputableAssert(precondition *protocol.Precondition, assertion *protocol.Assertion) (*types.Transaction, error) + func (man *EthValidator) InitiateChallenge(precondition *protocol.Precondition, assertion *protocol.AssertionStub) (*types.Transaction, error) + func (man *EthValidator) OneStepProof(precondition *protocol.Precondition, assertion *protocol.AssertionStub, ...) (*types.Transaction, error) + func (man *EthValidator) ProposeUnanimousAssert(newInboxHash [32]byte, timeBounds protocol.TimeBounds, ...) (*types.Transaction, error) + func (man *EthValidator) SendEthMessage(data value.Value, amount *big.Int) (*types.Transaction, error) + func (man *EthValidator) SendMessage(data value.Value, tokenType [21]byte, currency *big.Int) (*types.Transaction, error) + func (man *EthValidator) Sign(msgHash [32]byte) (valmessage.Signature, error) + func (man *EthValidator) StartListening() error + func (man *EthValidator) UnanimousAssert(newInboxHash [32]byte, timeBounds protocol.TimeBounds, ...) (*types.Transaction, error) + func (man *EthValidator) UnanimousAssertHash(sequenceNum uint64, beforeHash [32]byte, timeBounds protocol.TimeBounds, ...) ([32]byte, error) + func (val *EthValidator) Address() common.Address + func (val *EthValidator) ValidatorCount() int + type FollowerResponse struct + RequestId *value.HashBuf + Response isFollowerResponse_Response + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*FollowerResponse) Descriptor() ([]byte, []int) + func (*FollowerResponse) ProtoMessage() + func (*FollowerResponse) XXX_OneofWrappers() []interface{} + func (m *FollowerResponse) GetCreate() *CreateVMFollowerResponse + func (m *FollowerResponse) GetRequestId() *value.HashBuf + func (m *FollowerResponse) GetResponse() isFollowerResponse_Response + func (m *FollowerResponse) GetUnanimous() *UnanimousAssertionFollowerResponse + func (m *FollowerResponse) Reset() + func (m *FollowerResponse) String() string + func (m *FollowerResponse) XXX_DiscardUnknown() + func (m *FollowerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *FollowerResponse) XXX_Merge(src proto.Message) + func (m *FollowerResponse) XXX_Size() int + func (m *FollowerResponse) XXX_Unmarshal(b []byte) error + type FollowerResponse_Create struct + Create *CreateVMFollowerResponse + type FollowerResponse_Unanimous struct + Unanimous *UnanimousAssertionFollowerResponse + type GatherSignatureRequest struct + type LabeledFollowerResponse struct + type MerkleTree struct + func NewMerkleTree(elements [][32]byte) *MerkleTree + func (m *MerkleTree) GetNode(index int) [32]byte + func (m *MerkleTree) GetProof(index int) [][32]byte + func (m *MerkleTree) GetProofFlat(index int) []byte + func (m *MerkleTree) GetRoot() [32]byte + type MessageProcessingQueue struct + func NewMessageProcessingQueue() *MessageProcessingQueue + func (m *MessageProcessingQueue) Fetch() chan []OffchainMessage + func (m *MessageProcessingQueue) HasMessages() chan bool + func (m *MessageProcessingQueue) Return(messages []OffchainMessage) + func (m *MessageProcessingQueue) Send(message OffchainMessage) + type OffchainMessage struct + Message protocol.Message + Signature []byte + type Signature struct + R *value.HashBuf + S *value.HashBuf + V uint32 + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Signature) Descriptor() ([]byte, []int) + func (*Signature) ProtoMessage() + func (m *Signature) GetR() *value.HashBuf + func (m *Signature) GetS() *value.HashBuf + func (m *Signature) GetV() uint32 + func (m *Signature) Reset() + func (m *Signature) String() string + func (m *Signature) XXX_DiscardUnknown() + func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Signature) XXX_Merge(src proto.Message) + func (m *Signature) XXX_Size() int + func (m *Signature) XXX_Unmarshal(b []byte) error + type SignedMessage struct + Message *protocol.MessageBuf + Signature []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*SignedMessage) Descriptor() ([]byte, []int) + func (*SignedMessage) ProtoMessage() + func (m *SignedMessage) GetMessage() *protocol.MessageBuf + func (m *SignedMessage) GetSignature() []byte + func (m *SignedMessage) Reset() + func (m *SignedMessage) String() string + func (m *SignedMessage) XXX_DiscardUnknown() + func (m *SignedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SignedMessage) XXX_Merge(src proto.Message) + func (m *SignedMessage) XXX_Size() int + func (m *SignedMessage) XXX_Unmarshal(b []byte) error + type UnanimousAssertionFollowerResponse struct + Accepted bool + AssertionHash *value.HashBuf + Signature *Signature + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*UnanimousAssertionFollowerResponse) Descriptor() ([]byte, []int) + func (*UnanimousAssertionFollowerResponse) ProtoMessage() + func (m *UnanimousAssertionFollowerResponse) GetAccepted() bool + func (m *UnanimousAssertionFollowerResponse) GetAssertionHash() *value.HashBuf + func (m *UnanimousAssertionFollowerResponse) GetSignature() *Signature + func (m *UnanimousAssertionFollowerResponse) Reset() + func (m *UnanimousAssertionFollowerResponse) String() string + func (m *UnanimousAssertionFollowerResponse) XXX_DiscardUnknown() + func (m *UnanimousAssertionFollowerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *UnanimousAssertionFollowerResponse) XXX_Merge(src proto.Message) + func (m *UnanimousAssertionFollowerResponse) XXX_Size() int + func (m *UnanimousAssertionFollowerResponse) XXX_Unmarshal(b []byte) error + type UnanimousAssertionRequest struct + type UnanimousAssertionValidatorNotification struct + Accepted bool + Signatures []*Signature + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*UnanimousAssertionValidatorNotification) Descriptor() ([]byte, []int) + func (*UnanimousAssertionValidatorNotification) ProtoMessage() + func (m *UnanimousAssertionValidatorNotification) GetAccepted() bool + func (m *UnanimousAssertionValidatorNotification) GetSignatures() []*Signature + func (m *UnanimousAssertionValidatorNotification) Reset() + func (m *UnanimousAssertionValidatorNotification) String() string + func (m *UnanimousAssertionValidatorNotification) XXX_DiscardUnknown() + func (m *UnanimousAssertionValidatorNotification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *UnanimousAssertionValidatorNotification) XXX_Merge(src proto.Message) + func (m *UnanimousAssertionValidatorNotification) XXX_Size() int + func (m *UnanimousAssertionValidatorNotification) XXX_Unmarshal(b []byte) error + type UnanimousAssertionValidatorRequest struct + BeforeHash *value.HashBuf + BeforeInbox *value.HashBuf + SequenceNum uint64 + SignedMessages []*SignedMessage + TimeBounds *protocol.TimeBoundsBuf + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*UnanimousAssertionValidatorRequest) Descriptor() ([]byte, []int) + func (*UnanimousAssertionValidatorRequest) ProtoMessage() + func (m *UnanimousAssertionValidatorRequest) GetBeforeHash() *value.HashBuf + func (m *UnanimousAssertionValidatorRequest) GetBeforeInbox() *value.HashBuf + func (m *UnanimousAssertionValidatorRequest) GetSequenceNum() uint64 + func (m *UnanimousAssertionValidatorRequest) GetSignedMessages() []*SignedMessage + func (m *UnanimousAssertionValidatorRequest) GetTimeBounds() *protocol.TimeBoundsBuf + func (m *UnanimousAssertionValidatorRequest) Reset() + func (m *UnanimousAssertionValidatorRequest) String() string + func (m *UnanimousAssertionValidatorRequest) XXX_DiscardUnknown() + func (m *UnanimousAssertionValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *UnanimousAssertionValidatorRequest) XXX_Merge(src proto.Message) + func (m *UnanimousAssertionValidatorRequest) XXX_Size() int + func (m *UnanimousAssertionValidatorRequest) XXX_Unmarshal(b []byte) error + type VMResponse struct + Message protocol.Message + Proof [][32]byte + Result value.Value + type ValidatorCoordinator struct + Val *EthValidator + func NewValidatorCoordinator(name string, machine *vm.Machine, key *ecdsa.PrivateKey, ...) (*ValidatorCoordinator, error) + func (m *ValidatorCoordinator) CreateVM(timeout time.Duration) (chan bool, chan error) + func (m *ValidatorCoordinator) InitiateDisputableAssertion() chan bool + func (m *ValidatorCoordinator) InitiateUnanimousAssertion(final bool) (chan bool, chan error) + func (m *ValidatorCoordinator) Run() + func (m *ValidatorCoordinator) SendMessage(msg OffchainMessage) + type ValidatorFollower struct + FromCoordinator chan *ValidatorRequest + ToCoordinator chan *FollowerResponse + func NewValidatorFollower(name string, machine *vm.Machine, key *ecdsa.PrivateKey, ...) (*ValidatorFollower, error) + func (m *ValidatorFollower) HandleCreateVM(request *CreateVMValidatorRequest) + func (m *ValidatorFollower) HandleUnanimousRequest(request *UnanimousAssertionValidatorRequest, requestId [32]byte) + func (m *ValidatorFollower) Run() error + type ValidatorLeaderRequest interface + type ValidatorRequest struct + Request isValidatorRequest_Request + RequestId *value.HashBuf + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ValidatorRequest) Descriptor() ([]byte, []int) + func (*ValidatorRequest) ProtoMessage() + func (*ValidatorRequest) XXX_OneofWrappers() []interface{} + func (m *ValidatorRequest) GetCreate() *CreateVMValidatorRequest + func (m *ValidatorRequest) GetCreateNotification() *CreateVMFinalizedValidatorNotification + func (m *ValidatorRequest) GetRequest() isValidatorRequest_Request + func (m *ValidatorRequest) GetRequestId() *value.HashBuf + func (m *ValidatorRequest) GetUnanimous() *UnanimousAssertionValidatorRequest + func (m *ValidatorRequest) GetUnanimousNotification() *UnanimousAssertionValidatorNotification + func (m *ValidatorRequest) Reset() + func (m *ValidatorRequest) String() string + func (m *ValidatorRequest) XXX_DiscardUnknown() + func (m *ValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ValidatorRequest) XXX_Merge(src proto.Message) + func (m *ValidatorRequest) XXX_Size() int + func (m *ValidatorRequest) XXX_Unmarshal(b []byte) error + type ValidatorRequest_Create struct + Create *CreateVMValidatorRequest + type ValidatorRequest_CreateNotification struct + CreateNotification *CreateVMFinalizedValidatorNotification + type ValidatorRequest_Unanimous struct + Unanimous *UnanimousAssertionValidatorRequest + type ValidatorRequest_UnanimousNotification struct + UnanimousNotification *UnanimousAssertionValidatorNotification