Files
linea-monorepo/linea-besu-package/README.md
jonesho 2bdd4833e4 Feat/integrate linea besu package (#900)
* initial commit

* feat: merge changes from linea-besu-package latest main

* feat: change locationn of linea-devnet workflow

* feat: add job outputs for build-and-upload-artifact

* fix: assemble-devnet path

* fix: linea-devnet.env path

* fix: linea-devnet.env path for versions.txt copy

* fix: linea-besu path for placing the package together to build the docker images

* feat: add tree command install

* feat: add tree command install

* feat: add tree command install

* feat: add tree command install

* feat: revise linea-besu-package pattern for docker image artifacts download

* fix: sed command

* fix: tracer-plugin-version job output variable name

* feat: revise echo for expected-traces-api-version-v2

* feat: build and push to dockerhub whenever e2e tests succeeded even for pull requests

* fix: right path for linea-besu-package in build-and-push-dockerhub

* feat: remove redundant build and just push image to dockerhub after e2e tests passed

* feat: add parameters for build the combined manifest

* Revert "feat: add parameters for build the combined manifest"

This reverts commit 83d315f4fec0ebb5f658a3c0a2f903b43991061c.

* Revert "feat: remove redundant build and just push image to dockerhub after e2e tests passed"

This reverts commit 7b0dcd7b75f1c86e142aca048b0616ecf71b6553.

* feat: revert to build and push after e2e tests passed

* feat: updated linea-devnet.env for latest versions

* feat: removed the use of filter commit changes

* Revert "feat: updated linea-devnet.env for latest versions"

This reverts commit 8bfeb979b9ddef92e7a7bebfacbe639adee95ef3.

* feat: revised output values

* feat: reuse besu package build test push

* fix: linea_env inputs name

* feat: refactoring out assemble actions with linea_env input

* fix: assemble name

* feat: refactoring and added mainnet and sepolia workflow

* feat: removed unnecessary files

* Revert "feat: removed unnecessary files"

This reverts commit a60d1df7df3a1b6d3f74b3b0735f8070320bc4b5.

* feat: removed unnecessary files

* feat: add besu run test in reuse-linea-besu-package-build-test-push workflow

* fix: step typo

* fix: step outputs files typo

* fix: run-test outcome check

* fix: use result instead of outcome

* feat: add mainnet linea-besu-package workflow

* feat: add filter commit changes to determine running e2e and push image

* feat: force e2e test run and push to dockerhub when triggered manually

* feat: skip filter changes if triggered manually

* fix: missing quote

* feat: add if always in build-test-push

* feat: revise release to manual workflow

* fix: move up checkout

* fix: remove cd release

* fix: cd into the correct folder linea-besu-package/linea-besu

* fix: added release_tag_prefix and correct path for plugin tar files

* fix: release permission and besu tar.gz location

* feat: temp disable sepolia and devnet, and add changelog

* feat: set git-push as false in Changelog Action

* feat: re-enable sepolia and devnet, cleanup commented lines, removed unnecessary files

* fix: latest tag condition

* feat: use env for linea_env for tags

* feat: use env for linea_env for tags

* fix: syntax error of echo append

* feat: revise release note

* feat: clean up commented codes and remove output workflow id

* feat: move besu container check script

* feat: add timestamp in the release tag

* fix: check against github event name for compile release note

* feat: publish release log for every dockerhub image push and update README

* fix: release tag issue and change log only for manual release

* feat: revise release to tag on commit

* feat: temp change on versions and add prerelease

* fix: mainnet staterecovery version

* feat: update README and detect config changes to push image

* feat: update env version file

* feat: revise README

* feat: update devnet version

* feat: update devnet version

* feat: update path matching

* feat: update to use same format of release tag across all releases

* feat: added ref name and event name in release note

* feat: added markdown highlight

* feat: fixed in-line code block

* fix: in-line code block

* fix: in-line code block

* feat: add workflow link in release note

* feat: fix workflow link in release note

* feat: fix workflow link in release note

* feat: fix workflow link in release note

* fix: markdown highlight

* feat: update commit tag for PR as last commit on branch instead of merge commit

* feat: remove env files and env workflows to achieve environment-agnostic

* feat: update versions env file for beta v2

* feat: move linea.env to versions.env and update workflow accordingly

* feat: update README.md

* feat: remove commented out if check workflow_dispatch

* feat: update README.md

* staterecovery: update version

* feat: updated input description and removed unnecessary files

* feat: make assemble action to release notes based on inputs

---------

Co-authored-by: Fluent Crafter <205769460+fluentcrafter@users.noreply.github.com>
2025-05-09 11:47:16 +08:00

6.0 KiB

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 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 ./linea-besu-package/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

Or use a specific release image tag

docker run -e BESU_PROFILE=basic-mainnet consensys/linea-besu-package:2.1.0-20250507100634-6dc9db9

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

  1. Make a branch with changes to linea-besu-package/versions.env as needed
  2. Create a PR for the branch
  3. Go to the actions tab to check if the workflow completed successfully
  4. Go to the releases page and you should find the corresponding release info along with the docker image tag

How-To Release

  1. Go to the actions tab and click on the workflow linea-besu-package-release for release with besu and plugin versions based on linea-besu-package/versions.env

  2. If release prefix is not given, LINEA_TRACER_PLUGIN_VERSION in the target versions.env file will be used, and the resultant release tag would be linea-besu-package-[releasePrefix]-[YYYYMMDDHHMMSS]-[shortenCommitHash] and the docker image tag would be [releasePrefix]-[YYYYMMDDHHMMSS]-[shortenCommitHash]

  3. Go to the releases page and you should find the corresponding release info along with the docker image tag

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-package/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 updater plugin. Mainnet
basic-sepolia Creates a basic Linea Node. Sepolia
advanced-sepolia Creates a Linea Node with linea_estimateGas and finalized tag updater plugin. Sepolia