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

Eip 4788/beacon parent block root in evm #5476

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
962de19
- Added Eip4788 to ReleaseSpecs
Demuirgos Jul 19, 2023
ec00aec
- Added passing state to Precompiles
Demuirgos Jul 19, 2023
30f15e0
- Adds consensus logic of Eip4788
Demuirgos Jul 19, 2023
17a58e2
- Tests update
Demuirgos Jul 19, 2023
927c006
- Minor fixes, Missing migration code
Demuirgos Jul 19, 2023
28edbd4
- Test improvements
Demuirgos Jul 19, 2023
b900af3
- Test progress, Cleanup
Demuirgos Jul 19, 2023
a4e316f
- More tests fixes
Demuirgos Jul 19, 2023
c911bd6
- Whitespace fixes
Demuirgos Jul 19, 2023
73f9d08
- Attempt fix failing JsonRpc.Tests
Demuirgos Jul 19, 2023
0b6c02d
- Fix whistespace check failure
Demuirgos Jul 19, 2023
4c8c401
- Merge master, resolve conflicts
Demuirgos Jul 24, 2023
46108e8
- move setup precompile 4788 to instance method
Demuirgos Jul 24, 2023
ae7c4fd
- fix some build issue
Demuirgos Jul 24, 2023
6297784
- fixed failing tests
Demuirgos Jul 24, 2023
768c1ef
- Apply changes
Demuirgos Jul 27, 2023
b286950
- Merge master, resolve conflicts
Demuirgos Jul 27, 2023
27bb1ff
- Fix failing tests
Demuirgos Jul 27, 2023
fc7ed2d
- ws fixes
Demuirgos Jul 27, 2023
61c949f
- Merge master, resolve conflict
Demuirgos Jul 28, 2023
13d3c1d
- Introduce IBeaconBlockRootHandler
Demuirgos Jul 31, 2023
b2a1456
- Removed unnecessary "null" default value
Demuirgos Jul 31, 2023
8d45da3
- Fixed some naming inconsistensies
Demuirgos Jul 31, 2023
dcf7998
- Fix ws problems
Demuirgos Jul 31, 2023
011687d
- Fix default behavior of beaconBlockRootHandler argument in BlockPro…
Demuirgos Jul 31, 2023
5c2da2f
- fix
Demuirgos Aug 3, 2023
cac566f
- Fix ws
Demuirgos Aug 3, 2023
ce1cb7c
small improvements
LukaszRozmej Aug 4, 2023
8b411d5
Add EngineApiVersions
LukaszRozmej Aug 4, 2023
c2d1876
- refactor PayloadAttributes.Validate
Demuirgos Aug 4, 2023
2a822bb
- ws fix
Demuirgos Aug 4, 2023
3d975ef
Init beacon root precompile state for genesis (#5982)
flcl42 Aug 4, 2023
467d74c
- Applied suggested changes
Demuirgos Aug 7, 2023
06d9491
Merge remote-tracking branch 'origin/Engine/Rpc/Add-forkchoiceUpdated…
flcl42 Aug 7, 2023
2e3c632
Fix merge
flcl42 Aug 8, 2023
763d032
- Added a engine_fcuV3 test
Demuirgos Aug 8, 2023
c4c4b12
- Add simple BeaconParentBlockRoot test for NewPayloadV3
Demuirgos Aug 8, 2023
1447648
- Assert precompile creation at cancun block execution
Demuirgos Aug 8, 2023
3a5379a
- Applied flcl's fixes
Demuirgos Aug 8, 2023
7ed2ab4
Merge remote-tracking branch 'origin/master' into Engine/Rpc/Add-fork…
Demuirgos Aug 8, 2023
a9a7e36
- naming fix
Demuirgos Aug 8, 2023
f8c8b9b
Merge branch 'Engine/Rpc/Add-forkchoiceUpdatedV3' into EIP-4788/Beaco…
Demuirgos Aug 9, 2023
895669d
Merge remote-tracking branch 'origin/master' into EIP-4788/BeaconStat…
Demuirgos Aug 9, 2023
ddb0262
- ignore 0x0b from precompile checks
Demuirgos Aug 9, 2023
1edb452
- applied some Alexey's fixes
Demuirgos Aug 17, 2023
4877dd6
- merged master
Demuirgos Aug 17, 2023
4da6ccd
- removed reference of Precompile from code
Demuirgos Aug 17, 2023
dc1b94e
removed unnecessary refs of BlockRootClass
Demuirgos Aug 17, 2023
1a718f3
- removing more unnecessary refs
Demuirgos Aug 17, 2023
706c8dc
- added more of Alexey's fixes
Demuirgos Aug 17, 2023
26ddb49
revert master merge
Demuirgos Aug 17, 2023
e0f109a
- merged master (not definitive)
Demuirgos Aug 17, 2023
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
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.Consensus.BeaconBlockRoot;

namespace Nethermind.AccountAbstraction.Test
{
Expand Down Expand Up @@ -252,7 +253,7 @@ protected override BlockProcessor CreateBlockProcessor()
}

protected override async Task<TestBlockchain> Build(ISpecProvider? specProvider = null,
UInt256? initialValues = null)
UInt256? initialValues = null, bool addBlockOnStart = true)
{
TestBlockchain chain = await base.Build(specProvider, initialValues);
IList<Address> entryPointContractAddresses = new List<Address>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Nethermind.Blockchain.Receipts;
using Nethermind.Blockchain.Test.Validators;
using Nethermind.Consensus.AuRa;
using Nethermind.Consensus.BeaconBlockRoot;
using Nethermind.Consensus.Processing;
using Nethermind.Consensus.Rewards;
using Nethermind.Consensus.Transactions;
Expand Down Expand Up @@ -161,6 +162,7 @@ void Process(AuRaBlockProcessor auRaBlockProcessor, int blockNumber, Keccak stat
LimboLogs.Instance,
Substitute.For<IBlockTree>(),
new WithdrawalProcessor(stateProvider, LimboLogs.Instance),
new BeaconBlockRootHandler(),
txFilter,
contractRewriter: contractRewriter);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Nethermind.Abi;
using Nethermind.Consensus;
using Nethermind.Consensus.AuRa;
using Nethermind.Consensus.AuRa.BeaconBlockRoot;
using Nethermind.Consensus.AuRa.Contracts;
using Nethermind.Consensus.AuRa.Withdrawals;
using Nethermind.Consensus.Processing;
Expand Down Expand Up @@ -100,6 +101,7 @@ protected override BlockProcessor CreateBlockProcessor()
LimboLogs.Instance,
BlockTree,
NullWithdrawalProcessor.Instance,
NullBeaconBlockRootHandler.Instance,
null,
GasLimitCalculator as AuRaContractGasLimitOverride);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ protected override ILocalDataSource<IEnumerable<Address>> GetWhitelistLocalDataS
protected override ILocalDataSource<IEnumerable<TxPriorityContract.Destination>> GetMinGasPricesLocalDataStore() =>
LocalDataSource.GetMinGasPricesLocalDataSource();

