You can deploy GoChain in a private environment for the most optimized, stable 100% Ethereum compatible private blockchain.
You can run your own private GoChain network on your own hardware or on a cloud provider.
You can start a network on Azure with just a couple of clicks by choosing GoChain in the Azure Marketplace.
See Microsoft's blog announcement.
Use our AWS Cloudformation template to get started quickly.
See custom/ for more information.
Once you've deployed, test that it's working by trying the following commands:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' http://IP_ADDRESS_OF_THE_NODE:8545
You should receive something like that:
{"jsonrpc":"2.0","id":67,"result":"GoChain/v2.1.36/linux-amd64/go1.10.3"}
- Ssh into the instance and get an initial allocation address
cat genesis.json | grep alloc -C 1
You should get few lines, copy one with 40 symbols, then add 0x
to beginning so it looks like this:
0x21aca1c055e459808506a37b1a0079723314c18f
- Check that you have something on your initial account via API
curl http://IP_ADDRESS_OF_THE_NODE:8545 -H 'content-type: application/json;' --data-binary '[{"id":"94455d269e0ee68abf391d9923d26b13","jsonrpc":"2.0","method":"eth_getBalance", "params":["ADDRESS_FROM_ABOVE","pending"]}]'
You should see initial balance that you set during creation on the Azure site:
[{"jsonrpc":"2.0","id":"94455d269e0ee68abf391d9923d26b13","result":"0xd46b9bd62f3ba7e0"}]
- Get the password of the genesis account (run this on the instance you connected)
cat password.txt
- Launch the interactive GoChain console on the machine you ssh'd into:
sudo docker run --rm -it -v $PWD:/gochain -w /gochain ghcr.io/gochain/gochain gochain --datadir /gochain/node attach
- Check the balance of the genesis account
eth.getBalance('ADDRESS_FROM_ABOVE')
-
Go to GochainWallet and create a new account (a public and a private key)
-
Check the balance of the new account in the interactive gochain console
eth.getBalance('NEW_ACCOUNT_ADDRESS')
- Unlock the genesis account in the interactive gochain console (the address from the step 3 and the password from the step 5)
personal.unlockAccount("ADDRESS_FROM_ABOVE","PASSWORD")
- Transfer some GO from the genesis account to the new one that you created on the step 8
eth.sendTransaction({from:"ADDRESS_FROM_ABOVE",to:'NEW_ACCOUNT_ADDRESS',value:1000})
- Check the balance of the new account:
eth.getBalance('NEW_ACCOUNT_ADDRESS')
And it should return 1000
in the new account!