Documentation ¶
Index ¶
- type Store
- func (s *Store) ApplyGenesis(g opera.Genesis, startingRoot hash.Hash) (evmBlock *evmcore.EvmBlock, err error)
- func (s *Store) Cap(max, min int)
- func (s *Store) Commit(root hash.Hash) error
- func (s *Store) EvmDatabase() state.Database
- func (s *Store) EvmKvdbTable() kvdb.Store
- func (s *Store) EvmLogs() *topicsdb.Index
- func (s *Store) EvmTable() ethdb.Database
- func (s *Store) GetCachedEvmBlock(n idx.Block) *evmcore.EvmBlock
- func (s *Store) GetReceipts(n idx.Block) types.Receipts
- func (s *Store) GetTx(txid common.Hash) *types.Transaction
- func (s *Store) GetTxPosition(txid common.Hash) *TxPosition
- func (s *Store) IndexLogs(recs ...*types.Log)
- func (s *Store) InitEvmSnapshot(root hash.Hash) (err error)
- func (s *Store) SetCachedEvmBlock(n idx.Block, b *evmcore.EvmBlock)
- func (s *Store) SetRawReceipts(n idx.Block, receipts []*types.ReceiptForStorage) (size int)
- func (s *Store) SetReceipts(n idx.Block, receipts types.Receipts)
- func (s *Store) SetTx(txid common.Hash, tx *types.Transaction)
- func (s *Store) SetTxPosition(txid common.Hash, position TxPosition)
- func (s *Store) StateDB(from hash.Hash) (*state.StateDB, error)
- type StoreCacheConfig
- type StoreConfig
- type TxPosition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
Store is a node persistent storage working over physical key-value database.
func NewStore ¶
func NewStore(mainDB kvdb.Store, cfg StoreConfig) *Store
NewStore creates store over key-value db.
func (*Store) ApplyGenesis ¶
func (s *Store) ApplyGenesis(g opera.Genesis, startingRoot hash.Hash) (evmBlock *evmcore.EvmBlock, err error)
ApplyGenesis writes initial state.
func (*Store) EvmDatabase ¶
func (*Store) EvmKvdbTable ¶
func (*Store) GetReceipts ¶
GetReceipts returns stored transaction receipts.
func (*Store) GetTx ¶
func (s *Store) GetTx(txid common.Hash) *types.Transaction
GetTx returns stored non-event transaction.
func (*Store) GetTxPosition ¶
func (s *Store) GetTxPosition(txid common.Hash) *TxPosition
GetTxPosition returns stored transaction block and position.
func (*Store) SetCachedEvmBlock ¶
func (*Store) SetRawReceipts ¶
SetRawReceipts stores raw transaction receipts.
func (*Store) SetReceipts ¶
SetReceipts stores transaction receipts.
func (*Store) SetTx ¶
func (s *Store) SetTx(txid common.Hash, tx *types.Transaction)
SetTx stores non-event transaction.
func (*Store) SetTxPosition ¶
func (s *Store) SetTxPosition(txid common.Hash, position TxPosition)
SetTxPosition stores transaction block and position.
type StoreCacheConfig ¶
type StoreCacheConfig struct { // Cache size for Receipts (size in bytes). ReceiptsSize uint // Cache size for Receipts (number of blocks). ReceiptsBlocks int // Cache size for TxPositions. TxPositions int // Cache size for EVM database. EvmDatabase int // Cache size for EVM snapshot. EvmSnap int // Cache size for EvmBlock (number of blocks). EvmBlocksNum int // Cache size for EvmBlock (size in bytes). EvmBlocksSize uint }
StoreCacheConfig is a config for the db.
type StoreConfig ¶
type StoreConfig struct { Cache StoreCacheConfig EnableSnapshots bool // Enables tracking of SHA3 preimages in the VM EnablePreimageRecording bool }
StoreConfig is a config for store db.
func DefaultStoreConfig ¶
func DefaultStoreConfig(scale cachescale.Func) StoreConfig
DefaultStoreConfig for product.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.