Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel-Trintinalia <[email protected]>
  • Loading branch information
Gabriel-Trintinalia committed Apr 23, 2024
1 parent 4eed40b commit f338ab1
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 59 deletions.
9 changes: 8 additions & 1 deletion sequencer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies {
compileOnly 'com.google.auto.service:auto-service'
compileOnly 'com.google.auto.service:auto-service-annotations'

implementation 'net.consensys.linea.zktracer:arithmetization:0.1.4-20240421.234102-3'

implementation "${besuArtifactGroup}:evm"
implementation "${besuArtifactGroup}:plugin-api"
implementation "${besuArtifactGroup}:besu-datatypes"
Expand Down Expand Up @@ -69,6 +69,9 @@ dependencies {
testImplementation "${besuArtifactGroup}.internal:core:${besuVersion}"
testImplementation "${besuArtifactGroup}.internal:rlp:${besuVersion}"
testImplementation "${besuArtifactGroup}.internal:core:${besuVersion}"
implementation ('net.consensys.linea.zktracer:arithmetization:0.1.4-20240421.234102-3'){
transitive = false
}
}

configurations {
Expand All @@ -79,3 +82,7 @@ configurations {

apply from: rootProject.file("gradle/dist.gradle")
apply from: rootProject.file("gradle/publishing.gradle")

jar {
zip64=true
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public CorsetValidator.Result verifyTraceOfBlock(
} catch (final Exception e) {
throw new TraceVerificationException(blockHash, e.getMessage());
} finally {
zkTracer.traceEndConflation();
// zkTracer.traceEndConflation();
}

for (final TransactionTraceResult transactionTraceResult :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

import lombok.extern.slf4j.Slf4j;
import net.consensys.linea.continoustracing.exception.InvalidTraceHandlerException;
import net.consensys.linea.corset.CorsetValidator;
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.plugin.data.BlockHeader;


@Slf4j
public class TraceFailureHandler {
final SlackNotificationService slackNotificationService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Capture execute(final PluginRpcRequest request) {
tracer.setWorld(worldStateBeforeTracing);
tracer.traceStartConflation(toBlock - fromBlock + 1);
},
worldStateAfterTracing -> tracer.traceEndConflation(),
tracer::traceEndConflation,
tracer);
log.info("[CAPTURE] capture for {}-{} computed in {}", fromBlock, toBlock, sw);
return new Capture(tracer.toJson());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Counters execute(final PluginRpcRequest request) {
blockNumber,
blockNumber,
worldStateBeforeTracing -> tracer.traceStartConflation(1),
worldStateAfterTracing -> tracer.traceEndConflation(),
tracer::traceEndConflation,
tracer);

return tracer.getModulesLineCount();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public TraceFile execute(final PluginRpcRequest request) {
fromBlock,
toBlock,
worldStateBeforeTracing -> tracer.traceStartConflation(toBlock - fromBlock + 1),
worldStateAfterTracing -> tracer.traceEndConflation(),
tracer::traceEndConflation,
tracer);
log.info("[TRACING] trace for {}-{} computed in {}", fromBlock, toBlock, sw);
sw.reset().start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@ public Optional<String> validateTransaction(
if (simulationResult.isInvalid()) {
return Optional.of(
"Invalid transaction"
+ simulationResult.getInvalidReason().map(ir -> ": " + ir).orElse(""));
+ simulationResult.result().getInvalidReason().map(ir -> ": " + ir).orElse(""));
}
if (!simulationResult.isSuccessful()) {
return Optional.of(
"Reverted transaction"
+ simulationResult
.result()
.getRevertReason()
.map(rr -> ": " + rr.toHexString())
.orElse(""));
Expand Down
42 changes: 0 additions & 42 deletions sequencer/src/main/resources/spillings.toml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import net.consensys.linea.config.LineaTracerConfiguration;
import net.consensys.linea.config.LineaTransactionPoolValidatorConfiguration;
import net.consensys.linea.modulelimit.ModuleLineCountValidator;
import net.consensys.linea.sequencer.txselection.selectors.TraceLineLimitTransactionSelectorTest;
import net.consensys.linea.txselection.selectors.TraceLineLimitTransactionSelectorTest;
import org.apache.tuweni.bytes.Bytes;
import org.bouncycastle.asn1.sec.SECNamedCurves;
import org.bouncycastle.asn1.x9.X9ECParameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package net.consensys.linea.sequencer.txselection.selectors;
package net.consensys.linea.txselection.selectors;

import static net.consensys.linea.txselection.LineaTransactionSelectionResult.BLOCK_CALLDATA_OVERFLOW;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hyperledger.besu.plugin.data.TransactionSelectionResult.SELECTED;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import net.consensys.linea.txselection.selectors.MaxBlockCallDataTransactionSelector;
import org.apache.tuweni.bytes.Bytes;
import org.hyperledger.besu.datatypes.PendingTransaction;
import org.hyperledger.besu.datatypes.Transaction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package net.consensys.linea.sequencer.txselection.selectors;
package net.consensys.linea.txselection.selectors;

import static net.consensys.linea.txselection.LineaTransactionSelectionResult.TX_GAS_EXCEEDS_USER_MAX_BLOCK_GAS;
import static net.consensys.linea.txselection.LineaTransactionSelectionResult.TX_TOO_LARGE_FOR_REMAINING_USER_GAS;
Expand All @@ -21,7 +21,6 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import net.consensys.linea.txselection.selectors.MaxBlockGasTransactionSelector;
import org.hyperledger.besu.datatypes.PendingTransaction;
import org.hyperledger.besu.datatypes.Transaction;
import org.hyperledger.besu.plugin.data.TransactionProcessingResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package net.consensys.linea.sequencer.txselection.selectors;
package net.consensys.linea.txselection.selectors;

import static net.consensys.linea.txselection.LineaTransactionSelectionResult.TX_UNPROFITABLE;
import static net.consensys.linea.txselection.LineaTransactionSelectionResult.TX_UNPROFITABLE_MIN_GAS_PRICE_NOT_DECREASED;
Expand All @@ -27,7 +27,6 @@
import net.consensys.linea.config.LineaProfitabilityConfiguration;
import net.consensys.linea.config.LineaTransactionSelectorCliOptions;
import net.consensys.linea.config.LineaTransactionSelectorConfiguration;
import net.consensys.linea.txselection.selectors.ProfitableTransactionSelector;
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import org.bouncycastle.crypto.digests.KeccakDigest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package net.consensys.linea.sequencer.txselection.selectors;
package net.consensys.linea.txselection.selectors;

import com.google.common.base.Stopwatch;
import org.hyperledger.besu.datatypes.PendingTransaction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package net.consensys.linea.sequencer.txselection.selectors;
package net.consensys.linea.txselection.selectors;

import static net.consensys.linea.txselection.LineaTransactionSelectionResult.TX_MODULE_LINE_COUNT_OVERFLOW;
import static net.consensys.linea.txselection.LineaTransactionSelectionResult.TX_MODULE_LINE_COUNT_OVERFLOW_CACHED;
Expand All @@ -31,7 +31,6 @@
import net.consensys.linea.config.LineaTracerConfiguration;
import net.consensys.linea.config.LineaTransactionSelectorConfiguration;
import net.consensys.linea.modulelimit.ModuleLineCountValidator;
import net.consensys.linea.txselection.selectors.TraceLineLimitTransactionSelector;
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import org.hyperledger.besu.datatypes.Address;
Expand Down
1 change: 1 addition & 0 deletions sequencer/src/test/resources/sequencer/line-limits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ADD = 524286
BIN = 262128
BIN_RT = 262144
EC_DATA = 4084
EXP = 32760
EXT = 32760
HUB = 2097150
INSTRUCTION_DECODER = 512 # Ugly hack, TODO: @franklin
Expand Down

0 comments on commit f338ab1

Please sign in to comment.