Skip to content

Commit a453048

Browse files
yerke26MarekM25tanishqjasoria
authored
eip 7840 implementation (#7964)
Co-authored-by: MarekM25 <[email protected]> Co-authored-by: Tanishq Jasoria <[email protected]>
1 parent 4cf0c47 commit a453048

File tree

106 files changed

+747
-553
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+747
-553
lines changed

src/Nethermind/Chains/chiado.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,18 @@
7878
"eip1559ElasticityMultiplier": "0x2",
7979
"feeCollector": "0x1559000000000000000000000000000000000000",
8080
"eip1559FeeCollectorTransition": 0,
81-
"eip4844BlobGasPriceUpdateFraction": "0x10fafa",
82-
"eip4844MaxBlobGasPerBlock": "0x40000",
8381
"eip4844MinBlobGasPrice": "0x3b9aca00",
84-
"eip4844TargetBlobGasPerBlock": "0x20000",
8582
"registrar": "0x6000000000000000000000000000000000000000",
8683
"transactionPermissionContract": "0x4000000000000000000000000000000000000001",
8784
"transactionPermissionContractTransition": "0x0",
88-
"terminalTotalDifficulty": "231707791542740786049188744689299064356246512"
85+
"terminalTotalDifficulty": "231707791542740786049188744689299064356246512",
86+
"blobSchedule": {
87+
"cancun": {
88+
"target": 1,
89+
"max": 2,
90+
"baseFeeUpdateFraction": "0x10fafa"
91+
}
92+
}
8993
},
9094
"genesis": {
9195
"seal": {

src/Nethermind/Chains/foundation.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,19 @@
191191
"eip4844TransitionTimestamp": "0x65F1B057",
192192
"eip5656TransitionTimestamp": "0x65F1B057",
193193
"eip6780TransitionTimestamp": "0x65F1B057",
194-
"terminalTotalDifficulty": "C70D808A128D7380000"
194+
"terminalTotalDifficulty": "C70D808A128D7380000",
195+
"blobSchedule": {
196+
"cancun": {
197+
"target": 3,
198+
"max": 6,
199+
"baseFeeUpdateFraction": "0x32f0ed"
200+
},
201+
"prague": {
202+
"target": 6,
203+
"max": 9,
204+
"baseFeeUpdateFraction": "0x4c6964"
205+
}
206+
}
195207
},
196208
"genesis": {
197209
"seal": {

src/Nethermind/Chains/gnosis.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,18 @@
8585
"eip1559BaseFeeInitialValue": "0x3b9aca00",
8686
"feeCollector": "0x6BBe78ee9e474842Dbd4AB4987b3CeFE88426A92",
8787
"eip1559FeeCollectorTransition": 19040000,
88-
"eip4844BlobGasPriceUpdateFraction": "0x10fafa",
89-
"eip4844MaxBlobGasPerBlock": "0x40000",
9088
"eip4844MinBlobGasPrice": "0x3b9aca00",
91-
"eip4844TargetBlobGasPerBlock": "0x20000",
9289
"registrar": "0x6B53721D4f2Fb9514B85f5C49b197D857e36Cf03",
9390
"transactionPermissionContract": "0x7Dd7032AA75A37ea0b150f57F899119C7379A78b",
9491
"transactionPermissionContractTransition": 9186425,
95-
"terminalTotalDifficulty": "8626000000000000000000058750000000000000000000"
92+
"terminalTotalDifficulty": "8626000000000000000000058750000000000000000000",
93+
"blobSchedule": {
94+
"cancun": {
95+
"target": 1,
96+
"max": 2,
97+
"baseFeeUpdateFraction": "0x10fafa"
98+
}
99+
}
96100
},
97101
"genesis": {
98102
"seal": {

src/Nethermind/Chains/hive.json

Lines changed: 77 additions & 107 deletions
Large diffs are not rendered by default.

src/Nethermind/Chains/holesky.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,19 @@
5252
"maximumExtraDataSize": "0xffff",
5353
"minGasLimit": "0x1388",
5454
"registrar": "0x0000000000000000000000000000000000000000",
55-
"MergeForkIdTransition": "0x0"
55+
"MergeForkIdTransition": "0x0",
56+
"blobSchedule": {
57+
"cancun": {
58+
"target": 3,
59+
"max": 6,
60+
"baseFeeUpdateFraction": "0x32f0ed"
61+
},
62+
"prague": {
63+
"target": 6,
64+
"max": 9,
65+
"baseFeeUpdateFraction": "0x4c6964"
66+
}
67+
}
5668
},
5769
"genesis": {
5870
"seal": {

src/Nethermind/Chains/sepolia.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,19 @@
6666
"eip4788TransitionTimestamp": "0x65B97D60",
6767
"eip4844TransitionTimestamp": "0x65B97D60",
6868
"eip5656TransitionTimestamp": "0x65B97D60",
69-
"eip6780TransitionTimestamp": "0x65B97D60"
69+
"eip6780TransitionTimestamp": "0x65B97D60",
70+
"blobSchedule": {
71+
"cancun": {
72+
"target": 3,
73+
"max": 6,
74+
"baseFeeUpdateFraction": "0x32f0ed"
75+
},
76+
"prague": {
77+
"target": 6,
78+
"max": 9,
79+
"baseFeeUpdateFraction": "0x4c6964"
80+
}
81+
}
7082
},
7183
"genesis": {
7284
"seal": {

src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ protected EthereumTestResult RunTest(GeneralStateTest test, ITxTracer txTracer)
133133
TransactionResult? txResult = null;
134134
if (txIsValid)
135135
{
136-
txResult = transactionProcessor.Execute(test.Transaction, new BlockExecutionContext(header), txTracer);
136+
txResult = transactionProcessor.Execute(test.Transaction, new BlockExecutionContext(header, spec), txTracer);
137137
}
138138
else
139139
{

src/Nethermind/Nethermind.Blockchain.Test/BeaconBlockRootHandlerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,6 @@ public void Test_StoreBeaconRoot_AccessListNotNull()
149149

150150
transaction.Hash = transaction.CalculateHash();
151151
_transactionProcessor.Received().Execute(Arg.Is<Transaction>(t =>
152-
t.Hash == transaction.Hash), header, NullTxTracer.Instance);
152+
t.Hash == transaction.Hash), new BlockExecutionContext(header, Cancun.Instance), NullTxTracer.Instance);
153153
}
154154
}

src/Nethermind/Nethermind.Blockchain.Test/TestEip4844Config.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/Nethermind/Nethermind.Blockchain.Test/TransactionSelectorTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public static IEnumerable EnoughShardBlobTransactionsSelectedTestCases
160160
tx.MaxFeePerBlobGas = 1;
161161
});
162162
maxTransactionsSelected.Transactions[1].BlobVersionedHashes =
163-
new byte[Eip4844Constants.MaxBlobGasPerTransaction / Eip4844Constants.GasPerBlob - 1][];
163+
new byte[maxTransactionsSelected.ReleaseSpec.MaxBlobCount - 1][];
164164
maxTransactionsSelected.ExpectedSelectedTransactions.AddRange(
165165
maxTransactionsSelected.Transactions.OrderBy(static t => t.Nonce).Take(2));
166166
yield return new TestCaseData(maxTransactionsSelected).SetName("Enough transactions selected");
@@ -174,7 +174,7 @@ public static IEnumerable EnoughShardBlobTransactionsSelectedTestCases
174174
enoughTransactionsSelected.Transactions.OrderBy(static t => t.Nonce).ToArray();
175175
expectedSelectedTransactions[0].Type = TxType.Blob;
176176
expectedSelectedTransactions[0].BlobVersionedHashes =
177-
new byte[Eip4844Constants.MaxBlobGasPerTransaction / Eip4844Constants.GasPerBlob][];
177+
new byte[enoughTransactionsSelected.ReleaseSpec.MaxBlobCount][];
178178
expectedSelectedTransactions[0].MaxFeePerBlobGas = 1;
179179
expectedSelectedTransactions[1].Type = TxType.Blob;
180180
expectedSelectedTransactions[1].BlobVersionedHashes = new byte[1][];

0 commit comments

Comments
 (0)