lib

package
v0.0.0-...-2fe5e27 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Nonce    uint64
	Balance  *big.Int
	Root     common.Hash // merkle root of the storage trie
	CodeHash []byte
}

type SliceData

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

SliceData has all the juicy bits you need about computing an ethereum slice.

type SliceMetadataToFile

type SliceMetadataToFile struct {
	NodePathId          string
	TotalStateNodes     string
	TotalStorageNodes   string
	TotalLeaves         string
	TotalSmartContracts string
	BytesStem           string
	BytesState          string
	BytesStorage        string
	Final               string
	MaxDepth            string
}

type SliceProcessor

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

SliceProcessor wraps the goque stack, enabling the adding of specific methods for dealing with the state trie.

func NewSliceProcessor

func NewSliceProcessor(dbPath string, blockNumber uint64, filedir string) *SliceProcessor

NewSliceProcessor initializes the traversal stack, and finds the canonical block header, returning the TrieStack wrapper for further instructions

func (*SliceProcessor) GetHeatMap

func (sp *SliceProcessor) GetHeatMap(mode string)

GetHeatMap just takes the stored data and agregates it into a json file, for visualization purposes

func (*SliceProcessor) SliceTheTrie

func (sp *SliceProcessor) SliceTheTrie()

SliceTheTrie is the main loop of this program. One of its optimizations is that the program will try to see whether the slice has been computer before and stored in the DB so we spend O(1) on get it again.

type SliceProcessorConfig

type SliceProcessorConfig struct {
	DatabaseCache   int
	TrieCache       int
	MaxTrieCacheGen uint16
}

SliceProcessorConfig contains tweakable properties

Jump to

Keyboard shortcuts

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