Skip to content

Commit d41d156

Browse files
letypequividelespoubelleslorenzogentile404OlivierBBBfluentcrafterjonesho
authored
chore: update tracer to beta-v4.4-rc5 (Osaka) (#1774)
* chore: update tracer to beta-v4.4-rc1 (Osaka) Signed-off-by: F Bojarski <[email protected]> * update signature of ZkTracer / ZkCounter Signed-off-by: F Bojarski <[email protected]> * fix module name in toml files Signed-off-by: F Bojarski <[email protected]> * fix: more cleaning of toml files in AT test of sequencer Signed-off-by: F Bojarski <[email protected]> * fix ras typo Signed-off-by: François Bojarski <[email protected]> * all modexp are now accepted with Osaka Signed-off-by: F Bojarski <[email protected]> * clean: ras Signed-off-by: F Bojarski <[email protected]> * chore: update to rc2 Signed-off-by: F Bojarski <[email protected]> * update modules in kotlin file Signed-off-by: F Bojarski <[email protected]> * update BLOCK_HASH limits as it adds the historical blockhashes sinc release 4.4 Signed-off-by: F Bojarski <[email protected]> * rm AT for excluded modexp - they're now all accepted Signed-off-by: F Bojarski <[email protected]> * add tracer v4.4 limits files for coordinator Signed-off-by: F Bojarski <[email protected]> * substituted PRECOMPILE_BLS_C1_MEMBERSHIP_CHECKS with PRECOMPILE_BLS_C1_MEMBERSHIP_CHECKS * bump arithmetization release to `beta-v4.4-rc3` Signed-off-by: Olivier Bégassat <[email protected]> * Update arithmetization version to beta-v4.4-rc4 Signed-off-by: Olivier Bégassat <[email protected]> * fix (?): cursor comment to add PRECOMPILE_P256_VERIFY_EFFECTIVE_CALLS all in all there are: 27 occurrences of PRECOMPILE_BLS_POINT_EVALUATION_EFFECTIVE_CALLS 13 occurrences of PRECOMPILE_P256_VERIFY_EFFECTIVE_CALLS * revert module name change in trace-limits-v2 Signed-off-by: F Bojarski <[email protected]> * feat: precompiles limits as per Ivo Signed-off-by: F Bojarski <[email protected]> * fix module limits for AT Signed-off-by: F Bojarski <[email protected]> * partly revert 864a3dd Signed-off-by: F Bojarski <[email protected]> * keep old module in TracingModuleV2 Signed-off-by: F Bojarski <[email protected]> * really revert prover config changes Signed-off-by: F Bojarski <[email protected]> * fix rollback change in config Signed-off-by: F Bojarski <[email protected]> * feat: updated besu to 25.11.0-linea2 * fix(prover): format gofmt * migrate tests to Osaka * Revert "migrate tests to Osaka" This reverts commit 31b0a07. * feat: update versions.env to trigger linea-besu-pkg * Reapply "migrate tests to Osaka" This reverts commit 663d382. * Update arithmetization and besu versions arithmetization: `beta-v4.4-rc5` besu: `25.22.0-linea3` both alined with tracer repo Signed-off-by: Olivier Bégassat <[email protected]> * 1791 coordinator support for prague and osaka traces modules (#1792) * feat: coordinator to support both traces-limits v2 and v4 * improv traces counters parser (#1794) * improv traces counters parser --------- Co-authored-by: Fluent Crafter <[email protected]> * feat: update local stack to use v4.4 traces-limits file and bump shomei plugin * feat: add check-and-tag-images as needs in run-e2e-tests * Revert "Reapply "migrate tests to Osaka"" This reverts commit 75e96d7. * Update version numbers in versions.env Signed-off-by: Olivier Bégassat <[email protected]> * Reapply "Reapply "migrate tests to Osaka"" This reverts commit d7a65dd. * ✨ feat: upgrade Engine API service to V5 methods (#1797) * ✨ feat: upgrade Engine API service to V5 methods - Update engine_getPayload to use V5 endpoint - Update engine_newPayload to use V5 endpoint with blockAccessList - Add blockAccessList field support for V5 payload requests - Comment out V4 method implementation for reference * 🐛 fix: revert engine_newPayload to V4 due to unsupported V5 - Change createNewPayloadRequestV5 back to createNewPayloadRequestV4 - Uncomment V4 implementation and comment out V5 implementation - Besu 25.11.0-linea3 does not support engine_newPayloadV5 endpoint * empty * spotlessApply * feat: bump coordinator and besu nodes images to v4.4 * 🐛 fix: update expected upfront cost in passingStateOverridesWorks test Update the expected upfront cost value from 0x2094ddc28d to 0x1234000001 to match the new transaction gas limit calculation introduced in Osaka fork (EIP-7825). The upfront cost is now calculated as gasPrice * gasLimit where gasLimit is approximately 16,777,216 (0x1000000). * spotlessApply * fix(prover): revert PRECOMPILE_ECADD_EFFECTIVE_CALLS to 256 (same as Prague) * test: tmp disabled a test Signed-off-by: F Bojarski <[email protected]> * Updates `EstimateGasModuleLimitOverflowLimitlessTest` to test BLS12_MAP_FP_TO_G1 precompile overflow detection instead of ModExp (#1801) * did deployBLS12_MAP_FP_TO_G1 * ✅ test: update EstimateGasModuleLimitOverflowLimitlessTest to use BLS12_MAP_FP_TO_G1 precompile - Replace ModExp test inputs with BLS12_MAP_FP_TO_G1 test cases - Use valid left-padded inputs from Besu test resources - Update assertion to check PRECOMPILE_BLS_MAP_FP_TO_G1_EFFECTIVE_CALLS overflow * spotlessApply * removed @disabled for EstimateGasModuleLimitOverflowLimitlessTest --------- Signed-off-by: F Bojarski <[email protected]> Signed-off-by: François Bojarski <[email protected]> Signed-off-by: Olivier Bégassat <[email protected]> Co-authored-by: Lorenzo Gentile <[email protected]> Co-authored-by: Olivier Bégassat <[email protected]> Co-authored-by: Fluent Crafter <[email protected]> Co-authored-by: Olivier Bégassat <[email protected]> Co-authored-by: jonesho <[email protected]> Co-authored-by: gusiri <[email protected]> Co-authored-by: amkCha <[email protected]> Co-authored-by: jonesho <[email protected]> Co-authored-by: kyzooghost <[email protected]>
1 parent a89790d commit d41d156

File tree

69 files changed

+628
-572
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+628
-572
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ jobs:
228228
run-e2e-tests:
229229
needs:
230230
[
231+
check-and-tag-images,
231232
docker-build,
232233
get-has-changes-requiring-e2e-testing,
233234
manual-docker-build-and-e2e-tests,

besu-plugins/linea-sequencer/acceptance-tests/src/test/java/linea/plugin/acc/test/BlobTransactionDenialTest.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,11 @@
2828
* Tests that verify the LineaTransactionValidationPlugin correctly rejects BLOB transactions from
2929
* being executed
3030
*/
31-
public class BlobTransactionDenialTest extends LineaPluginTestBasePrague {
31+
public class BlobTransactionDenialTest extends LineaPluginPoSTestBase {
3232
private Web3j web3j;
3333
private Credentials credentials;
3434
private String recipient;
3535

36-
@Override
37-
protected String getGenesisFileTemplatePath() {
38-
// We cannot use clique-prague-zero-blobs because `config.blobSchedule.prague.max = 0` will
39-
// block all blob txs
40-
return "/clique/clique-prague-one-blob.json.tpl";
41-
}
42-
4336
@Override
4437
@BeforeEach
4538
public void setup() throws Exception {

besu-plugins/linea-sequencer/acceptance-tests/src/test/java/linea/plugin/acc/test/BlockGasLimitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import org.web3j.tx.TransactionManager;
2020

2121
/** This class tests the block gas limit functionality of the plugin. */
22-
public class BlockGasLimitTest extends LineaPluginTestBasePrague {
22+
public class BlockGasLimitTest extends LineaPluginPoSTestBase {
2323

2424
private static final BigInteger GAS_PRICE = BigInteger.TEN.pow(9);
2525
private static final BigInteger VALUE = BigInteger.TWO;

besu-plugins/linea-sequencer/acceptance-tests/src/test/java/linea/plugin/acc/test/EIP7702TransactionDenialTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* Tests that verify the LineaTransactionValidationPlugin correctly rejects EIP7702 DELEGATE_CODE
2929
* transactions from being executed
3030
*/
31-
public class EIP7702TransactionDenialTest extends LineaPluginTestBasePrague {
31+
public class EIP7702TransactionDenialTest extends LineaPluginPoSTestBase {
3232
private Web3j web3j;
3333
private Credentials credentials;
3434
private String recipient;

besu-plugins/linea-sequencer/acceptance-tests/src/test/java/linea/plugin/acc/test/EcDataLimitsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import org.web3j.protocol.core.methods.response.EthSendTransaction;
3535
import org.web3j.utils.Numeric;
3636

37-
public class EcDataLimitsTest extends LineaPluginTestBasePrague {
37+
public class EcDataLimitsTest extends LineaPluginPoSTestBase {
3838

3939
@Override
4040
public List<String> getTestCliOptions() {

besu-plugins/linea-sequencer/acceptance-tests/src/test/java/linea/plugin/acc/test/ExcludedPrecompilesLimitlessTest.java

Lines changed: 3 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
import java.util.Arrays;
1717
import java.util.List;
1818
import linea.plugin.acc.test.tests.web3j.generated.ExcludedPrecompiles;
19-
import org.apache.tuweni.bytes.Bytes;
2019
import org.apache.tuweni.bytes.Bytes32;
21-
import org.hyperledger.besu.tests.acceptance.dsl.account.Account;
2220
import org.hyperledger.besu.tests.acceptance.dsl.account.Accounts;
2321
import org.junit.jupiter.api.Test;
2422
import org.web3j.abi.datatypes.generated.Bytes8;
@@ -31,7 +29,7 @@
3129
import org.web3j.tx.gas.DefaultGasProvider;
3230
import org.web3j.utils.Numeric;
3331

34-
public class ExcludedPrecompilesLimitlessTest extends LineaPluginTestBasePrague {
32+
public class ExcludedPrecompilesLimitlessTest extends LineaPluginPoSTestBase {
3533
private static final BigInteger GAS_LIMIT = DefaultGasProvider.GAS_LIMIT;
3634
private static final BigInteger GAS_PRICE = DefaultGasProvider.GAS_PRICE;
3735

@@ -73,12 +71,12 @@ record InvalidCall(
7371
excludedPrecompiles
7472
.callRIPEMD160("I am not allowed here".getBytes(StandardCharsets.UTF_8))
7573
.encodeFunctionCall(),
76-
"Tx 0xe4648fd59d4289e59b112bf60931336440d306c85c2aac5a8b0c64ab35bc55b7 line count for module PRECOMPILE_RIPEMD_BLOCKS=2147483647 is above the limit 671"),
74+
"Tx 0xe4648fd59d4289e59b112bf60931336440d306c85c2aac5a8b0c64ab35bc55b7 line count for module PRECOMPILE_RIPEMD_BLOCKS=21 is above the limit 0"),
7775
new InvalidCall(
7876
Accounts.GENESIS_ACCOUNT_TWO_PRIVATE_KEY,
7977
0,
8078
encodedCallBlake2F(excludedPrecompiles),
81-
"Tx 0x9f457b1b5244b03c54234f7f9e8225d4253135dd3c99a46dc527d115e7ea5dac line count for module PRECOMPILE_BLAKE_EFFECTIVE_CALLS=2147483647 is above the limit 0")
79+
"Tx 0x9f457b1b5244b03c54234f7f9e8225d4253135dd3c99a46dc527d115e7ea5dac line count for module PRECOMPILE_BLAKE_EFFECTIVE_CALLS=1 is above the limit 0")
8280
};
8381

8482
final var invalidTxHashes =
@@ -136,78 +134,6 @@ record InvalidCall(
136134
.forEach(invalidCall -> assertThat(log).contains(invalidCall.expectedTraceLog));
137135
}
138136

139-
@Test
140-
public void invalidModExpCallsAreNotMined() throws Exception {
141-
final var modExp = deployModExp();
142-
143-
final var modExpSenders = new Account[3];
144-
final var foundTxHashes = new String[3];
145-
for (int i = 0; i < 3; i++) {
146-
modExpSenders[i] = accounts.createAccount("sender" + i);
147-
foundTxHashes[i] =
148-
accountTransactions
149-
.createTransfer(
150-
accounts.getSecondaryBenefactor(), modExpSenders[i], 1, BigInteger.valueOf(i))
151-
.execute(minerNode.nodeRequests())
152-
.toHexString();
153-
}
154-
Arrays.stream(foundTxHashes)
155-
.forEach(
156-
fundTxHash -> minerNode.verify(eth.expectSuccessfulTransactionReceipt(fundTxHash)));
157-
158-
final Bytes[][] invalidInputs = {
159-
{Bytes.fromHexString("0000000000000000000000000000000000000000000000000000000000000201")},
160-
{
161-
Bytes.fromHexString("00000000000000000000000000000000000000000000000000000000000003"),
162-
Bytes.fromHexString("ff")
163-
},
164-
{
165-
Bytes.fromHexString("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),
166-
Bytes.fromHexString("00000000000000000000000000000000000000000000000000000000000003"),
167-
Bytes.fromHexString("ff")
168-
}
169-
};
170-
171-
for (int i = 0; i < invalidInputs.length; i++) {
172-
final var invalidCallTxHashes = new String[invalidInputs[i].length];
173-
for (int j = 0; j < invalidInputs[i].length; j++) {
174-
175-
// use always the same nonce since we expect this tx not to be mined
176-
final var mulmodOverflow =
177-
encodedCallModExp(modExp, modExpSenders[j], 0, invalidInputs[i][j]);
178-
179-
final Web3j web3j = minerNode.nodeRequests().eth();
180-
final EthSendTransaction resp =
181-
web3j.ethSendRawTransaction(Numeric.toHexString(mulmodOverflow)).send();
182-
invalidCallTxHashes[j] = resp.getTransactionHash();
183-
}
184-
185-
// transfer used as sentry to ensure a new block is mined without the invalid modexp call
186-
final var transferTxHash =
187-
accountTransactions
188-
.createTransfer(
189-
accounts.getPrimaryBenefactor(),
190-
accounts.getSecondaryBenefactor(),
191-
1,
192-
BigInteger.valueOf(i + 1))
193-
.execute(minerNode.nodeRequests());
194-
195-
// sentry is mined and the invalid modexp txs are not
196-
minerNode.verify(eth.expectSuccessfulTransactionReceipt(transferTxHash.toHexString()));
197-
final var blockLog = getAndResetLog();
198-
Arrays.stream(invalidCallTxHashes)
199-
.forEach(
200-
invalidCallTxHash -> {
201-
minerNode.verify(eth.expectNoTransactionReceipt(invalidCallTxHash));
202-
assertThat(blockLog)
203-
.contains(
204-
"Tx "
205-
+ invalidCallTxHash
206-
+ " line count for module PRECOMPILE_MODEXP_EFFECTIVE_CALLS=2147483647 is above the limit 4, removing from the txpool");
207-
});
208-
}
209-
}
210-
211137
private String encodedCallBlake2F(final ExcludedPrecompiles excludedPrecompiles) {
212138
return excludedPrecompiles
213139
.callBlake2f(

besu-plugins/linea-sequencer/acceptance-tests/src/test/java/linea/plugin/acc/test/ExcludedPrecompilesTest.java

Lines changed: 1 addition & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
import java.util.Arrays;
1717
import java.util.List;
1818
import linea.plugin.acc.test.tests.web3j.generated.ExcludedPrecompiles;
19-
import org.apache.tuweni.bytes.Bytes;
2019
import org.apache.tuweni.bytes.Bytes32;
21-
import org.hyperledger.besu.tests.acceptance.dsl.account.Account;
2220
import org.hyperledger.besu.tests.acceptance.dsl.account.Accounts;
2321
import org.junit.jupiter.api.Test;
2422
import org.web3j.abi.datatypes.generated.Bytes8;
@@ -31,7 +29,7 @@
3129
import org.web3j.tx.gas.DefaultGasProvider;
3230
import org.web3j.utils.Numeric;
3331

34-
public class ExcludedPrecompilesTest extends LineaPluginTestBasePrague {
32+
public class ExcludedPrecompilesTest extends LineaPluginPoSTestBase {
3533
private static final BigInteger GAS_LIMIT = DefaultGasProvider.GAS_LIMIT;
3634
private static final BigInteger GAS_PRICE = DefaultGasProvider.GAS_PRICE;
3735

@@ -130,78 +128,6 @@ record InvalidCall(
130128
.forEach(invalidCall -> assertThat(log).contains(invalidCall.expectedTraceLog));
131129
}
132130

133-
@Test
134-
public void invalidModExpCallsAreNotMined() throws Exception {
135-
final var modExp = deployModExp();
136-
137-
final var modExpSenders = new Account[3];
138-
final var foundTxHashes = new String[3];
139-
for (int i = 0; i < 3; i++) {
140-
modExpSenders[i] = accounts.createAccount("sender" + i);
141-
foundTxHashes[i] =
142-
accountTransactions
143-
.createTransfer(
144-
accounts.getSecondaryBenefactor(), modExpSenders[i], 1, BigInteger.valueOf(i))
145-
.execute(minerNode.nodeRequests())
146-
.toHexString();
147-
}
148-
Arrays.stream(foundTxHashes)
149-
.forEach(
150-
fundTxHash -> minerNode.verify(eth.expectSuccessfulTransactionReceipt(fundTxHash)));
151-
152-
final Bytes[][] invalidInputs = {
153-
{Bytes.fromHexString("0000000000000000000000000000000000000000000000000000000000000201")},
154-
{
155-
Bytes.fromHexString("00000000000000000000000000000000000000000000000000000000000003"),
156-
Bytes.fromHexString("ff")
157-
},
158-
{
159-
Bytes.fromHexString("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),
160-
Bytes.fromHexString("00000000000000000000000000000000000000000000000000000000000003"),
161-
Bytes.fromHexString("ff")
162-
}
163-
};
164-
165-
for (int i = 0; i < invalidInputs.length; i++) {
166-
final var invalidCallTxHashes = new String[invalidInputs[i].length];
167-
for (int j = 0; j < invalidInputs[i].length; j++) {
168-
169-
// use always the same nonce since we expect this tx not to be mined
170-
final var mulmodOverflow =
171-
encodedCallModExp(modExp, modExpSenders[j], 0, invalidInputs[i][j]);
172-
173-
final Web3j web3j = minerNode.nodeRequests().eth();
174-
final EthSendTransaction resp =
175-
web3j.ethSendRawTransaction(Numeric.toHexString(mulmodOverflow)).send();
176-
invalidCallTxHashes[j] = resp.getTransactionHash();
177-
}
178-
179-
// transfer used as sentry to ensure a new block is mined without the invalid modexp call
180-
final var transferTxHash =
181-
accountTransactions
182-
.createTransfer(
183-
accounts.getPrimaryBenefactor(),
184-
accounts.getSecondaryBenefactor(),
185-
1,
186-
BigInteger.valueOf(i + 1))
187-
.execute(minerNode.nodeRequests());
188-
189-
// sentry is mined and the invalid modexp txs are not
190-
minerNode.verify(eth.expectSuccessfulTransactionReceipt(transferTxHash.toHexString()));
191-
final var blockLog = getAndResetLog();
192-
Arrays.stream(invalidCallTxHashes)
193-
.forEach(
194-
invalidCallTxHash -> {
195-
minerNode.verify(eth.expectNoTransactionReceipt(invalidCallTxHash));
196-
assertThat(blockLog)
197-
.contains(
198-
"Tx "
199-
+ invalidCallTxHash
200-
+ " line count for module PRECOMPILE_MODEXP_EFFECTIVE_CALLS=2147483647 is above the limit 10000, removing from the txpool");
201-
});
202-
}
203-
}
204-
205131
private String encodedCallBlake2F(final ExcludedPrecompiles excludedPrecompiles) {
206132
return excludedPrecompiles
207133
.callBlake2f(
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
// This file initializes a Besu node configured for the Prague fork and makes it available to
7474
// acceptance tests.
7575
@Slf4j
76-
public abstract class LineaPluginTestBasePrague extends LineaPluginTestBase {
76+
public abstract class LineaPluginPoSTestBase extends LineaPluginTestBase {
7777
private EngineAPIService engineApiService;
7878
protected ObjectMapper mapper;
7979

@@ -89,7 +89,7 @@ public abstract class LineaPluginTestBasePrague extends LineaPluginTestBase {
8989

9090
// Override this in subclasses to use a different genesis file template
9191
protected String getGenesisFileTemplatePath() {
92-
return "/clique/clique-prague-no-blobs.json.tpl";
92+
return "/clique/clique-to-pos.json.tpl";
9393
}
9494

9595
@BeforeEach

besu-plugins/linea-sequencer/acceptance-tests/src/test/java/linea/plugin/acc/test/LineaPluginTestBase.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,17 @@ protected ModExp deployModExp() throws Exception {
300300
return deploy.send();
301301
}
302302

303+
protected BLS12_MAP_FP_TO_G1 deployBLS12_MAP_FP_TO_G1() throws Exception {
304+
final Web3j web3j = minerNode.nodeRequests().eth();
305+
final Credentials credentials = Credentials.create(Accounts.GENESIS_ACCOUNT_ONE_PRIVATE_KEY);
306+
TransactionManager txManager =
307+
new RawTransactionManager(web3j, credentials, CHAIN_ID, createReceiptProcessor(web3j));
308+
309+
final RemoteCall<BLS12_MAP_FP_TO_G1> deploy =
310+
BLS12_MAP_FP_TO_G1.deploy(web3j, txManager, new DefaultGasProvider());
311+
return deploy.send();
312+
}
313+
303314
protected EcPairing deployEcPairing() throws Exception {
304315
final Web3j web3j = minerNode.nodeRequests().eth();
305316
final Credentials credentials = Credentials.create(Accounts.GENESIS_ACCOUNT_ONE_PRIVATE_KEY);

besu-plugins/linea-sequencer/acceptance-tests/src/test/java/linea/plugin/acc/test/ModExpLimitsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.web3j.protocol.core.methods.response.EthSendTransaction;
2525
import org.web3j.utils.Numeric;
2626

27-
public class ModExpLimitsTest extends LineaPluginTestBasePrague {
27+
public class ModExpLimitsTest extends LineaPluginPoSTestBase {
2828

2929
@Override
3030
public List<String> getTestCliOptions() {

0 commit comments

Comments
 (0)