protected override Task<TestBlockchain> Build(ISpecProvider specProvider = null, UInt256? initialValues = null)
protected override Task<TestBlockchain> Build(ISpecProvider specProvider = null, UInt256? initialValues = null, bool addBlockOnStart = true)
{
TempFile = TempPath.GetTempFile();
LocalDataSource = new TxPriorityContract.LocalDataSource(TempFile.Path, new EthereumJsonSerializer(), new FileSystem(), LimboLogs.Instance, Interval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Nethermind.Abi;
using Nethermind.AuRa.Test.Contract;
using Nethermind.Consensus.AuRa;
using Nethermind.Consensus.AuRa.BeaconBlockRoot;
using Nethermind.Consensus.AuRa.Contracts;
using Nethermind.Consensus.AuRa.Transactions;
using Nethermind.Consensus.AuRa.Withdrawals;
Expand Down Expand Up @@ -156,7 +157,8 @@ protected override BlockProcessor CreateBlockProcessor()
ReceiptStorage,
LimboLogs.Instance,
BlockTree,
NullWithdrawalProcessor.Instance);
NullWithdrawalProcessor.Instance,
NullBeaconBlockRootHandler.Instance);
}

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

namespace Nethermind.AuRa.Test.Transactions;

Expand Down Expand Up @@ -298,6 +299,7 @@ protected override BlockProcessor CreateBlockProcessor()
LimboLogs.Instance,
BlockTree,
NullWithdrawalProcessor.Instance,
NullBeaconBlockRootHandler.Instance,
PermissionBasedTxFilter);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
using Nethermind.Consensus.Withdrawals;
using Nethermind.Core.Test.Blockchain;
using Nethermind.Evm.TransactionProcessing;
using Nethermind.Consensus.BeaconBlockRoot;

