Skip to content

The Moonbase Alpha TestNet

Updated May 27th, 2021

Note

With the release of Moonbase Alpha v8, the minimum gas price has been set to 1 GDEV (similar to GWei on Ethereum). This might be a breaking change if you've previously specified a gas price of 0 for your deployment.

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 development setup.

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

Initial Configuration

Moonbase Alpha has the following configuration:

  • Moonbase Alpha runs as a parachain connected to a relay chain
  • The parachain has two collators (hosted by PureStake) that are collating blocks. External collators can join the network. Only the top 32 collator nodes by stake are chosen in the active set
  • The relay chain hosts three validators (hosted by PureStake) 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 (hosted by PureStake). People can run full nodes to access their own private RPC endpoints

TestNet Diagram

Features

The following features are available:

September 2020
  • Fully-emulated Ethereum block production in Substrate (Ethereum pallet)
  • Dispatchable functions to interact with the Rust EVM implementation (EVM pallet)
  • Native Ethereum RPC support (Web3) in Substrate (Frontier). This provides compatibility with Ethereum developer tools such as MetaMask, Remix, and Truffle
October 2020
  • 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
  • Support for the following precompile contracts: ecrecover, sha256, ripemd160 and the identity function (or datacopy)
November 2020
  • 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
  • Upgrades to the event subscription support, adding the possibility of using wildcards and conditional formatting for topics. You can find more information here
  • Polkadot JS Apps now natively supports H160 addresses and ECDSA keys. You can use your Ethereum-style address for Substrate functions (when available) like staking, balances, and governance. You can find more information here
December 2020
  • 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
  • Multiple improvements to our Etheruem Compatibility features:
    • Event subscription ID now returns an Ethereum-styled subscription ID
    • Fixed gas estimation issues for specific usecases
    • Added support for revert reason message
    • Support for Ethereum transactions without ChainId
January 2021
  • Added a custom version of the Staking pallet (for testing and development purposes only)
  • Added support for querying pending transactions while they are in the pool
  • Fixed some issues when retrieving past events and other minor fixes related to smart contract events
  • Multiple under-the-hood improvements that include an optimization of the EVM execution time, making it 15-50 times faster
  • Support for the modexp precompile contracts
February 2021
  • Public release of the custom Staking pallet. Now token holders can nominate collators and earn rewards
  • Added the Democracy pallet. Token holders can now submit proposals and vote on them
  • Updated to the latest version of Frontier RPC, which increases EVM execution efficiency by a factor of 5
  • The gas limit has been bump to 15M per block, with a 13M per transaction limit
April 2021
  • Added support for Ethereum debug/tracing modules. These are turned off by default, to use them you need to spin up a full-node and turn on the feature
  • Fixed block propagation issues so that is not longer limited to collators, improving network stability
  • Added Councils and Technical Committee, expanding governance features
  • Staking module has been refactored, with new names to improve the end-user experience
  • Added three new precompiles: Bn128Add, Bn128Mul and Bn128Pairing
May 2021
  • Added the Treasury pallet, to bring Treasury functionalities to Moonbase Alpha. Two separate treasuries were set up: one receiving 20% of the transaction fees and governed by democracy/councils, and the other receiving 30% of the block rewards that will serve to secure future parachain slots
  • Added the Proxy pallet, which enables the use of Proxy accounts on Moonbase Alpha
  • Introduced a new consensus mechanism, called Nimbus. Nimbus provides different filters to choose a random subset of the current active collator pool to produce the next block. Furthermore, block authors now sign blocks using session keys, which are mapped via an extrinsic to an H160 address for rewards payment. You can read more about Nimbus here
  • Added a Staking precompiled contract contract at address 0x0000000000000000000000000000000000000800. An interface to interact with the contract can be found on this link
  • Added preliminary logs bloom filtering to match user requests through Frontier. This feature was further optmized to achieve faster response times and a more predictable performance
  • Added the parachain Crowdloan pallet to test the distribution of rewards
  • Many improvements that aim to enhance network stability
  • Minimum gas price has been increased to 1 GDEV (analog to GWei on Ethereum)

Release Notes

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

Get Started

The Moonbase Alpha RPC and WSS endpoints hosted by PureStake are for development purposes only and are not meant to be used in production applications. The following are alternative endpoint providers:

HTTPS DNS

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

https://rpc.testnet.moonbeam.network
https://moonbeam-alpha.api.onfinality.io/public

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.StaticJsonRpcProvider(providerURL, {object}) and setting the provider URL to Moonbase Alpha:

const ethers = require('ethers');


const providerURL = 'https://rpc.testnet.moonbeam.network';
// Define Provider
const provider = new ethers.providers.StaticJsonRpcProvider(providerURL, {
    chainId: 1287,
    name: 'moonbase-alphanet'
});

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 DNS:

wss://wss.testnet.moonbeam.network
wss://moonbeam-alpha.api.onfinality.io/public-ws
wss://moonbase.moonbeam.elara.patract.io

Chain ID

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

Relay Chain

To connect to the Moonbase Alpha relay chain, managed by PureStake, you can use the following WS Endpoint:

wss://wss-relay.testnet.moonbeam.network

Telemetry

You can see current Moonbase Alpha telemetry information visiting this link.

Tokens

Tokens on Moonbase Alpha, named DEV, will be issued on demand. DEV tokens hold no value and can be freely acquired. 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 5 DEV tokens every 24 hours (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.

Early Stage Proof of Stake

With the release of Moonbase Alpha v6, the TestNet is now running with an early stage Proof of Stake system. Currently the active set consists of 32 collators, which are nominated with DEV funds held by the team.

As Moonbase Alpha progresses, we expect to evolve into a fully decentralized Proof of Stake network.

Limitations

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

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

Since the release of Moonbase Alpha v6, the maximum gas limit per block has been set to 15M, with a maximum gas limit per transaction of 12.995M.

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.