Installation

Installing an IdA Node is quite simple, but you need to make sure you previously install all the required technologies. Mainly the dependencies concern NodeJS, MongoDB and the official Scrypta wallet.

We recommend deploying on a device with Ubuntu 16.04 and at least 2GB of RAM.

The install.sh file will install all the dependencies for you, we will analyze the script directly on this page. The important thing is to edit the .env file after installation, correctly entering all the fields; in particular:

  • RPCUSER: The same value inserted into the wallet, by default is "lyrarpc". It is essential to edit this field in both lyra.conf and .env

  • RPCPASSWORD: The same value inserted into the wallet, by default is "lyrapassword". It is essential to edit this field in both lyra.conf and .env

  • RPCPORT: It must be 42223 and is already preset.

  • RPCADDRESS: It must be localhost (if the wallet is installed inside the same machine). Alternatively, the IP address of an external machine must be entered.

  • LYRAPATH: Path pointing to the folder containing the lyrad file.

  • DEBUG:Needed to work with active debug mode, which we recommend.

  • DB_PORT: The connection port for MongoDB, by default is 28015.

  • DB_HOST: It must be localhost if the database is installed inside the same machine. Alternatively, the IP address of an external machine must be entered.

  • COIN: by default it is LYRA, it could be modified for any integration with other blockchains.

  • SYNC: by default is true and is used to activate or deactivate automatic synchronization. It can be disabled for debugging reasons.

  • AIRDROP: the amount of LYRA coin that IdA Node sends each time an address is initialized.

  • SERVERMODE: parameter that establishes whether the system must install a "Tray Icon" in the topbar to quickly close the Ida Node. By default it is false.

  • TESTNET: It establishes if the IdaNode is in testnet mode or not, the value can be entered as true or false.

  • LYRADATAFOLDER: Path pointing to the folder containing the Scrypta blockchain files. Usually it is ~/.lyra. It is essential to successfully start the bootstrap file construction process.

Installation example

To install the Ida Node via the install.sh script you need to use the following commands:

cd ~
git clone https://github.com/scryptachain/scrypta-idanodejs
cd scrypta-idanodejs
chmod 777 install.sh
./install.sh

At this point we edit the lyra.conf file, through the nano ~/.lyra/lyra.conf command and we change the rpcuser and rpcpassword with two random values:

rpcuser=YsmtF6bvBrY82Q
rpcpassword=e43GkfCGMYaXsr

Now we modify our .env file through the nano ~/scrypta-idanodejs/.env command and modify the parameters:

RPCUSER=YsmtF6bvBrY82Q
RPCPASSWORD=e43GkfCGMYaXsr
LYRAPATH=/home/YourLinuxUser/scrypta-idanodejs

At this point we are ready to test our configuration through the command npm run dev. If so, we will see a result similar to this:

Scrypta IdaNode listening at port 3001. Public IP is: 37.161.46.223
LYRA wallet successfully connected.
Database connected successfully.
Starting database check.
Collection settings created.
Collection transactions created.
Checking index address of collection transactions
Checking index txid of collection transactions
Checking index time of collection transactions
Checking index block of collection transactions
Swarm listening on /ip4/127.0.0.1/tcp/4002/ipfs/QmcTiDC92gos8rZJNPj5CwToPUP597CQqFvRfxPCY3ZHvT
Swarm listening on /ip4/10.61.255.119/tcp/4002/ipfs/QmcTiDC92gos8rZJNPj5CwToPUP597CQqFvRfxPCY3ZHvT
Swarm listening on /ip4/127.0.0.1/tcp/4003/ws/ipfs/QmcTiDC92gos8rZJNPj5CwToPUP597CQqFvRfxPCY3ZHvT
Swarm listening on /p2p-circuit/ipfs/QmcTiDC92gos8rZJNPj5CwToPUP597CQqFvRfxPCY3ZHvT
Swarm listening on /p2p-circuit/ip4/127.0.0.1/tcp/4002/ipfs/QmcTiDC92gos8rZJNPj5CwToPUP597CQqFvRfxPCY3ZHvT
Swarm listening on /p2p-circuit/ip4/10.61.255.119/tcp/4002/ipfs/QmcTiDC92gos8rZJNPj5CwToPUP597CQqFvRfxPCY3ZHvT
Swarm listening on /p2p-circuit/ip4/127.0.0.1/tcp/4003/ws/ipfs/QmcTiDC92gos8rZJNPj5CwToPUP597CQqFvRfxPCY3ZHvT
Checking compound index ["address","txid"] of collection transactions
Collection received created.
Checking index address of collection received
Checking index block of collection received
Checking index uuid of collection received
Checking index collection of collection received
Checking index protocol of collection received
Checking compound index ["txid","address"] of collection received
Collection written created.
Checking index address of collection written
Checking index block of collection written
Checking index uuid of collection written
Checking index collection of collection written
Checking index protocol of collection written
Checking compound index ["uuid","block"] of collection written
Collection unspent created.
Checking index address of collection unspent
Checking index txid of collection unspent
Checking compound index ["txid","vout"] of collection unspent
Database and tables are ok.
Starting block synchronization.
FOUND 428314 BLOCKS IN THE BLOCKCHAIN

Now the IDA Node will start to synchronize all the data in the blockchain.

Congratulations you have installed the Node IdA!

If you haven't downloaded the bootstrap (ie if you did a manual installation), the synchronization process takes a few hours. Alternatively, using the bootstrap, it will only take a few minutes.