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

docs: add docs for greenfield peer for BSC network #417

Merged
merged 4 commits into from
Jul 24, 2024
Merged
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
3 changes: 1 addition & 2 deletions docs/bnb-greenfield/for-developers/data-archive/blob-hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ blob-syncer service continuously fetches blobs from Ethereum and other blockchai
api-server handles historical blob query requests from users. The bundle-service can aggregate blobs together, validate
their correctness, and upload them to Greenfield efficiently.

![Blob Hub Solution](../../static/asset/blob-hub-1.png)
Blob Hub Solution
![Blob Hub Solution](../../static/asset/blob-hub.png)

The syncing process ensures that no blob is missing and each blob synced to Greenfield is consistent. This is achieved
by running a post-verification process that scans all uploaded blobs again, conducts integrity checks against data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ conducts validation checks against data already stored in Greenfield, and detect
Node operators requiring full sync from the genesis block need access to historical block data via the Block-Archiver.
Leveraging Greenfield's robust infrastructure, they can trust the integrity and availability of the stored data.

Note: The Greenfield community is currently working on a solution, the Greenfield Peer, which aims to use the Block-Archiver as back-end,
provides fullsync Nodes block data. More info will be available soon.
The Greenfield community has launched the `Greenfield Peer`, a data-seed solution for those who need to run BSC nodes in fullsync mode. For more details, check out this [page](../greenfield-peer).

## Data Analysts and Researchers

Expand All @@ -47,7 +46,7 @@ data. By leveraging Block-Archiver, they can collect reliable data for analysis,
# Accessing Block Data with Block-Archiver

Block-Archiver supports BSC now and its API is fully compatible with Ethereum API specifications, ensuring ease of integration for
developers. Detailed information about supported networks and endpoints can be found in the documentation. For more details
developers. Detailed information about supported networks and endpoints can be found in [network and endpoints](../network-endpoint/endpoints.md#Block Archiver). For more details
about the API spec, please refer to [Block-Archiver API](https://github.com/bnb-chain/greenfield-bsc-archiver/?tab=readme-ov-file#block-archiver-api)

# Try It Out
Expand Down
42 changes: 42 additions & 0 deletions docs/bnb-greenfield/for-developers/data-archive/greenfield-peer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Greenfield Peer, a BSC data-seed By Greenfield
keywords: [ BNB Greenfield, NodeReal, Data Archive Layer, Greenfield Peer]
---

# Greenfield Peer

With the launch of the [block-archiver](../block-archiver), BSC historical block data is now accessible on Greenfield.
For those operating BSC nodes in fullsync mode, connecting to the Greenfield peer is a beneficial choice. The Greenfield peer
fetches block data from Greenfield and supplies it to BSC nodes via the P2P network.

## How Greenfield Peer Works

The diagram below illustrates the functionality of the Greenfield Peer. While the Greenfield peer does not participate in
other operations within the BSC network, it solely provides block data to BSC nodes. It does not persist any data on its own;
instead, when it receives requests (GetBodies and GetHeaders) from other BSC nodes, it fetches a bundle of blocks (# of blocks determined
by the Block Archiver Service) from Greenfield and caches them in memory. This ensures the Greenfield peer delivers block data
to BSC nodes efficiently.

![gnfd peer](../../static/asset/gnfd-peer.png)

## How to interact with Greenfield Peer

Utilizing the Greenfield Peer is straightforward. Configure your BSC node to connect to the Greenfield Peer by adjusting the
settings in your configuration file.

Navigate to the P2P section of your BSC node configuration file and specify the enode info of the Greenfield Peer.

```toml
# other configurations are omitted
...
[Node.P2P]
MaxPeers = 1
NoDiscovery = true
TrustedNodes = []
StaticNodes = ["${enode_info}"]
...
```

The `enode_info` for Testnet and Mainnet will be coming soon


Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,9 @@ order: 3
- `https://opbnb-testnet.nodereal.io/v1/e9a36765eb8a40b9bd12e680a1fd2bc5`

For more details, you can refer to [here](network-info.md).

### Block Archiver
- **BSC:**
unclezoro marked this conversation as resolved.
Show resolved Hide resolved
- `https://gnfd-bsc-archiver-testnet.bnbchain.org`
unclezoro marked this conversation as resolved.
Show resolved Hide resolved

By accessing the above endpoints, you can retrieve historical block data from the BSC network. For comprehensive information, please refer to the [Block-Archiver documentation](../data-archive/block-archiver.md).
Binary file removed docs/bnb-greenfield/static/asset/blob-hub-1.png
Binary file not shown.
Binary file added docs/bnb-greenfield/static/asset/blob-hub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/bnb-greenfield/static/asset/block-archiver.png
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 docs/bnb-greenfield/static/asset/gnfd-peer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/bnb-smart-chain/developers/node_operators/full_node.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ The **full** sync mode can also be used to do initial sync, which will execute a

If the flag **--syncmode** is not provided, the default sync mode will depend on the state of the data folder. It will be **snap** mode if you sync from genesis or **full** mode if you start from a snapshot.

### Full Sync with Greenfield Peer (Optional)

Opting for **full** sync mode means your node will only need block headers and bodies from other network peers. To expedite this process,
consider utilizing the `Greenfield Peer`.

This data seed, offered by Greenfield, allows for a more efficient synchronization.
Configure your BSC node to connect with the Greenfield Peer by modifying your configuration file settings.
For comprehensive instructions, see [Greenfield Peer](../../../bnb-greenfield/for-developers/data-archive/greenfield-peer.md).

## Local Private Network
Please refer to [BSC-Deploy Tools](https://github.com/bnb-chain/node-deploy) to setup a local private network.

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ nav:
- Overview: ./bnb-greenfield/for-developers/data-archive/data-archive-layer.md
- Blob Hub: ./bnb-greenfield/for-developers/data-archive/blob-hub.md
- Block Archiver: ./bnb-greenfield/for-developers/data-archive/block-archiver.md
- Greenfield Peer: ./bnb-greenfield/for-developers/data-archive/greenfield-peer.md
- Tutorials:
- Overview: ./bnb-greenfield/for-developers/tutorials/overview.md
- Basic File Management with CLI: ./bnb-greenfield/for-developers/tutorials/file-management-overview.md
Expand Down
Loading