Moonbase Alpha, The Moonbeam TestNet¶
Updated October 12, 2020
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.
Moonbase Alpha has the following configuration:
- Infrastructure is hosted by PureStake.
- Moonbeam runs as a parachain connected to a relay chain.
- The parachain has one collator that is producing blocks.
- The relay chain hosts three validators to finalize relay chain blocks. One of them is selected to finalize each block produced by Moonbeam's only collator. This setup provides room to expand to a two-parachain configuration in the future.
- There are two RPC endpoints.
The following features are available:
- 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 RPC). This provides compatibility with Ethereum developer tools such as MetaMask, Truffle, and Remix.
- 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).
For more details regarding the updates of Moonbase Alpha v2, please refer to the release notes.
We have many features on Moonbase's roadmap, planned for the next release:
- 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.
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).
To connect to Moonbase Alpha via HTTPS, simply point your provider to the following RPC DNS:
For the Web3 library, create a local Web3 instance and set the provider to connect to the Moonbeam TestNet:
const Web3 = require('web3'); //Load Web3 library . . . //Create local Web3 instance - set the Moonbeam TestNet as provider const web3 = new Web3('https://rpc.testnet.moonbeam.network');
Any Ethereum wallet should be able to generate a valid address for Moonbeam (for example, MetaMask).
For WebSocket connections, you can use the following RPC DNS:
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 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->
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.
This is the first TestNet for Moonbeam, so there are some limitations.
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.
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.
If you have any feedback regarding Moonbase Alpha, feel free to reach out through our official development channel on Discord .