Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions core/rawdb/accessors_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions eth/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package eth
import (
"context"
"errors"
"github.com/scroll-tech/go-ethereum/log"
"math/big"
"time"

Expand Down Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions rollup/fees/rollup_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"errors"
"fmt"
"github.com/scroll-tech/go-ethereum/log"
"math/big"

"github.com/scroll-tech/go-ethereum/common"
Expand Down Expand Up @@ -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
}

Expand Down