Skip to content

Commit 9d4aadf

Browse files
committed
Build fixes
1 parent 330505f commit 9d4aadf

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

src/Nethermind/Nethermind.Blockchain.Test/BlockProcessorTests.cs

+3-7
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
using Nethermind.Consensus.Withdrawals;
3030
using Nethermind.Core.Test.Blockchain;
3131
using Nethermind.Evm.TransactionProcessing;
32-
using Nethermind.Core.Specs;
33-
using Nethermind.Db.Blooms;
34-
using Nethermind.State.Repositories;
3532

3633
namespace Nethermind.Blockchain.Test
3734
{
@@ -72,7 +69,8 @@ public void Can_store_a_witness()
7269
{
7370
IDb stateDb = new MemDb();
7471
IDb codeDb = new MemDb();
75-
TrieStore trieStore = new(stateDb, LimboLogs.Instance);
72+
var trieStore = new TrieStore(stateDb, LimboLogs.Instance);
73+
7674
IWorldState stateProvider = new WorldState(trieStore, codeDb, LimboLogs.Instance);
7775
ITransactionProcessor transactionProcessor = Substitute.For<ITransactionProcessor>();
7876
IWitnessCollector witnessCollector = Substitute.For<IWitnessCollector>();
@@ -102,10 +100,8 @@ public void Recovers_state_on_cancel()
102100
{
103101
IDb stateDb = new MemDb();
104102
IDb codeDb = new MemDb();
105-
var trieStore = new TrieStore(stateDb, LimboLogs.Instance);
106-
103+
TrieStore trieStore = new(stateDb, LimboLogs.Instance);
107104
IWorldState stateProvider = new WorldState(trieStore, codeDb, LimboLogs.Instance);
108-
109105
ITransactionProcessor transactionProcessor = Substitute.For<ITransactionProcessor>();
110106
BlockProcessor processor = new(
111107
RinkebySpecProvider.Instance,

src/Nethermind/Nethermind.Consensus/Nethermind.Consensus.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<ProjectReference Include="..\Nethermind.Crypto\Nethermind.Crypto.csproj" />
1414
<ProjectReference Include="..\Nethermind.Evm\Nethermind.Evm.csproj" />
1515
<ProjectReference Include="..\Nethermind.TxPool\Nethermind.TxPool.csproj" />
16-
<ProjectReference Include="..\Nethermind.Serialization.Rlp\Nethermind.Serialization.Rlp.csproj" />
16+
1717
</ItemGroup>
1818

1919
</Project>

src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
using Nethermind.Core.Crypto;
1515
using Nethermind.Core.Specs;
1616
using Nethermind.Crypto;
17+
using Nethermind.Evm.Precompiles.Statefull;
1718
using Nethermind.Evm.Tracing;
1819
using Nethermind.Int256;
1920
using Nethermind.Logging;
@@ -37,8 +38,6 @@ public partial class BlockProcessor : IBlockProcessor
3738

3839
private const int MaxUncommittedBlocks = 64;
3940

40-
public static readonly Address HISTORY_STORAGE_ADDRESS = Address.FromNumber(UInt256.MaxValue - 2);
41-
4241
/// <summary>
4342
/// We use a single receipt tracer for all blocks. Internally receipt tracer forwards most of the calls
4443
/// to any block-specific tracers.
@@ -224,7 +223,7 @@ protected virtual TxReceipt[] ProcessBlock(
224223

225224
if (spec.BeaconStateRootAvailable)
226225
{
227-
StorageCell storageCell = new(HISTORY_STORAGE_ADDRESS, new UInt256(block.Header.BeaconStateRoot.Bytes));
226+
StorageCell storageCell = new(BeaconStateRootPrecompile.Address, new UInt256(block.Header.BeaconStateRoot.Bytes));
228227
_stateProvider.Set(storageCell, ((UInt256)block.Timestamp).ToBigEndian());
229228
}
230229

src/Nethermind/Nethermind.Evm/Precompiles/Statefull/BeaconStateRootPrecompile.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
using Nethermind.State;
1515

1616
namespace Nethermind.Evm.Precompiles.Statefull;
17-
internal class BeaconStateRootPrecompile : IPrecompile
17+
public class BeaconStateRootPrecompile : IPrecompile
1818
{
1919
private readonly IWorldState _state;
20-
public static Address Address { get; } = Address.FromNumber(UInt256.MaxValue - 2);
20+
public static Address Address { get; } = Address.FromNumber(0x0B);
2121

2222
private BeaconStateRootPrecompile(IWorldState state)
2323
{

0 commit comments

Comments
 (0)