Local Blockchain Network

You may wish to run your own private Aion blockchain to build and test your dApp.

🚧

Aion Node

Make sure you have already set-up your node and created an account.

Modify Configure File Names

Note that your aion/config folder contains two JSON files: genesis.json and testnet.json.

  1. Rename the original genesis.json file to a different name
  2. Rename the original testnet.json file to "genesis.json"

This lowers the difficulty of the network for testing & development purposes.

Configure the config.xml

  1. Navigate to the aion/config folder and open config.xml
  2. Delete all the seed nodes in the section:
<nodes>
</nodes>
  1. Set to true in the section to enable internal mining:
<consensus>
  <mining>true</mining>
<consensus>

Get Balance into Test Account

  1. Open the new genesis.json file
  2. Replace one of the current addresses in the "alloc" object with your newly created account address:
{
  "alloc": {
    "0x------------------your-account-address--------------------------": {
      "balance": "314159000000000000000000"
    },
    "0xa0353561f8b6b5a8b56d535647a4ddd7278e80c2494e3314d1f0605470f56925": {
      "balance": "314159000000000000000000"
    },
    "0xa0274c1858ca50576f4d4d18b719787b76bb454c33749172758a620555bf4586": {
      "balance": "314159000000000000000000"
    },
    ...
  },

🚧

Remove any existing database

If applicable, delete the aion/database folder and re-launch the node in order for genesis to take in effect