MassBit Route
Search…
📦
Components
Main component in Massbit network

Massbit Core

  • Massbit Core (MC) is the orchestrator of the entire Massbit network. New Nodes and Gateways that need to join Massbit network can obtain installation script and network configuration generated by MC.
  • MC works along with other components to onboard new Gateways and Nodes onto the Massbit network, and make sure traffic is routed by Gateways and Nodes effectively. When Providers need to operate Nodes or Gateways in the Massbit network, they need to obtain a set of instructions created by the MC from the Portal for their servers. By executing the instructions in the form of a bash shell script, the server will negotiate with MC and Verification Service if it is qualified to participate in the MassBit routing network. Once a Gateway is successfully verified in the Massbit network, MC provides a list of dAPI entry-points and Nodes in the same zone the Gateway needs to server request and forward traffic respectively.
  • As the Massbit Route network grow globally and blockchain traffic needs to be directed optimally, MC constantly updates Gateways with a set of traffic routing and handling instruction to adopt a change within the Massbit network. For example, when some nodes in a zone go offline, new nodes are added or Consumers adjust the request rate for dAPI entry-point, MC generates a new set of configurations for all of the Gateway in the zone.

Gateway Manager

  • Gateway Manager the DNS component of Massbit network based on the opensource project gdnsd. It runs as an authoritative DNS system of the Massbit network, and can be seen as a directory for all Community Gateways and Nodes around the world.
  • When a dApp queries blockchain API through a Massbit dAPI entry-point, it needs to look the IP address for the dAPI entry-point through their configured recursive DNS servers. If the recursive DNS servers do not have the entry for the dAPI entry-point, they will perform an authoritative lookup to Gateway Manager. With geographic IP capability, Gateway Manager resolves the DNS lookup with the IP of the Gateway closest to the requesting DApp based on the source IP in the request Header.
  • A dAPI entry-point URL has the following format:
https://[API ID].eth-mainnet.massbitroute.dev/[API key]
wss://[API ID].eth-mainnet.massbitroute.dev/[API key]
  • The host portion in the dAPI URL is a dynamic DNS entry in Gateway Manager. The resolved IP in the authoritative response by Gateway Manager will vary depending on the source IP in the request Header.

Session Manager

  • Massbit Core (MC) is the orchestrator of the entire Massbit network. New Nodes and Gateways that need to join Massbit network can obtain installation script and network configuration generated by MC.
  • MC works along with other components to onboard new Gateways and Nodes onto the Massbit network, and make sure traffic is routed by Gateways and Nodes effectively. When Providers need to operate Nodes or Gateways in the Massbit network, they need to obtain a set of instructions created by the MC from the Portal for their servers. By executing the instructions in the form of a bash shell script, the server will negotiate with MC and Verification Service if it is qualified to participate in the MassBit routing network. Once a Gateway is successfully verified in the Massbit network, MC provides a list of dAPI entry-points and Nodes in the same zone the Gateway needs to server request and forward traffic respectively.
  • As the Massbit Route network grow globally and blockchain traffic needs to be directed optimally, MC constantly updates Gateways with a set of traffic routing and handling instruction to adopt a change within the Massbit network. For example, when some nodes in a zone go offline, new nodes are added or Consumers adjust the request rate for dAPI entry-point, MC generates a new set of configurations for all of the Gateway in the zone.

Fisherman

  • Massbit Route becomes a faster and more reliable BDN when the number of Community Nodes and Gateway increases. For that reason, Nodes and gateways need to meet certain bandwidth and latency requirements checks by Fishermans in order to be part of Massbit global network. Fisherman Pallet is an Off-Chain Woker that is included with the Massbit Gateway installation script. The more Massbit Gateways are deployed, the more decentralized this service become, which make the process of node/gateway onboarding un-biased.
  • When a Node requests to join the Massbit network, nearest Fishermans checks if the Node is able to forward requests to its blockchain data source and return results matching with the blockchain data source such as block data, block hash, and runtime version. If all checks passed the validation process, the node becomes a part of the Massbit network and gets ready to receive traffic from Gateways in the same zone.
  • In each zone, a minimum of 1 Node is required in order for a Gateway to be verified. Without any Node or blockchain data source, it is unnecessary to run a Gateway in that zone because it introduces some routing overhead, and traffic will eventually be routed to the nearest zone.
  • When a Gateway needs to join the Massbit network, Fisherman will validate if the Gateway has obtained a list of Node in its zone from Massbit Core and whether it can proxy traffic to the Nodes properly. If blockchain data returned by Gateway is correct and match with data from the Node and blockchain data source in that zone, the Gateway is verified and its public IP is updated in the Gateway Manager directory.

Stats

  • Stats collects telemetry from all verified Gateways and Nodes in the Massbit network. The service provides different metric data to allow the Portal to visualize Nodes and Gateway performance with charts. In addition, it calculates and keeps track of the available quota for each dAPI based on the amount of MBT token deposit.

Massbit Route blockchain

  • Building on the Substrate framework, the Massbit chain is a source of truth for token-related activities in the Massbit network. Massbit Consumers need to pay fees in MBT tokens in exchange for global dAPI service. In return, Providers earns rewards from Consumers' fee for handling blockchain API requests and maintaining the stability of the network. Through the Massbit chain, anyone can verify Providers' and Consumers' activities with the following pallets:
  • Provider/Delegator activities Pallet
    • Staking/Un-staking amount on each Node/Gateway
    • Reward calculated after each Era from Consumer fees ​
    • Reward claim history ​
    • Node/Gateway State reported by Fisherman ​
    • Node verified duration eligible for staking reward​
    • Provider Wallet and transactions
    • Staking/Un-staking amount on delegated Node/Gateway
  • Consumer activities Pallet
    • dAPI deposit fee
    • dAPI remaining quota based on past usage on the deposit fee
    • Consumer wallet and transactions

Portal

Portal is the user-interface of Massbit Route that allows user to user to perform the following activities:
  • Create/stake/unregister Nodes and Gateways
  • Obtain installation script for Nodes and Gateways
  • Claim reward for Nodes and Gateways
  • Visualize traffic of Nodes, Gateway and dAPI entry-point
  • Create dAPI entry-point and view quota
  • Deposit fee for dAPI

Community Gateway

  • Gateways are entry-points to the Massbit network, which receive blockchain API requests from dApps. It keeps a list of verified Nodes in the same zone, and forward requests to those nodes. It also stores static content of blockchain requests to reduce the response time for identical requests that come in later
  • Utilizing Open Resty framework, Gateways are responsible for blockchain traffic within each zone. The robust functionalities of Open Resty framework allow advanced and efficient routing capabilities for Massbit dAPI entry-points including:
    • Load Balancing for multiple Node-as-a-Service endpoints like Infura or Getblock
    • Accepting blockchain requests from dAPI entry-points
    • Rate limiting
    • Geo IP detection and routing for optimal response time
    • Edge caching
    • Routing to only functional Upstream servers (Massbit Node)

Community Node

  • Community Nodes receive requests from upstream Community Gateway and forward them to the attached blockchain data source. In addition, it works with Massbit Fisherman to make sure the data source is available and synchronized with peers before it can receive new blockchain API requests from Gateways.
  • Also utilizing Open Resty framework, it acts as one of the Upstream Servers for all of the Massbit Gateways in the same zone and forwards traffic to its own blockchain data source.
  • Node Providers can make their own decision whether to run Massbit Node and blockchain RPC node on the same host/server or different ones.
Copy link
On this page
Massbit Core
Gateway Manager
Session Manager
Fisherman
Stats
Massbit Route blockchain
Portal
Community Gateway
Community Node