A Linea tracing implementation for Besu based on an existing implementation in Go.
brew install openjdk@25
go install github.com/consensys/go-corset/cmd/go-corset@latestInstall pre-commit
pip install --user pre-commit
# For macOS users.
brew install pre-commitThen run pre-commit install to set up git hook scripts.
Used hooks can be found here.
NOTE
pre-commitaids in running checks (end of file fixing, markdown linting, linting, runs tests, json validation, etc.) before you perform your git commits.
# Run unit tests
./gradlew tracer:arithmetization:test
# Run replay tests
./gradlew tracer:arithmetization:fastReplayTests
# Run EVM test suite BlockchainTests
./gradlew tracer:reference-tests:referenceBlockchainTests
# Run single reference test via gradle, e.g for net.consensys.linea.generated.blockchain.BlockchainReferenceTest_339
./gradlew tracer:reference-tests:referenceBlockchainTests --tests "net.consensys.linea.generated.blockchain.BlockchainReferenceTest_339"-
Go to
Settings | Build, Execution, Deployment | Compiler | Annotation Processorsand tick the following checkbox:
NOTE
This setting is required to avoid IDE compilation errors because of the Lombok library used for code generation of boilerplate Java code such as:
- Getters/Setters (via
@Getter/@Setter)- Class log instances (via
@Slf4j)- Builder classes (via
@Builder)- Constructors ( via
@NoArgsConstructor/@RequiredArgsConstructor/@AllArgsConstructor)- etc.
Learn more about how Java annotation processing works here.
-
Install Checkstyle plugin and set IDE code reformatting to comply with the project's Checkstyle configuration:
- Install Spotless Gradle plugin to re-format through the IDE according to spotless configuration.
- JSON files can be debugged with the following command:
go-corset check --report <LT/JSON FILE> tracer/linea-constraints/zkevm_osaka.binSee here for more options when running go-corset directly.
Plugins are documented here.
Here are the steps for releasing a new version of the plugins:
- Update tracer/build.gradle property
targetReleaseVersionwith the release version number's expected tag in the format vX.Y.Z (e.g., v0.2.0 creates a release version 0.2.0). - Launch Linea tracer release Github action with the chosen tag
- Once the release workflow completes, check and update the release notes.
Note: Release tags (of the form v*) are protected and can only be pushed by organization and/or repository owners.

