Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add System Transactions to mainnet #6206

Closed
wants to merge 116 commits into from
Closed
Show file tree
Hide file tree
Changes from 111 commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
7dafa25
resolved conflicts
Demuirgos Aug 15, 2023
06cb959
fix ethereum tests
MarekM25 Aug 22, 2023
4205ff5
whitespace fix
MarekM25 Aug 22, 2023
18e0a6e
Benchmarks.sln
MarekM25 Aug 22, 2023
3965ea5
test working fine
MarekM25 Aug 22, 2023
a1cebce
a few fixes
MarekM25 Aug 22, 2023
899547f
a few more cleanups
MarekM25 Aug 22, 2023
6814bf7
cosmetic
MarekM25 Aug 22, 2023
ae3a469
fix tests
MarekM25 Aug 22, 2023
bc8df77
cosmetic
MarekM25 Aug 22, 2023
9a2dfc6
Revert volta.cfg
MarekM25 Aug 22, 2023
5f709f0
fix build
MarekM25 Aug 23, 2023
e1aa156
Merge branch 'master' into 4788_systemTx
MarekM25 Aug 23, 2023
0e0ae94
WIP
MarekM25 Aug 24, 2023
1527828
Special handling for System account
MarekM25 Aug 25, 2023
3e595d3
better solution?
MarekM25 Aug 25, 2023
ef38eab
fix
MarekM25 Aug 25, 2023
008abef
even better solution?
MarekM25 Aug 25, 2023
3b03a83
alternative solution
MarekM25 Aug 25, 2023
a2bae6e
final solution?
MarekM25 Aug 25, 2023
67df5df
one more try
MarekM25 Aug 28, 2023
bb5b89c
revert volta.cfg
MarekM25 Aug 28, 2023
1df46d0
cleanup
MarekM25 Aug 29, 2023
95a9b4a
cosmetic
MarekM25 Aug 29, 2023
a8366dd
Merge master
Demuirgos Sep 6, 2023
4a7d599
apply suggestions
Demuirgos Sep 6, 2023
ded036e
further experiments
MarekM25 Sep 7, 2023
84892e7
Resolved conflict
MarekM25 Sep 7, 2023
c037823
IgnoredAccount
MarekM25 Sep 8, 2023
a62aee4
MainnetSystemCalls in chainspec
MarekM25 Sep 8, 2023
7258c88
cosmetic fixes
MarekM25 Sep 8, 2023
664e095
cosmetic
MarekM25 Sep 8, 2023
129fbfb
fix
MarekM25 Sep 8, 2023
9f48de9
Merge branch 'master' into 4788_systemTx
MarekM25 Sep 9, 2023
0ff3605
fix rest of the tests
MarekM25 Sep 11, 2023
d5bdb07
test system tx
MarekM25 Sep 18, 2023
b13fefe
adjust address to tests
MarekM25 Sep 18, 2023
54073e8
change address for experiments
MarekM25 Sep 19, 2023
7d96dec
resolve conflicts, updated address
MarekM25 Sep 21, 2023
65bb610
Resolved conflicts
MarekM25 Sep 22, 2023
3e4aad7
one more experiment
MarekM25 Sep 25, 2023
6348277
experiments
MarekM25 Sep 25, 2023
dce9c1c
more cosmetic
MarekM25 Sep 25, 2023
33de708
refactoring
MarekM25 Sep 26, 2023
30bacdd
fix
MarekM25 Sep 26, 2023
12bfa82
Update address
MarekM25 Sep 27, 2023
f80ed7b
cosmetic changes
MarekM25 Oct 6, 2023
f6cd317
cosmetic
MarekM25 Oct 6, 2023
43e307e
cosmetic
MarekM25 Oct 6, 2023
32722b9
conflicts
MarekM25 Oct 11, 2023
88e0214
adjust ProofRpcModuleTests expected values
Demuirgos Oct 19, 2023
65c0384
Revert "adjust ProofRpcModuleTests expected values"
Demuirgos Oct 19, 2023
bd955d8
adjust ProofRPC tests
Demuirgos Oct 23, 2023
ff0d882
Merge remote-tracking branch 'origin/master' into systemTx_experiment
Demuirgos Oct 23, 2023
a1fdcd3
update spec tests
Demuirgos Oct 25, 2023
6660f9e
Merge remote-tracking branch 'origin/master' into systemTx_experiment
Demuirgos Oct 25, 2023
95fc31f
Merge master and resolve conflicts
Demuirgos Nov 2, 2023
facf07c
minor refactor + fix
Demuirgos Nov 2, 2023
883c9ef
extract systemTxProcessor selection into method
Demuirgos Nov 4, 2023
f9b8725
Merge remote-tracking branch 'origin/master' into systemTx_experiment
Demuirgos Nov 4, 2023
f67633a
attempt to fix failing tests
Demuirgos Nov 8, 2023
c061d9c
Merge remote-tracking branch 'origin/master' into systemTx_experiment
Demuirgos Nov 19, 2023
c139e06
geth like tx processor experiment
Demuirgos Nov 23, 2023
73090d1
Merged master
Demuirgos Nov 27, 2023
55c4a13
simplified attempt at separating txProcessor and systxProcessor
Demuirgos Nov 28, 2023
2aad40c
Merge remote-tracking branch 'origin/master' into systemTx_experiment
Demuirgos Dec 5, 2023
4414ade
fix build
Demuirgos Dec 5, 2023
570b064
fix most faling tests
Demuirgos Dec 5, 2023
9a20cd3
fix 1 extra test
Demuirgos Dec 5, 2023
7d56a52
attempt #1
Demuirgos Dec 6, 2023
7695942
merged master
Demuirgos Dec 6, 2023
62776c1
Merge master
Demuirgos Dec 12, 2023
4ab7379
fix merge issue
Demuirgos Dec 12, 2023
5575a6e
expose IsSystemEnv deep in EVM stackcalls
Demuirgos Dec 21, 2023
a8ef491
disallow createTx from targeting systemAddress
Demuirgos Dec 22, 2023
eba84d8
fix build issue
Demuirgos Dec 26, 2023
eaf42f2
merge master
Demuirgos Dec 26, 2023
99d7456
test fix attempt, ws fix
Demuirgos Dec 26, 2023
1895940
merge master
Demuirgos Dec 28, 2023
e9d21b9
* merge master
Demuirgos Jan 8, 2024
80ce2ed
Merge branch 'master' into systemTx_experiment
Demuirgos Jan 11, 2024
c966cf0
fix comment duplicate
Demuirgos Jan 11, 2024
4a16e48
Merge branch 'master' into systemTx_experiment
kamilchodola Jan 12, 2024
0102295
merged master, resolved conflicts
Demuirgos Feb 23, 2024
eaf7041
merge master and resolve conflicts
Demuirgos Feb 27, 2024
676c2dd
Merge branch 'master' into systemTx_experiment
kamilchodola Feb 27, 2024
deea212
Merge branch 'systemTx_experiment' of https:/NethermindEt…
kamilchodola Feb 27, 2024
9fa73bf
Perf/somepath hashdb (#6798)
kamilchodola Feb 29, 2024
48be801
Merge branch 'release/1.26.0-exp.3-halfPath' into systemTx_experiment
kamilchodola Feb 29, 2024
d8570ba
initial master merge
Demuirgos Apr 9, 2024
68aba28
fix build issues
Demuirgos Apr 9, 2024
e1ced0e
Merge branch 'master' into systemTx_experiment
MarekM25 Apr 19, 2024
f08df88
removed problematic methods
Demuirgos Apr 22, 2024
bbf421f
Merge branch 'master' into systemTx_experiment
Demuirgos Apr 22, 2024
bf09e5b
changed IBlockProcessor dependencies in ctor
Demuirgos Apr 22, 2024
8a3a481
Merge branch 'systemTx_experiment' of https:/NethermindEt…
Demuirgos Apr 22, 2024
11dc882
fix build issues
Demuirgos Apr 22, 2024
a644a80
fix failing build test
Demuirgos Apr 22, 2024
6dbd5e9
ws fixes
Demuirgos Apr 22, 2024
27dfaf5
Merge master, resolve conflitct, resolve build issues
Demuirgos May 22, 2024
1e208f0
experiment 1 : if system call altering system account abort state mod…
Demuirgos May 22, 2024
2f01efb
undo last change
Demuirgos May 23, 2024
de470e8
Merge master
Demuirgos Jun 4, 2024
ce75a7d
fix build issue
Demuirgos Jun 4, 2024
b926560
merge master
Demuirgos Jun 11, 2024
df92bce
remove isSystemCall from IWorldState Interface
Demuirgos Jun 11, 2024
c0f6ad3
mistake fix
Demuirgos Jun 11, 2024
0344b57
Merge branch 'master' into systemTx_experiment
Demuirgos Jun 11, 2024
7881cb5
Merge branch 'systemTx_experiment' of https:/NethermindEt…
Demuirgos Jun 11, 2024
53c01ef
fix build issues
Demuirgos Jun 11, 2024
ba196ec
fix failing test, and minor cleanup
Demuirgos Jun 11, 2024
2f1e06a
Merge branch 'master' into systemTx_experiment
rjnrohit Jun 19, 2024
6569494
Merge branch 'master' into systemTx_experiment
rjnrohit Jun 21, 2024
0c357ed
cosmetics
rjnrohit Jun 21, 2024
b625aa4
Merge branch 'master' into systemTx_experiment
rjnrohit Jun 28, 2024
999021a
Merge branch 'master' into systemTx_experiment
rjnrohit Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/Nethermind/Ethereum.Test.Base/BlockchainTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
using Nethermind.Trie.Pruning;
using Nethermind.TxPool;
using NUnit.Framework;
using Nethermind.Blockchain.BeaconBlockRoot;

namespace Ethereum.Test.Base
{
Expand Down Expand Up @@ -155,6 +156,13 @@ protected async Task<EthereumTestResult> RunTest(BlockchainTest test, Stopwatch?
codeInfoRepository,
_logManager);

TransactionProcessor? txProcessor = new(
specProvider,
stateProvider,
virtualMachine,
codeInfoRepository,
_logManager);

IBlockProcessor blockProcessor = new BlockProcessor(
specProvider,
blockValidator,
Expand All @@ -170,7 +178,8 @@ protected async Task<EthereumTestResult> RunTest(BlockchainTest test, Stopwatch?
stateProvider,
receiptStorage,
new BlockhashStore(blockTree, specProvider, stateProvider),
_logManager);
_logManager,
new BeaconBlockRootHandler(txProcessor, _logManager));

IBlockchainProcessor blockchainProcessor = new BlockchainProcessor(
blockTree,
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private static void InitializeTestState(GeneralStateTest test, WorldState stateP
}

stateProvider.CreateAccount(accountState.Key, accountState.Value.Balance);
stateProvider.InsertCode(accountState.Key, accountState.Value.Code, specProvider.GenesisSpec);
stateProvider.InsertCode(accountState.Key, accountState.Value.Code, specProvider.GenesisSpec, false);
stateProvider.SetNonce(accountState.Key, accountState.Value.Nonce);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
using Nethermind.State;
using NSubstitute;
using Nethermind.Config;
using Nethermind.Blockchain.BeaconBlockRoot;

namespace Nethermind.AccountAbstraction.Test
{
Expand Down Expand Up @@ -190,7 +191,8 @@ protected override BlockProcessor CreateBlockProcessor()
State,
ReceiptStorage,
new BlockhashStore(BlockTree, SpecProvider, State),
LogManager);
LogManager,
new BeaconBlockRootHandler(TxProcessor, LogManager));

AbiParameterConverter.RegisterFactory(new AbiTypeFactory(new AbiTuple<UserOperationAbi>()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using FluentAssertions;
using Nethermind.Blockchain;
using Nethermind.Blockchain.BeaconBlockRoot;
using Nethermind.Blockchain.Receipts;
using Nethermind.Blockchain.Test.Validators;
using Nethermind.Consensus.AuRa;
Expand Down Expand Up @@ -160,6 +161,7 @@ void Process(AuRaBlockProcessor auRaBlockProcessor, int blockNumber, Hash256 sta
LimboLogs.Instance,
Substitute.For<IBlockTree>(),
new WithdrawalProcessor(stateProvider, LimboLogs.Instance),
new BeaconBlockRootHandler(transactionProcessor, LimboLogs.Instance),
null,
txFilter,
contractRewriter: contractRewriter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Threading.Tasks;
using FluentAssertions;
using Nethermind.Abi;
using Nethermind.Blockchain.BeaconBlockRoot;
using Nethermind.Blockchain;
using Nethermind.Consensus;
using Nethermind.Consensus.AuRa;
Expand Down Expand Up @@ -101,6 +102,7 @@ protected override BlockProcessor CreateBlockProcessor()
LimboLogs.Instance,
BlockTree,
NullWithdrawalProcessor.Instance,
new BeaconBlockRootHandler(TxProcessor, LimboLogs.Instance),
null,
null,
GasLimitCalculator as AuRaContractGasLimitOverride);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using FluentAssertions;
using Nethermind.Abi;
using Nethermind.AuRa.Test.Contract;
using Nethermind.Blockchain.BeaconBlockRoot;
using Nethermind.Blockchain;
using Nethermind.Consensus.AuRa;
using Nethermind.Consensus.AuRa.Contracts;
Expand Down Expand Up @@ -157,8 +158,8 @@ protected override BlockProcessor CreateBlockProcessor()
LimboLogs.Instance,
BlockTree,
NullWithdrawalProcessor.Instance,
null
);
new BeaconBlockRootHandler(TxProcessor, LimboLogs.Instance),
null);
}

protected override Task AddBlocksOnStart() => Task.CompletedTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
using Nethermind.TxPool;
using NSubstitute;
using NUnit.Framework;
using Nethermind.Blockchain.BeaconBlockRoot;

namespace Nethermind.AuRa.Test.Transactions;

Expand Down Expand Up @@ -298,6 +299,7 @@ protected override BlockProcessor CreateBlockProcessor()
LimboLogs.Instance,
BlockTree,
NullWithdrawalProcessor.Instance,
new BeaconBlockRootHandler(TxProcessor, LimboLogs.Instance),
null,
PermissionBasedTxFilter);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using Nethermind.Consensus.Rewards;
using Nethermind.Core.Test.Blockchain;
using Nethermind.Evm.TransactionProcessing;
using Nethermind.Blockchain.BeaconBlockRoot;

