diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index d126c5027..b6e48aaad 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -26,7 +26,6 @@ import ( "github.com/scroll-tech/go-ethereum/common" "github.com/scroll-tech/go-ethereum/core/types" - "github.com/scroll-tech/go-ethereum/crypto" "github.com/scroll-tech/go-ethereum/ethdb" "github.com/scroll-tech/go-ethereum/log" "github.com/scroll-tech/go-ethereum/params" @@ -287,7 +286,13 @@ func ReadHeaderRLP(db ethdb.Reader, hash common.Hash, number uint64) rlp.RawValu // comparison is necessary since ancient database only maintains // the canonical data. data, _ = reader.Ancient(freezerHeaderTable, number) - if len(data) > 0 && crypto.Keccak256Hash(data) == hash { + + // crypto.Keccak256Hash(data) does not make sense here, as we use different way to make the block hash + // we have instant finality strategy, so we do NOT need hash check here + // if len(data) > 0 && crypto.Keccak256Hash(data) == hash { + // return nil + // } + if len(data) > 0 { return nil } // If not, try reading from leveldb diff --git a/eth/api_backend.go b/eth/api_backend.go index 3780dd4e5..9be299ad3 100644 --- a/eth/api_backend.go +++ b/eth/api_backend.go @@ -19,7 +19,6 @@ package eth import ( "context" "errors" - "github.com/scroll-tech/go-ethereum/log" "math/big" "time" @@ -147,7 +146,6 @@ func (b *EthAPIBackend) StateAndHeaderByNumber(ctx context.Context, number rpc.B // Pending state is only known by the miner if number == rpc.PendingBlockNumber { block, state := b.eth.miner.Pending() - log.Info("[log4Debug]StateAndHeaderByNumber pending data", "blockNumber", block.NumberU64(), "state is null?", state == nil) return state, block.Header(), nil } // Otherwise resolve the block number and return its state diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 15f172ab1..2854f7290 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1150,17 +1150,6 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr return 0, err } if l1DataFee.Cmp(available) >= 0 { - log.Error("[log4Debug] Error happens here", "l1DataFee", l1DataFee.String(), "available", available.String()) - log.Error("[log4Debug] Balance tracking", "blockNrOrHash", blockNrOrHash.String(), "balance", balance.String()) - if state == nil { - log.Error("[log4Debug]state is nil") - } - balance2 := state.GetBalance(*args.From) - log.Error("[log4Debug]query balance again", "from", (*args.From).String(), "balance", balance2.String()) - if balance2.Cmp(big.NewInt(0)) == 0 { - log.Error("[log4Debug]the address is empty?", "empty", state.Empty(*args.From)) - } - return 0, errors.New("insufficient funds for l1 fee") } available.Sub(available, l1DataFee) diff --git a/rollup/fees/rollup_fee.go b/rollup/fees/rollup_fee.go index 8293ba74f..81e427d63 100644 --- a/rollup/fees/rollup_fee.go +++ b/rollup/fees/rollup_fee.go @@ -4,7 +4,6 @@ import ( "bytes" "errors" "fmt" - "github.com/scroll-tech/go-ethereum/log" "math/big" "github.com/scroll-tech/go-ethereum/common" @@ -64,9 +63,7 @@ func EstimateL1DataFeeForMessage(msg Message, baseFee, chainID *big.Int, signer } l1BaseFee, overhead, scalar := readGPOStorageSlots(rcfg.L1GasPriceOracleAddress, state) - log.Info("[log4Debug] readGPOStorageSlots", "l1BaseFee", l1BaseFee.String(), "overhead", overhead.String(), "scalar", scalar.String(), "raw length", len(raw)) l1DataFee := calculateEncodedL1DataFee(raw, overhead, l1BaseFee, scalar) - log.Info("[log4Debug] calculateEncodedL1DataFee", "l1DataFee", l1DataFee.String()) return l1DataFee, nil }