forked from cerc-io/plugeth
miner: add to build block with EIP-4844 blobs (#27875)
--------- Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
co-authored by
Marius van der Wijden
Felix Lange
parent
d1f6735171
commit
feb8f416ac
@@ -53,7 +53,7 @@ const (
|
||||
// maxBlobsPerTransaction is the maximum number of blobs a single transaction
|
||||
// is allowed to contain. Whilst the spec states it's unlimited, the block
|
||||
// data slots are protocol bound, which implicitly also limit this.
|
||||
maxBlobsPerTransaction = params.BlobTxMaxBlobGasPerBlock / params.BlobTxBlobGasPerBlob
|
||||
maxBlobsPerTransaction = params.MaxBlobGasPerBlock / params.BlobTxBlobGasPerBlob
|
||||
|
||||
// txAvgSize is an approximate byte size of a transaction metadata to avoid
|
||||
// tiny overflows causing all txs to move a shelf higher, wasting disk space.
|
||||
|
||||
@@ -120,8 +120,8 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
|
||||
if len(hashes) == 0 {
|
||||
return fmt.Errorf("blobless blob transaction")
|
||||
}
|
||||
if len(hashes) > params.BlobTxMaxBlobGasPerBlock/params.BlobTxBlobGasPerBlob {
|
||||
return fmt.Errorf("too many blobs in transaction: have %d, permitted %d", len(hashes), params.BlobTxMaxBlobGasPerBlock/params.BlobTxBlobGasPerBlob)
|
||||
if len(hashes) > params.MaxBlobGasPerBlock/params.BlobTxBlobGasPerBlob {
|
||||
return fmt.Errorf("too many blobs in transaction: have %d, permitted %d", len(hashes), params.MaxBlobGasPerBlock/params.BlobTxBlobGasPerBlob)
|
||||
}
|
||||
if err := validateBlobSidecar(hashes, sidecar); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user