statedb

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

README

StateDB

An historical database for tabular data with loader for EOSIO state table & permissions.

Installation

Install through dfuse for EOSIO

Features

StateDB supports parallel ingestion by doing a first sharding pass on the chain history, splitting the different tables being mutated in different shards, then ingesting linearly each table.

This allows ingestion of the whole history in a few hours.

Documentation

See the /v0/state endpoints under https://docs.dfuse.io/reference/zswhq/rest/

Contributing

Issues and PR related to FluxDB belong to this repository

See the dfuse-wide contribution guide if you wish to contribute to this code base.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContractABIPackedOnly = ContractABIOption(true)

Functions

func AppBlockNumHigherThanHeadBlockError

func AppBlockNumHigherThanHeadBlockError(ctx context.Context, chosenBlockNum, headBlockNum, lastWrittenBlockNum uint64) *derr.ErrorResponse

func AppBlockNumHigherThanLIBError

func AppBlockNumHigherThanLIBError(ctx context.Context, chosenBlockNum, lastWrittenBlockNum uint64) *derr.ErrorResponse

func AppNotReadyError

func AppNotReadyError(ctx context.Context) *derr.ErrorResponse

func DataABINotFoundError

func DataABINotFoundError(ctx context.Context, account string, blockNum uint64) *derr.ErrorResponse

func DataDecodingRowError

func DataDecodingRowError(ctx context.Context, hexData string) *derr.ErrorResponse

func DataPublicKeyNotFoundError

func DataPublicKeyNotFoundError(ctx context.Context, publicKey string) *derr.ErrorResponse

func DataRowNotFoundError

func DataRowNotFoundError(ctx context.Context, account zsw.AccountName, table zsw.TableName, scope zsw.AccountName, primaryKey string) *derr.ErrorResponse

func DataTableNotFoundError

func DataTableNotFoundError(ctx context.Context, account zsw.AccountName, table zsw.TableName) *derr.ErrorResponse

Types

type AuthLinkRow

type AuthLinkRow struct {
	fluxdb.BaseTabletRow
}

func NewDeleteAuthLinkRow

func NewDeleteAuthLinkRow(blockNum uint64, actionTrace *pbcodec.ActionTrace) (*AuthLinkRow, error)

func NewInsertAuthLinkRow

func NewInsertAuthLinkRow(blockNum uint64, actionTrace *pbcodec.ActionTrace) (*AuthLinkRow, error)

func (*AuthLinkRow) Explode

func (r *AuthLinkRow) Explode() (contract, action string)

func (*AuthLinkRow) Permission

func (r *AuthLinkRow) Permission() (out zsw.PermissionName, err error)

func (*AuthLinkRow) String

func (r *AuthLinkRow) String() string

type AuthLinkTablet

type AuthLinkTablet []byte

AuthLinkTablet tablet is composed

func NewAuthLinkTablet

func NewAuthLinkTablet(account string) AuthLinkTablet

func (AuthLinkTablet) Collection

func (t AuthLinkTablet) Collection() uint16

func (AuthLinkTablet) Identifier

func (t AuthLinkTablet) Identifier() []byte

func (AuthLinkTablet) Row

func (t AuthLinkTablet) Row(height uint64, primaryKey []byte, data []byte) (fluxdb.TabletRow, error)

func (AuthLinkTablet) String

func (t AuthLinkTablet) String() string

type BlockMapper

type BlockMapper struct {
}

func (*BlockMapper) Map

func (m *BlockMapper) Map(rawBlk *bstream.Block) (*fluxdb.WriteRequest, error)

type ContractABIEntry

type ContractABIEntry struct {
	fluxdb.BaseSingletEntry
}

func NewContractABIEntry

func NewContractABIEntry(blockNum uint64, actionTrace *pbcodec.ActionTrace) (entry *ContractABIEntry, err error)

func (*ContractABIEntry) ABI

func (r *ContractABIEntry) ABI(options ...ContractABIOption) (abi *zsw.ABI, rawBytes []byte, err error)

func (*ContractABIEntry) Contract

func (r *ContractABIEntry) Contract() string

func (*ContractABIEntry) ToProto

func (r *ContractABIEntry) ToProto() (proto.Message, error)

type ContractABIOption

type ContractABIOption bool

type ContractABISinglet

type ContractABISinglet []byte

func NewContractABISinglet

func NewContractABISinglet(contract string) ContractABISinglet

func (ContractABISinglet) Collection

