all: replace data gas to blob gas in comments (#27825)
* eth: excessDataGas -> excessBlobGas * consensus: data gas -> blob gas * core: data gas -> blob gas * params: data gas -> blob gas
This commit is contained in:
@@ -91,7 +91,7 @@ func (v *BlockValidator) ValidateBody(block *types.Block) error {
|
||||
}
|
||||
if header.BlobGasUsed != nil {
|
||||
if want := *header.BlobGasUsed / params.BlobTxBlobGasPerBlob; uint64(blobs) != want { // div because the header is surely good vs the body might be bloated
|
||||
return fmt.Errorf("data gas used mismatch (header %v, calculated %v)", *header.BlobGasUsed, blobs*params.BlobTxBlobGasPerBlob)
|
||||
return fmt.Errorf("blob gas used mismatch (header %v, calculated %v)", *header.BlobGasUsed, blobs*params.BlobTxBlobGasPerBlob)
|
||||
}
|
||||
} else {
|
||||
if blobs > 0 {
|
||||
|
||||
+2
-2
@@ -102,6 +102,6 @@ var (
|
||||
ErrSenderNoEOA = errors.New("sender not an eoa")
|
||||
|
||||
// ErrBlobFeeCapTooLow is returned if the transaction fee cap is less than the
|
||||
// data gas fee of the block.
|
||||
ErrBlobFeeCapTooLow = errors.New("max fee per data gas less than block data gas fee")
|
||||
// blob gas fee of the block.
|
||||
ErrBlobFeeCapTooLow = errors.New("max fee per blob gas less than block blob gas fee")
|
||||
)
|
||||
|
||||
@@ -645,7 +645,7 @@ func ReadReceipts(db ethdb.Reader, hash common.Hash, number uint64, time uint64,
|
||||
} else {
|
||||
baseFee = header.BaseFee
|
||||
}
|
||||
// Compute effective data gas price.
|
||||
// Compute effective blob gas price.
|
||||
var blobGasPrice *big.Int
|
||||
if header != nil && header.ExcessBlobGas != nil {
|
||||
blobGasPrice = eip4844.CalcBlobFee(*header.ExcessBlobGas)
|
||||
|
||||
@@ -467,7 +467,7 @@ func (st *StateTransition) gasUsed() uint64 {
|
||||
return st.initialGas - st.gasRemaining
|
||||
}
|
||||
|
||||
// blobGasUsed returns the amount of data gas used by the message.
|
||||
// blobGasUsed returns the amount of blob gas used by the message.
|
||||
func (st *StateTransition) blobGasUsed() uint64 {
|
||||
return uint64(len(st.msg.BlobHashes) * params.BlobTxBlobGasPerBlob)
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ func newBlobTxMeta(id uint64, size uint32, tx *types.Transaction) *blobTxMeta {
|
||||
// - Local txs are meaningless. Mining pools historically used local transactions
|
||||
// for payouts or for backdoor deals. With 1559 in place, the basefee usually
|
||||
// dominates the final price, so 0 or non-0 tip doesn't change much. Blob txs
|
||||
// retain the 1559 2D gas pricing (and introduce on top a dynamic data gas fee),
|
||||
// retain the 1559 2D gas pricing (and introduce on top a dynamic blob gas fee),
|
||||
// so locality is moot. With a disk backed blob pool avoiding the resend issue,
|
||||
// there's also no need to save own transactions for later.
|
||||
//
|
||||
|
||||
@@ -122,7 +122,7 @@ func (bc *testBlockChain) CurrentBlock() *types.Header {
|
||||
}
|
||||
baseFee := lo
|
||||
|
||||
// The excess data gas at 2^27 translates into a blob fee higher than mainnet
|
||||
// The excess blob gas at 2^27 translates into a blob fee higher than mainnet
|
||||
// ether existence, use that as a cap for the tests.
|
||||
lo = new(big.Int)
|
||||
hi = new(big.Int).Exp(big.NewInt(2), big.NewInt(27), nil)
|
||||
|
||||
@@ -288,10 +288,10 @@ func (tx *Transaction) GasTipCap() *big.Int { return new(big.Int).Set(tx.inner.g
|
||||
// GasFeeCap returns the fee cap per gas of the transaction.
|
||||
func (tx *Transaction) GasFeeCap() *big.Int { return new(big.Int).Set(tx.inner.gasFeeCap()) }
|
||||
|
||||
// BlobGas returns the data gas limit of the transaction for blob transactions, 0 otherwise.
|
||||
// BlobGas returns the blob gas limit of the transaction for blob transactions, 0 otherwise.
|
||||
func (tx *Transaction) BlobGas() uint64 { return tx.inner.blobGas() }
|
||||
|
||||
// BlobGasFeeCap returns the data gas fee cap per data gas of the transaction for blob transactions, nil otherwise.
|
||||
// BlobGasFeeCap returns the blob gas fee cap per blob gas of the transaction for blob transactions, nil otherwise.
|
||||
func (tx *Transaction) BlobGasFeeCap() *big.Int { return tx.inner.blobGasFeeCap() }
|
||||
|
||||
// BlobHashes returns the hases of the blob commitments for blob transactions, nil otherwise.
|
||||
|
||||
Reference in New Issue
Block a user