Compare commits
No commits in common. "07a1bc7bbd5b8b0ea93a9037a83e7c4290475184" and "8fbff7fe46aff65de1131d5ac7b361fec5475ffd" have entirely different histories.
07a1bc7bbd
...
8fbff7fe46
@ -29,39 +29,27 @@ import (
|
|||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StateDiffIndexer describes the interface for indexing state data.
|
// StateDiffIndexer interface required to index statediff data
|
||||||
type StateDiffIndexer interface {
|
type StateDiffIndexer interface {
|
||||||
// PushBlock indexes block data except for state & storage nodes: header, uncles, transactions &
|
DetectGaps(beginBlock uint64, endBlock uint64) ([]*BlockGap, error)
|
||||||
// receipts. Returns an initiated DB transaction which must be committed or rolled back.
|
CurrentBlock() (*models.HeaderModel, error)
|
||||||
|
HasBlock(hash common.Hash, number uint64) (bool, error)
|
||||||
PushBlock(block *types.Block, receipts types.Receipts, totalDifficulty *big.Int) (Batch, error)
|
PushBlock(block *types.Block, receipts types.Receipts, totalDifficulty *big.Int) (Batch, error)
|
||||||
// PushHeader indexes a block header.
|
|
||||||
PushHeader(batch Batch, header *types.Header, reward, td *big.Int) (string, error)
|
PushHeader(batch Batch, header *types.Header, reward, td *big.Int) (string, error)
|
||||||
// PushStateNode indexes a state node and its storage trie.
|
|
||||||
PushStateNode(tx Batch, stateNode sdtypes.StateLeafNode, headerID string) error
|
PushStateNode(tx Batch, stateNode sdtypes.StateLeafNode, headerID string) error
|
||||||
// PushIPLD indexes an IPLD node.
|
|
||||||
PushIPLD(tx Batch, ipld sdtypes.IPLD) error
|
PushIPLD(tx Batch, ipld sdtypes.IPLD) error
|
||||||
// BeginTx starts a new DB transaction.
|
ReportDBMetrics(delay time.Duration, quit <-chan bool)
|
||||||
|
|
||||||
BeginTx(number *big.Int, ctx context.Context) Batch
|
BeginTx(number *big.Int, ctx context.Context) Batch
|
||||||
|
|
||||||
// DetectGaps returns a list of gaps in the block range, if any.
|
|
||||||
DetectGaps(beginBlock uint64, endBlock uint64) ([]*BlockGap, error)
|
|
||||||
// CurrentBlock returns the latest indexed block.
|
|
||||||
CurrentBlock() (*models.HeaderModel, error)
|
|
||||||
// HasBlock returns true if the block is indexed.
|
|
||||||
HasBlock(hash common.Hash, number uint64) (bool, error)
|
|
||||||
|
|
||||||
// Close closes the associated output DB connection or files.
|
|
||||||
Close() error
|
|
||||||
|
|
||||||
// Methods used by WatchAddress API/functionality
|
// Methods used by WatchAddress API/functionality
|
||||||
|
|
||||||
LoadWatchedAddresses() ([]common.Address, error)
|
LoadWatchedAddresses() ([]common.Address, error)
|
||||||
InsertWatchedAddresses(addresses []sdtypes.WatchAddressArg, currentBlock *big.Int) error
|
InsertWatchedAddresses(addresses []sdtypes.WatchAddressArg, currentBlock *big.Int) error
|
||||||
RemoveWatchedAddresses(addresses []sdtypes.WatchAddressArg) error
|
RemoveWatchedAddresses(addresses []sdtypes.WatchAddressArg) error
|
||||||
SetWatchedAddresses(args []sdtypes.WatchAddressArg, currentBlockNumber *big.Int) error
|
SetWatchedAddresses(args []sdtypes.WatchAddressArg, currentBlockNumber *big.Int) error
|
||||||
ClearWatchedAddresses() error
|
ClearWatchedAddresses() error
|
||||||
|
|
||||||
ReportDBMetrics(delay time.Duration, quit <-chan bool)
|
Close() error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Batch required for indexing data atomically
|
// Batch required for indexing data atomically
|
||||||
|
20
test/stack.yml
Normal file
20
test/stack.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
version: "1.2"
|
||||||
|
name: fixturenet-plugeth-tx
|
||||||
|
description: "Plugeth Ethereum Fixturenet for testing plugeth-statediff"
|
||||||
|
repos:
|
||||||
|
- git.vdb.to/cerc-io/plugeth@v1.13.14-cerc-2
|
||||||
|
- git.vdb.to/cerc-io/plugeth-statediff
|
||||||
|
- git.vdb.to/cerc-io/lighthouse
|
||||||
|
- git.vdb.to/cerc-io/ipld-eth-db@v5.3.0-alpha
|
||||||
|
containers:
|
||||||
|
- cerc/plugeth-statediff
|
||||||
|
- cerc/plugeth
|
||||||
|
- cerc/fixturenet-eth-genesis
|
||||||
|
- cerc/fixturenet-plugeth-plugeth
|
||||||
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
|
- cerc/fixturenet-eth-lighthouse
|
||||||
|
- cerc/ipld-eth-db
|
||||||
|
pods:
|
||||||
|
- fixturenet-plugeth
|
||||||
|
- ipld-eth-db
|
Loading…
Reference in New Issue
Block a user