stateless

package
v0.0.0-...-140c642 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: GPL-3.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReportsProgressBucket = "reports_progress"
	MainHashesBucket      = "gl_main_hashes"
)
View Source
const (
	PrintMemStatsEvery = 1_000_000
	PrintProgressEvery = 100_000
	CommitEvery        = 100_000
	MaxIterationsPerTx = 10_000_000
	CursorBatchSize    = uint(10_000)
)
View Source
const MaxUint16 = ^uint16(0)

const MaxUint = ^uint(0) const MaxUint64 = ^uint64(0)

Variables

This section is empty.

Functions

func CheckChangeSets

func CheckChangeSets(genesis *core.Genesis, blockNum uint64, chaindata string, historyfile string, nocheck bool, writeReceipts bool) error

CheckChangeSets re-executes historical transactions in read-only mode and checks that their outputs match the database ChangeSets.

func MakeChart

func MakeChart(filename string, right []int, chartFileName string, start uint64, startColor int) error

func NewOpcodeTracer

func NewOpcodeTracer(blockNum uint64, saveOpcodes bool, saveBblocks bool) *opcodeTracer

func OpcodeTracer

func OpcodeTracer(genesis *core.Genesis, blockNum uint64, chaindata string, numBlocks uint64,
	saveOpcodes bool, saveBblocks bool) error

OpcodeTracer re-executes historical transactions in read-only mode and traces them at the opcode level

func StateGrowthChart1

func StateGrowthChart1(start int, window int)

func StateGrowthChart2

func StateGrowthChart2(start, window int)

func Stateless

func Stateless(
	ctx context.Context,
	blockNum uint64,
	blockSourceURI string,
	statefile string,
	triesize uint32,
	tryPreRoot bool,
	interval uint64,
	ignoreOlderThan uint64,
	witnessThreshold uint64,
	statsfile string,
	verifySnapshot bool,
	binary bool,
	createDb CreateDbFunc,
	starkBlocksFile string,
	starkStatsBase string,
	useStatelessResolver bool,
	witnessDatabasePath string,
	writeHistory bool,
)

func VerifySnapshot

func VerifySnapshot(path string)

Types

type BlockChainBlockProvider

type BlockChainBlockProvider struct {
	// contains filtered or unexported fields
}

func (*BlockChainBlockProvider) Close

func (p *BlockChainBlockProvider) Close() error

func (*BlockChainBlockProvider) Engine

func (*BlockChainBlockProvider) FastFwd

func (p *BlockChainBlockProvider) FastFwd(to uint64) error

func (*BlockChainBlockProvider) GetHeader

func (p *BlockChainBlockProvider) GetHeader(h common.Hash, i uint64) *types.Header

func (*BlockChainBlockProvider) NextBlock

func (p *BlockChainBlockProvider) NextBlock() (*types.Block, error)

type BlockProvider

type BlockProvider interface {
	core.ChainContext
	io.Closer
	FastFwd(uint64) error
	NextBlock() (*types.Block, error)
}

func BlockProviderForURI

func BlockProviderForURI(uri string, createDBFunc CreateDbFunc) (BlockProvider, error)

func NewBlockProviderFromDB

func NewBlockProviderFromDB(path string, createDBFunc CreateDbFunc) (BlockProvider, error)

func NewBlockProviderFromExportFile

func NewBlockProviderFromExportFile(fn string) (BlockProvider, error)

type CreateDbFunc

type CreateDbFunc func(string) (*ethdb.ObjectDatabase, error)

type ExportFileBlockProvider

type ExportFileBlockProvider struct {
	// contains filtered or unexported fields
}

func (*ExportFileBlockProvider) Close

func (p *ExportFileBlockProvider) Close() error

func (*ExportFileBlockProvider) Engine

func (*ExportFileBlockProvider) FastFwd

func (p *ExportFileBlockProvider) FastFwd(to uint64) error

func (*ExportFileBlockProvider) GetHeader

func (p *ExportFileBlockProvider) GetHeader(h common.Hash, i uint64) *types.Header

func (*ExportFileBlockProvider) NextBlock

func (p *ExportFileBlockProvider) NextBlock() (*types.Block, error)

func (*ExportFileBlockProvider) WriteHeader

func (p *ExportFileBlockProvider) WriteHeader(h *types.Header)

