Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -305,47 +305,6 @@ public void SpecProvider_P256GasCost_ChangesAtArbOSVersion50(
$"EIP-7951 should be {(shouldHaveUpdatedGas ? "enabled" : "disabled")} at ArbOS version {arbOsVersion}");
}

[Test]
// [TestCase(10UL, TestName = "ArbOS v10")]
// [TestCase(20UL, TestName = "ArbOS v20")]
// [TestCase(30UL, TestName = "ArbOS v30")]
// This test is disabled because it is not supported by the current version of the spec provider
// in order to sync to the tip of the chain on mainnet, needs to be reverted according to nitro and TestExtendedContractDeploymentComparison test
[TestCase(40UL, TestName = "ArbOS v40")]
[TestCase(50UL, TestName = "ArbOS v50")]
public void SpecProvider_ForAllArbOSVersions_ReturnsCorrectArbitrumCodeSizeLimits(ulong arbOsVersion)
{
ChainSpec chainSpec = FullChainSimulationChainSpecProvider.Create(initialArbOsVersion: arbOsVersion);

Action<ContainerBuilder> configurer = builder =>
{
builder.AddScoped(new ArbitrumTestBlockchainBase.Configuration
{
SuggestGenesisOnStart = true,
L1BaseFee = 92
});
};

using ArbitrumRpcTestBlockchain blockchain = ArbitrumRpcTestBlockchain.CreateDefault(
configurer: configurer,
chainSpec: chainSpec);

IReleaseSpec spec = blockchain.SpecProvider.GenesisSpec;

// Arbitrum-specific overrides that should always apply regardless of ArbOS version
spec.MaxCodeSize.Should().Be(131072,
"Arbitrum allows 128 KB contracts (Stylus support)");

spec.MaxInitCodeSize.Should().Be(262144,
"MaxInitCodeSize should be 2 * MaxCodeSize");

spec.IsEip170Enabled.Should().BeFalse(
"EIP-170 should be disabled to allow contracts larger than 24 KB");

spec.IsEip3541Enabled.Should().BeFalse(
"EIP-3541 should be disabled to allow Stylus bytecode storage");
}

private static void AssertForkFeatures(string forkName, bool shouldBeEnabled, params Func<bool>[] featureChecks)
{
foreach (Func<bool> check in featureChecks)
Expand Down
11 changes: 0 additions & 11 deletions src/Nethermind.Arbitrum/Config/ArbitrumDynamicSpecProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@ private static void ApplyArbitrumOverrides(ArbitrumReleaseSpec spec, ulong arbos
{
spec.ArbOsVersion = arbosVersion;

// TODO: Remove this when mainnet syncs to the tip of the chain
// This is not a nitro compatible change, we need to expriment with it (30,31,32)
// in order to sync mainnet to the tip of the chain - TestExtendedContractDeploymentComparison test
if (arbosVersion >= ArbosVersion.Thirty)
{
// Arbitrum Stylus support: Allow larger code sizes
spec.MaxCodeSize = 131072; // 128 KB (vs Ethereum's 24 KB)
// Arbitrum supports larger contracts than Ethereum (128KB+ for Stylus)
spec.IsEip170Enabled = false;
}

// Shanghai EIPs (ArbOS v11+)
bool shanghaiEnabled = arbosVersion >= ArbosVersion.Eleven;
spec.IsEip3651Enabled = shanghaiEnabled;
Expand Down