Skip to content

Latest commit

 

History

History
128 lines (90 loc) · 5.61 KB

README.md

File metadata and controls

128 lines (90 loc) · 5.61 KB

Linea Besu Distribution

This project uses Gradle to manage dependencies, build tasks, and create distributions for linea-besu with all the necessary plugins to run a node for operators. The build process will also create a Docker image that can be used to run a node with a specific profile.

Run with Docker

Step 1. Download configuration files

You can start with the Docker Compose files located in the docker-compose directory.

Step 2. Update the Docker Compose file

In the docker-compose.yaml file, update the --p2p-host command to include your public IP address. For example:

--p2p-host=103.10.10.10

Update plugin-linea-l1-rpc-endpoint config with your L1 RPC endpoint. You should replace YOUR_L1_RPC_ENDPOINT with your endpoint, like:

--plugin-linea-l1-rpc-endpoint=https://mainnet.infura.io/v3/PROJECT_ID

This is required to enable RPC queries using "FINALIZED" block tag. Linea Finalization status is based on L1 RPC endpoint's response

Step 2. Start the Besu node

docker compose -f ./docker/docker-compose-basic-mainnet.yaml up

Alternatively, to run a node with a specific profile, set the BESU_PROFILE environment variable to the desired profile name:

docker run -e BESU_PROFILE=basic-mainnet consensys/linea-besu-package:latest

Run with a binary distribution

Step 1. Install Linea Besu from packaged binaries

Display Besu command line help to confirm installation:

bin/besu --help

Step 2. Start the Besu client

Note the YOUR_L1_RPC_ENDPOINT. You should replace this with your L1 RPC endpoint.

This is required to enable RPC queries using "FINALIZED" tag. Linea Finalization status is based on L1 RPC endpoint's response

bin/besu --profile=advanced-mainnet --plugin-linea-l1-rpc-endpoint=YOUR_L1_RPC_ENDPOINT

Build from source

The build process is driven by the following configuration file:

To execute the complete build process, which includes downloading, extracting, copying plugins, and creating distributions, use the following command:

./gradlew build

This command will generate two distribution files:

  • /build/distributions/linea-besu-package-<version>.tar.gz
  • /build/distributions/linea-besu-package-<version>.zip

To create the Docker image, run:

./gradlew distDocker

How-To Release

Releases are automated using GitHub Actions and are triggered by pushing a tag that matches the pattern 'v[0-9]+.[0-9]+.[0-9]+. (e.g., v1.0.0, v2.1.3)

The tag creation will draft a release and include the distribution artifact uploaded as an asset.

git tag -a 'v0.0.1' 5cf01f9  -m 'Release test'
git push upstream v1.0.0

Once the GitHub draft release is published, the Docker image will be created and pushed to the registry. Additionally, the latest tag will be updated to match this release.

Profiles

This project leverages Besu Profiles to enable multiple startup configurations for different node types.

During the build process, all TOML files located in the linea-besu/profiles directory will be incorporated into the package. These profiles are crucial for configuring the node, as each one specifies the necessary plugins and CLI options to ensure Besu operates correctly.

Each profile is a TOML file that outlines the plugins and CLI options to be used when starting the node. For example:

# required plugins to run a sequencer node
plugins=["LineaExtraDataPlugin","LineaEndpointServicePlugin","LineaTransactionPoolValidatorPlugin","LineaTransactionSelectorPlugin"]

# required options to configure the plugins above
plugin-linea-module-limit-file-path="config/trace-limits.mainnet.toml"
# Other required plugin options
# ...

# Other Besu options
# ...

Currently, the following profiles are available:

Profile Name Description Network
basic-mainnet Creates a basic Linea Node. Mainnet
advanced-mainnet Creates a Linea Node with linea_estimateGas and finalized tag plugin. Mainnet
basic-sepolia Creates a basic Linea Node. Sepolia
advanced-sepolia Creates a Linea Node with linea_estimateGas and finalized tag plugin. Sepolia