reassemble

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT, MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Channels

func Channels(config Config, rollupCfg *rollup.Config)

Channels loads all transactions from the given input directory that are submitted to the specified batch inbox and then re-assembles all channels & writes the re-assembled channels to the out directory.

Types

type ChannelWithMetadata

type ChannelWithMetadata struct {
	ID             derive.ChannelID         `json:"id"`
	IsReady        bool                     `json:"is_ready"`
	InvalidFrames  bool                     `json:"invalid_frames"`
	InvalidBatches bool                     `json:"invalid_batches"`
	Frames         []FrameWithMetadata      `json:"frames"`
	Batches        []derive.Batch           `json:"batches"`
	BatchTypes     []int                    `json:"batch_types"`
	ComprAlgos     []derive.CompressionAlgo `json:"compr_algos"`
}

func ProcessFrames added in v1.9.3

func ProcessFrames(cfg Config, rollupCfg *rollup.Config, id derive.ChannelID, frames []FrameWithMetadata) ChannelWithMetadata

ProcessFrames processes the frames for a given channel and reads batches and other relevant metadata from the channel. Returns a ChannelWithMetadata struct containing all the relevant data.

type Config

type Config struct {
	BatchInbox    common.Address
	InDirectory   string
	OutDirectory  string
	L2ChainID     *big.Int
	L2GenesisTime uint64
	L2BlockTime   uint64
}

type FrameWithMetadata

type FrameWithMetadata struct {
	TxHash         common.Hash  `json:"transaction_hash"`
	InclusionBlock uint64       `json:"inclusion_block"`
	Timestamp      uint64       `json:"timestamp"`
	BlockHash      common.Hash  `json:"block_hash"`
	Frame          derive.Frame `json:"frame"`
}

func LoadFrames

func LoadFrames(directory string, inbox common.Address) []FrameWithMetadata

Jump to

Keyboard shortcuts

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