func (s ContractABISinglet) Collection() uint16

func (ContractABISinglet) Contract

func (s ContractABISinglet) Contract() string

func (ContractABISinglet) Entry

func (s ContractABISinglet) Entry(height uint64, data []byte) (fluxdb.SingletEntry, error)

func (ContractABISinglet) Identifier

func (s ContractABISinglet) Identifier() []byte

func (ContractABISinglet) String

func (s ContractABISinglet) String() string

type ContractStatePrimaryKey

type ContractStatePrimaryKey []byte

func (ContractStatePrimaryKey) Bytes

func (k ContractStatePrimaryKey) Bytes() []byte

func (ContractStatePrimaryKey) String

func (k ContractStatePrimaryKey) String() string

type ContractStateRow

type ContractStateRow struct {
	fluxdb.BaseTabletRow
}

func NewContractStateRow

func NewContractStateRow(blockNum uint64, op *pbcodec.DBOp) (row *ContractStateRow, err error)

func (*ContractStateRow) Info

func (r *ContractStateRow) Info() (payer string, rowData []byte, err error)

func (*ContractStateRow) String

func (r *ContractStateRow) String() string

func (*ContractStateRow) ToProto

func (r *ContractStateRow) ToProto() (proto.Message, error)

type ContractStateTablet

type ContractStateTablet []byte

func NewContractStateTablet

func NewContractStateTablet(contract, table string, scope string) ContractStateTablet

func (ContractStateTablet) Collection

func (t ContractStateTablet) Collection() uint16

func (ContractStateTablet) Explode

func (t ContractStateTablet) Explode() (contract, table, scope string)

func (ContractStateTablet) Identifier

func (t ContractStateTablet) Identifier() []byte

func (ContractStateTablet) Row

func (t ContractStateTablet) Row(height uint64, primaryKey []byte, data []byte) (fluxdb.TabletRow, error)

func (ContractStateTablet) String

func (t ContractStateTablet) String() string

type ContractTableScopeRow

type ContractTableScopeRow struct {
	fluxdb.BaseTabletRow
}

func NewContractTableScopeRow

func NewContractTableScopeRow(blockNum uint64, op *pbcodec.TableOp) (row *ContractTableScopeRow, err error)

func (*ContractTableScopeRow) Payer

func (r *ContractTableScopeRow) Payer() (string, error)

func (*ContractTableScopeRow) Scope

func (r *ContractTableScopeRow) Scope() string

func (*ContractTableScopeRow) String

func (r *ContractTableScopeRow) String() string

type ContractTableScopeTablet

type ContractTableScopeTablet []byte

func NewContractTableScopeTablet

func NewContractTableScopeTablet(contract, table string) ContractTableScopeTablet

func (ContractTableScopeTablet) Collection

func (t ContractTableScopeTablet) Collection() uint16

func (ContractTableScopeTablet) Identifier

func (t ContractTableScopeTablet) Identifier() []byte

func (ContractTableScopeTablet) Row

func (t ContractTableScopeTablet) Row(height uint64, primaryKey []byte, data []byte) (fluxdb.TabletRow, error)

func (ContractTableScopeTablet) String

func (t ContractTableScopeTablet) String() string

type KeyAccountRow

type KeyAccountRow struct {
	fluxdb.BaseTabletRow
}

func NewKeyAccountRow

func NewKeyAccountRow(blockNum uint64, publicKey, account, permission string, isDeletion bool) (row *KeyAccountRow, err error)

func (*KeyAccountRow) Explode

func (r *KeyAccountRow) Explode() (account, permission string)

func (*KeyAccountRow) Payer

func (r *KeyAccountRow) Payer() (string, error)

func (*KeyAccountRow) Scope

func (r *KeyAccountRow) Scope() string

func (*KeyAccountRow) String

func (r *KeyAccountRow) String() string

type KeyAccountTablet

type KeyAccountTablet []byte

func NewKeyAccountTablet

func NewKeyAccountTablet(publicKey string) KeyAccountTablet

func (KeyAccountTablet) Collection

func (t KeyAccountTablet) Collection() uint16

func (KeyAccountTablet) Identifier

func (t KeyAccountTablet) Identifier() []byte

func (KeyAccountTablet) Row

func (t KeyAccountTablet) Row(height uint64, primaryKey []byte, data []byte) (fluxdb.TabletRow, error)

func (KeyAccountTablet) String

func (t KeyAccountTablet) String() string

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

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