Skip to content

Commit 25733a4

Browse files
lightclientfjl
andauthored
params: update 4844 parameters (#28026)
On ACD 163, it was agreed to bump the target and max blob values from `2/4` to `3/6` for future devnets until we could decide on final mainnet number. This change contains said update, making master pass all the hive tests. The final decision for mainnet cancun is still to be made. --------- Co-authored-by: Felix Lange <[email protected]>
1 parent eff7c3b commit 25733a4

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

consensus/misc/eip4844/eip4844_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ func TestCalcExcessBlobGas(t *testing.T) {
4545
// The excess blob gas should decrease by however much the target was
4646
// under-shot, capped at zero.
4747
{params.BlobTxTargetBlobGasPerBlock, params.BlobTxTargetBlobGasPerBlock / params.BlobTxBlobGasPerBlob, params.BlobTxTargetBlobGasPerBlock},
48-
{params.BlobTxTargetBlobGasPerBlock, (params.BlobTxTargetBlobGasPerBlock / params.BlobTxBlobGasPerBlob) - 1, params.BlobTxBlobGasPerBlob},
49-
{params.BlobTxTargetBlobGasPerBlock, (params.BlobTxTargetBlobGasPerBlock / params.BlobTxBlobGasPerBlob) - 2, 0},
48+
{params.BlobTxTargetBlobGasPerBlock, (params.BlobTxTargetBlobGasPerBlock / params.BlobTxBlobGasPerBlob) - 1, params.BlobTxTargetBlobGasPerBlock - params.BlobTxBlobGasPerBlob},
49+
{params.BlobTxTargetBlobGasPerBlock, (params.BlobTxTargetBlobGasPerBlock / params.BlobTxBlobGasPerBlob) - 2, params.BlobTxTargetBlobGasPerBlock - (2 * params.BlobTxBlobGasPerBlob)},
5050
{params.BlobTxBlobGasPerBlob - 1, (params.BlobTxTargetBlobGasPerBlock / params.BlobTxBlobGasPerBlob) - 1, 0},
5151
}
52-
for _, tt := range tests {
52+
for i, tt := range tests {
5353
result := CalcExcessBlobGas(tt.excess, tt.blobs*params.BlobTxBlobGasPerBlob)
5454
if result != tt.want {
55-
t.Errorf("excess blob gas mismatch: have %v, want %v", result, tt.want)
55+
t.Errorf("test %d: excess blob gas mismatch: have %v, want %v", i, result, tt.want)
5656
}
5757
}
5858
}
@@ -63,9 +63,9 @@ func TestCalcBlobFee(t *testing.T) {
6363
blobfee int64
6464
}{
6565
{0, 1},
66-
{1542706, 1},
67-
{1542707, 2},
68-
{10 * 1024 * 1024, 111},
66+
{2314057, 1},
67+
{2314058, 2},
68+
{10 * 1024 * 1024, 23},
6969
}
7070
for i, tt := range tests {
7171
have := CalcBlobFee(tt.excessBlobGas)

core/txpool/blobpool/slotter_test.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ func TestNewSlotter(t *testing.T) {
3838
2*blobSize + txAvgSize, // 2 blob + some expected tx infos (could be fewer blobs and more tx data)
3939
3*blobSize + txAvgSize, // 3 blob + some expected tx infos (could be fewer blobs and more tx data)
4040
4*blobSize + txAvgSize, // 4 blob + some expected tx infos (could be fewer blobs and more tx data)
41-
5*blobSize + txAvgSize, // 1-4 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
42-
6*blobSize + txAvgSize, // 1-4 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
43-
7*blobSize + txAvgSize, // 1-4 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
44-
8*blobSize + txAvgSize, // 1-4 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
45-
9*blobSize + txAvgSize, // 1-4 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
46-
10*blobSize + txAvgSize, // 1-4 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
47-
11*blobSize + txAvgSize, // 1-4 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
48-
12*blobSize + txAvgSize, // 1-4 blobs + unexpectedly large tx infos >= 4 blobs + max tx metadata size
41+
5*blobSize + txAvgSize, // 1-6 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
42+
6*blobSize + txAvgSize, // 1-6 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
43+
7*blobSize + txAvgSize, // 1-6 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
44+
8*blobSize + txAvgSize, // 1-6 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
45+
9*blobSize + txAvgSize, // 1-6 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
46+
10*blobSize + txAvgSize, // 1-6 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
47+
11*blobSize + txAvgSize, // 1-6 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
48+
12*blobSize + txAvgSize, // 1-6 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
49+
13*blobSize + txAvgSize, // 1-6 blobs + unexpectedly large tx infos < 4 blobs + max tx metadata size
50+
14*blobSize + txAvgSize, // 1-6 blobs + unexpectedly large tx infos >= 4 blobs + max tx metadata size
4951
}
5052
if len(shelves) != len(want) {
5153
t.Errorf("shelves count mismatch: have %d, want %d", len(shelves), len(want))

params/protocol_params.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,13 @@ const (
167167
BlobTxBytesPerFieldElement = 32 // Size in bytes of a field element
168168
BlobTxFieldElementsPerBlob = 4096 // Number of field elements stored in a single data blob
169169
BlobTxHashVersion = 0x01 // Version byte of the commitment hash
170-
MaxBlobGasPerBlock = 1 << 19 // Maximum consumable blob gas for data blobs per block
171-
BlobTxTargetBlobGasPerBlock = 1 << 18 // Target consumable blob gas for data blobs per block (for 1559-like pricing)
172170
BlobTxBlobGasPerBlob = 1 << 17 // Gas consumption of a single data blob (== blob byte size)
173171
BlobTxMinBlobGasprice = 1 // Minimum gas price for data blobs
174-
BlobTxBlobGaspriceUpdateFraction = 2225652 // Controls the maximum rate of change for blob gas price
172+
BlobTxBlobGaspriceUpdateFraction = 3338477 // Controls the maximum rate of change for blob gas price
175173
BlobTxPointEvaluationPrecompileGas = 50000 // Gas price for the point evaluation precompile.
174+
175+
BlobTxTargetBlobGasPerBlock = 3 * BlobTxBlobGasPerBlob // Target consumable blob gas for data blobs per block (for 1559-like pricing)
176+
MaxBlobGasPerBlock = 6 * BlobTxBlobGasPerBlob // Maximum consumable blob gas for data blobs per block
176177
)
177178

178179
// Gas discount table for BLS12-381 G1 and G2 multi exponentiation operations

0 commit comments

Comments
 (0)