Skip to content

Commit

Permalink
Merge branch 'main' into etherscan-api
Browse files Browse the repository at this point in the history
  • Loading branch information
jlwllmr authored Nov 8, 2024
2 parents 11e2d63 + d5f02a2 commit 58b16ea
Show file tree
Hide file tree
Showing 19 changed files with 8,742 additions and 5,306 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/update-node-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Update Node Size Data

on:
schedule:
- cron: '0 0 * * 1' # Runs at 00:00 UTC every Monday
workflow_dispatch: # Allows manual triggering

jobs:
update-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20.9.0' # or whatever version you're using

- name: Install dependencies
run: npm ci

- name: Run update script
env:
LINEA_OBSERVABILITY_USER: ${{ secrets.LINEA_OBSERVABILITY_USER }}
LINEA_OBSERVABILITY_PASS: ${{ secrets.LINEA_OBSERVABILITY_PASS }}
run: node scripts/fetchNodeSize.js

- name: Check for changes
id: git-check
run: |
git add linea-node-size/data.json
git diff --staged --exit-code
continue-on-error: true

- name: Create Pull Request
if: steps.git-check.outcome == 'failure'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update node size data
title: 'Update Node Size Data'
body: |
This is an automated PR to update the node size data.
Please review the changes and merge if everything looks correct.
branch: update-node-size-data
delete-branch: true

slackNotification:
needs: [update-data]
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: doc-ci-alerts
SLACK_COLOR: danger
SLACK_USERNAME: ci
SLACK_TITLE: Linea node size update - Failure
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
MSG_MINIMAL: true
51 changes: 51 additions & 0 deletions README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,54 @@ information.

You can run other linters for code style (CSS, JavaScript) and link formatting any time with the
command `npm run lint`.

## Adding images to articles

### Add image files

Any images for articles should be added to the `/static/img/` directory. Here, the `/img` folder
structure mirrors that of the docs, and images are stored in the corresponding subdirectory. If
you have added a _new_ article in `/docs`, create the new subdirectory in `/img` according to this
structure.

#### Format image files

Use the following JSX formatting to add an image into an article:

```
<div class="center-container">
<div class="img-medium">
<img
src="/img/path-to-file/image.png"
alt="alt text here"
/>
</div>
</div>
```

To adjust the display size of the image, adjust the size class to one of the following:

`img-xsmall`, `img-small`, `img-medium`, `img-large`

Adhere to using these predefined sizings where possible.

#### Format svg files

Use the following formatting for svg files. Place the import statement at the top of the file,
beneath the front matter.

```
import MySVGGraphic from "/img/path-to-file/image.svg";
```
```
<div className="img-large">
<MySVGGraphic />
</div>
```

As outlined above, you can adjust the display size of the svg by changing the class applied.

### Social cards

A social card for any new article(s) will be generated and applied when the site builds, so there
is no need to manually create or add one.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ total fee = units of gas used * (base fee + priority fee)

Linea fundamentally works exactly the same as Ethereum. The only difference is that **the base fee
is constant at 7 wei.** Blocks created by Linea use up to 24 million gas (less than 50% of the
maximum Linea block size of 61 million gas), and the fee decreases by 12.5% per block, effectively
keeping it at a stable 7 wei.
maximum Linea block size of 61 million gas), and the fee decreases by 12.5% per block, keeping it
at a stable 7 wei.

The gas cost to submit your transaction and include it on Ethereum involves the following fee
components:
Expand All @@ -31,10 +31,11 @@ components:
These two resource costs are abstracted by the rollup and covered by the recommended L2 gas price
and gas used.

