Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f024174
Corrected namespaces
damian-orzechowski Aug 29, 2025
c8613ba
Adjust code to latest nm changes
damian-orzechowski Sep 2, 2025
9ed115c
Genesis loader fix
damian-orzechowski Sep 2, 2025
252e14f
Add worldState scope for PrepareBlock
damian-orzechowski Sep 2, 2025
43222da
Cleanup
damian-orzechowski Sep 2, 2025
c086392
Making most tests work
damian-orzechowski Sep 2, 2025
95385bb
Fix precompile execution context Orgin / GrandCaller
damian-orzechowski Sep 2, 2025
23af0ee
Fix stylus origin set
damian-orzechowski Sep 2, 2025
1366afd
Fix rpc module tests
damian-orzechowski Sep 2, 2025
56d669a
Test fix
damian-orzechowski Sep 3, 2025
ae8e961
Submodule change
damian-orzechowski Sep 3, 2025
3385c91
Merge main
damian-orzechowski Sep 3, 2025
015e142
Post merge test fixes
damian-orzechowski Sep 3, 2025
67aeb19
Test fixes - scoped WorldState
damian-orzechowski Sep 3, 2025
19f7ec0
Submodule update
damian-orzechowski Sep 3, 2025
975c4eb
build fix for precompiled addresses - still pending implementation
svlachakis Sep 3, 2025
889b1e9
VM tests fix
damian-orzechowski Sep 3, 2025
746c93b
Spec fix - disable new eips
damian-orzechowski Sep 3, 2025
7d7ff51
Register `ArbitrumBlockValidationModule`
damian-orzechowski Sep 5, 2025
f6f2f9e
Code cleanup
damian-orzechowski Sep 5, 2025
66bfcb3
Format whitespace
damian-orzechowski Sep 5, 2025
91e9959
Cleanup
damian-orzechowski Sep 5, 2025
3fd0f63
Merge main
damian-orzechowski Sep 5, 2025
3f8384e
ArbitrumEthRpcModule tests support (#195)
svlachakis Sep 5, 2025
ccebe44
Formatting
svlachakis Sep 5, 2025
ad884b9
Use decorator instead of `ChainSpecBasedSpecProvider`
damian-orzechowski Sep 5, 2025
392529b
Merge branch 'fix/nm-master-sync' of https://github.com/NethermindEth…
damian-orzechowski Sep 5, 2025
c38003f
Change ISpecProvider resolution
damian-orzechowski Sep 8, 2025
0ddb49f
Throw OutOfGasException directly instead of calling static method
damian-orzechowski Sep 8, 2025
b2df213
NM submodule update and fixes
damian-orzechowski Sep 8, 2025
ed5ebd1
Test fixes
damian-orzechowski Sep 8, 2025
c176843
Update NM submodule to master
damian-orzechowski Sep 8, 2025
9c67028
Fix ArbitrumChainSpecBasedSpecProvider test
damian-orzechowski Sep 8, 2025
7493be4
Precompiles override & small fixes on nm-master-sync (#196)
svlachakis Sep 8, 2025
cf5b267
Merge branch 'main' into fix/nm-master-sync
svlachakis Sep 8, 2025
2e7c1b5
IWorldState Import on ArbGasInfoParserTests.cs
svlachakis Sep 8, 2025
5757bfb
Fixes in ArbGasInfoParserTests.cs
svlachakis Sep 8, 2025
07f7a13
ArbGasInfoParserTests.cs worldState fixes
svlachakis Sep 8, 2025
95cedad
ArbGasInfoParserTests.cs fixes
svlachakis Sep 8, 2025
6f069be
Nitpick fixes
damian-orzechowski Sep 9, 2025
fce2ce7
submodule update
svlachakis Sep 9, 2025
ce6c726
TrackingWorldState.cs fix
svlachakis Sep 9, 2025
7779ad8
Merge remote-tracking branch 'origin/main' into fix/nm-master-sync
svlachakis Sep 9, 2025
3b4dc6d
Conflicts fix
svlachakis Sep 9, 2025
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "src/Nethermind"]
path = src/Nethermind
url = https://github.com/NethermindEth/nethermind.git
branch = feature/arbitrum-setup
branch = master
2 changes: 1 addition & 1 deletion src/Nethermind
Submodule Nethermind updated 1637 files
13 changes: 6 additions & 7 deletions src/Nethermind.Arbitrum.Test/Arbos/ArbosGenesisLoaderTests.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
using FluentAssertions;
using Nethermind.Arbitrum.Config;
using Nethermind.Arbitrum.Data;
using Nethermind.Arbitrum.Genesis;
using Nethermind.Arbitrum.Test.Infrastructure;
using Nethermind.Core;
using Nethermind.Core.Crypto;
using Nethermind.Core.Test;
using Nethermind.Logging;
using Nethermind.Specs.ChainSpecStyle;
using Nethermind.Evm.State;
using Nethermind.State;
using NUnit.Framework;

namespace Nethermind.Arbitrum.Test.Arbos;

Expand All @@ -18,7 +13,11 @@ public class ArbosGenesisLoaderTests
[Test]
public void Load_FullChainSimulationAtV32_ProducesCorrectHash()
{
(_, Block genesisBlock) = ArbOSInitialization.Create();
IWorldStateManager worldStateManager = TestWorldStateFactory.CreateForTest();
IWorldState worldState = worldStateManager.GlobalWorldState;
using var worldStateDisposer = worldState.BeginScope(IWorldState.PreGenesis);

Block genesisBlock = ArbOSInitialization.Create(worldState);

genesisBlock.Hash.Should().Be(new Hash256("0xbd9f2163899efb7c39f945c9a7744b2c3ff12cfa00fe573dcb480a436c0803a8"));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System.Numerics;
using FluentAssertions;
using Nethermind.Arbitrum.Arbos.Storage;
using Nethermind.Arbitrum.Test.Infrastructure;
using Nethermind.Core.Crypto;
using Nethermind.Core.Test;
using System.Numerics;
using Nethermind.Evm.State;

namespace Nethermind.Arbitrum.Test.Arbos;

Expand All @@ -25,7 +27,7 @@ public partial class ArbosStorageTests
public void SetCheckedStorageBackedByBigInteger_Always_SetsAndGetsTheSameValue(string strValue, string expectedHash)
{
const ulong offset = 0ul;
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedBigInteger backedStorage = new(storage, offset);

BigInteger value = BigInteger.Parse(strValue);
Expand All @@ -47,7 +49,7 @@ public void SetCheckedStorageBackedByBigInteger_Always_SetsAndGetsTheSameValue(s
public void SetCheckedStorageBackedByBigInteger_Overflow_Throws(string strValue)
{
const ulong offset = 0ul;
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedBigInteger backedStorage = new(storage, offset);

BigInteger value = strValue switch
Expand Down Expand Up @@ -77,7 +79,7 @@ public void SetCheckedStorageBackedByBigInteger_Overflow_Throws(string strValue)
public void SetSaturatingStorageBackedByBigInteger_Always_SetsAndGetsTheSameValue(string strValue, string expectedHash)
{
const ulong offset = 0ul;
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedBigInteger backedStorage = new(storage, offset);

BigInteger value = BigInteger.Parse(strValue);
Expand All @@ -100,7 +102,7 @@ public void SetSaturatingStorageBackedByBigInteger_Underflow_UsesMaxUInt256Value
BigInteger expectedValue = ArbosStorageBackedBigInteger.TwoToThe255 * -1;

const ulong offset = 0ul;
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedBigInteger backedStorage = new(storage, offset);

BigInteger value = strValue == "min"
Expand All @@ -126,7 +128,7 @@ public void SetSaturatingStorageBackedByBigInteger_Overflow_UsesMaxUInt256MinusO
BigInteger expectedValue = ArbosStorageBackedBigInteger.TwoToThe255MinusOne;

const ulong offset = 0ul;
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedBigInteger backedStorage = new(storage, offset);

BigInteger value = strValue == "max"
Expand Down Expand Up @@ -160,7 +162,7 @@ public void SetSaturatingStorageBackedByBigInteger_Overflow_UsesMaxUInt256MinusO
public void SetPreVersion7StorageBackedByBigInteger_Always_HandlesNegativeValuesIncorrectly(string strValue, string expectedHash)
{
const ulong offset = 0ul;
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedBigInteger backedStorage = new(storage, offset);

BigInteger value = BigInteger.Parse(strValue);
Expand All @@ -179,7 +181,7 @@ public void SetPreVersion7StorageBackedByBigInteger_Always_HandlesNegativeValues
public void SetStorageBackedByBigInteger_Always_SetsAndGetsTheSameValue(ulong value)
{
const ulong offset = 0ul;
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedBigInteger backedStorage = new(storage, offset);

backedStorage.Set(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public partial class ArbosStorageTests
[TestCase(ulong.MaxValue, uint.MaxValue)]
public void GetSetStorageBackedByUInt_Always_SetsAndGetsTheSameValue(ulong offset, uint value)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedUInt backedStorage = new(storage, offset);

backedStorage.Set(value);
Expand All @@ -34,7 +34,7 @@ public void GetSetStorageBackedByUInt_Always_SetsAndGetsTheSameValue(ulong offse
[TestCase(ulong.MaxValue, ulong.MaxValue)]
public void GetSetStorageBackedByULong_Always_SetsAndGetsTheSameValue(ulong offset, ulong value)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedULong backedStorage = new(storage, offset);

backedStorage.Set(value);
Expand All @@ -46,7 +46,7 @@ public void GetSetStorageBackedByULong_Always_SetsAndGetsTheSameValue(ulong offs
[Test]
public void IncrementStorageBackedByULong_IncrementULongMax_Throws()
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedULong backedStorage = new(storage, 10);

backedStorage.Set(ulong.MaxValue);
Expand All @@ -58,7 +58,7 @@ public void IncrementStorageBackedByULong_IncrementULongMax_Throws()
[Test]
public void IncrementStorageBackedByULong_Always_IncrementsCorrectly()
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedULong backedStorage = new(storage, 10);

backedStorage.Get().Should().Be(0);
Expand All @@ -71,7 +71,7 @@ public void IncrementStorageBackedByULong_Always_IncrementsCorrectly()
[Test]
public void DecrementStorageBackedByULong_DecrementZero_Throws()
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedULong backedStorage = new(storage, 10);

var underflow = () => backedStorage.Decrement();
Expand All @@ -81,7 +81,7 @@ public void DecrementStorageBackedByULong_DecrementZero_Throws()
[Test]
public void DecrementStorageBackedByULong_Always_DecrementsCorrectly()
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedULong backedStorage = new(storage, 10);

backedStorage.Set(3);
Expand All @@ -101,7 +101,7 @@ public void DecrementStorageBackedByULong_Always_DecrementsCorrectly()
[TestCase(ulong.MaxValue, "18446744073709551615999999999999")] // much larger than ulong.MaxValue
public void GetSetStorageBackedByUInt256_Always_SetsAndGetsTheSameValue(ulong offset, string rawValue)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedUInt256 backedStorage = new(storage, offset);
UInt256 value = UInt256.Parse(rawValue);

Expand All @@ -116,7 +116,7 @@ public void GetSetStorageBackedByUInt256_Always_SetsAndGetsTheSameValue(ulong of
[TestCase(100ul, "0x123456ffffffffffffffffffffffffffffffffff")]
public void GetSetStorageBackedByAddress_Always_SetsAndGetsTheSameValue(ulong offset, string rawAddress)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedAddress backedStorage = new(storage, offset);
Address value = new(rawAddress);

Expand All @@ -133,7 +133,7 @@ public void GetSetStorageBackedByAddress_Always_SetsAndGetsTheSameValue(ulong of
[TestCase(5, 200)]
public void GetSetStorageBackedByBytes_Always_SetsAndGetsTheSameValue(byte offset, int length)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ArbosStorageBackedBytes backedStorage = new(storage.OpenSubStorage([offset]));
byte[] value = RandomNumberGenerator.GetBytes(length);

Expand Down
41 changes: 21 additions & 20 deletions src/Nethermind.Arbitrum.Test/Arbos/ArbosStorageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
using Nethermind.Arbitrum.Arbos.Storage;
using Nethermind.Arbitrum.Test.Infrastructure;
using Nethermind.Arbitrum.Tracing;
using Nethermind.Blockchain.Tracing.GethStyle;
using Nethermind.Core;
using Nethermind.Core.Crypto;
using Nethermind.Core.Extensions;
using Nethermind.Evm;
using Nethermind.Evm.CodeAnalysis;
using Nethermind.Evm.Tracing.GethStyle;
using Nethermind.Evm.State;

namespace Nethermind.Arbitrum.Test.Arbos;

Expand All @@ -27,7 +28,7 @@ public partial class ArbosStorageTests
[TestCase(1, 255, "0xdbdac6271f6e6f0b61b2d13ce15962a39f49ff9593aa09e53e4a9ce085ccd03b")]
public void Set_Always_MapsAddressTheSameWayAsNitro(byte byte1, byte byte2, string cellHash)
{
(ArbosStorage storage, TrackingWorldState worldState) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out TrackingWorldState worldState, out ArbosStorage storage, TestAccount);

storage.Set(Hash256.FromBytesWithPadding([byte1, byte2]), Hash256.Zero);

Expand All @@ -42,7 +43,7 @@ public void Set_Always_TrimsLeadingZeroes(byte byte1, byte byte2, byte byte3)
{
byte[] expectedValue = new[] { byte1, byte2, byte3 }.WithoutLeadingZeros().ToArray();

(ArbosStorage storage, TrackingWorldState worldState) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out TrackingWorldState worldState, out ArbosStorage storage, TestAccount);

storage.Set(Hash256.FromBytesWithPadding([1]), new ValueHash256(Bytes32(byte1, byte2, byte3)));

Expand All @@ -55,7 +56,7 @@ public void Set_Always_TrimsLeadingZeroes(byte byte1, byte byte2, byte byte3)
[TestCase(255, 255, 255)]
public void SetGet_Always_GetReturnsWhatsSet(byte byte1, byte byte2, byte byte3)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);

ValueHash256 key = Hash256.FromBytesWithPadding([1]);
ValueHash256 value = new Hash256(Bytes32(byte1, byte2, byte3));
Expand All @@ -70,7 +71,7 @@ public void SetGet_Always_GetReturnsWhatsSet(byte byte1, byte byte2, byte byte3)
public void Get_Always_BurnsStorageReadCost()
{
SystemBurner systemBurner = new SystemBurner();
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount, systemBurner);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount, systemBurner);

storage.Get(Hash256.FromBytesWithPadding([1]));

Expand All @@ -81,7 +82,7 @@ public void Get_Always_BurnsStorageReadCost()
public void GetFree_Always_BurnsNothing()
{
SystemBurner systemBurner = new SystemBurner();
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount, systemBurner);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount, systemBurner);

storage.GetFree(Hash256.FromBytesWithPadding([1]));

Expand All @@ -92,7 +93,7 @@ public void GetFree_Always_BurnsNothing()
public void Set_ValueIsEmpty_BurnsStorageWriteZeroCost()
{
SystemBurner systemBurner = new SystemBurner();
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount, systemBurner);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount, systemBurner);

storage.Set(Hash256.FromBytesWithPadding([1]), Hash256.Zero);

Expand All @@ -103,7 +104,7 @@ public void Set_ValueIsEmpty_BurnsStorageWriteZeroCost()
public void Set_ValueIsNonEmpty_BurnsStorageWriteCost()
{
SystemBurner systemBurner = new SystemBurner();
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount, systemBurner);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount, systemBurner);

storage.Set(Hash256.FromBytesWithPadding([1]), new ValueHash256(Bytes32(1, 2, 3)));

Expand All @@ -116,7 +117,7 @@ public void Set_ValueIsNonEmpty_BurnsStorageWriteCost()
[TestCase(ulong.MaxValue)]
public void GetSetULong_Always_SetsAndGetsProperValue(ulong value)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);

storage.Set(Hash256.FromBytesWithPadding([1]), value);

Expand All @@ -130,7 +131,7 @@ public void GetSetULong_Always_SetsAndGetsProperValue(ulong value)
[TestCase(ulong.MaxValue)]
public void GetSetByULong_Always_SetsAndGetsTheSameValue(ulong key)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ValueHash256 value = new ValueHash256(RandomNumberGenerator.GetBytes(Hash256.Size));

storage.Set(key, value);
Expand All @@ -145,7 +146,7 @@ public void GetSetByULong_Always_SetsAndGetsTheSameValue(ulong key)
[TestCase(ulong.MaxValue, ulong.MaxValue)]
public void GetSetULongByULong_Always_SetsAndGetsTheSameValue(ulong key, ulong value)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);

storage.Set(key, value);

Expand All @@ -156,7 +157,7 @@ public void GetSetULongByULong_Always_SetsAndGetsTheSameValue(ulong key, ulong v
[Test]
public void Clear_Always_ClearsStorage()
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ValueHash256 key = Hash256.FromBytesWithPadding([1]);

storage.Set(key, new ValueHash256(Bytes32(1, 2, 3)));
Expand All @@ -169,7 +170,7 @@ public void Clear_Always_ClearsStorage()
[Test]
public void ClearByULong_Always_ClearsStorage()
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);
ulong key = 999;

storage.Set(key, new ValueHash256(Bytes32(1, 2, 3)));
Expand All @@ -185,7 +186,7 @@ public void ClearByULong_Always_ClearsStorage()
[TestCase(100)]
public void GetBytesLength_Always_ReturnsCorrectLength(int length)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);

byte[] value = RandomNumberGenerator.GetBytes(length);

Expand All @@ -203,7 +204,7 @@ public void GetBytesLength_Always_ReturnsCorrectLength(int length)
[TestCase(400)]
public void SetBytesGetBytes_Always_SetsAndGetsTheSameValue(int length)
{
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount);

byte[] value = RandomNumberGenerator.GetBytes(length);

Expand All @@ -217,7 +218,7 @@ public void SetBytesGetBytes_Always_SetsAndGetsTheSameValue(int length)
[TestCase(100)]
public void ClearBytes_Always_ClearsStorage(int length)
{
(ArbosStorage storage, TrackingWorldState worldState) = TestArbosStorage.Create(TestAccount);
using var disposable = TestArbosStorage.Create(out TrackingWorldState worldState, out ArbosStorage storage, TestAccount);

worldState.Commit(FullChainSimulationReleaseSpec.Instance);
worldState.CommitTree(0);
Expand All @@ -241,7 +242,7 @@ public void ClearBytes_Always_ClearsStorage(int length)
public void GetCodeHash_Always_BurnsStorageReadCostAndGetsHash()
{
SystemBurner systemBurner = new SystemBurner();
(ArbosStorage storage, TrackingWorldState worldState) = TestArbosStorage.Create(TestAccount, systemBurner);
using var disposable = TestArbosStorage.Create(out TrackingWorldState worldState, out ArbosStorage storage, TestAccount, systemBurner);

// Insert random code to ensure the code hash is set.
byte[] code = RandomNumberGenerator.GetBytes(Hash256.Size);
Expand All @@ -263,7 +264,7 @@ public void GetCodeHash_Always_BurnsStorageReadCostAndGetsHash()
public void CalculateHash_Always_BurnsProperCostAndReturnsHash(int bytesLength, ulong burnedCost)
{
SystemBurner systemBurner = new SystemBurner();
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount, systemBurner);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount, systemBurner);

ReadOnlySpan<byte> data = RandomNumberGenerator.GetBytes(bytesLength);
ValueHash256 expected = Keccak.Compute(data);
Expand All @@ -285,7 +286,7 @@ public void Trace_OnlyDuringEvm_RecordStorageGet(TracingScenario scenario)
var tracingInfo = new TracingInfo(tracer, scenario, executionEnv);

SystemBurner systemBurner = new SystemBurner(tracingInfo);
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount, systemBurner);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount, systemBurner);

storage.Get(Hash256.FromBytesWithPadding([1]));

Expand Down Expand Up @@ -314,7 +315,7 @@ public void Trace_OnlyDuringEvm_RecordStorageSet(TracingScenario scenario)
var tracingInfo = new TracingInfo(tracer, scenario, executionEnv);

SystemBurner systemBurner = new SystemBurner(tracingInfo);
(ArbosStorage storage, _) = TestArbosStorage.Create(TestAccount, systemBurner);
using var disposable = TestArbosStorage.Create(out _, out ArbosStorage storage, TestAccount, systemBurner);

storage.Set(Hash256.FromBytesWithPadding([1]), Hash256.FromBytesWithPadding([2]));

Expand Down
Loading