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 ¶
This section is empty.
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(fork *common.ChainFork) error // OnL1Block - performed after the block was processed OnL1Block(block types.Block, result *components.BlockIngestionType) 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() 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, sequencerID gethcommon.Address, storage storage.Storage, sigValidator *components.SignatureValidator, mempool *txpool.TxPool, logger gethlog.Logger) ObsValidator
type Sequencer ¶
type Sequencer interface { // CreateBatch - creates a new head batch for the latest known L1 head block. CreateBatch(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(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, hostID gethcommon.Address, 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.