Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LegacyBlock ¶
type LegacyBlock struct {
Header *LegacyHeader
Transactions types.Transactions
Uncles []*LegacyHeader
}
LegacyBlock represents old format blocks
type LegacyHeader ¶
type LegacyHeader struct {
ParentHash common.Hash
UncleHash common.Hash
Coinbase common.Address
Root common.Hash
TxHash common.Hash
ReceiptHash common.Hash
Bloom types.Bloom
Difficulty *big.Int
Number *big.Int
GasLimit uint64
GasUsed uint64
Time uint64
Extra []byte
MixDigest common.Hash
Nonce types.BlockNonce
// SubnetEVM specific
BlockGasCost *big.Int `rlp:"optional"`
}
LegacyHeader represents old format header
type ReplayConfig ¶
type ReplayConfig struct {
// BadgerDB path for migrated blocks
BadgerDBPath string
// Target database for replayed blocks
TargetDB ethdb.Database
// Chain configuration
ChainConfig *params.ChainConfig
// Network parameters
NetworkID uint64
Layer uint8 // 0=C-Chain, 1=L1, 2=L2, 3=L3
ConsensusType uint8 // 0=POA, 1=POS, 2=POW
// Replay parameters
StartBlock uint64
EndBlock uint64
BatchSize int
UpgradeToQuantum bool
// Progress callback
OnProgress func(current, total uint64)
}
ReplayConfig configures the unified replay system
type ReplayResult ¶
type ReplayResult struct {
TotalBlocks uint64
ProcessedBlocks uint64
FailedBlocks uint64
UpgradedBlocks uint64
Duration time.Duration
Errors []error
}
ReplayResult contains replay statistics
func FullReplay ¶
func FullReplay(ctx context.Context, config *ReplayConfig) (*ReplayResult, error)
FullReplay performs complete replay with statistics
type UnifiedReplayer ¶
type UnifiedReplayer struct {
// contains filtered or unexported fields
}
UnifiedReplayer handles block replay with format conversion
func NewUnifiedReplayer ¶
func NewUnifiedReplayer(config *ReplayConfig) (*UnifiedReplayer, error)
NewUnifiedReplayer creates a new replay instance
func (*UnifiedReplayer) GetErrors ¶
func (r *UnifiedReplayer) GetErrors() []error
GetErrors returns all recorded errors
func (*UnifiedReplayer) ReplayBlocks ¶
func (r *UnifiedReplayer) ReplayBlocks(ctx context.Context) error
ReplayBlocks replays blocks from BadgerDB to the unified format
Click to show internal directories.
Click to hide internal directories.