# Identity Configuration¶

You can check out the video for this section.

TRAC token that is required for OriginTrail Decentralized Network is based on ERC20 standard that utilizes Ethereum network. In order to utilize the ODN you will need both TRAC and ETH tokens on your wallet. ERC20 standard enables use of one wallet for both crypto currencies.

ODN testnet is based on Ethereum test network Rinkeby and test Trac tokens (TRAC). We strongly advise use of dedicated wallet for ODN TestNet for security reasons. Please don’t store real TRAC tokens and ETH on that wallet in this stage. Test TRAC and Rinkeby ETH have no commercial value.

OriginTrail is not responsible for setup and use of wallets and related software. We also do not provide support for this software.

The easiest way to get wallet is to install MetaMask. MetaMask is a Chrome Extension that allows you to interact with the Ethereum network without having to run a node on your system.

Install the Chrome plugin. This adds a little fox icon to your extension bar. Click on the icon and follow instructions to accept disclaimer and terms & conditions.

When you click on the top left “Ethereum Main Net” button of the MetaMask window you be able to select the node you want to connect to. Please use Rinkeby Test Network when dealing with testnet scenario.

## Wallet¶

In order to copy your wallet address, click on three dots on top right corner and select Copy Address to clipboard.

To get a private key you can click on the same menu and select Export Private Key.

Alternatively, if you need to create a new wallet and associate it to MetaMask, you can go to https://www.myetherwallet.com/ and follow the procedure. In the last step just select Connect to Metamask.

IMPORTANT: The OriginTrail node needs access to its operational wallet private key. This is due to it’s need to be able to sign transactions sent to the blockchain. It is important to keep your node and wallet safe, but it is also recommended to have another cold storage wallet to store larger funds and periodically move earned TRAC from the node operational wallet to the cold storage wallet in case you experience some sort of a breach at some point.

The OriginTrail team is not responsible for the safety of your private key and cannot help you recover it in case you loose it. Never the less, if you apply proper backup and security practices, your node wallet should be safe.

The tokens staked and locked for agreements your node is performing on the network are stored on a smart contract (not your wallet) which is part of the ODN. You can widthdraw these tokens once your node agreement has been fulfilled (the storage time has elapse and your node has kept the data for that required time).

To widthdraw the tokens from the smart contract to your operational node wallet, use the following curl command:

curl -X POST http://<NODE_HOSTNAME>:<NODE_REST_API_PORT>/api/withdraw -H 'Content-Type: application/json' -d '{"trac_amount": <AMOUNT>}'


After you have started the withdraw process your tokens will arrive in approximately 5 minutes.

Example of a valid command:

curl -X POST http://104.248.243.200:8900/api/withdraw -H 'Content-Type: application/json' -d '{ "trac_amount": 100 }'


## Get some funds on the wallet¶

In order to run node you will need some Ether and TRAC on our wallet. Initially your balance will be 0.

For running testnet node, get some test Ether from https://faucet.rinkeby.io/ and follow the instructions. Remember, test network Ether does not have any exchange value, it’s just for testing and development purposes.

For running mainnet node, one needs real Ether and Trac.

Once you get Ether/TRAC on your account, you will be able to see new balance in MetaMask.

## ERC725 Identity¶

ERC 725 is a proposed standard for blockchain-based identity authored by Fabian Vogelsteller, creator of ERC 20 and Web3.js. ERC 725 describes proxy smart contracts that can be controlled by multiple keys and other smart contracts and it lives on Ethereum blockchain.

The easiest way to find values of these two identities is to search for them in running node’s log.

notify - Identity created for node ab2e1b1e520cac0d1321cd3760c2e7473970ec8a.
Identity is 0x99c67054a8c7b7fa62243f0446eacd80c6ff0aff.


The last value (in above case 0x99c67054a8c7b7fa62243f0446eacd80c6ff0aff) represent ERC 725 identity. Alternatively, you can copy it from node’s container

# Copies file to HOME dir
docker cp otnode:/ot-node/data/erc725_identity.json ~


one of the files here should be erc725_identity.json, whose value should exactly match value shown in the log line.

For manual installation file can be found at ~/.origintrail_noderc/producion for testnet or ~/.origintrail_noderc/mariner for mainnet.

### Network identity¶

For the Node identity, simply find a log line similar to this:

notify - My network identity: ab2e1b1e520cac0d1321cd3760c2e7473970ec8a


and this value ( in above example ab2e1b1e520cac0d1321cd3760c2e7473970ec8a) it what you are looking for. Alternatively, you can copy it from node’s container

# Copies file to HOME dir
docker cp otnode:/ot-node/data/identity.json ~


For manual installation file can be found at ~/.origintrail_noderc/producion for testnet or ~/.origintrail_noderc/mariner for mainnet.

Some users might notice that in data folder there exist also file called identity.json, and that value stored in this file is different from node identity value from logs. Identity.json contains atomic information about the node identity - identity itself is created based on it.

Having above said, final important note: If you wish to run identical node on some other machine, then in addition to backing up you node wallet/private key, please back up erc725_identity.json and identity.json files. There will be a separate article on how to start node with previously backed up identities. For now, be aware if you start a node on a different machine with providing only node wallet/private key, node will create new identities, and you end up having different node.

### Setting up a node with predefined identities¶

Let’s say user already have network identity file and ERC725 identity file in home dir.

• .origintrail_noderc - node configuration.
• .identity.json - network identity.
• .erc725_identity.json - ERC 725 idenity.
docker run -it --name=otnode -p 8900:8900 -p 5278:5278 -p 3000:3000
-v ~/.origintrail_noderc:/ot-node/.origintrail_noderc
-v ~/.identity.json:/ot-node/data/identity.json
-v ~/.erc725_identity.json:/ot-node/data/erc725_identity.json
quay.io/origintrail/otnode-mariner:release_mariner


Please note this example is for mainnet. For testnet use origintrail/ot-node instead quay.io/origintrail/otnode-mariner:release_mariner

For manual installations just put identity files to ~/.origintrail_noderc/producion for testnet or ~/.origintrail_noderc/mariner for mainnet.