Documentation ¶
Index ¶
Constants ¶
View Source
const RollupDelay = 2 // number of L1 blocks to exclude when creating a rollup. This will minimize compression reorg issues.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NodeType ¶
type NodeType interface { // SubmitTransaction - L2 obscuro transactions need to be passed here. Sequencers // will put them in the mempool while validators might put them in a queue and monitor // for censorship. SubmitTransaction(*common.L2Tx) error // OnL1Fork - logic to be performed when there is an L1 Fork OnL1Fork(ctx context.Context, fork *common.ChainFork) error // OnL1Block - performed after the block was processed OnL1Block(ctx context.Context, block *types.Header, result *components.BlockIngestionType) error ExportCrossChainData(context.Context, uint64, uint64) (*common.ExtCrossChainBundle, error) Close() error }
NodeType - the interface for any service type running in Obscuro nodes. Should only contain the shared functionality that every service type needs to have.
type ObsValidator ¶
type ObsValidator interface { // ExecuteStoredBatches - try to execute all stored by unexecuted batches ExecuteStoredBatches(context.Context) error VerifySequencerSignature(*core.Batch) error NodeType }
func NewValidator ¶
func NewValidator( consumer components.L1BlockProcessor, batchExecutor components.BatchExecutor, registry components.BatchRegistry, rollupConsumer components.RollupConsumer, chainConfig *params.ChainConfig, storage storage.Storage, sigValidator *components.SignatureValidator, mempool *txpool.TxPool, enclaveKey *crypto.EnclaveKey, logger gethlog.Logger, ) ObsValidator
type Sequencer ¶
type Sequencer interface { // CreateBatch - creates a new head batch for the latest known L1 head block. CreateBatch(ctx context.Context, skipBatchIfEmpty bool) error // CreateRollup - creates a new rollup from the latest recorded rollup in the head l1 chain // and adds as many batches to it as possible. CreateRollup(ctx context.Context, lastBatchNo uint64) (*common.ExtRollup, error) NodeType }
func NewSequencer ¶
func NewSequencer( blockProcessor components.L1BlockProcessor, batchExecutor components.BatchExecutor, registry components.BatchRegistry, rollupProducer components.RollupProducer, rollupConsumer components.RollupConsumer, rollupCompression *components.RollupCompression, gethEncodingService gethencoding.EncodingService, logger gethlog.Logger, chainConfig *params.ChainConfig, enclavePrivateKey *crypto.EnclaveKey, mempool *txpool.TxPool, storage storage.Storage, dataEncryptionService crypto.DataEncryptionService, dataCompressionService compression.DataCompressionService, settings SequencerSettings, blockchain *ethchainadapter.EthChainAdapter, ) Sequencer
type SequencerSettings ¶
Click to show internal directories.
Click to hide internal directories.