-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90817ec
commit 55c026e
Showing
10 changed files
with
108 additions
and
106 deletions.
There are no files selected for viewing
56 changes: 0 additions & 56 deletions
56
docs/bnb-greenfield/for-developers/data-archive/block-archiver.md
This file was deleted.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
docs/bnb-greenfield/for-developers/data-archive/block-hub.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: BlockHub | ||
description: Archive blocks on Greenfield | ||
keywords: [ BNB Greenfield, NodeReal, Data Archive Layer, BlockHub ] | ||
--- | ||
|
||
# BlockHub | ||
|
||
BlockHub offers a lightweight, trustless, and decentralized method for accessing blockchain data. It provides a user experience | ||
that is fully consistent with the original network's RPC and P2P access, eliminating the need for users to run full nodes or | ||
rely on centralized data providers to fetch block data. Don't want to trust a third party provider to provide the block data? | ||
Greenfield Blockhub is the answer. BlockHub is alive for BSC now. | ||
|
||
Much like Blob Hub, which uses the Bundle Service to archive blobs into a single bundle, BlockHub leverages | ||
the bundle service to combine a range of blocks into a single bundle. This approach optimizes storage usage, ensures cost-effectiveness, | ||
and maintains data integrity and accessibility. | ||
|
||
Note: Greenfield charges a fee for both storing and accessing objects. If the bucket owner's payment account lacks sufficient balance, | ||
users will be unable to query data until the quota is refilled. | ||
|
||
# How BlockHub Operates | ||
|
||
The BlockHub comprises three main components: | ||
|
||
- Block Indexer: This service continuously indexes blocks from the Blockchain and stores them in Greenfield. It ensures no block is missed and that each stored block is accurate. | ||
- API Server: This component handles user requests for historical block data, providing seamless access to the stored blocks. | ||
- Light Peers: It is a blockchain client that is backed by Greenfield storage but can serve in the P2P network. Refer to the [Light Peer](./light-peer.md) documentation for more details. | ||
|
||
![BlockHub](../../static/asset/block-hub.png) | ||
|
||
The indexing process ensures data integrity by running a post-verification process. This process scans all uploaded blocks, | ||
conducts validation checks against data already stored in Greenfield, and detects any missing data. | ||
|
||
# Who Needs to Access the BlockHub? | ||
|
||
## Node Operators | ||
|
||
Node operators requiring full sync from the genesis block need access to historical block data via the BlockHub. | ||
Leveraging Greenfield's robust infrastructure, they can trust the integrity and availability of the stored data. | ||
|
||
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](./light-peer.md). | ||
|
||
## Data Analysts and Researchers | ||
|
||
BlockHub offers a valuable resource for data analysts and researchers who need comprehensive access to historical block | ||
data. By leveraging BlockHub, they can collect reliable data for analysis, research, and development purposes. | ||
|
||
# Accessing Block Data with BlockHub | ||
|
||
BlockHub 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 [network and endpoints](../network-endpoint/endpoints.md#BlockHub). For more details | ||
about the API spec, please refer to [BlockHub API](https://github.com/bnb-chain/greenfield-bsc-archiver/?tab=readme-ov-file#BlockHub-api) | ||
|
||
# Try It Out | ||
|
||
Adopting this innovative solution ensures the integrity, accessibility, and longevity of blockchain data, supporting a more | ||
resilient and transparent digital ecosystem. Join the Greenfield community today and set a new standard for blockchain data | ||
reliability and security. |
42 changes: 0 additions & 42 deletions
42
docs/bnb-greenfield/for-developers/data-archive/greenfield-peer.md
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
docs/bnb-greenfield/for-developers/data-archive/light-peer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Light Peer, a BSC data-seed By Greenfield | ||
keywords: [ BNB Greenfield, NodeReal, Data Archive Layer, Light Peer] | ||
--- | ||
|
||
# Light Peer | ||
|
||
With the launch of the [block-hub](./block-hub.md), BSC historical block data is now accessible on Greenfield. | ||
For those operating BSC nodes in fullsync mode, connecting to the Light peer is a beneficial choice. The Light peer | ||
fetches block data from Greenfield and supplies it to BSC nodes via the P2P network. | ||
|
||
## How The Light Peer Works | ||
|
||
The diagram below illustrates the functionality of the Light peer. While the Light 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 Indexer) from Greenfield and caches them in memory. This ensures the Light peer delivers block data | ||
to BSC nodes efficiently. | ||
|
||
![light peer](../../static/asset/light-peer.png) | ||
|
||
## How to interact with Light Peer | ||
|
||
Utilizing the Light Peer is straightforward. Configure your BSC node to connect to the Light 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 Light peer. | ||
|
||
```toml | ||
# other configurations are omitted | ||
... | ||
[Node.P2P] | ||
MaxPeers = 1 | ||
NoDiscovery = true | ||
TrustedNodes = [] | ||
StaticNodes=["enode://a2c586f41d2cc6dc7445e32922305e92b4de7daad718744d12bf105a79715606330535cffae6a0d60c61567ff772796d906fcb72b9cbb578f10de3221bb34015@13.115.90.65:30303?discport=0"] | ||
... | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters