Quickstart: running Linea Besu with plugins
- compile linea-plugins
gradlew installDist
- copy jar file to besu runtime plugins/ directory (where you will run Besu from, not where you're building Besu)
- add
LINEA
to besu config to enable the plugin RPC methods- rpc-http-api=["ADMIN","ETH","NET","WEB3","LINEA"]
- start besu (command line or from IDE) and you should see plugins registered at startup
- call the RPC endpoint eg:
curl --location --request POST 'http://localhost:8545' --data-raw '{
"jsonrpc": "2.0",
"method": "linea_estimateGas",
"params": [
"from": "0x73b2e0E54510239E22cC936F0b4a6dE1acf0AbdE",
"to": "0xBb977B2EE8a111D788B3477D242078d0B837E72b",
"value": "0x123"
],
"id": 1
}'
Linux/MacOs
- Install the relevant CGo compiler for your platform
- Install the Go toolchain
Windows
- Requirement Docker Desktop WSL 2 backend on Windows
On release native libs are built for all the supported platforms,
if you want to test this process locally run ./gradlew -PreleaseNativeLibs jar
,
jar is generated in sequencer/build/libs
.
# Run all tests
./gradlew clean test
# Run only acceptance tests
./gradlew clean acceptanceTests
-
Go to
Settings | Build, Execution, Deployment | Compiler | Annotation Processors
and 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 Spotless Gradle plugin to re-format through the IDE according to spotless configuration.
Learn more about available plugins.