Documentation
¶
Index ¶
- Variables
- func NewAllTxsIterator(txStore TxStore, stateURI string, txIDs []state.Version) *allTxsForStateURIIterator
- func NewAllValidTxsForStateURIOrderedIterator(txStore TxStore, stateURI string, fromTxID state.Version) *allValidTxsForStateURIOrderedIterator
- func NewMempool(processCallback func(tx Tx) processTxOutcome) *mempool
- type Controller
- type ControllerHub
- type Indexer
- type IndexerConstructor
- type Mempool
- type NewStateCallback
- type NewStateURIWithDataCallback
- type Patch
- type Resolver
- type ResolverConstructor
- type StateURI
- type Tx
- type TxIterator
- type TxStatus
- type TxStore
- type Validator
- type ValidatorConstructor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MergeTypeKeypath = state.Keypath("Merge-Type") ValidatorKeypath = state.Keypath("Validator") )
View Source
var ( ErrNoParentYet = errors.New("no parent yet") ErrPendingParent = errors.New("parent pending validation") ErrInvalidParent = errors.New("invalid parent") ErrInvalidSignature = errors.New("invalid signature") ErrInvalidTx = errors.New("invalid tx") ErrTxMissingParents = errors.New("tx must have parents") ErrMissingCriticalBlobs = errors.New("missing critical blobs") ErrSenderIsNotAMember = errors.New("tx sender is not a member of state URI") )
View Source
var ( GenesisTxID = state.VersionFromString("genesis") EmptyHash = types.Hash{} )
View Source
var ( TxStatusUnknown = pb.TxStatusUnknown TxStatusInMempool = pb.TxStatusInMempool TxStatusInvalid = pb.TxStatusInvalid TxStatusValid = pb.TxStatusValid )
Functions ¶
func NewAllTxsIterator ¶
func NewMempool ¶
func NewMempool(processCallback func(tx Tx) processTxOutcome) *mempool
Types ¶
type Controller ¶
type Controller interface { process.Interface AddTx(tx Tx) error StateAtVersion(version *state.Version) state.Node // QueryIndex(version *state.Version, keypath state.Keypath, indexName state.Keypath, queryParam state.Keypath, rng *state.Range) (state.Node, error) Leaves() ([]state.Version, error) OnNewState(fn NewStateCallback) DebugPrint() }
func NewController ¶
func NewController( stateURI string, stateDBRootPath string, badgerOpts badgerutils.OptsBuilder, controllerHub ControllerHub, txStore TxStore, blobStore blob.Store, ) (Controller, error)
type ControllerHub ¶
type ControllerHub interface { process.Interface AddTx(tx Tx) error FetchTx(stateURI string, txID state.Version) (Tx, error) FetchValidTxsOrdered(stateURI string, fromTxID state.Version) TxIterator StateURIsWithData() (types.Set[string], error) IsStateURIWithData(stateURI string) (bool, error) OnNewStateURIWithData(fn NewStateURIWithDataCallback) StateAtVersion(stateURI string, version *state.Version) (state.Node, error) // QueryIndex(stateURI string, version *state.Version, keypath state.Keypath, indexName state.Keypath, queryParam state.Keypath, rng *state.Range) (state.Node, error) Leaves(stateURI string) ([]state.Version, error) BlobReader(refID blob.ID, rng *types.Range) (io.ReadCloser, int64, error) OnNewState(fn NewStateCallback) DebugPrint(stateURI string) }
func NewControllerHub ¶
func NewControllerHub(dbRootPath string, txStore TxStore, blobStore blob.Store, badgerOpts badgerutils.OptsBuilder) ControllerHub
type NewStateCallback ¶
type NewStateURIWithDataCallback ¶
type NewStateURIWithDataCallback func(stateURI string)
type Resolver ¶
type Resolver interface { ResolveState(node state.Node, blobStore blob.Store, sender types.Address, txID state.Version, parents []state.Version, patches []Patch) error InternalState() map[string]interface{} }
func NewDumbResolver ¶
func NewJSResolver ¶
type ResolverConstructor ¶
type TxIterator ¶
type TxStore ¶
type TxStore interface { Start() error Close() AddTx(tx Tx) error RemoveTx(stateURI string, txID state.Version) error TxExists(stateURI string, txID state.Version) (bool, error) FetchTx(stateURI string, txID state.Version) (Tx, error) AllTxsForStateURI(stateURI string, fromTxID state.Version) (TxIterator, error) AllValidTxsForStateURIOrdered(stateURI string, fromTxID state.Version) TxIterator IsStateURIWithData(stateURI string) (bool, error) StateURIsWithData() (types.Set[string], error) OnNewStateURIWithData(fn NewStateURIWithDataCallback) MarkLeaf(stateURI string, txID state.Version) error UnmarkLeaf(stateURI string, txID state.Version) error Leaves(stateURI string) ([]state.Version, error) DebugPrint() }
func NewBadgerTxStore ¶
func NewBadgerTxStore(badgerOpts badger.Options) TxStore
Source Files
¶
Click to show internal directories.
Click to hide internal directories.