Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBatchPosterConfig = BatchPosterConfig{ Enable: false, DisableDasFallbackStoreDataOnChain: false, MaxBatchSize: 100000, BatchPollDelay: time.Second * 10, PostingErrorDelay: time.Second * 10, MaxBatchPostInterval: time.Hour, CompressionLevel: brotli.DefaultCompression, DASRetentionPeriod: time.Hour * 24 * 15, GasRefunderAddress: "", ExtraBatchGas: 50_000, DataPoster: dataposter.DefaultDataPosterConfig, }
View Source
var TestBatchPosterConfig = BatchPosterConfig{ Enable: true, MaxBatchSize: 100000, BatchPollDelay: time.Millisecond * 10, PostingErrorDelay: time.Millisecond * 10, MaxBatchPostInterval: 0, CompressionLevel: 2, DASRetentionPeriod: time.Hour * 24 * 15, GasRefunderAddress: "", ExtraBatchGas: 10_000, DataPoster: dataposter.TestDataPosterConfig, }
Functions ¶
Types ¶
type BatchPoster ¶
type BatchPoster struct { stopwaiter.StopWaiter // contains filtered or unexported fields }
func NewBatchPoster ¶
func NewBatchPoster(l1Reader *headerreader.HeaderReader, inbox *InboxTracker, streamer *TransactionStreamer, syncMonitor *SyncMonitor, config BatchPosterConfigFetcher, contractAddress common.Address, transactOpts *bind.TransactOpts, daWriter das.DataAvailabilityServiceWriter) (*BatchPoster, error)
func (*BatchPoster) Start ¶
func (b *BatchPoster) Start(ctxIn context.Context)
func (*BatchPoster) StopAndWait ¶
func (b *BatchPoster) StopAndWait()
type BatchPosterConfig ¶
type BatchPosterConfig struct { Enable bool `koanf:"enable"` DisableDasFallbackStoreDataOnChain bool `koanf:"disable-das-fallback-store-data-on-chain" reload:"hot"` MaxBatchSize int `koanf:"max-size" reload:"hot"` MaxBatchPostInterval time.Duration `koanf:"max-interval" reload:"hot"` BatchPollDelay time.Duration `koanf:"poll-delay" reload:"hot"` PostingErrorDelay time.Duration `koanf:"error-delay" reload:"hot"` CompressionLevel int `koanf:"compression-level" reload:"hot"` DASRetentionPeriod time.Duration `koanf:"das-retention-period" reload:"hot"` GasRefunderAddress string `koanf:"gas-refunder-address" reload:"hot"` DataPoster dataposter.DataPosterConfig `koanf:"data-poster" reload:"hot"` RedisUrl string `koanf:"redis-url"` RedisLock SimpleRedisLockConfig `koanf:"redis-lock" reload:"hot"` ExtraBatchGas uint64 `koanf:"extra-batch-gas" reload:"hot"` }
func (*BatchPosterConfig) Validate ¶
func (c *BatchPosterConfig) Validate() error
type BatchPosterConfigFetcher ¶
type BatchPosterConfigFetcher func() *BatchPosterConfig
Click to show internal directories.
Click to hide internal directories.