diff --git a/consensus/misc/eip4844/eip4844.go b/consensus/misc/eip4844/eip4844.go index 2dad9a0cd..d475e437a 100644 --- a/consensus/misc/eip4844/eip4844.go +++ b/consensus/misc/eip4844/eip4844.go @@ -26,8 +26,8 @@ import ( ) var ( - minBlobGasPrice = big.NewInt(params.BlobTxMinBlobGasprice) - blobGaspriceUpdateFraction = big.NewInt(params.BlobTxBlobGaspriceUpdateFraction) +// minBlobGasPrice = big.NewInt(params.BlobTxMinBlobGasprice) +// blobGaspriceUpdateFraction = big.NewInt(params.BlobTxBlobGaspriceUpdateFraction) ) // VerifyEIP4844Header verifies the presence of the excessBlobGas field and that @@ -77,7 +77,8 @@ func CalcExcessBlobGas(parentExcessBlobGas uint64, parentBlobGasUsed uint64) uin // CalcBlobFee calculates the blobfee from the header's excess blob gas field. func CalcBlobFee(excessBlobGas uint64) *big.Int { - return fakeExponential(minBlobGasPrice, new(big.Int).SetUint64(excessBlobGas), blobGaspriceUpdateFraction) + return params.BigBlobBaseFee + //return fakeExponential(minBlobGasPrice, new(big.Int).SetUint64(excessBlobGas), blobGaspriceUpdateFraction) } // fakeExponential approximates factor * e ** (numerator / denominator) using diff --git a/consensus/misc/eip4844/eip4844_test.go b/consensus/misc/eip4844/eip4844_test.go index ec417380f..f9bd0afa7 100644 --- a/consensus/misc/eip4844/eip4844_test.go +++ b/consensus/misc/eip4844/eip4844_test.go @@ -69,8 +69,8 @@ func TestCalcBlobFee(t *testing.T) { } for i, tt := range tests { have := CalcBlobFee(tt.excessBlobGas) - if have.Int64() != tt.blobfee { - t.Errorf("test %d: blobfee mismatch: have %v want %v", i, have, tt.blobfee) + if have.Cmp(params.BigBlobBaseFee) != 0 { + t.Errorf("test %d: blobfee mismatch: have %v want %v", i, have, params.BigBlobBaseFee) } } } diff --git a/core/txpool/validation.go b/core/txpool/validation.go index 592bceba5..54764602a 100644 --- a/core/txpool/validation.go +++ b/core/txpool/validation.go @@ -34,7 +34,8 @@ import ( var ( // blobTxMinBlobGasPrice is the big.Int version of the configured protocol // parameter to avoid constructing a new big integer for every transaction. - blobTxMinBlobGasPrice = big.NewInt(params.BlobTxMinBlobGasprice) + //blobTxMinBlobGasPrice = big.NewInt(params.BlobTxMinBlobGasprice) + blobTxMinBlobGasPrice = params.BigBlobBaseFee ) // ValidationOptions define certain differences between transaction validation diff --git a/params/protocol_params.go b/params/protocol_params.go index f8a435629..85fb5b376 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -190,6 +190,10 @@ var ( DurationLimit = big.NewInt(13) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. ) +var ( + BigBlobBaseFee, _ = new(big.Int).SetString("1000000000000000000000000000", 10) // Disable blob tx by setting blob fee 1,000,000,000 over +) + // System contracts. var ( // SystemAddress is where the system-transaction is sent from as per EIP-4788