Skip to content

Commit 362e99d

Browse files
committed
add eip 7691 and set the modify the update fraction
1 parent 7e2d406 commit 362e99d

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
lines changed

packages/block/src/header/header.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ export class BlockHeader {
551551
return fakeExponential(
552552
this.common.param('minBlobGas'),
553553
excessBlobGas,
554+
// the correct blobGasPriceUpdateFraction should be loaded if 7691 is activated
554555
this.common.param('blobGasPriceUpdateFraction'),
555556
)
556557
}

packages/block/src/params.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,11 @@ export const paramsBlock: ParamsDict = {
8585
// pow
8686
difficultyBombDelay: 11400000, // the amount of blocks to delay the difficulty bomb with
8787
},
88+
/**
89+
. * Blob throughput increase
90+
. */
91+
7691: {
92+
// max blobs and target blobs are relied from the CL after 7742
93+
blobGasPriceUpdateFraction: 5007716, // The denominator used in the exponential when calculating a blob gas price
94+
},
8895
}

packages/client/src/miner/pendingBlock.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ export class PendingBlock {
124124
if(vm.common.isActivatedEIP(7742)){
125125
this.maxBlobsPerBlock = toType(maxBlobsPerBlock!, TypeOutput.Number)
126126
}else{
127-
if (vm.common.isActivatedEIP(4844)) {
127+
if(vm.common.isActivatedEIP(7691)){
128+
this.maxBlobsPerBlock = vm.common.param('maxBlobsPerBlock')
129+
}else if (vm.common.isActivatedEIP(4844)) {
128130
const blobGasLimit = vm.common.param('maxblobGasPerBlock')
129131
const blobGasPerBlob = vm.common.param('blobGasPerBlob')
130132
this.maxBlobsPerBlock = Number(blobGasLimit / blobGasPerBlob)

packages/common/src/eips.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,16 @@ export const eipsDict: EIPsDict = {
415415
minimumHardfork: Hardfork.Cancun,
416416
requiredEIPs: [3675],
417417
},
418+
/**
419+
* Description : Blob throughput increase
420+
* URL : https://eips.ethereum.org/EIPS/eip-7691
421+
* Status : Review
422+
*/
423+
7691: {
424+
minimumHardfork: Hardfork.Prague,
425+
// basing this on 7742 because the max blobs and target blobs are relied from CL
426+
requiredEIPs: [7742],
427+
},
418428
/**
419429
* Description : EVM Object Format (EOFv1) Meta
420430
* URL : https://github.com/ethereum/EIPs/blob/4153e95befd0264082de3c4c2fe3a85cc74d3152/EIPS/eip-7692.md

packages/common/src/hardforks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const hardforksDict: HardforksDict = {
160160
prague: {
161161
// TODO update this accordingly to the right devnet setup
162162
//eips: [663, 3540, 3670, 4200, 4750, 5450, 6206, 7069, 7480, 7620, 7692, 7698], // This is EOF-only
163-
eips: [2537, 2935, 6110, 7002, 7251, 7685, 7702, 7742], // This is current prague without EOF
163+
eips: [2537, 2935, 6110, 7002, 7251, 7685, 7691, 7702, 7742], // This is current prague without EOF
164164
},
165165
/**
166166
* Description: Next feature hardfork after prague, internally used for verkle testing/implementation (incomplete/experimental)

0 commit comments

Comments
 (0)