Documentation ¶
Index ¶
- Constants
- func AggregateItemLess(a, than *AggregateItem) bool
- func ByEndBlockItemLess(i, than *byEndBlockItem) bool
- type AggregateItem
- type AggregationTask
- type Aggregator
- type ChangeFile
- type Changes
- type ChangesItem
- type CommitmentItem
- type CommitmentValTransform
- type CursorHeap
- type CursorItem
- type CursorType
- type FileType
- type FilesStats
- type History
- type HistoryReader
- func (hr *HistoryReader) ReadAccountCode(addr []byte, trace bool) ([]byte, error)
- func (hr *HistoryReader) ReadAccountCodeSize(addr []byte, trace bool) (int, error)
- func (hr *HistoryReader) ReadAccountData(addr []byte, trace bool) ([]byte, error)
- func (hr *HistoryReader) ReadAccountStorage(addr []byte, loc []byte, trace bool) (*uint256.Int, error)
- func (hr *HistoryReader) SetNums(blockNum, txNum uint64, lastTx bool)
- type Reader
- func (r *Reader) ReadAccountCode(addr []byte, trace bool) ([]byte, error)
- func (r *Reader) ReadAccountCodeSize(addr []byte, trace bool) (int, error)
- func (r *Reader) ReadAccountData(addr []byte, trace bool) ([]byte, error)
- func (r *Reader) ReadAccountStorage(addr []byte, loc []byte, trace bool) ([]byte, error)
- type Writer
- func (w *Writer) Aggregate(trace bool) error
- func (w *Writer) Close()
- func (w *Writer) ComputeCommitment(trace bool) ([]byte, error)
- func (w *Writer) DeleteAccount(addr []byte, trace bool) error
- func (w *Writer) FinishTx(txNum uint64, trace bool) error
- func (w *Writer) Reset(blockNum uint64, tx kv.RwTx) error
- func (w *Writer) UpdateAccountCode(addr []byte, code []byte, trace bool) error
- func (w *Writer) UpdateAccountData(addr []byte, account []byte, trace bool) error
- func (w *Writer) WriteAccountStorage(addr, loc []byte, value []byte, trace bool) error
Constants ¶
View Source
const ( FirstType = Account NumberOfAccountStorageTypes = Code NumberOfStateTypes = AccountHistory )
View Source
const AggregatorPrefix = "aggregator"
Variables ¶
This section is empty.
Functions ¶
func AggregateItemLess ¶
func AggregateItemLess(a, than *AggregateItem) bool
func ByEndBlockItemLess ¶
func ByEndBlockItemLess(i, than *byEndBlockItem) bool
Types ¶
type AggregateItem ¶
type AggregateItem struct {
// contains filtered or unexported fields
}
type AggregationTask ¶
type AggregationTask struct {
// contains filtered or unexported fields
}
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
func NewAggregator ¶
func (*Aggregator) Close ¶
func (a *Aggregator) Close()
func (*Aggregator) MakeStateReader ¶
func (a *Aggregator) MakeStateReader(blockNum uint64, tx kv.Tx) *Reader
func (*Aggregator) MakeStateWriter ¶
func (a *Aggregator) MakeStateWriter(beforeOn bool) *Writer
func (*Aggregator) Stats ¶
func (a *Aggregator) Stats() FilesStats
type ChangeFile ¶
type ChangeFile struct {
// contains filtered or unexported fields
}
type ChangesItem ¶
type ChangesItem struct {
// contains filtered or unexported fields
}
type CommitmentItem ¶
type CommitmentItem struct {
// contains filtered or unexported fields
}
type CommitmentValTransform ¶
type CommitmentValTransform struct {
// contains filtered or unexported fields
}
type CursorHeap ¶
type CursorHeap []*CursorItem
func (CursorHeap) Len ¶
func (ch CursorHeap) Len() int
func (CursorHeap) Less ¶
func (ch CursorHeap) Less(i, j int) bool
func (*CursorHeap) Pop ¶
func (ch *CursorHeap) Pop() interface{}
func (*CursorHeap) Push ¶
func (ch *CursorHeap) Push(x interface{})
func (*CursorHeap) Swap ¶
func (ch *CursorHeap) Swap(i, j int)
type CursorItem ¶
type CursorItem struct {
// contains filtered or unexported fields
}
CursorItem is the item in the priority queue used to do merge interation over storage of a given account
type CursorType ¶
type CursorType uint8
const ( FILE_CURSOR CursorType = iota DB_CURSOR TREE_CURSOR )
type FilesStats ¶
type History ¶
type History struct {
// contains filtered or unexported fields
}
History is a utility class that allows reading history of state from state files, history files, and bitmap files produced by an Aggregator
func NewHistory ¶
func (*History) MakeHistoryReader ¶
func (h *History) MakeHistoryReader() *HistoryReader
type HistoryReader ¶
type HistoryReader struct {
// contains filtered or unexported fields
}
func (*HistoryReader) ReadAccountCode ¶
func (hr *HistoryReader) ReadAccountCode(addr []byte, trace bool) ([]byte, error)
func (*HistoryReader) ReadAccountCodeSize ¶
func (hr *HistoryReader) ReadAccountCodeSize(addr []byte, trace bool) (int, error)
func (*HistoryReader) ReadAccountData ¶
func (hr *HistoryReader) ReadAccountData(addr []byte, trace bool) ([]byte, error)
func (*HistoryReader) ReadAccountStorage ¶
func (*HistoryReader) SetNums ¶
func (hr *HistoryReader) SetNums(blockNum, txNum uint64, lastTx bool)
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) ReadAccountCode ¶
func (*Reader) ReadAccountCodeSize ¶
func (*Reader) ReadAccountData ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) Aggregate ¶
Aggegate should be called to check if the aggregation is required, and if it is required, perform it
func (*Writer) UpdateAccountCode ¶
func (*Writer) UpdateAccountData ¶
Click to show internal directories.
Click to hide internal directories.