Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
pcw109550 committed May 29, 2024
1 parent 8108416 commit 2eeecb2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion erigon-lib/opstack/rollup_cost.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ func NewL1CostFunc(config *chain.Config, statedb StateGetter) L1CostFunc {
forBlock := ^uint64(0)
var cachedFunc l1CostFunc
selectFunc := func(blockTime uint64) l1CostFunc {
log.Info("AAAA", "blockTime", blockTime, "ecotoneTime", config.EcotoneTime.String(), "fjordTime", config.FjordTime.String())
if !config.IsOptimismEcotone(blockTime) {
log.Info("AAAAAAA", "blockTime", blockTime, "newL1CostFuncPreEcotone", "newL1CostFuncPreEcotone")
return newL1CostFuncPreEcotone(config, statedb, blockTime)
}

Expand All @@ -136,14 +138,15 @@ func NewL1CostFunc(config *chain.Config, statedb StateGetter) L1CostFunc {
firstEcotoneBlock := l1BlobBaseFee.BitLen() == 0 &&
bytes.Equal(emptyScalars, l1FeeScalars[scalarSectionStart:scalarSectionStart+8])
if firstEcotoneBlock {
log.Info("AAAAAAA", "blockTime", blockTime, "newL1CostFuncPreEcotone using pre-ecotone l1 cost func for first Ecotone block", "newL1CostFuncPreEcotone")
log.Info("using pre-ecotone l1 cost func for first Ecotone block", "time", blockTime)
return newL1CostFuncPreEcotone(config, statedb, blockTime)
}

l1BaseFeeScalar, l1BlobBaseFeeScalar := extractEcotoneFeeParams(l1FeeScalars[:])

if config.IsOptimismFjord(blockTime) {

log.Info("AAAAAAA", "blockTime", blockTime, "NewL1CostFuncFjord", "NewL1CostFuncFjord")
log.Info("WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW")
log.Info("W", "l1BaseFee", l1BaseFee.String(), "l1BlobBaseFee", l1BlobBaseFee.String(),
"l1BaseFeeScalar", l1BaseFeeScalar.String(), "l1BlobBaseFeeScalar", l1BlobBaseFeeScalar.String())
Expand All @@ -155,6 +158,7 @@ func NewL1CostFunc(config *chain.Config, statedb StateGetter) L1CostFunc {
l1BlobBaseFeeScalar,
)
} else {
log.Info("AAAAAAA", "blockTime", blockTime, "newL1CostFuncEcotone", "newL1CostFuncEcotone")
return newL1CostFuncEcotone(&l1BaseFee, &l1BlobBaseFee, l1BaseFeeScalar, l1BlobBaseFeeScalar)
}
}
Expand Down

0 comments on commit 2eeecb2

Please sign in to comment.