> Learn more about [gas on Linea](./gas-on-linea.mdx).
> Learn more about gas on Linea on our [support page](https://support.linea.build/getting-started/what-does-gas-pay-for/)
and release notes for [Alpha v2](../linea-version/index.mdx#alpha-v2) and [Alpha v3](../linea-version/index.mdx#alpha-v3).

`linea_estimateGas` is the recommended method for estimating gas on Linea. See our
[reference page](../../reference/api/linea-estimategas.mdx) for more information.
[reference page](../reference/api/linea-estimategas.mdx) for more information.

Linea also supports:
- [`eth_estimateGas`](https://docs.infura.io/api/networks/linea/json-rpc-methods/eth_estimategas)
Expand All @@ -57,7 +58,7 @@ by `linea_estimateGas` to calculate the cost of a transaction:
The `extraData` field is a 32-byte space used to store arbitrary data, such as metadata or
additional information relevant to the block.

On Linea, it is used by the sequencer and Linea Besu nodes running the correct plugins to expose
On Linea, it's used by the sequencer and Linea Besu nodes running the correct plugins to expose
`linea_estimateGas`.

:::
Expand Down Expand Up @@ -119,13 +120,13 @@ In some cases, transactions with lower priority fees are included ahead of other
priority fees. This is because the nonce order of transactions submitted from the same account
takes precedence.

## [`linea_estimateGas`](../../reference/api/linea-estimategas.mdx)
## [`linea_estimateGas`](../reference/api/linea-estimategas.mdx)

`linea_estimateGas` is the recommended method for estimating gas on Linea. It returns `gasLimit`,
`baseFeePerGas`, and `priorityFeePerGas`, and therefore provides a more precise gas estimate than
the alternatives.

It can also help prevent transactions from being rejected due to exceeding [module limits](../../../architecture/stack/trace-expansion-proving/prover-limits.mdx).
It can also help prevent transactions from being rejected due to exceeding [module limits](../../architecture/stack/trace-expansion-proving/prover-limits.mdx).

### Example

Expand All @@ -152,4 +153,4 @@ curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \
}
```

See the [reference page](../../reference/api/linea-estimategas.mdx) for full usage.
See the [reference page](../reference/api/linea-estimategas.mdx) for full usage.
99 changes: 0 additions & 99 deletions docs/developers/guides/gas/gas-on-linea.mdx

This file was deleted.

12 changes: 8 additions & 4 deletions docs/developers/guides/run-a-node/besu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

import VolumeCreation from "./volume-creation.mdx";
import NodeSize from "../../../../src/components/NodeSize";
import LastUpdated from "../../../../src/components/LastUpdated";

[Besu](https://besu.hyperledger.org/) is an open source Ethereum client developed under the
Apache 2.0 license and written in Java.
Expand Down Expand Up @@ -56,10 +58,12 @@ Download the genesis file and Besu configuration file.

### 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:
Define a volume size appropriate to your expected usage. Besu nodes use:

- Full nodes: 120GB, growing ~1.5GB per day.
- Archive nodes: 740GB, growing ~9.5GB per day.
- Full node: <NodeSize network="mainnet" cluster="linea-prod-eks" pvc="data-linea-besu-full-0" />
- Archive node: <NodeSize network="mainnet" cluster="linea-prod-eks" pvc="data-linea-besu-archive-v2-0" />

<LastUpdated />

Use these figures as a basis to determine the extent to which you want to future-proof your node.

Expand All @@ -70,7 +74,7 @@ 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` or `config-sepolia.toml`), configure
the following options:
Expand Down
13 changes: 9 additions & 4 deletions docs/developers/guides/run-a-node/geth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

import VolumeCreation from "./volume-creation.mdx";
import NodeSize from "../../../../src/components/NodeSize";
import LastUpdated from "../../../../src/components/LastUpdated";

[Geth](https://geth.ethereum.org/) is an open-source Go implementation of Ethereum.

Expand All @@ -27,7 +29,7 @@ You can run Geth from a [binary distribution](#run-using-the-binary-distribution

:::warning

Linea only supports Geth _up to_ v1.13.15 or lower. v1.14.0 and subsequent versions are not
Linea only supports Geth _up to_ v1.13.15 or lower. v1.14.0 and subsequent versions aren't
supported.

:::
Expand All @@ -51,9 +53,12 @@ Download the genesis file for the relevant network.

### Step 3. Define disk space volume (optional) \{#disk-space-geth}

Define a volume size appropriate to your expected usage. As of March 20 2024, Geth nodes use:
- Full nodes: 170GB, growing ~2.6GB per day.
- Archive nodes: 760GB, growing ~10GB per day.
Define a volume size appropriate to your expected usage. Geth nodes use:

- Full node: <NodeSize network="mainnet" cluster="linea-prod-eks" pvc="data-linea-geth-full-snapshot-0" />
- Archive node: <NodeSize network="mainnet" cluster="linea-prod-eks" pvc="data-linea-geth-archive-0" />

<LastUpdated />

Use these figures as a basis to determine the extent to which you want to future-proof your node.

Expand Down
21 changes: 19 additions & 2 deletions docs/developers/guides/run-a-node/linea-besu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

import VolumeCreation from "./volume-creation.mdx";
import NodeSize from "../../../../src/components/NodeSize";
import LastUpdated from "../../../../src/components/LastUpdated";

Linea Besu is an implementation of the Besu client that extends its functionality using plugins
adapted specifically for Linea, such as the
Expand Down Expand Up @@ -50,7 +52,22 @@ and extract it.
tar -xzvf linea-besu-package-<version>.tar.gz
```

### Step 3. Select a profile
### Step 3. Define disk space volume (optional) \{#disk-space-besu}

Define a volume size appropriate to your expected usage. Besu nodes use:

- Full node: <NodeSize network="mainnet" cluster="linea-prod-eks" pvc="data-linea-besu-full-0" />
- Archive node: <NodeSize network="mainnet" cluster="linea-prod-eks" pvc="data-linea-besu-archive-v2-0" />

<LastUpdated />

Use these figures as a basis to determine the extent to which you want to future-proof your node.

Ensure you mount the `data-path` to the custom volume when you start the node.

<VolumeCreation />

### Step 4. Select a profile

In the extracted directory, find `profiles`. The `.toml` configuration files in this folder define
the parameters for each possible profile you can select for your Linea Besu node.
Expand All @@ -70,7 +87,7 @@ the parameters for each possible profile you can select for your Linea Besu node
</TabItem>
</Tabs>

### Step 4. Start the Linea Besu client
### Step 5. Start the Linea Besu client

In a terminal, navigate to the `linea-besu-package-<version>` directory, where the `bin`, `genesis`,
`profiles` etc. directories are.
Expand Down
Loading

0 comments on commit 58b16ea

Please sign in to comment.