Skip to content

Latest commit

 

History

History
83 lines (61 loc) · 2.75 KB

quickstart.md

File metadata and controls

83 lines (61 loc) · 2.75 KB

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
  }'

Development Setup

Install Java 21

Native Lib Prerequisites

Linux/MacOs

  • Install the relevant CGo compiler for your platform
  • Install the Go toolchain

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 tests

# Run all tests
./gradlew clean test

# Run only acceptance tests
./gradlew clean acceptanceTests

IntelliJ IDEA Setup

Enable Annotation Processing

  • Go to Settings | Build, Execution, Deployment | Compiler | Annotation Processors and tick the following checkbox:

    idea_enable_annotation_processing_setting.png


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:

Learn more about how Java annotation processing works here.


Install Optional Plugins

  • Install Spotless Gradle plugin to re-format through the IDE according to spotless configuration.

Learn more about available plugins.