Documentation
¶
Index ¶
Constants ¶
View Source
const L1TxGas = 300_000
L1TxGas - a crude estimation of the cost of publishing an L1 tx
View Source
const MaxHistoricMA = 50
MaxHistoricMA - the maximum number of historic blocks
View Source
const MovingAverageWindow = 300 // `3600 / 12` - last 1 hour
MovingAverageWindow - the more traffic on the network, the lower this number can get. Should be roughly the number of blocks between rollups. - note that increasing this value will have to increase the number of cached blocks in the cache_service
View Source
const TxsPerRollup = 250
TxsPerRollup - the number of transactions in a rollup. A conservative estimation.
Variables ¶
This section is empty.
Functions ¶
func CalculateL1Size ¶ added in v1.1.0
CalculateL1Size - calculates the size of the published transaction.
Types ¶
type Oracle ¶
type Oracle interface {
SubmitL1Block(ctx context.Context, headBlock *types.Header) error
EstimateL1StorageGasCost(ctx context.Context, tx *types.Transaction, block *types.Header, header *common.BatchHeader) (*big.Int, error)
EstimateL1CostForMsg(ctx context.Context, args *gethapi.TransactionArgs, header *common.BatchHeader) (*big.Int, error)
}
Oracle - the interface for the future precompiled gas oracle contract which will expose necessary l1 information.
func NewGasOracle ¶
func NewGasOracle(l1ChainCfg *params.ChainConfig, storage storage.BlockResolver, logger gethlog.Logger) Oracle
Click to show internal directories.
Click to hide internal directories.