Skip to content

Commit

Permalink
Merge branch 'arith-dev' into 1580-transaction-creates-only-a-tx_init…
Browse files Browse the repository at this point in the history
…-section
  • Loading branch information
letypequividelespoubelles authored Nov 28, 2024
2 parents b0fd3b6 + 18adbaa commit ac83a87
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 32 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
releaseVersion=0.8.0-rc5
besuVersion=24.11-develop-660a354
besuVersion=24.11-delivery39
besuArtifactGroup=io.consensys.linea-besu
distributionIdentifier=linea-tracer
distributionBaseUrl=https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class BlockchainReferenceTestTools {

private static final List<String> NETWORKS_TO_RUN = List.of("London");

private static final JsonTestParameters<?, ?> PARAMS =
public static final JsonTestParameters<?, ?> PARAMS =
JsonTestParameters.create(BlockchainReferenceTestCaseSpec.class)
.generator(
(testName, fullPath, spec, collector) -> {
Expand All @@ -80,33 +80,33 @@ public class BlockchainReferenceTestTools {
PARAMS.ignoreAll();
}
// ignore tests that are failing in Besu too
PARAMS.ignore("RevertInCreateInInitCreate2_d0g0v0_London[London]");
PARAMS.ignore("RevertInCreateInInit_d0g0v0_London[London]");
PARAMS.ignore("create2collisionStorage_d0g0v0_London[London]");
PARAMS.ignore("create2collisionStorage_d1g0v0_London[London]");
PARAMS.ignore("create2collisionStorage_d2g0v0_London[London]");
PARAMS.ignore("dynamicAccountOverwriteEmpty_d0g0v0_London[London]");
PARAMS.ignore("RevertInCreateInInitCreate2_d0g0v0_London\\[London\\]");
PARAMS.ignore("RevertInCreateInInit_d0g0v0_London\\[London\\]");
PARAMS.ignore("create2collisionStorage_d0g0v0_London\\[London\\]");
PARAMS.ignore("create2collisionStorage_d1g0v0_London\\[London\\]");
PARAMS.ignore("create2collisionStorage_d2g0v0_London\\[London\\]");
PARAMS.ignore("dynamicAccountOverwriteEmpty_d0g0v0_London\\[London\\]");

// ignore tests that are failing because there is an account with nonce 0 and
// non empty code which can't happen in Linea since we are post LONDON only.
PARAMS.ignore("InitCollision_d0g0v0_London[London]");
PARAMS.ignore("InitCollision_d1g0v0_London[London]");
PARAMS.ignore("InitCollision_d2g0v0_London[London]");
PARAMS.ignore("InitCollision_d3g0v0_London[London]");
PARAMS.ignore("RevertInCreateInInitCreate2_d0g0v0_London[London]");
PARAMS.ignore("RevertInCreateInInit_d0g0v0_London[London]");
PARAMS.ignore("InitCollision_d0g0v0_London\\[London\\]");
PARAMS.ignore("InitCollision_d1g0v0_London\\[London\\]");
PARAMS.ignore("InitCollision_d2g0v0_London\\[London\\]");
PARAMS.ignore("InitCollision_d3g0v0_London\\[London\\]");
PARAMS.ignore("RevertInCreateInInitCreate2_d0g0v0_London\\[London\\]");
PARAMS.ignore("RevertInCreateInInit_d0g0v0_London\\[London\\]");

// Arithmetization restriction: recipient address is a precompile.
PARAMS.ignore("modexpRandomInput_d0g0v0_London[London]");
PARAMS.ignore("modexpRandomInput_d0g1v0_London[London]");
PARAMS.ignore("modexpRandomInput_d1g0v0_London[London]");
PARAMS.ignore("modexpRandomInput_d1g1v0_London[London]");
PARAMS.ignore("modexpRandomInput_d2g0v0_London[London]");
PARAMS.ignore("modexpRandomInput_d2g1v0_London[London]");
PARAMS.ignore("randomStatetest642_d0g0v0_London[London]");
PARAMS.ignore("randomStatetest644_d0g0v0_London[London]");
PARAMS.ignore("randomStatetest645_d0g0v0_London[London]");
PARAMS.ignore("randomStatetest645_d0g0v1_London[London]");
PARAMS.ignore("modexpRandomInput_d0g0v0_London\\[London\\]");
PARAMS.ignore("modexpRandomInput_d0g1v0_London\\[London\\]");
PARAMS.ignore("modexpRandomInput_d1g0v0_London\\[London\\]");
PARAMS.ignore("modexpRandomInput_d1g1v0_London\\[London\\]");
PARAMS.ignore("modexpRandomInput_d2g0v0_London\\[London\\]");
PARAMS.ignore("modexpRandomInput_d2g1v0_London\\[London\\]");
PARAMS.ignore("randomStatetest642_d0g0v0_London\\[London\\]");
PARAMS.ignore("randomStatetest644_d0g0v0_London\\[London\\]");
PARAMS.ignore("randomStatetest645_d0g0v0_London\\[London\\]");
PARAMS.ignore("randomStatetest645_d0g0v1_London\\[London\\]");

// Consumes a huge amount of memory.
PARAMS.ignore("static_Call1MB1024Calldepth_d1g0v0_\\w+");
Expand All @@ -120,14 +120,14 @@ public class BlockchainReferenceTestTools {
PARAMS.ignore("randomStatetest94_\\w+");

// Balance is more than 128 bits
PARAMS.ignore("Call1024PreCalls_d0g0v0_London[London]");
PARAMS.ignore("Call1024PreCalls_d0g1v0_London[London]");
PARAMS.ignore("OverflowGasRequire_London[London]");
PARAMS.ignore("StrangeContractCreation_London[London]");
PARAMS.ignore("SuicideIssue_London[London]");
PARAMS.ignore("DelegateCallSpam_London[London]");
PARAMS.ignore("OverflowGasRequire2_d0g0v0_London[London]");
PARAMS.ignore("HighGasLimit_d0g0v0_London[London]");
PARAMS.ignore("Call1024PreCalls_d0g0v0_London\\[London\\]");
PARAMS.ignore("Call1024PreCalls_d0g1v0_London\\[London\\]");
PARAMS.ignore("OverflowGasRequire_London\\[London\\]");
PARAMS.ignore("StrangeContractCreation_London\\[London\\]");
PARAMS.ignore("SuicideIssue_London\\[London\\]");
PARAMS.ignore("DelegateCallSpam_London\\[London\\]");
PARAMS.ignore("OverflowGasRequire2_d0g0v0_London\\[London\\]");
PARAMS.ignore("HighGasLimit_d0g0v0_London\\[London\\]");

// Deployment transaction to an account with nonce / code
PARAMS.ignore("TransactionCollisionToEmptyButCode_d0g0v0_London\\[London\\]");
Expand Down
36 changes: 36 additions & 0 deletions reference-tests/src/test/java/net/consensys/linea/FilterTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright Consensys Software Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/

package net.consensys.linea;

import static net.consensys.linea.BlockchainReferenceTestTools.PARAMS;

import java.util.Collection;
import java.util.List;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class FilterTest {

@Test
void name() {
Collection<Object[]> tests =
PARAMS.generate(
"ethereum-tests/BlockchainTests/GeneralStateTests/stCreate2/RevertInCreateInInitCreate2.json");
List<Object[]> filtered = tests.stream().filter(t -> ((boolean) t[2]) == true).toList();
Assertions.assertEquals(0, filtered.size());
}
}

0 comments on commit ac83a87

Please sign in to comment.