Documentation
¶
Overview ¶
Package raftwallogdb implements LogsDB on top of hashicorp/raft-wal.
Each sealed block (block-record + all of its logs) is a single raft-wal entry. Entry index = block.Number + 1 (offset by 1 because raft-wal reserves index 0). StoreLog fsyncs the entry to disk before returning, so SealBlock is durable on return. AddLog buffers in memory and the entry is built on SealBlock — atomicity is therefore guaranteed by the single StoreLog call.
Index ¶
- type DB
- func (d *DB) AddLog(logHash common.Hash, parentBlock eth.BlockID, logIdx uint32, ...) error
- func (d *DB) Clear() error
- func (d *DB) Close() error
- func (d *DB) Contains(query messages.ContainsQuery) (messages.BlockSeal, error)
- func (d *DB) FindSealedBlock(number uint64) (messages.BlockSeal, error)
- func (d *DB) FirstSealedBlock() (messages.BlockSeal, error)
- func (d *DB) LatestSealedBlock() (eth.BlockID, bool)
- func (d *DB) OpenBlock(blockNum uint64) (eth.BlockRef, uint32, map[uint32]*messages.ExecutingMessage, error)
- func (d *DB) Rewind(newHead eth.BlockID) error
- func (d *DB) SealBlock(parentHash common.Hash, block eth.BlockID, timestamp uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.