Skip to content

Commit

Permalink
add eip 7691 and set the modify the update fraction
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Dec 8, 2024
1 parent 7e2d406 commit 362e99d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/block/src/header/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ export class BlockHeader {
return fakeExponential(
this.common.param('minBlobGas'),
excessBlobGas,
// the correct blobGasPriceUpdateFraction should be loaded if 7691 is activated
this.common.param('blobGasPriceUpdateFraction'),
)
}
Expand Down
7 changes: 7 additions & 0 deletions packages/block/src/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,11 @@ export const paramsBlock: ParamsDict = {
// pow
difficultyBombDelay: 11400000, // the amount of blocks to delay the difficulty bomb with
},
/**
. * Blob throughput increase
. */
7691: {
// max blobs and target blobs are relied from the CL after 7742
blobGasPriceUpdateFraction: 5007716, // The denominator used in the exponential when calculating a blob gas price
},
}
4 changes: 3 additions & 1 deletion packages/client/src/miner/pendingBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ export class PendingBlock {
if(vm.common.isActivatedEIP(7742)){
this.maxBlobsPerBlock = toType(maxBlobsPerBlock!, TypeOutput.Number)
}else{
if (vm.common.isActivatedEIP(4844)) {
if(vm.common.isActivatedEIP(7691)){
this.maxBlobsPerBlock = vm.common.param('maxBlobsPerBlock')
}else if (vm.common.isActivatedEIP(4844)) {
const blobGasLimit = vm.common.param('maxblobGasPerBlock')
const blobGasPerBlob = vm.common.param('blobGasPerBlob')
this.maxBlobsPerBlock = Number(blobGasLimit / blobGasPerBlob)
Expand Down
10 changes: 10 additions & 0 deletions packages/common/src/eips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,16 @@ export const eipsDict: EIPsDict = {
minimumHardfork: Hardfork.Cancun,
requiredEIPs: [3675],
},
/**
* Description : Blob throughput increase
* URL : https://eips.ethereum.org/EIPS/eip-7691
* Status : Review
*/
7691: {
minimumHardfork: Hardfork.Prague,
// basing this on 7742 because the max blobs and target blobs are relied from CL
requiredEIPs: [7742],
},
/**
* Description : EVM Object Format (EOFv1) Meta
* URL : https://github.com/ethereum/EIPs/blob/4153e95befd0264082de3c4c2fe3a85cc74d3152/EIPS/eip-7692.md
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/hardforks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const hardforksDict: HardforksDict = {
prague: {
// TODO update this accordingly to the right devnet setup
//eips: [663, 3540, 3670, 4200, 4750, 5450, 6206, 7069, 7480, 7620, 7692, 7698], // This is EOF-only
eips: [2537, 2935, 6110, 7002, 7251, 7685, 7702, 7742], // This is current prague without EOF
eips: [2537, 2935, 6110, 7002, 7251, 7685, 7691, 7702, 7742], // This is current prague without EOF
},
/**
* Description: Next feature hardfork after prague, internally used for verkle testing/implementation (incomplete/experimental)
Expand Down

0 comments on commit 362e99d

Please sign in to comment.