mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
EIP-4844: Increase Blob Throughput (#7688)
See https://github.com/ethereum/EIPs/pull/7154
This commit is contained in:
parent
1546a79771
commit
06af87dad7
@ -174,7 +174,7 @@ func (s *Merge) FinalizeAndAssemble(config *chain.Config, header *types.Header,
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
if config.IsCancun(header.Time) {
|
||||
dataGasUsed := uint64(misc.CountBlobs(txs) * params.DataGasPerBlob)
|
||||
dataGasUsed := uint64(misc.CountBlobs(txs)) * params.DataGasPerBlob
|
||||
header.DataGasUsed = &dataGasUsed
|
||||
}
|
||||
return types.NewBlock(header, outTxs, uncles, outReceipts, withdrawals), outTxs, outReceipts, nil
|
||||
|
@ -354,7 +354,7 @@ func (txw *BlobTxWrapper) ValidateBlobTransactionWrapper() error {
|
||||
// the following check isn't strictly necessary as it would be caught by data gas processing
|
||||
// (and hence it is not explicitly in the spec for this function), but it doesn't hurt to fail
|
||||
// early in case we are getting spammed with too many blobs or there is a bug somewhere:
|
||||
if l1 > params.MaxBlobsPerBlock {
|
||||
if uint64(l1) > params.MaxBlobsPerBlock {
|
||||
return fmt.Errorf("number of blobs exceeds max: %v", l1)
|
||||
}
|
||||
kzgCtx := libkzg.Ctx()
|
||||
|
@ -164,11 +164,11 @@ const (
|
||||
|
||||
// stuff from EIP-4844
|
||||
FieldElementsPerBlob = 4096 // each field element is 32 bytes
|
||||
MaxDataGasPerBlock = 1 << 19
|
||||
DataGasPerBlob = 1 << 17
|
||||
TargetDataGasPerBlock uint64 = 1 << 18
|
||||
MaxDataGasPerBlock uint64 = 0xC0000
|
||||
TargetDataGasPerBlock uint64 = 0x60000
|
||||
DataGasPerBlob uint64 = 0x20000
|
||||
MinDataGasPrice = 1
|
||||
DataGasPriceUpdateFraction = 2225652
|
||||
DataGasPriceUpdateFraction = 3338477
|
||||
MaxBlobsPerBlock = MaxDataGasPerBlock / DataGasPerBlob
|
||||
|
||||
BlobVerificationGas uint64 = 1800000
|
||||
|
Loading…
Reference in New Issue
Block a user