generated from Consensys/doctools.template-site
-
Notifications
You must be signed in to change notification settings - Fork 541
Document how to run the Linea stack. #624
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
Open
bgravenorst
wants to merge
6
commits into
Consensys:main
Choose a base branch
from
bgravenorst:linea-stack
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1ba9dc5
Document running the Linea stack.
bgravenorst bc36c63
Fix typos.
bgravenorst 12af1e7
Fix redirect.
bgravenorst 19a8505
Address reviewer feedback.
bgravenorst 0a7637f
Edit content.
bgravenorst 757eae5
Address feedback.
bgravenorst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| description: How to run a Linea network. | ||
| image: /img/socialCards/how-to-run-a-linea-network.jpg | ||
| --- | ||
|
|
||
| import DocCardList from "@theme/DocCardList"; | ||
|
|
||
| # Run Linea | ||
|
|
||
| You can run the entire Linea stack or a Linea node. Choosing between running the entire Linea stack | ||
| and a Linea node depends on your specific needs and the environment you're working in. | ||
|
|
||
| ## When to run the Linea stack | ||
|
|
||
| :::info | ||
| Currently, the Linea stack is available for local deployments only. | ||
| ::: | ||
|
|
||
| Run the Linea stack locally if you want to develop or test applications on Linea without connecting | ||
| to Sepolia or Ethereum Mainnet. | ||
|
|
||
| The Linea stack incorporates the base layer (L1) and the Linea stack itself. | ||
| By running the entire Linea stack locally, developers benefit from a controlled environment that provides | ||
| direct access to the blockchain's capabilities. | ||
|
|
||
| ## When to run a Linea node | ||
|
|
||
| Run a Linea node if you want a local view of the Linea blockchain state. | ||
| A node enables users to call Linea JSON-RPC API methods and submit transactions to the | ||
| mempool independently, without depending on external RPC providers. | ||
|
|
||
| Select the appropriate card for more information on running Linea using your preferred setup: | ||
|
|
||
| <DocCardList /> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| description: Run the Linea stack. | ||
| image: /img/socialCards/run-the-linea-stack.jpg | ||
| --- | ||
|
|
||
| import DocCardList from "@theme/DocCardList"; | ||
|
|
||
| # Run the Linea stack | ||
|
|
||
| :::info | ||
|
|
||
| The Linea stack is currently available only for local testing. This includes a local version of the | ||
| base layer (Hyperledger Besu) and the Linea stack itself. | ||
|
|
||
| ::: | ||
|
|
||
| Run the the entire Linea stack to get working versions of: | ||
|
|
||
| - **Sequencer**: Responsible for ordering, building, and executing blocks. | ||
| - **State manager**: Manages the L2 network and account states. | ||
| - **Coordinator**: Coordinates the steps to create zk proofs and ensures their persistence on the | ||
| L1 Ethereum network. It specifically handles batch conflation, blob creation, and aggregation. | ||
| - **Traces API**: Provides trace counts and generates conflated trace files for zk proof creation. | ||
| - **Provers**: Generates three types of zk-SNARK proofs: execution, compression, and aggregation. | ||
|
|
||
| Refer to the [Linea architecture documentation](../../../../architecture/index.mdx) for more information | ||
| about the Linea stack components. | ||
|
|
||
|
|
||
| <DocCardList /> | ||
115 changes: 115 additions & 0 deletions
115
docs/developers/guides/run-linea/run-the-stack/local.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| --- | ||
| description: Run the Linea stack locally. | ||
| image: /img/socialCards/run-the-linea-stack-locally.jpg | ||
| --- | ||
|
|
||
| import Tabs from "@theme/Tabs"; | ||
| import TabItem from "@theme/TabItem"; | ||
|
|
||
| # Run locally | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Install the following: | ||
|
|
||
| - [Node.js v18 or later](https://nodejs.org/en/download/package-manager) | ||
| - [Docker v24 or later](https://docs.docker.com/get-docker/) | ||
| - [Docker Compose v2.19 or later](https://docs.docker.com/compose/install/) | ||
| - [Make v3.81 or later](https://www.npmjs.com/package/make) | ||
| - [Pnpm v9.0.6 or later](https://pnpm.io/installation) | ||
|
|
||
| :::important | ||
| These instructions run the Linea stack using Docker containers. Set your Docker resources to | ||
| use at least 10 CPU cores, 8 GB of memory, and 1 GB swap space. | ||
| ::: | ||
|
|
||
| ## Run the Linea stack | ||
|
|
||
| ### 1. Clone the repository | ||
|
|
||
| Clone the Linea repository: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/Consensys/linea-monorepo.git | ||
| ``` | ||
|
|
||
| ### 2. Install the dependencies | ||
|
|
||
| Change to the root of the directory and install the project dependencies: | ||
|
|
||
| ```bash | ||
| cd linea-monorepo | ||
| ``` | ||
|
|
||
| ```bash | ||
| pnpm install | ||
| ``` | ||
|
|
||
| ### 3. Start the Linea stack | ||
|
|
||
| Start the network stack. This will also compile and deploy the required rollup contracts: | ||
|
|
||
| ```bash | ||
| make fresh-start-all | ||
| ``` | ||
|
|
||
| You now have a local developer instance of the entire Linea network, which includes components such as | ||
| the sequencer, prover, coordinator, and a local L1 settlement layer. You can view these components in | ||
| Docker Desktop. | ||
|
|
||
| <div class="center-container"> | ||
| <div class="img-large"> | ||
| <img | ||
| src="/img/docs/build-on-linea/linea-stack.png" | ||
| alt="Docker Desktop view of the Linea stack." | ||
| /> | ||
| </div> | ||
| </div> | ||
|
|
||
| ## View network details | ||
|
|
||
| Access the RPC endpoints from the following local URLs: | ||
|
|
||
| <Tabs className="my-tabs"> | ||
bgravenorst marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <TabItem value="Linea" label="Linea (L2)" default> | ||
| - Endpoints: | ||
| - HTTPS: `http://localhost:8545` | ||
| - WebSockets: `ws://localhost:8546` | ||
| - Chain ID: `1337` | ||
| - [Message service address](../../../../architecture/stack/canonical-msg-service/message-service.mdx): `0xe537D669CA013d86EBeF1D64e40fC74CADC91987` | ||
| - Deployment account private key: `0x1dd171cec7e2995408b5513004e8207fe88d6820aeff0d82463b3e41df251aae` | ||
| </TabItem> | ||
| <TabItem value="Base layer" label="Base layer (L1)"> | ||
| - Endpoints: | ||
| - HTTPS: `http://localhost:8445` | ||
| - WebSockets: `ws://localhost:8446` | ||
| - Chain ID: `31648428` | ||
| - Linea rollup contract address: `0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9` | ||
| - Deployment account private key: `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` | ||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| :::info | ||
| You can [connect your MetaMask wallet](https://support.metamask.io/networks-and-sidechains/managing-networks/how-to-add-a-custom-network-rpc/#adding-a-network-manually) | ||
| to the required chain and [import the deployment account](https://support.metamask.io/managing-my-wallet/accounts-and-addresses/how-to-import-an-account/#importing-using-a-private-key) | ||
| to access the test tokens. | ||
| ::: | ||
|
|
||
| ## Stop the Linea stack | ||
|
|
||
| You can stop and start the the Docker containers in Docker Desktop. However, constant stopping and | ||
| starting can lead to network or state issues. | ||
|
|
||
| Once stopped, you can clean your environment using the following commands: | ||
bgravenorst marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| :::note | ||
| This will permanently remove all Docker images, containers, volumes, and any data saved in them. | ||
| ::: | ||
|
|
||
| ```bash | ||
| make clean-environment | ||
| ``` | ||
| ```bash | ||
| docker system prune --volumes | ||
| ``` | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
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.
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
BIN
+93.7 KB
...alCards/simulate-transaction-submission-to-help-prevent-failed-transactions.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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.