type GasLimitReporter

type GasLimitReporter struct {
	StartedWhenBlockNumber uint64
	HeaderPrefixKey1       []byte
	HeaderPrefixKey2       []byte
	// contains filtered or unexported fields
}

func NewGasLimitReporter

func NewGasLimitReporter(ctx context.Context, remoteDB ethdb.KV, localDB ethdb.KV) *GasLimitReporter

func (*GasLimitReporter) GasLimits

func (r *GasLimitReporter) GasLimits(ctx context.Context)

type IntSorterAddr

type IntSorterAddr struct {
	// contains filtered or unexported fields
}

func NewIntSorterAddr

func NewIntSorterAddr(length int) IntSorterAddr

func (IntSorterAddr) Len

func (isa IntSorterAddr) Len() int

func (IntSorterAddr) Less

func (isa IntSorterAddr) Less(i, j int) bool

func (IntSorterAddr) Swap

func (isa IntSorterAddr) Swap(i, j int)

type KeyItem

type KeyItem struct {
	// contains filtered or unexported fields
}

func (*KeyItem) Less

func (a *KeyItem) Less(b llrb.Item) bool

type RetStackTop

type RetStackTop []uint32

type StateGrowth1Reporter

type StateGrowth1Reporter struct {
	StartedWhenBlockNumber uint64
	MaxTimestamp           uint64
	HistoryKey             []byte
	AccountKey             []byte
	// For each timestamp, how many accounts were created in the state
	CreationsByBlock map[uint64]int
	// contains filtered or unexported fields
}

func NewStateGrowth1Reporter

func NewStateGrowth1Reporter(ctx context.Context, remoteDB ethdb.KV, _ ethdb.KV) *StateGrowth1Reporter

func (*StateGrowth1Reporter) StateGrowth1

func (r *StateGrowth1Reporter) StateGrowth1(ctx context.Context)

type StateGrowth2Reporter

type StateGrowth2Reporter struct {
	StartedWhenBlockNumber uint64
	MaxTimestamp           uint64
	HistoryKey             []byte
	StorageKey             []byte

	CreationsByBlock map[uint64]int
	// contains filtered or unexported fields
}

func NewStateGrowth2Reporter

func NewStateGrowth2Reporter(ctx context.Context, remoteDB ethdb.KV, _ ethdb.KV) *StateGrowth2Reporter

func (*StateGrowth2Reporter) StateGrowth2

func (r *StateGrowth2Reporter) StateGrowth2(ctx context.Context)

type StatsFile

type StatsFile struct {
	// contains filtered or unexported fields
}

func NewStatsFile

func NewStatsFile(path string) (*StatsFile, error)

func (*StatsFile) AddRow

func (s *StatsFile) AddRow(blockNumber uint64, row *trie.BlockWitnessStats) error

func (*StatsFile) Close

func (s *StatsFile) Close() error

type TimeSorterInt

type TimeSorterInt struct {
	// contains filtered or unexported fields
}

Implements sort.Interface

func NewTimeSorterInt

func NewTimeSorterInt(length int) TimeSorterInt

func (TimeSorterInt) Len

func (tsi TimeSorterInt) Len() int

func (TimeSorterInt) Less

func (tsi TimeSorterInt) Less(i, j int) bool

func (TimeSorterInt) Swap

func (tsi TimeSorterInt) Swap(i, j int)

type WitnessDBReader

type WitnessDBReader struct {
	// contains filtered or unexported fields
}

func NewWitnessDBReader

func NewWitnessDBReader(getter ethdb.Getter) *WitnessDBReader

func (*WitnessDBReader) GetWitnessesForBlock

func (db *WitnessDBReader) GetWitnessesForBlock(blockNumber uint64, maxTrieSize uint32) ([]byte, error)

type WitnessDBWriter

type WitnessDBWriter struct {
	// contains filtered or unexported fields
}

func NewWitnessDBWriter

func NewWitnessDBWriter(storage ethdb.Database, statsWriter *csv.Writer) (*WitnessDBWriter, error)

func (*WitnessDBWriter) MustUpsert

func (db *WitnessDBWriter) MustUpsert(blockNumber uint64, maxTrieSize uint32, resolveWitnesses []*trie.Witness)

Jump to

Keyboard shortcuts

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