Skip to content

Commit

Permalink
Merge branch 'arith-dev' into 1728-blockdata-calls-to-wcp-are-not-cou…
Browse files Browse the repository at this point in the history
…nted-for-trace-file-limit
  • Loading branch information
letypequividelespoubelles authored Jan 25, 2025
2 parents 3bfd95f + c23befc commit 36eb45e
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-go-corset/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ runs:

- name: Install Go Corset
shell: bash
run: go install github.com/consensys/go-corset/cmd/go-corset@77d304f
run: go install github.com/consensys/go-corset/cmd/go-corset@fe70003
2 changes: 1 addition & 1 deletion .github/workflows/reference-blockchain-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
REFERENCE_TESTS_PARALLELISM: 2
JAVA_OPTS: -Dorg.gradle.daemon=false
CORSET_FLAGS: disable
GOCORSET_FLAGS: -vw --ansi-escapes=false --report --air
GOCORSET_FLAGS: -b1024 -vw --ansi-escapes=false --report --air
ZKEVM_BIN: "zkevm_for_reference_tests.go.bin"
FAILED_TEST_JSON_DIRECTORY: ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/
FAILED_MODULE: ${{ inputs.failed_module || '' }}
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## beta-v1-2.0-rc2
* Use both traceStartBlock method calls wherever suitable (#1711)
* Fix/refacto blockdata files (#1724)
* update `go-corset` to latest version (#1732)
* Update Linea Besu to 25.1-develop-448d1a9 (#1722)
* fix: update `go-corset` to latest (#1726)
* feat: go-corset front end integration (#1689)
* Improve the copy local Besu distribution archive when the download fails (#1720)
* Fix Java jars publication and remove redundant upload to Cloudsmith (#1716)
* Update actions/upload-artifact to v4 since v3 is deprecated and breaks CI (#1718)
* Tweak publish task (#1713)
* fix cloudsmith publish
* fix location of distribution for release (#1710)
* Add actions/checkout to release.yml (#1708)
* update `release` action to install `corset` (#1706)


## beta-v1.2.0-rc0
* Fix: ignore `Trace.java` files and `GlobalConstants.java` + recognize 'beta*' as release tag (#1703)
* init chain id in zktracer. (#1702)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void traceEndConflation(WorldView state) {}

@Override
public void traceStartBlock(
BlockHeader blockHeader, BlockBody blockBody, Address miningBeneficiary) {
BlockHeader blockHeader, BlockBody blockBody, final Address miningBeneficiary) {
this.reaper.enterBlock(blockHeader, blockBody, miningBeneficiary);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ public void traceEndConflation(WorldView state) {
this.tracers.forEach(tracer -> tracer.traceEndConflation(state));
}

public void traceStartBlock(
final BlockHeader blockHeader, final BlockBody blockBody, final Address miningBeneficiary) {
this.tracers.forEach(
tracer -> tracer.traceStartBlock(blockHeader, blockBody, miningBeneficiary));
}

public void traceStartBlock(
final ProcessableBlockHeader processableBlockHeader, final Address miningBeneficiary) {
this.tracers.forEach(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,17 @@ public void traceStartBlock(
}
}

@Override
public void traceStartBlock(
final BlockHeader blockHeader, final BlockBody blockBody, final Address miningBeneficiary) {
try {
this.hub.traceStartBlock(blockHeader, miningBeneficiary);
this.debugMode.ifPresent(x -> x.traceStartBlock(blockHeader, blockBody, miningBeneficiary));
} catch (final Exception e) {
this.tracingExceptions.add(e);
}
}

@Override
public void traceEndBlock(final BlockHeader blockHeader, final BlockBody blockBody) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import net.consensys.linea.zktracer.opcode.OpCode;
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.DelegatingBytes;
import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.datatypes.Quantity;
import org.hyperledger.besu.datatypes.Transaction;
import org.hyperledger.besu.evm.frame.MessageFrame;
Expand Down Expand Up @@ -159,7 +160,10 @@ public void traceEndConflation() {
log.info("=== Stop conflation ===");
}

public void traceStartBlock(ProcessableBlockHeader processableBlockHeader, final BlockBody body) {
public void traceStartBlock(
ProcessableBlockHeader processableBlockHeader,
final BlockBody body,
final Address miningBeneficiary) {
if (!this.l.doBlock()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

import static net.consensys.linea.zktracer.MultiBlockUtils.multiBlocksTest;
import static net.consensys.linea.zktracer.module.blockdata.NextGasLimitScenario.*;
import static net.consensys.linea.zktracer.module.blockdata.Trace.*;
import static net.consensys.linea.zktracer.module.blockdata.Trace.GAS_LIMIT_MAXIMUM;
import static net.consensys.linea.zktracer.module.blockdata.Trace.GAS_LIMIT_MINIMUM;
import static net.consensys.linea.zktracer.module.constants.GlobalConstants.*;

import java.util.ArrayList;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
releaseVersion=beta-v1.2.0-rc0
releaseVersion=beta-v1.2.0-rc2
besuVersion=25.1-develop-448d1a9
besuArtifactGroup=io.consensys.linea-besu
distributionIdentifier=linea-tracer
Expand Down
10 changes: 5 additions & 5 deletions gradle/trace-files.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ tasks.register("blockdataEthereum", TraceFilesTask) {
group "Trace files generation"
dependsOn corsetExists
module = 'blockdata'
files = ['blockdata/constants.lisp', 'blockdata/columns.lisp', 'blockdata/processing/gaslimit/constants-ethereum.lisp']
files = ['constants/constants.lisp', 'blockdata/constants.lisp', 'blockdata/columns.lisp', 'blockdata/processing/gaslimit/ethereum.lisp']
}

tasks.register("blockdataLinea", TraceFilesTask) {
group "Trace files generation"
dependsOn corsetExists
module = 'blockdata'
files = ['blockdata/constants.lisp', 'blockdata/columns.lisp', 'blockdata/processing/gaslimit/constants-linea.lisp']
files = ['constants/constants.lisp', 'blockdata/constants.lisp', 'blockdata/columns.lisp', 'blockdata/processing/gaslimit/linea.lisp']
}

//
Expand Down Expand Up @@ -145,15 +145,15 @@ tasks.register('buildTracer') {
dependsOn 'mmu', 'blake2fmodexpdata', 'oob', 'exp', 'rlptxrcpt', 'rlpaddr', 'shakiradata', 'mxp', 'ecdata'
dependsOn 'txndata'
dependsOn 'constants'

def chain = System.getProperty('blockchain')
// Conditional dependsOn
if(chain == null || chain == "Linea") {
print("Building for Linea...\n")
dependsOn 'blockdataLinea'
dependsOn 'blockdataLinea'
} else if(chain == "Ethereum") {
dependsOn 'blockdataEthereum'
print("Building for Ethereum...\n")
print("Building for Ethereum...\n")
} else {
// Force build failure if unknown chain.
println("*** unknown target chain. Try '-Dblockchain=Linea' or '-Dblockchain=Ethereum'\n\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public static void executeTest(final GeneralStateTestCaseEipSpec spec) {

final ZkTracer zkTracer = new ZkTracer();
zkTracer.traceStartConflation(1);
zkTracer.traceStartBlock(blockHeader, blockHeader.getCoinbase());
zkTracer.traceStartBlock(blockHeader, blockBody, blockHeader.getCoinbase());

final TransactionProcessingResult result =
processor.processTransaction(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static void executeTest(
.blobGasPricePerGas(blockHeader.getExcessBlobGas().orElse(BlobGas.ZERO));

tracer.traceStartConflation(1);
tracer.traceStartBlock(blockHeader, blockHeader.getCoinbase());
tracer.traceStartBlock(blockHeader, blockBody, blockHeader.getCoinbase());
TransactionProcessingResult result = null;
for (Transaction transaction : blockBody.getTransactions()) {
// Several of the GeneralStateTests check if the transaction could potentially
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private static void executeFrom(
useCoinbaseAddressFromBlockHeader
? header.getCoinbase()
: CliqueHelpers.getProposerOfBlock(header);
tracer.traceStartBlock(header, miningBeneficiary);
tracer.traceStartBlock(header, body, miningBeneficiary);

for (TransactionSnapshot txs : blockSnapshot.txs()) {
final Transaction tx = txs.toTransaction();
Expand Down

0 comments on commit 36eb45e

Please sign in to comment.