Skip to content

Commit 74a2123

Browse files
committed
remove 7742 and add 7691 independently
1 parent caa9e1c commit 74a2123

File tree

7 files changed

+31
-6
lines changed

7 files changed

+31
-6
lines changed

packages/block/src/params.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,13 @@ 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+
// gasConfig
93+
targetBlobGasPerBlock: 786432, // The target blob gas consumed per block
94+
maxblobGasPerBlock: 1179648, // The max blob gas allowable per block
95+
blobGasPriceUpdateFraction: 5007716, // The denominator used in the exponential when calculating a blob gas price
96+
},
8897
}

packages/common/src/eips.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,15 @@ 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.Paris,
425+
requiredEIPs: [4844],
426+
},
418427
/**
419428
* Description : EVM Object Format (EOFv1) Meta
420429
* 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], // This is current prague without EOF
163+
eips: [2537, 2935, 6110, 7002, 7251, 7685, 7691, 7702], // This is current prague without EOF
164164
},
165165
/**
166166
* Description: Next feature hardfork after prague, internally used for verkle testing/implementation (incomplete/experimental)

packages/evm/src/evm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export class EVM implements EVMInterface {
182182
const supportedEIPs = [
183183
663, 1153, 1559, 2537, 2565, 2718, 2929, 2930, 2935, 3198, 3529, 3540, 3541, 3607, 3651, 3670,
184184
3855, 3860, 4200, 4399, 4750, 4788, 4844, 4895, 5133, 5450, 5656, 6110, 6206, 6780, 6800,
185-
7002, 7069, 7251, 7480, 7516, 7620, 7685, 7692, 7698, 7702, 7709,
185+
7002, 7069, 7251, 7480, 7516, 7620, 7685, 7691, 7692, 7698, 7702, 7709,
186186
]
187187

188188
for (const eip of this.common.eips()) {

packages/tx/src/4844/tx.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import * as EIP1559 from '../capabilities/eip1559.js'
1515
import * as EIP2718 from '../capabilities/eip2718.js'
1616
import * as EIP2930 from '../capabilities/eip2930.js'
1717
import * as Legacy from '../capabilities/legacy.js'
18-
import { LIMIT_BLOBS_PER_TX } from '../constants.js'
1918
import { getBaseJSON, sharedConstructor, valueBoundaryCheck } from '../features/util.js'
2019
import { TransactionType } from '../types.js'
2120
import { AccessLists, validateNotArray } from '../util.js'
@@ -172,13 +171,16 @@ export class Blob4844Tx implements TransactionInterface<TransactionType.BlobEIP4
172171
throw new Error(msg)
173172
}
174173
}
175-
if (this.blobVersionedHashes.length > LIMIT_BLOBS_PER_TX) {
176-
const msg = Legacy.errorMsg(this, `tx can contain at most ${LIMIT_BLOBS_PER_TX} blobs`)
174+
175+
const limitBlobsPerTx = this.common.param('maxblobGasPerBlock') / this.common.param('blobGasPerBlob')
176+
if (this.blobVersionedHashes.length > limitBlobsPerTx) {
177+
const msg = Legacy.errorMsg(this, `tx can contain at most ${limitBlobsPerTx} blobs`)
177178
throw new Error(msg)
178179
} else if (this.blobVersionedHashes.length === 0) {
179180
const msg = Legacy.errorMsg(this, `tx should contain at least one blob`)
180181
throw new Error(msg)
181182
}
183+
182184
if (this.to === undefined) {
183185
const msg = Legacy.errorMsg(
184186
this,

packages/tx/src/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
export const MAX_CALLDATA_SIZE = 16777216 // 2 ** 24
44
export const MAX_ACCESS_LIST_SIZE = 16777216 // 2 ** 24
55
export const MAX_VERSIONED_HASHES_LIST_SIZE = 16777216 // 2 ** 24
6-
export const LIMIT_BLOBS_PER_TX = 6 // 786432 / 2^17 (`MAX_BLOB_GAS_PER_BLOCK` / `GAS_PER_BLOB`)
76
export const MAX_TX_WRAP_KZG_COMMITMENTS = 16777216 // 2 ** 24
87
export const FIELD_ELEMENTS_PER_BLOB = 4096 // This is also in the Common 4844 parameters but needed here since types can't access Common params
98
export const BYTES_PER_FIELD_ELEMENT = 32

packages/vm/src/params.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,10 @@ export const paramsVM: ParamsDict = {
9191
// See: https://github.com/ethereum/EIPs/pull/8934/files
9292
consolidationRequestPredeployAddress: '0x01aBEa29659e5e97C95107F20bb753cD3e09bBBb', // Address of the consolidations contract
9393
},
94+
/**
95+
. * Shard Blob Transactions
96+
. */
97+
7691: {
98+
maxblobGasPerBlock: 1179648, // The max blob gas allowable per block
99+
},
94100
}

0 commit comments

Comments
 (0)