model

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const HashLength = common.HashLength

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address = common.Address

type Application

type Application struct {
	Id                   uint64
	ContractAddress      Address
	TemplateHash         Hash
	TemplateUri          string
	LastProcessedBlock   uint64
	LastClaimCheckBlock  uint64
	LastOutputCheckBlock uint64
	Status               ApplicationStatus
	IConsensusAddress    Address
}

type ApplicationStatus

type ApplicationStatus string
const (
	ApplicationStatusRunning    ApplicationStatus = "RUNNING"
	ApplicationStatusNotRunning ApplicationStatus = "NOT RUNNING"
)

type Bytes

type Bytes = hexutil.Bytes

type DefaultBlock

type DefaultBlock string
const (
	DefaultBlockStatusLatest    DefaultBlock = "LATEST"
	DefaultBlockStatusFinalized DefaultBlock = "FINALIZED"
	DefaultBlockStatusPending   DefaultBlock = "PENDING"
	DefaultBlockStatusSafe      DefaultBlock = "SAFE"
)

type Epoch

type Epoch struct {
	Id              uint64
	Index           uint64
	FirstBlock      uint64
	LastBlock       uint64
	ClaimHash       *Hash
	TransactionHash *Hash
	Status          EpochStatus
	AppAddress      Address
}

type EpochStatus

type EpochStatus string
const (
	EpochStatusOpen               EpochStatus = "OPEN"
	EpochStatusClosed             EpochStatus = "CLOSED"
	EpochStatusProcessedAllInputs EpochStatus = "PROCESSED_ALL_INPUTS"
	EpochStatusClaimComputed      EpochStatus = "CLAIM_COMPUTED"
	EpochStatusClaimSubmitted     EpochStatus = "CLAIM_SUBMITTED"
	EpochStatusClaimAccepted      EpochStatus = "CLAIM_ACCEPTED"
	EpochStatusClaimRejected      EpochStatus = "CLAIM_REJECTED"
)

type ExecutionParameters

type ExecutionParameters struct {
	AdvanceIncCycles      uint64
	AdvanceMaxCycles      uint64
	InspectIncCycles      uint64
	InspectMaxCycles      uint64
	AdvanceIncDeadline    time.Duration
	AdvanceMaxDeadline    time.Duration
	InspectIncDeadline    time.Duration
	InspectMaxDeadline    time.Duration
	LoadDeadline          time.Duration
	StoreDeadline         time.Duration
	FastDeadline          time.Duration
	MaxConcurrentInspects int64
}

type Hash

type Hash = common.Hash

type Input

type Input struct {
	Id               uint64
	Index            uint64
	CompletionStatus InputCompletionStatus
	RawData          Bytes
	BlockNumber      uint64
	MachineHash      *Hash
	OutputsHash      *Hash
	AppAddress       Address
	EpochId          uint64
	TransactionId    Bytes
}

type InputCompletionStatus

type InputCompletionStatus string
const (
	InputStatusNone                       InputCompletionStatus = "NONE"
	InputStatusAccepted                   InputCompletionStatus = "ACCEPTED"
	InputStatusRejected                   InputCompletionStatus = "REJECTED"
	InputStatusException                  InputCompletionStatus = "EXCEPTION"
	InputStatusMachineHalted              InputCompletionStatus = "MACHINE_HALTED"
	InputStatusOutputsLimitExceeded       InputCompletionStatus = "OUTPUTS_LIMIT_EXCEEDED"
	InputStatusCycleLimitExceeded         InputCompletionStatus = "CYCLE_LIMIT_EXCEEDED"
	InputStatusTimeLimitExceeded          InputCompletionStatus = "TIME_LIMIT_EXCEEDED"
	InputStatusPayloadLengthLimitExceeded InputCompletionStatus = "PAYLOAD_LENGTH_LIMIT_EXCEEDED"
)

type MachineConfig

type MachineConfig struct {
	AppAddress      Address
	SnapshotPath    string
	ProcessedInputs uint64
	ExecutionParameters
}

type NodePersistentConfig

type NodePersistentConfig struct {
	DefaultBlock            DefaultBlock
	InputBoxDeploymentBlock uint64
	InputBoxAddress         Address
	ChainId                 uint64
}

type Output

type Output struct {
	Id                   uint64
	Index                uint64
	RawData              Bytes
	Hash                 *Hash
	OutputHashesSiblings []Hash
	InputId              uint64
	TransactionHash      *Hash
}

type Report

type Report struct {
	Id      uint64
	Index   uint64
	RawData Bytes
	InputId uint64
}

type Snapshot

type Snapshot struct {
	Id         uint64
	URI        string
	InputId    uint64
	AppAddress Address
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL