Skip to content

Commit ccd4bfa

Browse files
feat: add test osaka replay test
Signed-off-by: F Bojarski <[email protected]>
1 parent 8c82fbc commit ccd4bfa

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed

arithmetization/src/main/java/net/consensys/linea/zktracer/ChainConfig.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
*/
1515
package net.consensys.linea.zktracer;
1616

17-
import static net.consensys.linea.zktracer.Fork.LONDON;
18-
import static net.consensys.linea.zktracer.Fork.PRAGUE;
17+
import static net.consensys.linea.zktracer.Fork.*;
1918
import static net.consensys.linea.zktracer.Trace.ETHEREUM_GAS_LIMIT_MAXIMUM;
2019
import static net.consensys.linea.zktracer.Trace.ETHEREUM_GAS_LIMIT_MINIMUM;
2120
import static net.consensys.linea.zktracer.Trace.LINEA_CHAIN_ID;
@@ -40,6 +39,8 @@ public class ChainConfig {
4039

4140
public static final ChainConfig SEPOLIA_PRAGUE_TESTCONFIG = SEPOLIA_TESTCONFIG(PRAGUE);
4241

42+
public static final ChainConfig DEVNET_OSAKA_TESTCONFIG = DEVNET_TESTCONFIG(OSAKA);
43+
4344
public static final ChainConfig MAINNET_TESTCONFIG(final Fork fork) {
4445
return new ChainConfig(
4546
fork,
@@ -60,6 +61,16 @@ public static final ChainConfig SEPOLIA_TESTCONFIG(final Fork fork) {
6061
LineaL1L2BridgeSharedConfiguration.TEST_DEFAULT);
6162
}
6263

64+
public static final ChainConfig DEVNET_TESTCONFIG(final Fork fork) {
65+
return new ChainConfig(
66+
fork,
67+
LINEA_SEPOLIA_CHAIN_ID, // TODO update me
68+
true,
69+
BigInteger.valueOf(LINEA_GAS_LIMIT_MINIMUM),
70+
BigInteger.valueOf(LINEA_GAS_LIMIT_MAXIMUM),
71+
LineaL1L2BridgeSharedConfiguration.TEST_DEFAULT);
72+
}
73+
6374
/**
6475
* Represents Linea mainnet prior to the block gas limit being enforced for the purposes of
6576
* running existing replay tests. As the name suggest, this is only intended for testing purposes.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright ConsenSys Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*
13+
* SPDX-License-Identifier: Apache-2.0
14+
*/
15+
16+
package net.consensys.linea.osakaReplayTests;
17+
18+
import static net.consensys.linea.ReplayTestTools.replay;
19+
import static net.consensys.linea.zktracer.ChainConfig.DEVNET_OSAKA_TESTCONFIG;
20+
21+
import net.consensys.linea.UnitTestWatcher;
22+
import net.consensys.linea.reporting.TracerTestBase;
23+
import org.junit.jupiter.api.Tag;
24+
import org.junit.jupiter.api.Test;
25+
import org.junit.jupiter.api.TestInfo;
26+
import org.junit.jupiter.api.extension.ExtendWith;
27+
28+
@Tag("replay")
29+
@ExtendWith(UnitTestWatcher.class)
30+
public class ExempleReplayTests extends TracerTestBase {
31+
32+
@Test
33+
void exempleOogModexp(TestInfo testInfo) {
34+
replay(DEVNET_OSAKA_TESTCONFIG, "osaka/oogModexp.json", testInfo);
35+
}
36+
}

0 commit comments

Comments
 (0)