namespace Nethermind.Blockchain.Test
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public PruningTestBlockchain()
TempDirectory = TempPath.GetTempDirectory();
}

protected override async Task<TestBlockchain> Build(ISpecProvider? specProvider = null, UInt256? initialValues = null)
protected override async Task<TestBlockchain> Build(ISpecProvider? specProvider = null, UInt256? initialValues = null, bool addBlockOnStart = true)
{
TestBlockchain chain = await base.Build(specProvider, initialValues);
PruningDb = (IFullPruningDb)DbProvider.StateDb;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using FluentAssertions;
using Nethermind.Blockchain.Receipts;
using Nethermind.Config;
using Nethermind.Consensus.BeaconBlockRoot;
using Nethermind.Consensus.Processing;
using Nethermind.Consensus.Producers;
using Nethermind.Consensus.Rewards;
Expand Down
1 change: 1 addition & 0 deletions src/Nethermind/Nethermind.Blockchain.Test/ReorgTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Nethermind.Blockchain.Receipts;
using Nethermind.Blockchain.Spec;
using Nethermind.Blockchain.Synchronization;
using Nethermind.Consensus.BeaconBlockRoot;
using Nethermind.Consensus.Comparers;
using Nethermind.Consensus.Processing;
using Nethermind.Consensus.Rewards;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// SPDX-FileCopyrightText: 2023 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nethermind.Core.Specs;
using Nethermind.Core;
using Nethermind.Evm.Precompiles.Stateful;
using Nethermind.Int256;
using Nethermind.State;
using static Nethermind.Evm.Precompiles.Stateful.BeaconBlockRootPrecompile;


namespace Nethermind.Consensus.BeaconBlockRoot;
public class BeaconBlockRootHandler : IBeaconBlockRootHandler
{
public void HandleBeaconBlockRoot(Block block, IReleaseSpec spec, IWorldState stateProvider)
{
if (!spec.IsBeaconBlockRootAvailable) return;
Copy link
Member

@LukaszRozmej LukaszRozmej Aug 7, 2023

Choose a reason for hiding this comment

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

Lets:

  1. Rename it to InitStatefulPrecompiles (Handler?)
  2. Create it in the BlockProcessor instead of injecting it, contrary to withdrawals which are consensus specific, this is directly controlled by spec, so doesn't make sense to inject different implementations - sorry if I confused you earlier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

perfect ig (it was painful to make it injectable xD)


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

stateProvider.CreateAccountIfNotExists(BeaconBlockRootPrecompile.Address, 1);

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

StorageCell tsStorageCell = new(BeaconBlockRootPrecompile.Address, timestampReduced);
StorageCell brStorageCell = new(BeaconBlockRootPrecompile.Address, rootIndex);

stateProvider.Set(tsStorageCell, timestamp.ToBigEndian());
stateProvider.Set(brStorageCell, parentBeaconBlockRoot.Bytes.ToArray());
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be better if this code would live in some static method in BeaconBlockRootPrecompile?
You are touching its address, you are duplicating the logic of calculating indexes, doesn't make sense to be anywhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

funnily tho it was in a static method on IBeaconBlockRootPrecompile, but I dont think it's worth modifying now cause chances are it will be yeeeted out completely one the v2 comes arround

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-FileCopyrightText: 2023 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nethermind.Core.Specs;
using Nethermind.Core;
using Nethermind.State;

namespace Nethermind.Consensus.BeaconBlockRoot;
public interface IBeaconBlockRootHandler
{
void HandleBeaconBlockRoot(Block block, IReleaseSpec spec, IWorldState state);
}
5 changes: 5 additions & 0 deletions src/Nethermind/Nethermind.Blockchain/GenesisLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Nethermind.Evm.TransactionProcessing;
using Nethermind.Specs.ChainSpecStyle;
using Nethermind.State;
using Nethermind.Consensus.BeaconBlockRoot;

namespace Nethermind.Blockchain
{
Expand All @@ -24,6 +25,7 @@ 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 @@ -35,6 +37,7 @@ 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 All @@ -45,6 +48,8 @@ public Block Load()
// we no longer need the allocations - 0.5MB RAM, 9000 objects for mainnet
_chainSpec.Allocations = null;

_beaconBlockRootHandler?.HandleBeaconBlockRoot(genesis, _specProvider.GenesisSpec, _stateProvider);

_stateProvider.Commit(_specProvider.GenesisSpec, true);

_stateProvider.CommitTree(0);
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.Consensus.BeaconBlockRoot;

namespace Nethermind.Clique.Test
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Nethermind.Blockchain.Find;
using Nethermind.Blockchain.Receipts;
using Nethermind.Consensus.AuRa.Validators;
using Nethermind.Consensus.BeaconBlockRoot;
using Nethermind.Consensus.Processing;
using Nethermind.Consensus.Rewards;
using Nethermind.Consensus.Transactions;
Expand Down Expand Up @@ -43,6 +44,7 @@ public AuRaBlockProcessor(
ILogManager logManager,
IBlockTree blockTree,
IWithdrawalProcessor withdrawalProcessor,
IBeaconBlockRootHandler beaconBlockRootHandler,
ITxFilter? txFilter = null,
AuRaContractGasLimitOverride? gasLimitOverride = null,
ContractRewriter? contractRewriter = null)
Expand All @@ -55,7 +57,8 @@ public AuRaBlockProcessor(
receiptStorage,
NullWitnessCollector.Instance,
logManager,
withdrawalProcessor)
withdrawalProcessor,
beaconBlockRootHandler)
{
_specProvider = specProvider;
_blockTree = blockTree ?? throw new ArgumentNullException(nameof(blockTree));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// SPDX-FileCopyrightText: 2023 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nethermind.Consensus.BeaconBlockRoot;
using Nethermind.Core;
using Nethermind.Core.Specs;
using Nethermind.State;

namespace Nethermind.Consensus.AuRa.BeaconBlockRoot;
internal class NullBeaconBlockRootHandler : IBeaconBlockRootHandler
{
public void HandleBeaconBlockRoot(Block block, IReleaseSpec spec, IWorldState state)
{
}

public static IBeaconBlockRootHandler Instance { get; } = new NullBeaconBlockRootHandler();
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Nethermind.Blockchain.Data;
using Nethermind.Blockchain.Services;
using Nethermind.Config;
using Nethermind.Consensus.AuRa.BeaconBlockRoot;
using Nethermind.Consensus.AuRa.Config;
using Nethermind.Consensus.AuRa.Contracts;
using Nethermind.Consensus.AuRa.Contracts.DataStore;
Expand Down Expand Up @@ -97,6 +98,7 @@ protected virtual BlockProcessor NewBlockProcessor(AuRaNethermindApi api, ITxFil
_api.LogManager,
_api.BlockTree,
NullWithdrawalProcessor.Instance,
NullBeaconBlockRootHandler.Instance,
txFilter,
GetGasLimitCalculator(),
contractRewriter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Nethermind.Blockchain;
using Nethermind.Blockchain.Data;
using Nethermind.Config;
using Nethermind.Consensus.AuRa.BeaconBlockRoot;
using Nethermind.Consensus.AuRa.Config;
using Nethermind.Consensus.AuRa.Contracts;
using Nethermind.Consensus.AuRa.Contracts.DataStore;
Expand Down Expand Up @@ -159,6 +160,7 @@ private BlockProcessor CreateBlockProcessor(ReadOnlyTxProcessingEnv changeableTx
_api.LogManager,
changeableTxProcessingEnv.BlockTree,
NullWithdrawalProcessor.Instance,
NullBeaconBlockRootHandler.Instance,
auRaTxFilter,
CreateGasLimitCalculator(constantContractTxProcessingEnv) as AuRaContractGasLimitOverride,
contractRewriter)
Expand Down
11 changes: 9 additions & 2 deletions src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Numerics;
using Nethermind.Blockchain;
using Nethermind.Blockchain.Receipts;
using Nethermind.Consensus.BeaconBlockRoot;
using Nethermind.Consensus.Rewards;
using Nethermind.Consensus.Validators;
using Nethermind.Consensus.Withdrawals;
Expand All @@ -15,6 +16,7 @@
using Nethermind.Core.Specs;
using Nethermind.Crypto;
using Nethermind.Evm;
using Nethermind.Evm.Precompiles.Stateful;
using Nethermind.Evm.Tracing;
using Nethermind.Int256;
using Nethermind.Logging;
Expand All @@ -32,6 +34,7 @@ public partial class BlockProcessor : IBlockProcessor
private readonly IReceiptStorage _receiptStorage;
private readonly IWitnessCollector _witnessCollector;
private readonly IWithdrawalProcessor _withdrawalProcessor;
private readonly IBeaconBlockRootHandler _beaconBlockRootHandler;
private readonly IBlockValidator _blockValidator;
private readonly IRewardCalculator _rewardCalculator;
private readonly IBlockProcessor.IBlockTransactionsExecutor _blockTransactionsExecutor;
Expand All @@ -53,7 +56,8 @@ public BlockProcessor(
IReceiptStorage? receiptStorage,
IWitnessCollector? witnessCollector,
ILogManager? logManager,
IWithdrawalProcessor? withdrawalProcessor = null)
IWithdrawalProcessor? withdrawalProcessor = null,
IBeaconBlockRootHandler beaconBlockRootHandler = null)
{
_logger = logManager?.GetClassLogger() ?? throw new ArgumentNullException(nameof(logManager));
_specProvider = specProvider ?? throw new ArgumentNullException(nameof(specProvider));
Expand All @@ -64,7 +68,7 @@ public BlockProcessor(
_withdrawalProcessor = withdrawalProcessor ?? new WithdrawalProcessor(stateProvider, logManager);
_rewardCalculator = rewardCalculator ?? throw new ArgumentNullException(nameof(rewardCalculator));
_blockTransactionsExecutor = blockTransactionsExecutor ?? throw new ArgumentNullException(nameof(blockTransactionsExecutor));

_beaconBlockRootHandler = beaconBlockRootHandler ?? new BeaconBlockRootHandler();

_receiptsTracer = new BlockReceiptsTracer();
}
Expand Down Expand Up @@ -225,6 +229,8 @@ protected virtual TxReceipt[] ProcessBlock(
_receiptsTracer.SetOtherTracer(blockTracer);
_receiptsTracer.StartNewBlockTrace(block);

_beaconBlockRootHandler.HandleBeaconBlockRoot(block, spec, _stateProvider);

TxReceipt[] receipts = _blockTransactionsExecutor.ProcessTransactions(block, options, _receiptsTracer, spec);

if (spec.IsEip4844Enabled)
Expand Down Expand Up @@ -283,6 +289,7 @@ private Block PrepareBlockForProcessing(Block suggestedBlock)
BaseFeePerGas = bh.BaseFeePerGas,
WithdrawalsRoot = bh.WithdrawalsRoot,
IsPostMerge = bh.IsPostMerge,
ParentBeaconBlockRoot = bh.ParentBeaconBlockRoot,
};

return suggestedBlock.CreateCopy(headerForProcessing);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using Nethermind.Blockchain.Receipts;
using Nethermind.Consensus.BeaconBlockRoot;
using Nethermind.Consensus.Rewards;
using Nethermind.Consensus.Validators;
using Nethermind.Consensus.Withdrawals;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ protected virtual BlockHeader PrepareBlockHeader(BlockHeader parent,
{
Author = blockAuthor,
MixHash = payloadAttributes?.PrevRandao,
ParentBeaconBlockRoot = payloadAttributes?.BeaconParentBlockRoot
};

UInt256 difficulty = _difficultyCalculator.Calculate(header, parent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Nethermind.Blockchain;
using Nethermind.Blockchain.Receipts;
using Nethermind.Config;
using Nethermind.Consensus.BeaconBlockRoot;
using Nethermind.Consensus.Comparers;
using Nethermind.Consensus.Processing;
using Nethermind.Consensus.Rewards;
Expand Down
Loading
Loading