Skip to content

Commit

Permalink
Merge branch 'node-size-2' of https://github.com/Consensys/doc.linea
Browse files Browse the repository at this point in the history
…into node-size-2
  • Loading branch information
jlwllmr committed Nov 4, 2024
2 parents 8963d5b + ba6285f commit b73f064
Show file tree
Hide file tree
Showing 15 changed files with 65 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ select it.
When an ERC-20 token is bridged from one chain to the other and the token has not been deployed on
the destination chain, the Token Bridge Smart Contract will attempt to determine the “decimals” of
the ERC-20 token. If the decimals cannot be determined by reading the origin ERC-20 token contract
(e.g. a token contract does not adhere to the [ERC-20 standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/)),
(e.g. a token contract doesn't adhere to the [ERC-20 standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/)),
it will default to 18 decimals.

This can result in the token quantities displaying incorrectly on the destination chain. For example,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@ title: Create an inscription
image: /img/socialCards/create-an-inscription.jpg
---

## What are inscriptions?

Bitcoin inscriptions are a method of adding metadata to the smallest unit of Bitcoin, a satoshi (sat). Various types of data, including images, videos, messages, etc., can be "inscribed" onto the Bitcoin blockchain to create NFTs. This concept has been adapted for the Ethereum blockchain, where it's known as ["Ethscriptions"](https://docs.ethscriptions.com/overview/introducing-ethscriptions).

## Implementation

Traditionally, calldata is the most straightforward method for implementing inscriptions. However, this approach can become quite expensive on L1 during finalization by the sequencer, which in turn can drive up the price on L2 for users to maintain profitability.
Traditionally, calldata is the most straightforward method for implementing inscriptions. However, this approach can become expensive on L1 during finalization by the sequencer, which in turn can drive up the price on L2 for users to maintain profitability.

To avoid this increase in costs, Linea recommends following [ESIP-3](https://docs.ethscriptions.com/esips/accepted-esips/esip-3-smart-contract-ethscription-creations), for creating inscriptions. This is because events and subcalls do not involve any finalization costs on L1, making them a more cost-effective option for users.

:::info[attention]

**We want to emphasize that this is the best and only method for creating inscriptions on Linea that we will support.** Any team that is building tools for inscriptions or issuing inscriptions will receive our support, including marketing support, only if they use this pattern documented in ESIP-3. Special thanks to the Lins20 and Carpenter teams! Their collaboration and support were invaluable in creating this reference implementation.
**We want to emphasize that this is the best and only method for creating inscriptions on Linea that we will support.** Any team building tools for inscriptions or issuing inscriptions will receive our support, including marketing support, only if they use this pattern documented in ESIP-3. Special thanks to the Lins20 and Carpenter teams! Their collaboration and support were invaluable in creating this reference implementation.

:::

Expand All @@ -33,7 +31,7 @@ event ethscriptions_protocol_CreateEthscription(
- `initialOwner`is usually the msg.sender.
- `contentURI` should be crafted by minimizing the amount of calldata.

Linea recommends loading it (at least partially) from the contract code to reduce the amount of calldata that has to be passed to the contract.
We recommend loading it from the contract code to reduce the amount of calldata that has to be passed to the contract.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/developers/guides/linea-safe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ or all three individuals before a transaction can proceed. This security measure
single person can compromise the funds.

On top of that, Linea Safe gives complete self-custody over funds. In other words, the smart
contract deployed for the wallet has complete control over the wallet's contents, and does not
contract deployed for the wallet has complete control over the wallet's contents, and doesn't
rely on any trusted external party for execution.

To create your Safe wallet click [here](https://app.safe.global/), and select Linea as the network.
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/guides/run-a-node/besu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The Besu node will attempt to find peers to begin synchronizing and to download

:::warning Important

The Besu Docker image does not run on Windows.
The Besu Docker image doesn't run on Windows.
:::
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/guides/run-a-node/geth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Start the node using the following command:
</Tabs>

The Linea network only produces blocks if there is currently at least 1 pending transaction. If you see no incoming blocks
to your node, **that does not mean that the node is not syncing**.
to your node, **that doesn't mean that the node is not syncing**.
**If you don't see any incoming blocks**, check and make sure that you have **at least one peer from the bootnodes**;
otherwise, you might not be connected to the Linea network.
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/guides/run-a-node/linea-besu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Plugins are installed with the `advanced` profile during the configuration steps

:::warning

The `advanced` profile option does not currently support macOS/ARM. Please use
The `advanced` profile option doesn't currently support macOS/ARM. Please use
Linux/ARM or Windows/X86_64.

:::
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/linea-version/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ to a push model. It also improves EVM prover coverage, and provides batch confla
:::note
Contracts audit is in progress. This does not reflect final versions.
Contracts audit is in progress. This doesn't reflect final versions.

:::

Expand Down
18 changes: 12 additions & 6 deletions docs/developers/quickstart/info-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ official lists in [this repo](https://github.com/Consensys/linea-token-list/blob
:::warning[Note]

We recommend you rely on the shortlist in the above links, rather than the full list. The shortlist is
actively curated by our team, whereas the full list is not, and automatically populates with all
actively curated by our team, whereas the full list isn't, and automatically populates with all
tokens bridged to Linea.

:::
Expand Down Expand Up @@ -193,9 +193,9 @@ For both mainnet and testnet:

If you're new to public blockchain networks, you might not be familiar with _block explorers_. It's helpful to remember that the network is keeping track of a _ledger_ of accounts, with tokens attributed to them, sent between them, created by them, etc.

So, as users take actions on the network, there are changes to those accounts and tokens. A block explorer is an interface through which you can look at that information in all its raw, gritty detail.
As users take actions on the network, there are changes to those accounts and tokens. A block explorer is an interface through which you can look at that information in all its raw, gritty detail.

> If you want to learn more about explorers and how to use them, check out MetaMask's article on the topic: [How to check my wallet activity on the blockchain explorer](https://support.metamask.io/hc/en-us/articles/360057536611-How-to-check-my-wallet-activity-on-the-blockchain-explorer)
> If you want to learn more about explorers and how to use them, check out the [MetaMask help center](https://support.metamask.io/managing-my-wallet/how-to-check-my-wallet-activity-on-the-blockchain-explorer/)
<Tabs groupId="Mainnet-Testnet" className="my-tabs">
<TabItem value="Mainnet" label="Mainnet" default>
Expand Down Expand Up @@ -291,8 +291,14 @@ So, as users take actions on the network, there are changes to those accounts an
</TabItem>
</Tabs>

:::note
## Faucets

Learn how to verify your contracts in our [quickstart](./verify-smart-contract).
You can use one of the following Linea Sepolia faucets to drip testnet ETH directly to your
Linea Sepolia address:

:::
- [Covalent](https://www.covalenthq.com/faucet/)
- [Infura](https://www.infura.io/faucet/linea)
- [GetBlock](https://getblock.io/faucet/linea-sepolia/)
- [HackQuest](https://www.hackquest.io/en/faucets/59141) (and check out their [Linea Learning Track](https://www.hackquest.io/en/learning-track/9be129e7-575b-49bd-a64e-1bbe32427ace))

Alternatively, [use the Linea native bridge to bridge tokens between Sepolia and Linea Sepolia](../../developers/guides/bridge/how-to-bridge-eth.mdx).
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You'll need to get a Lineascan (Linea instance of Etherscan) API key by creating
:::note


These instructions verify using the Linea instance of Etherscan, which currently does not support Yul. If you
These instructions verify using the Linea instance of Etherscan, which currently doesn't support Yul. If you
would like to verify using Blockscout, please use the [Blockscout API URL for the required network](../info-contracts.mdx#block-explorers).

:::
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/quickstart/verify-smart-contract/hardhat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const { PRIVATE_KEY, LINEASCAN_API_KEY } = process.env;
:::note


These instructions verify using the Linea instance of Etherscan, which currently does not support Yul. If you
These instructions verify using the Linea instance of Etherscan, which currently doesn't support Yul. If you
would like to verify using Blockscout, please use the [Blockscout API URL for the required network](../info-contracts.mdx#block-explorers).

:::
Expand Down Expand Up @@ -155,7 +155,7 @@ https://sepolia.lineascan.build/address/address/0x3Af089fee468eb7fcf750e929321b0
:::note


If you get an error saying that the address does not have bytecode, it probably means that Etherscan has not indexed your contract yet. In that case, wait for a while and then try again.
If you get an error saying that the address doesn't have bytecode, it probably means that Etherscan has not indexed your contract yet. In that case, wait for a while and then try again.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/developers/reference/api/eth-sendrawtransaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \
### Gas price too low

The error `Gas price too low` is thrown when the transaction's gas is too low; specifically, the
offered gas does not create enough of a buffer to ensure that Linea can cover the costs of
offered gas doesn't create enough of a buffer to ensure that Linea can cover the costs of
finalizing the transaction on L1.

### Transaction line count above limit
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/reference/api/linea-getproof.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ The supplied block parameter must be an L2 block that has been finalized on L1.

- When an account or storage slot exists, the response includes the `leafIndex` and
a proof of existence.
- When an account or storage slot does not exist, the response will include the proof of the
- When an account or storage slot doesn't exist, the response will include the proof of the
elements before and after it in the tree.

In the [example response](#response) the account exists but the slot does not.
In the [example response](#response) the account exists but the slot doesn't.

## Parameters

Expand Down
71 changes: 35 additions & 36 deletions docs/developers/tooling/oracles/pyth.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,46 @@ title: Pyth Network
image: /img/socialCards/pyth-network.jpg
---

# Pyth Network

Pyth Network is an oracle that publishes financial market data to multiple blockchains. Our market
data is contributed by over 80 [first-party publishers](https://pyth.network/publishers), including
some of the biggest exchanges and market making firms in the world. We offer price feeds for a
number of different asset classes, including [US equities, commodities, and cryptocurrencies](https://pyth.network/price-feeds).
Each price feed publishes a [robust aggregate](https://docs.pyth.network/documentation/how-pyth-works/price-aggregation)
Pyth Network is an oracle that publishes financial market data to multiple blockchains. Our market
data is contributed by over 80 [first-party publishers](https://pyth.network/publishers), including
some of the biggest exchanges and market making firms in the world. We offer price feeds for a
number of different asset classes, including [US equities, commodities, and cryptocurrencies](https://pyth.network/price-feeds).
Each price feed publishes a [robust aggregate](https://docs.pyth.network/documentation/how-pyth-works/price-aggregation)
of publisher prices that updates multiple times per second.

### How Pyth works
## How Pyth works

Pyth is a protocol that allows market participants to publish pricing information on-chain for
Pyth is a protocol that allows market participants to publish pricing information on-chain for
others to use. The protocol is an interaction between three parties:

- _Publishers_ submit pricing information to Pyth's oracle program. Pyth has multiple data
- _Publishers_ submit pricing information to Pyth's oracle program. Pyth has multiple data
publishers for every product to improve the accuracy and robustness of the system.
- Pyth's _oracle program_ combines publishers' data to produce a single aggregate price and
- Pyth's _oracle program_ combines publishers' data to produce a single aggregate price and
confidence interval.
- _Consumers_ read the price information produced by the oracle program.

## Pyth on-demand model

Pyth Network uses a pull price update model that is slightly different from other oracles you
may be more familiar with. Most oracles today use a push model, where the oracle runs an
off-chain process that continuously sends transactions to update an on-chain price. In contrast,
Pyth Network does not operate an off-chain process that pushes prices on-chain. Instead, it
Pyth Network uses a pull price update model that is slightly different from other oracles you
may be more familiar with. Most oracles today use a push model, where the oracle runs an
off-chain process that continuously sends transactions to update an on-chain price. In contrast,
Pyth Network doesn't operate an off-chain process that pushes prices on-chain. Instead, it
delegates this work to Pyth Network users.

Pyth price updates are created on [Pythnet](https://docs.pyth.network/documentation/how-pyth-works/pythnet)
and streamed off-chain via the Wormhole Network, a cross-chain messaging protocol. These updates
are signed such that the Pyth on-chain program can verify their authenticity. Updating the on-chain
price is a permissionless operation: anyone can submit a valid Wormhole message to the Pyth
contract to update the price. Typically, users of Pyth Network prices will submit a single
Pyth price updates are created on [Pythnet](https://docs.pyth.network/documentation/how-pyth-works/pythnet)
and streamed off-chain via the Wormhole Network, a cross-chain messaging protocol. These updates
are signed such that the Pyth on-chain program can verify their authenticity. Updating the on-chain
price is a permissionless operation: anyone can submit a valid Wormhole message to the Pyth
contract to update the price. Typically, users of Pyth Network prices will submit a single
transaction that simultaneously updates the price and uses it in a downstream application.

On-chain prices can only move forward in time. If a user submits a Wormhole message with a less
recent price the Pyth program will not fail but will also not update the price. This in particular
means that there's no guarantee that when a user atomically updates the price and then interacts
with an application powered by Pyth, the price that the application will read will be equal to
On-chain prices can only move forward in time. If a user submits a Wormhole message with a less
recent price the Pyth program will not fail but will also not update the price. This in particular
means that there's no guarantee that when a user atomically updates the price and then interacts
with an application powered by Pyth, the price that the application will read will be equal to
the price the user submitted.

You can find an in-depth explanation from one of our contributors, Jayant:
You can find an in-depth explanation from one of our contributors, Jayant:
[Explaining the Pyth Network Oracle Model: Pyth Tutorials](https://www.youtube.com/watch?v=qdwrs23Qc9g)

Read more about on-demand updates [here](https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand).
Expand All @@ -53,22 +51,22 @@ Read more about on-demand updates [here](https://docs.pyth.network/documentation

### Price feed IDs

Each Pyth Network price feed is referred to via a unique ID. However, the IDs may be represented in
different formats (e.g., hex or base58) depending on the blockchain. Price feeds also have different
IDs in mainnets than testnets or devnets. The full list of price feeds is listed on the
[pyth.network website](https://pyth.network/price-feeds). The [price feed IDs page](https://pyth.network/developers/price-feed-ids)
lists the ID of each available price feed on every chain where they are available. To use a price
feed on-chain, look up its ID using these pages, then store the feed ID in your program to use for
Each Pyth Network price feed is referred to via a unique ID. However, the IDs may be represented in
different formats (e.g., hex or base58) depending on the blockchain. Price feeds also have different
IDs in mainnets than testnets or devnets. The full list of price feeds is listed on the
[pyth.network website](https://pyth.network/price-feeds). The [price feed IDs page](https://pyth.network/developers/price-feed-ids)
lists the ID of each available price feed on every chain where they are available. To use a price
feed on-chain, look up its ID using these pages, then store the feed ID in your program to use for
price feed queries.

## Pyth on EVM (Linea)

On-chain EVM programs can use the [Solidity SDK](https://github.com/pyth-network/pyth-sdk-solidity)
to read Pyth prices. The [EVM API reference](https://docs.pyth.network/evm) lets you interactively
On-chain EVM programs can use the [Solidity SDK](https://github.com/pyth-network/pyth-sdk-solidity)
to read Pyth prices. The [EVM API reference](https://docs.pyth.network/evm) lets you interactively
explore the complete API of the Pyth contract.

The off-chain portion of the application can use [pyth-evm-js](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/js)
to generate price update transactions. This repository's [Quickstart](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/js#quickstart)
The off-chain portion of the application can use [pyth-evm-js](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/js)
to generate price update transactions. This repository's [Quickstart](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/js#quickstart)
includes an example of both the on- and off-chain code necessary to integrate with Pyth.

### Examples
Expand All @@ -87,7 +85,7 @@ Pyth is currently available on the following Linea networks:

### Price feed IDs

The price feed IDs for EVM chains differs depending on whether they are a mainnet or testnet (see
The price feed IDs for EVM chains differs depending on whether they are a mainnet or testnet (see
above):

- [List of mainnet ids](https://pyth.network/developers/price-feed-ids#pyth-evm-mainnet)
Expand All @@ -96,6 +94,7 @@ above):
---

## Links

- [X](https://x.com/PythNetwork)
- [Discord](https://discord.com/invite/PythNetwork)
- [Website](https://pyth.network/)
Expand Down
Loading

0 comments on commit b73f064

Please sign in to comment.