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

Document Lazy Loading #1029

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div id="termynal" data-termynal>
<span data-ty>[Lazy loading 🌗]
<br>You are now running the Moonbeam client in lazy loading mode, where data is retrieved
<br>from a live RPC node on demand.
<br>Using remote state from: https://moonbeam.public.blastapi.io
<br>Forking from block: 8482853
<br>To ensure the client works properly, please note the following:
<br> 1. *Avoid Throttling*: Ensure that the backing RPC node is not limiting the number of
<br> requests, as this can prevent the lazy loading client from functioning correctly;
<br> 2. *Be Patient*: As the client may take approximately 20 times longer than normal to
<br> retrieve and process the necessary data for the requested operation.
<br>The service will start in 10 seconds...</span>
</div>
12 changes: 12 additions & 0 deletions node-operators/networks/run-a-node/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ This guide will cover some of the most common flags and show you how to access a
- **`warp`** - downloads the latest state and proof
- **`--prometheus-port`** - specifies a custom Prometheus port

## Lazy Loading Flags {: #lazy-loading-flags }

Lazy loading lets a Moonbeam node operate while downloading network state in the background, eliminating the need to wait for full synchronization before use.

- **`fork-chain-from-rpc`** - allows lazy loading by relying on a specified RPC for network state until the node is fully synchronized e.g. `--fork-chain-from-rpc 'https://moonbeam.public.blastapi.io'`

You can further customize your use of the lazy loading functionality with the following optional parameters:

- **`block`** - specifies the block number from which to start forking the chain
- **`fork-state-overrides`** - path to a JSON file containing state overrides to be applied when forking
- **`runtime-override`** - path to a WASM file to override the runtime when forking

## Flags for Configuring a SQL Backend {: #flags-for-sql-backend }

- **`--frontier-backend-type`** - sets the Frontier backend type to one of the following options:
Expand Down
28 changes: 28 additions & 0 deletions node-operators/networks/run-a-node/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,34 @@ There are a couple different guides to help you get started running a Moonbeam-b

You can also gain access to some non-standard RPC methods by running a tracing node, which allow developers to inspect and debug transactions during runtime. Tracing nodes use a different Docker image than a standard Moonbase Alpha, Moonriver, or Moonbeam node. Check out the [Run a Tracing Node](/node-operators/networks/tracing-node/) guide and be sure to switch to the right network tab throughout the instructions. Then to interact with your tracing node, check out the [Debug & Trace](/builders/ethereum/json-rpc/debug-trace/) guide.

## Lazy Loading {: #lazy-loading }
Copy link
Contributor

Choose a reason for hiding this comment

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

This is very repetitive to the flags section. Unsure what to do here but ideally ti is not just repeated


Lazy loading lets a Moonbeam node operate while downloading network state in the background, eliminating the need to wait for full synchronization before use. You can activate lazy loading with the following flag:

- **`fork-chain-from-rpc`** - allows lazy loading by relying on a specified RPC for network state until the node is fully synchronized e.g. `--fork-chain-from-rpc 'https://moonbeam.public.blastapi.io'`

Upon spooling up a node with this feature, you'll see output like the following:

--8<-- 'code/node-operators/networks/run-a-node/terminal/lazy-loading.md'

You can further customize your use of the lazy loading functionality with the following optional parameters:

- **`block`** - specifies the block number from which to start forking the chain
- **`runtime-override`** - path to a WASM file to override the runtime when forking
- **`fork-state-overrides`** - path to a JSON file containing state overrides to be applied when forking

The state overrides file should define the respective pallet, storage item, and value that you seek to override as follows:

```json
[
{
"pallet": "System",
"storage": "SelectedCandidates",
"value": "0x04f24ff3a9cf04c71dbc94d0b566f7a27b94566cac"
}
]
```

## Logs and Troubleshooting {: #logs-and-troubleshooting }

You will see logs from both the relay chain and the parachain. The relay chain will be prefixed by `[Relaychain]`, while the parachain has no prefix.
Expand Down
Loading