Small adjustment to portal_bridge + docs update (#2110)
This commit is contained in:
parent
8e4368195a
commit
058f412bbc
|
@ -9,12 +9,16 @@
|
||||||
Run a Portal client with the Portal JSON-RPC API enabled, e.g. fluffy:
|
Run a Portal client with the Portal JSON-RPC API enabled, e.g. fluffy:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./build/fluffy --rpc
|
./build/fluffy --rpc --storage-capacity:0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> Note: The `--storage-capacity:0` option is not required, but it is added here
|
||||||
|
for the use case where the node its only focus is on gossiping content from the
|
||||||
|
`portal_bridge`.
|
||||||
|
|
||||||
#### Step 2: Run an EL client
|
#### Step 2: Run an EL client
|
||||||
|
|
||||||
The portal_bridge needs access to the EL JSON-RPC API, either through a local
|
The `portal_bridge` needs access to the EL JSON-RPC API, either through a local
|
||||||
Ethereum client or via a web3 provider.
|
Ethereum client or via a web3 provider.
|
||||||
|
|
||||||
#### Step 3: Run the Portal bridge in history mode
|
#### Step 3: Run the Portal bridge in history mode
|
||||||
|
@ -27,6 +31,20 @@ WEB3_URL="http://127.0.0.1:8546" # Replace with your provider.
|
||||||
./build/portal_bridge history --web3-url:${WEB3_URL}
|
./build/portal_bridge history --web3-url:${WEB3_URL}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Default the portal_bridge will run in `--latest` mode, which means that only the
|
||||||
|
latest block content will be gossiped into the network.
|
||||||
|
|
||||||
|
The portal_bridge also has a `--backfill` mode which will gossip pre-merge blocks
|
||||||
|
from `era1` files into the network. Default the bridge will audit first whether
|
||||||
|
the content is available on the network and if not it will gossip it into the
|
||||||
|
network.
|
||||||
|
|
||||||
|
E.g. run latest + backfill with audit mode:
|
||||||
|
```bash
|
||||||
|
WEB3_URL="http://127.0.0.1:8546" # Replace with your provider.
|
||||||
|
./build/portal_bridge history --latest:true --backfill:true --audit:true --era1-dir:/somedir/era1/ --web3-url:${WEB3_URL}
|
||||||
|
```
|
||||||
|
|
||||||
### Seeding post-merge history data with the `beacon_lc_bridge`
|
### Seeding post-merge history data with the `beacon_lc_bridge`
|
||||||
|
|
||||||
The `beacon_lc_bridge` is more of a standalone bridge that does not require access to a full node with its EL JSON-RPC API. However it is also more limited in the functions it provides.
|
The `beacon_lc_bridge` is more of a standalone bridge that does not require access to a full node with its EL JSON-RPC API. However it is also more limited in the functions it provides.
|
||||||
|
|
|
@ -116,7 +116,7 @@ type
|
||||||
audit* {.
|
audit* {.
|
||||||
desc:
|
desc:
|
||||||
"Run pre-merge backfill in audit mode, which will only gossip content that if failed to fetch from the network",
|
"Run pre-merge backfill in audit mode, which will only gossip content that if failed to fetch from the network",
|
||||||
defaultValue: false,
|
defaultValue: true,
|
||||||
name: "audit"
|
name: "audit"
|
||||||
.}: bool
|
.}: bool
|
||||||
|
|
||||||
|
|
|
@ -289,8 +289,8 @@ proc runLatestLoop(
|
||||||
let elapsed = t1 - t0
|
let elapsed = t1 - t0
|
||||||
if elapsed < newHeadPollInterval:
|
if elapsed < newHeadPollInterval:
|
||||||
await sleepAsync(newHeadPollInterval - elapsed)
|
await sleepAsync(newHeadPollInterval - elapsed)
|
||||||
else:
|
elif elapsed > newHeadPollInterval * 2:
|
||||||
warn "Block gossip took longer than the poll interval"
|
warn "Block gossip took longer than slot interval"
|
||||||
|
|
||||||
proc gossipHeadersWithProof(
|
proc gossipHeadersWithProof(
|
||||||
portalClient: RpcClient,
|
portalClient: RpcClient,
|
||||||
|
|
Loading…
Reference in New Issue