Harmony Foundation’s Service Externalization Plan

Leo Chen
Harmony
Published in
4 min readJan 20, 2021

Decentralization and externalization is the only way to have the blockchain long-lived with the support of the community.

As a layer1 blockchain, to facilitate the user and developer experience, Harmony has provided many other services and infrastructure in addition to the blockchain core since the launch of the mainnet.

The Harmony Foundation is actively looking for external parties to fully own and maintain those services with subsidiaries from the Foundation. We are calling for builders and service operators to take over those services currently operated by Harmony since last year. Here is a short summary of the externalization project. Interested in becoming a service provider, please do not hesitate to contact the Harmony team via our discord or telegram.

Agreement

For each service externalized, the Harmony engineering team will provide:

  • knowledge/codebase transfer
  • architecture guidance and review
  • migration process support

Harmony Foundation will provide sufficient financial incentives and initial service maintenance costs to ensure the service owners have a successful migration.

Each service owner will be the full owner of the service’s open-source repository, database, and cloud infrastructure.

Service owners need to provide:

  • Service Level Agreement (SLA) to ensure the high availability of the service
  • Technical support to end-users in discord/telegram/Twitter
  • Regular release and codebase maintenance/enhancement

Services

Among all the services provided by the Harmony team, the following is the priority list for externalization.

RPC endpoints

Harmony explorer node is also called a non-validating node. It is a full node of the Harmony blockchain but doesn’t join in the consensus. It is mainly used as the RPC/WS endpoints to access the RPC APIs provided by Harmony blockchain. It is also an archival node of the blockchain.

Harmony right now provides the public RPC endpoints to our partners or dApp developers, similar to the Infura project in the Ethereum ecosystem. Any validator can actually run a public RPC endpoint by opening their IP and Port to the general public.

This externalization project is to ask for an infrastructure provider to run the public RPC endpoints for Harmony blockchain. It can be built as a SaaS company or a pure non-profit service.

The requirement to the infrastructure provider include:

  • high availability service (99.99% uptime)
  • scalability, regular request 5k-10k per minutes, peak request 35k per minutes
  • security measurements to defend against DDoS attack
  • regular update to keep up with the release of the Harmony node program

As Harmony is a sharded blockchain, there is one explorer node setup per shard (4 shards). Explorer node on shard 0 is currently responsible for most of the transaction request as all the exchange partners are using shard 0.

The cost of running explorer nodes may include:

  • VPS cost
  • storage cost
  • redundancy setup cost
  • network data transfer cost from some cloud providers
  • monitoring and maintenance cost
  • operational cost of the software update, test, release

Recommended setup

  • four explorer nodes, one per shard
  • one additional explorer nodes as load balancing on shard0
  • use the local disk to save cloud disk cost
  • load balancer setup with rate limit to protect against DDoS
  • use a cloud provider that includes traffic costs, such as Digital Ocean, or AWS Lightsail. Or colocated bare metal servers.

Block Explorer

The Harmony block explorer is an essential service to provide detailed block/transaction explorer to users/developers. The current architecture of the explorer includes front-end, back-end, and database.

The backend is responsible for querying block/transaction data from the explorer nodes and save it to another DB for caching purposes. The frontend will query the DB to display on the browser.

The current infrastructure setup is using one server running both frontend and backend, and use Google Cloud Firestore DB as the DB backend. The explorer is also lacking in-depth smart contract tracking support.

Block Explorer provider can fork the harmony repo and do regular maintenance to release the latest version to the public. Additional development on the block explorer is still ongoing. Thus the service operator shall keep a close track of the development or join the governance committee of the explorer project.

Since Harmony has the full support of the Coinbase Rosetta API, additional block explorers can also be built by the service providers such as block explorer built on Rosetta API, such as https://github.com/figment-networks/rosetta-inspector/

One Wallet

One Wallet is a chrome plugin developed in-house by the Harmony team. It supports harmony mainnet/testnet, cross-shard transaction, native ONE token, and HRC20 tokens. It is currently integrated with Harmony SDK. We encourage developers to take over the repo and keep improving it, by supporting swap or HRC721 token, etc. The open-source repo of the onewallet is here.

Monitoring Service

Monitoring services are websites to keep track of account balances and network status. They can be built on top of the new Rosetta API and p2p heartbeat messages. Harmony provided Prometheus metrics to all nodes in the network, which can be easily consumed from the gateway website. The account list has been developed and maintained by the validator SmartStake.

Snapshot Service

Harmony runs a snapshot service of the blockchain data in order for validators to quickly spin up a new validator node. The service is hosted on Amazon S3 public bucket. They can be hosted on any public download service or IPFS. The current size of the blockchain data as of Dec/2020.

  • shard0: 9.3GB
  • shard1: 3.4GB
  • shard2: 3.4GB
  • shard3: 3.4GB

--

--