Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for enabling linea-sequencer plugin #680

Closed
wants to merge 11 commits into from
2 changes: 1 addition & 1 deletion docs/architecture/stack/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Linea software
image: /img/socialCards/the-linea-stack.jpg
image: /img/socialCards/linea-software.jpg
---

import DocCardList from "@theme/DocCardList";
Expand Down
14 changes: 9 additions & 5 deletions docs/developers/guides/run-a-node/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ import DocCardList from "@theme/DocCardList";

There are no financial incentives for running a Linea node, but it does allow you to:

- Call the Linea JSON RPC API methods and submit transactions to the mempool without relying on an RPC provider.
- Have a local copy of the Linea blockchain. This view of the state is "trusted" until the transaction, or the
block that transaction is in, has been finalized on L1.
- Call the Linea JSON RPC API methods and submit transactions to the mempool without relying on an
RPC provider. Note that using [Linea-specific API methods](/developers/reference/api) such as
`linea_estimateGas` requires Besu and [the `linea-sequencer` plugin](/developers/guides/run-a-node/linea-sequencer).
- Have a local copy of the Linea blockchain. This view of the state is "trusted" until the
transaction, or the block that transaction is in, has been finalized on L1. You don't need to
install additional plugins to follow chain activity.

:::note

Running a sequencer node is currently not possible and there is no option to vote on blocks as part of the consensus
mechanism or [fork-choice](https://eth2book.info/capella/part3/forkchoice/#whats-a-fork-choice) like on Ethereum.
Running a sequencer node is currently not possible and there is no option to vote on blocks as part
of the consensus mechanism or [fork-choice](https://eth2book.info/capella/part3/forkchoice/#whats-a-fork-choice)
like on Ethereum.

:::

Expand Down
37 changes: 37 additions & 0 deletions docs/developers/guides/run-a-node/linea-sequencer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Install the linea-sequencer plugin for Besu
description: How to install and configure the linea-sequencer plugin for Besu
image: /img/socialCards/install-the-linea-sequencer-plugin-for-besu.jpg
---

# Install `linea-sequencer`
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved

If you want to run a Linea node and use it to interact with the blockchain, rather than running a
'follower' node that simply keeps a local copy of the chain, then you will need to install the
`linea-sequencer` plugin to ensure full functionality. This plugin only works with Besu.

Specifically, the Linea-specific API methods documented in our [reference section](/developers/reference/api)
will not work unless you install and configure `linea-sequencer`.

## Steps

1. From the [`linea-sequencer` releases page](https://github.com/Consensys/linea-sequencer/releases),
download the `.jar` file for the latest release.

2. In the local Besu runtime directory (where you will run Besu from), create a directory called
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"In the root of the Besu installation directory"?

Copy link
Collaborator Author

@jlwllmr jlwllmr Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the original instructions (https://github.com/Consensys/linea-sequencer/blob/main/docs/quickstart.md) stated explicitly the runtime directory, "not where you're building Besu", so I tried to reflect this -- unsure if I did so correctly. I.e. unsure if the installation directory == runtime directory?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, the Besu docs is also slightly inconsistent as to where the plugin goes: https://besu.hyperledger.org/development/private-networks/concepts/plugins#install-plugins

So I'm a bit confused. I'm sure users will be too.

`plugins` and place the `.jar` file there.

3. In the Besu configuration file (called `config-mainnet.toml` if you downloaded the [file from
our instructions](pathname:///files/besu/config-mainnet.toml)), add `LINEA` to the list of RPC
methods:

```
rpc-http-api=["ADMIN","NET","ETH","WEB3","TXPOOL","LINEA"]
```

Alternatively, you can add `LINEA` to this list in the command line by running:
```
--rpc-http-api=ADMIN,NET,ETH,WEB3,TXPOOL,LINEA
```

When you run Besu, you will see the `linea-sequencer` plugin registered during startup.
17 changes: 15 additions & 2 deletions docs/developers/guides/run-a-node/use-binary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ Download the genesis file and Besu configuration file.

</Tabs>

:::warning[Important: enable linea-sequencer]

You must install and enable the `linea-sequencer` Besu plugin if you are offering RPC services or
hosting nodes. Enabling the plugin is a requirement for using certain API methods, such as
[`linea_estimateGas`](/developers/reference/api/linea-estimategas).

Please see our [instructions for installing the plugin](./linea-sequencer).

If you are running a node to follow the chain activity, rather than submit transactions, you don't
need to install `linea-sequencer`.

:::

jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
### Step 3. Define disk space volume (optional) {#disk-space-besu}

Define a volume size appropriate to your expected usage. As of March 20 2024, Besu nodes use:
Expand All @@ -72,9 +85,9 @@ Ensure you mount the Besu `data-path` to the custom volume when you start the no

<VolumeCreation />

### Step 4. Configure the Besu configuration file.
### Step 4. Configure the Besu configuration file

In your Besu configuration file (`config-mainnet.toml`, `config-goerli.toml`, or `config-sepolia.toml`), configure
In your Besu configuration file (`config-mainnet.toml` or `config-sepolia.toml`), configure
the following options:

- Set `data-path` to the location you want to store your data.
Expand Down
Binary file modified static/files/besu/besu-mainnet.zip
Binary file not shown.
Binary file modified static/files/besu/besu-sepolia.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion static/files/besu/config-mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ data-path="/path/to/your/directory"


# Sync mode and data layer implementation
sync-mode="X_SNAP"
sync-mode="SNAP"
data-storage-format="BONSAI"
Xsnapsync-synchronizer-flat-db-healing-enabled=true

Expand Down
2 changes: 1 addition & 1 deletion static/files/besu/config-sepolia.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ data-path="/path/to/your/directory"


# Sync mode and data layer implementation
sync-mode="X_SNAP"
sync-mode="SNAP"
data-storage-format="BONSAI"
Xsnapsync-synchronizer-flat-db-healing-enabled=true

Expand Down
Binary file modified static/img/socialCards/ethsendrawtransaction.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/socialCards/linea-software.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/socialCards/lineaestimategas.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.