forensics

package
v0.0.0-...-2935fa7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareCaptures

func CompareCaptures(exp, act []*ReplayCapture) (uint64, error)

CompareCaptures of two independent replays

func CompareStateAtHeight

func CompareStateAtHeight(exp, act *state.State, height uint64) error

CompareStateAtHeight of two replays

Types

type Replay

type Replay struct {
	Src *Source
	Dst *Source
}

Replay is a kernel for state replaying

func NewReplay

func NewReplay(src, dst *Source) *Replay

func (*Replay) Block

func (re *Replay) Block(height uint64) (*ReplayCapture, error)

Block loads and commits a block

func (*Replay) Blocks

func (re *Replay) Blocks(startHeight, endHeight uint64) ([]*ReplayCapture, error)

Blocks iterates through the given range

func (*Replay) Commit

func (re *Replay) Commit(height uint64) (*ReplayCapture, error)

Commit block at height to state cache, saving a capture

type ReplayCapture

type ReplayCapture struct {
	Height        uint64
	AppHashBefore binary.HexBytes
	AppHashAfter  binary.HexBytes
	TxExecutions  []*exec.TxExecution
}

func (*ReplayCapture) Compare

func (exp *ReplayCapture) Compare(act *ReplayCapture) error

Compare the app hashes of two block replays

func (*ReplayCapture) String

func (rc *ReplayCapture) String() string

type Source

type Source struct {
	Explorer *bcm.BlockStore
	State    *state.State
	// contains filtered or unexported fields
}

Source is a kernel for tracking state

func NewSource

func NewSource(hscDB, tmDB dbm.DB, genesisDoc *genesis.GenesisDoc) *Source

func NewSourceFromDir

func NewSourceFromDir(genesisDoc *genesis.GenesisDoc, dbDir string) *Source

func NewSourceFromGenesis

func NewSourceFromGenesis(genesisDoc *genesis.GenesisDoc) *Source

func (*Source) LatestBlockchain

func (src *Source) LatestBlockchain() (*bcm.Blockchain, error)

func (*Source) LatestHeight

func (src *Source) LatestHeight() (uint64, error)

func (*Source) LoadAt

func (src *Source) LoadAt(height uint64) (err error)

LoadAt height

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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