Documentation ¶
Index ¶
- Constants
- Variables
- func InitIPFSBlockService(ipfsPath string) (blockservice.BlockService, error)
- func LoadEnv(c *Config) error
- func LoadViper(c *Config)
- func NewDB() (*sqlx.DB, error)
- func NewKVSDatabaseWithAncient(kvs ethdb.KeyValueStore) ethdb.Database
- type Config
- type KVSWithAncient
- type Params
- type TraversalType
- type Validator
- func (v *Validator) Close() error
- func (v *Validator) GetCacheStats() groupcache.Stats
- func (v *Validator) ValidateStateTrie(stateRoot common.Hash) error
- func (v *Validator) ValidateStorageTrie(stateRoot common.Hash, address common.Address, storageRoot common.Hash) error
- func (v *Validator) ValidateTrie(stateRoot common.Hash) error
Constants ¶
const ( DATABASE_NAME = "DATABASE_NAME" DATABASE_HOSTNAME = "DATABASE_HOSTNAME" DATABASE_PORT = "DATABASE_PORT" DATABASE_USER = "DATABASE_USER" DATABASE_PASSWORD = "DATABASE_PASSWORD" )
Env variables
Variables ¶
var (
DefaultRecoveryFormat = "./recover_validate_%s"
)
Functions ¶
func InitIPFSBlockService ¶
InitIPFSBlockService is used to configure and return a BlockService using an ipfs repo path (e.g. ~/.ipfs)
func NewKVSDatabaseWithAncient ¶
func NewKVSDatabaseWithAncient(kvs ethdb.KeyValueStore) ethdb.Database
Types ¶
type Config ¶
func (*Config) ConnString ¶
type KVSWithAncient ¶
type TraversalType ¶
type TraversalType = string
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator is used for validating Ethereum state and storage tries on PG-IPFS
func NewIPFSValidator ¶
NewIPFSValidator returns a new trie validator ontop of an IPFS blockservice
func NewPGIPFSValidator ¶
NewPGIPFSValidator returns a new trie validator ontop of a connection pool for an IPFS backing Postgres database
func NewValidator ¶
func NewValidator(kvs ethdb.KeyValueStore, database ethdb.Database) *Validator
NewValidator returns a new trie validator Validating the completeness of a modified merkle patricia tries requires traversing the entire trie and verifying that every node is present, this is an expensive operation
func (*Validator) GetCacheStats ¶
func (v *Validator) GetCacheStats() groupcache.Stats
func (*Validator) ValidateStateTrie ¶
ValidateStateTrie returns an error if the state trie for the provided state root cannot be confirmed as complete This does not consider child storage tries