This is a discussion on setting up your own Ethereum Private Node. A private node is very handy for testing configuration options, smart contract code and in general playing around with blockchain environment.
Ethereum is currently the most popular blockchain platform for cryptocurrency and distributed ledger logic use cases in various domains.
This is tested on the following OS, but the steps are equally valid for MacOS and Windows To Setup An Ethereum Private Node
Although the most popular Ethereum node software is their Go client (Geth), but Parity client, developed on Rust language allows for extra configurations mode for running an Ethereum instance. You can download Parity for our platform from Parity.io
For Ubuntu OS, the download is a debian package that can be installed from the software center on a double click. On install it should be available as an environment command:
(this will print out all config parameter information.)
Parity uses the toml file to configure the process when parity starts off. There is an out of the box parameter set that runs parity Ethereum node in development mode.
G50-70:~$parity — chain dev
This will start off the Ethereum dev node on your machine with regular default parameters. It’s possible to customize the parameters using a toml (toml language) file. The default toml file on the ethcore github page is obsolete, we would need to comment out a bunch of parameters.
With these parameters, the blockchain will be created in the base_path during processing.
The node can be started with the customized toml. (Assuming its in the same path)
G50-70:~$parity — config dev.toml
where dev.toml is the parameter file placed in the same directory.
The analysis of individual parameters with defaults is listed here: parity toml
You can also use the config generator tool to generate this file. Parity instance can also be customized with of command line parameters with identical names as toml parameters.
Running a local instance is a choice we have made, we could alternately connect to mainnet (default) or testnet (public testing environment). These choices and a couple of other parameters from the chain specifications.
An important choice to make as a chain spec is what is the confirmation mode. Parity offers multiple modes using the “engine” spec to configure a Proof Of Work or Proof Of Authority chain. We will go into the engine parameter in later sections. For now, important chain specs are named. params, genesis, accounts.
The name is any phrase that you want to give to your chain, params hold some max values, genesis has some genesis phase offsets. The accounts hold the specific account config that the chain starts off with. You will create an account in the following section. In the account parameter, you can add the starting ether balance you want to give to your account with account specific configuration.
A tool to generate chain specs can be found here. The file used for this demo can be
Before starting the chain, we need to create an account that forms our coinbase. In case we start to mine on production, this account will receive the ether rewards.
G50-70:~$parity account new — chain chain_spec.json — keys-path dev_chain/signer
The chain_spec.json is the chain spec file and dev_chain/signer is the path to your private keys, refer to these in the toml file. You will be prompted for a password, once you type it, you will receive a newly created account.
Once the account is created add it to the chain_spec file in the accounts element. add this :