namespace Nethermind.Blockchain.Test
{
Expand All @@ -50,7 +51,9 @@ public void Prepared_block_contains_author_field()
stateProvider,
NullReceiptStorage.Instance,
Substitute.For<IBlockhashStore>(),
LimboLogs.Instance);
LimboLogs.Instance,
new BeaconBlockRootHandler(transactionProcessor, LimboLogs.Instance));


BlockHeader header = Build.A.BlockHeader.WithAuthor(TestItem.AddressD).TestObject;
Block block = Build.A.Block.WithHeader(header).TestObject;
Expand Down Expand Up @@ -79,7 +82,9 @@ public void Recovers_state_on_cancel()
stateProvider,
NullReceiptStorage.Instance,
Substitute.For<IBlockhashStore>(),
LimboLogs.Instance);
LimboLogs.Instance,
new BeaconBlockRootHandler(transactionProcessor, LimboLogs.Instance));


BlockHeader header = Build.A.BlockHeader.WithNumber(1).WithAuthor(TestItem.AddressD).TestObject;
Block block = Build.A.Block.WithTransactions(1, MuirGlacier.Instance).WithHeader(header).TestObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Threading;
using FluentAssertions;
using Nethermind.Blockchain.BeaconBlockRoot;
using Nethermind.Blockchain.Blocks;
using Nethermind.Blockchain.Receipts;
using Nethermind.Config;
Expand Down Expand Up @@ -78,7 +79,8 @@ public void Test()
stateProvider,
NullReceiptStorage.Instance,
new BlockhashStore(blockTree, specProvider, stateProvider),
LimboLogs.Instance);
LimboLogs.Instance,
new BeaconBlockRootHandler(txProcessor, LimboLogs.Instance));
BlockchainProcessor blockchainProcessor = new(
blockTree,
blockProcessor,
Expand Down
4 changes: 3 additions & 1 deletion src/Nethermind/Nethermind.Blockchain.Test/ReorgTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Collections.Generic;
using FluentAssertions;
using Nethermind.Blockchain.BeaconBlockRoot;
using Nethermind.Blockchain.Blocks;
using Nethermind.Blockchain.Receipts;
using Nethermind.Consensus.Comparers;
Expand Down Expand Up @@ -78,7 +79,8 @@ public void Setup()
stateProvider,
NullReceiptStorage.Instance,
new BlockhashStore(_blockTree, MainnetSpecProvider.Instance, stateProvider),
LimboLogs.Instance);
LimboLogs.Instance,
new BeaconBlockRootHandler(transactionProcessor, LimboLogs.Instance));
_blockchainProcessor = new BlockchainProcessor(
_blockTree,
blockProcessor,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,57 @@
// SPDX-FileCopyrightText: 2023 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Core.Specs;
using System;
using Nethermind.Core;
using Nethermind.Int256;
using Nethermind.State;
using Nethermind.Core.Crypto;
using Nethermind.Core.Extensions;
using Nethermind.Core.Specs;
using Nethermind.Crypto;
using Nethermind.Evm.Tracing;
using Nethermind.Evm.TransactionProcessing;
using Nethermind.Int256;
using Nethermind.Logging;
using Nethermind.State;

namespace Nethermind.Consensus.BeaconBlockRoot;

namespace Nethermind.Blockchain.BeaconBlockRoot;
public class BeaconBlockRootHandler : IBeaconBlockRootHandler
{
public void ApplyContractStateChanges(Block block, IReleaseSpec spec, IWorldState stateProvider)
private readonly ITransactionProcessor _processor;
private static Address Default4788Address = new Address("0x000f3df6d732807ef1319fb7b8bb8522d0beac02");
private readonly ILogger _logger;
private const long GasLimit = 30_000_000L;
public BeaconBlockRootHandler(
ITransactionProcessor processor,
ILogManager logManager)
{
_processor = processor;
_logger = logManager.GetClassLogger();
}
public void ExecuteSystemCall(Block block, IReleaseSpec spec)
{
BlockHeader? header = block.Header;
if (!spec.IsBeaconBlockRootAvailable ||
block.IsGenesis ||
block.Header.ParentBeaconBlockRoot is null)
return;

Address eip4788Account = spec.Eip4788ContractAddress ?? Eip4788Constants.BeaconRootsAddress;

if (!stateProvider.AccountExists(eip4788Account))
return;

UInt256 timestamp = (UInt256)block.Timestamp;
Hash256 parentBeaconBlockRoot = block.ParentBeaconBlockRoot;

UInt256.Mod(timestamp, Eip4788Constants.HistoryBufferLength, out UInt256 timestampReduced);
UInt256 rootIndex = timestampReduced + Eip4788Constants.HistoryBufferLength;

StorageCell tsStorageCell = new(eip4788Account, timestampReduced);
StorageCell brStorageCell = new(eip4788Account, rootIndex);

stateProvider.Set(tsStorageCell, Bytes.WithoutLeadingZeros(timestamp.ToBigEndian()).ToArray());
stateProvider.Set(brStorageCell, Bytes.WithoutLeadingZeros(parentBeaconBlockRoot.Bytes).ToArray());
header.IsGenesis ||
header.ParentBeaconBlockRoot is null) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we produce block at all if we have no ParentBeaconBlockRoot post-Cancun?


Transaction? transaction = new()
{
Value = UInt256.Zero,
Data = header.ParentBeaconBlockRoot.Bytes.ToArray(),
Demuirgos marked this conversation as resolved.
Show resolved Hide resolved
To = spec.Eip4788ContractAddress ?? Default4788Address,
SenderAddress = Address.SystemUser,
GasLimit = GasLimit,
GasPrice = UInt256.Zero,
};
transaction.Hash = transaction.CalculateHash();

try
{
_processor.Execute(transaction, header, NullTxTracer.Instance);
}
catch (Exception e)
{
if (_logger.IsError) _logger.Error("Error during calling BeaconBlockRoot contract", e);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// SPDX-FileCopyrightText: 2023 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Core.Specs;
using Nethermind.Core;
using Nethermind.Core.Specs;
using Nethermind.State;

namespace Nethermind.Consensus.BeaconBlockRoot;
namespace Nethermind.Blockchain.BeaconBlockRoot;
public interface IBeaconBlockRootHandler
{
void ApplyContractStateChanges(Block block, IReleaseSpec spec, IWorldState state);
void ExecuteSystemCall(Block block, IReleaseSpec spec);
}
1 change: 0 additions & 1 deletion src/Nethermind/Nethermind.Blockchain/Contracts/Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ protected byte[] CallCore(ITransactionProcessor transactionProcessor, BlockHeade
return tracer.ReturnValue;
}
}

protected object[] DecodeReturnData(string functionName, byte[] data)
{
AbiEncodingInfo abiEncodingInfo = AbiDefinition.GetFunction(functionName).GetReturnInfo();
Expand Down
Empty file modified src/Nethermind/Nethermind.Blockchain/FullPruning/FullPruner.cs
100755 → 100644
Empty file.
3 changes: 0 additions & 3 deletions src/Nethermind/Nethermind.Blockchain/GenesisLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
using Nethermind.Evm.TransactionProcessing;
using Nethermind.Specs.ChainSpecStyle;
using Nethermind.State;
using Nethermind.Consensus.BeaconBlockRoot;

namespace Nethermind.Blockchain
{
Expand All @@ -24,7 +23,6 @@ public class GenesisLoader
private readonly ISpecProvider _specProvider;
private readonly IWorldState _stateProvider;
private readonly ITransactionProcessor _transactionProcessor;
private readonly BeaconBlockRootHandler _beaconBlockRootHandler;

public GenesisLoader(
ChainSpec chainSpec,
Expand All @@ -36,7 +34,6 @@ public GenesisLoader(
_specProvider = specProvider ?? throw new ArgumentNullException(nameof(specProvider));
_stateProvider = stateProvider ?? throw new ArgumentNullException(nameof(stateProvider));
_transactionProcessor = transactionProcessor ?? throw new ArgumentNullException(nameof(transactionProcessor));
_beaconBlockRootHandler = new BeaconBlockRootHandler();
}

public Block Load()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
using Nethermind.TxPool;
using NUnit.Framework;
using Nethermind.Config;
using Nethermind.Blockchain.BeaconBlockRoot;

namespace Nethermind.Clique.Test
{
Expand Down Expand Up @@ -141,7 +142,8 @@ public On CreateNode(PrivateKey privateKey, bool withGenesisAlreadyProcessed = f
stateProvider,
NullReceiptStorage.Instance,
new BlockhashStore(blockTree, goerliSpecProvider, stateProvider),
nodeLogManager);
nodeLogManager,
new BeaconBlockRootHandler(transactionProcessor, nodeLogManager));

BlockchainProcessor processor = new(blockTree, blockProcessor, new AuthorRecoveryStep(snapshotManager), stateReader, nodeLogManager, BlockchainProcessor.Options.NoReceipts);
processor.Start();
Expand All @@ -159,8 +161,9 @@ public On CreateNode(PrivateKey privateKey, bool withGenesisAlreadyProcessed = f
new BlockProcessor.BlockProductionTransactionsExecutor(minerTransactionProcessor, minerStateProvider, goerliSpecProvider, _logManager),
minerStateProvider,
NullReceiptStorage.Instance,
new BlockhashStore(blockTree, goerliSpecProvider, minerStateProvider),
nodeLogManager);
new BlockhashStore(blockTree, specProvider, stateProvider),
nodeLogManager,
new BeaconBlockRootHandler(minerTransactionProcessor, nodeLogManager));

BlockchainProcessor minerProcessor = new(blockTree, minerBlockProcessor, new AuthorRecoveryStep(snapshotManager), stateReader, nodeLogManager, BlockchainProcessor.Options.NoReceipts);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using Nethermind.Blockchain;
using Nethermind.Blockchain.BeaconBlockRoot;
using Nethermind.Blockchain.Blocks;
using Nethermind.Blockchain.Find;
using Nethermind.Blockchain.Receipts;
Expand All @@ -17,6 +18,7 @@
using Nethermind.Crypto;
using Nethermind.Evm;
using Nethermind.Evm.Tracing;
using Nethermind.Evm.TransactionProcessing;
using Nethermind.Logging;
using Nethermind.State;
using Nethermind.TxPool;
Expand All @@ -42,6 +44,7 @@ public AuRaBlockProcessor(
ILogManager logManager,
IBlockFinder blockTree,
IWithdrawalProcessor withdrawalProcessor,
IBeaconBlockRootHandler beaconBlockRootProcessor,
IAuRaValidator? auRaValidator,
ITxFilter? txFilter = null,
AuRaContractGasLimitOverride? gasLimitOverride = null,
Expand All @@ -55,6 +58,7 @@ public AuRaBlockProcessor(
receiptStorage,
new BlockhashStore(blockTree, specProvider, stateProvider),
logManager,
beaconBlockRootProcessor,
withdrawalProcessor)
{
_specProvider = specProvider;
Expand Down
Loading