Skip to content

Moonbase Alpha, The Moonbeam TestNet

Updated December 14, 2020

Goal

The first Moonbeam TestNet, named Moonbase Alpha, aims to provide developers with a place to start experimenting and building on Moonbeam in a shared environment. Since Moonbeam will be deployed as a parachain on Kusama and Polkadot, we want our TestNet to reflect our production configuration. For this reason, we decided that it needed to be a parachain-based configuration rather than a Substrate standalone setup.

In order to collect as much feedback as possible and provide a fast resolution on issues, we have set up a Discord with a dedicated Moonbase AlphaNet channel.

Initial Configuration

Moonbase Alpha has the following configuration:

  • Infrastructure is hosted by PureStake
  • Moonbeam runs as a parachain connected to a relay chain
  • The parachain has two collator that are collating blocks
  • The relay chain hosts three validators to finalize relay chain blocks. One of them is selected to finalize each block collated by Moonbeam's collators. This setup provides room to expand to a two-parachain configuration in the future
  • There are two RPC endpoints

TestNet Diagram

Features

The following features are available:

  • Fully emulated Ethereum block production in Substrate (Ethereum pallet) v1
  • Dispatchable functions to interact with the Rust EVM implementation (EVM pallet) v1
  • Native Ethereum RPC support (Web3) in Substrate (Frontier RPC). This provides compatibility with Ethereum developer tools such as MetaMask, Truffle, and Remix v1
  • Event subscription support (pub/sub), which is a missing component on the Web3 RPC side and commonly used by dApp developers. You can find a tutorial on how to subscribe to events here v2
  • Support for the following precompile contracts: ecrecover, sha256, ripemd160 and the identity function (or datacopy) v2
  • Unification of Substrate and Ethereum accounts under the H160 format, an effort we are calling Unified Accounts. Consequently, there will be only one kind of account in the system represented by a single address v3
  • Upgrades to the event subscription support, adding the possibility of using wildcards and conditional formatting for topics. You can find more information here v3
  • Polkadot JS Apps now natively supports H160 addresses and ECDSA keys. You can use your Ethereum-style address for Substrate functions (when available) such as: staking, balances and governance. You can find more information here v3
  • Updated to the newest version of the Polkadot parachain protocol (Parachains V1), which fixed several issues with node syncing, paving the way to have multiple collators to sync in the same parachain v4
  • Multiple improvements to our Etheruem Compatibility features:
    • Event subscrition ID now returns a Ethereum-styled subscription ID v4
    • Fixed gas estimation issues for specific usecases v4
    • Added support for revert reason message v4
    • Support for Ethereum transactions without ChainId v4

Release Notes

For more details regarding the updates of Moonbase Alpha, please refer to the following release notes:

Future Releases

Features that may be implemented in the future:

  • Support for third-party collators to enable interested parties to test their setups
  • Implementation of the rewards system, as well as the token economic model (Staking Pallet)
  • On-chain governance features (Democracy Pallet).
  • Treasury features (Treasury Pallet)

Get Started

HTTPS DNS

To connect to Moonbase Alpha via HTTPS, simply point your provider to the following RPC DNS:

https://rpc.testnet.moonbeam.network

For the web3.js library, you can create a local Web3 instance and set the provider to connect to Moonbase Alpha (both HTTP and WS are supported):

const Web3 = require('web3'); //Load Web3 library
.
.
.
//Create local Web3 instance - set Moonbase Alpha as provider
const web3 = new Web3('https://rpc.testnet.moonbeam.network'); 

For the ethers.js library, define the provider by using ethers.providers.JsonRpcProvider(providerURL) and setting the provider URL to Moonbase Alpha:

const ethers = require('ethers');


const providerURL = 'https://rpc.testnet.moonbeam.network';
// Define Provider
let provider = new ethers.providers.JsonRpcProvider(providerURL);

Any Ethereum wallet should be able to generate a valid address for Moonbeam (for example, MetaMask).

WSS DNS

For WebSocket connections, you can use the following RPC DNS:

wss://wss.testnet.moonbeam.network

Chain ID

For the Moonbase Alpha TestNet the chain ID is: 1287.

Proof of Authority

Moonbase Alpha will run similarly to the way the Polkadot MainNets ran when they first launched: with Proof of Authority instead of Proof of Stake. This means that block finalization is carried out by a known identity, in this case, the PureStake validators.

This also means that PureStake holds the Sudo Key in order to issue the commands and upgrades necessary to the network.

Tokens

Tokens on Moonbase Alpha, named DEV, will be issued on demand. Currently, there are two ways you can get access to this token: through a Discord bot, or manually.

Discord - Mission Control

To request tokens automatically, we've created a Discord bot (named Mission Control 😎) that will automatically send a maximum of 10 DEV tokens per hour (per Discord user) when you enter your address. You can check it out on our Discord channel. For more information, please visit this site.

Under the category "Miscellaneous", you will find our AlphaNet bot channel. Enter the following message, replacing <enter-address-here-> with your H160 address:

!faucet send <enter-address-here->

Manual Procedure

For token requests of more than the limited account allowed by our Discord bot, contact a moderator directly via our Discord channel. We are happy to provide the tokens needed to test your applications.

Limitations

This is the first TestNet for Moonbeam, so there are some limitations.

Some precompiles are yet to be included in this release. You can check a list of the precompiles supported here. However, all built-in functions are available.

In order to provide an easy on-ramp for developers, this early iteration has no gas limit per block for execution of smart contracts. This is temporary and will be adjusted in the future.

Users only have access to the Moonbeam parachain. In future networks, we will add access to the relay chain so users can test transferring tokens.

Chain Purge

This network is under active development. Occasionally, chain purges may be needed in order to reset the blockchain to its initial state. This is necessary when doing major TestNet upgrades or maintenance. We will announce when a chain purge will take place via our Discord channel at least 24 hours in advance.

Please take note that PureStake will not be migrating the chain state. Thus, all data stored in the blockchain will be lost when a chain purge is carried out. However, as there is no gas limit, users can easily recreate their pre-purge state.

Contact Us

If you have any feedback regarding Moonbase Alpha, feel free to reach out through our official development channel on Discord .