Check our terms and conditions, privacy policies, and cookies policy.
Copyright 2024 © All rights Reserved. Designed by LACNet
This guide is not for deploying nodes in the LACChain Networks. Instead, it creates an isolated LACChain environment on your machine for testing and development purposes in a simulated LACChain Network. If what you want is to deploy a node in the LACChain Networks, please go here.Â
For quick local and isolated testing, you can follow this guide. After completing this guide for local and isolated node deployment, you can also follow our complementary Getting Started guide to deploy a smart contract and Getting Started guide to send a transaction.
Recommended hardware features for the LACChain node:
2 vCPUs |
RAM memory 8Gb |
Hard Disk 10GB |
To configure and deploy your node, you must clone this git repository in your machine.
$ git clone https://github.com/LACNet-Networks/besu-networks
Make sure you have Docker and Docker-compose installed on machine. If not, you can install them following the instructions to install docker and docker-compose.
Execute the following command to run your containers:
$ cd besu-networks/docker/compose/local/writer1
This node comes with all the smart contracts pre-deployed, so you have to give permissions in the data directory to your user so you can read, write, and execute in this directory. Depending on your docker version, run:
$ sudo chmod -R 667 data
$ cd ..
$ docker-compose up -d
Or:
$ docker compose up -d
Execute the following command to run your containers
$ cd besu-networks/docker/compose/firefly/writer1
We have deployed all smart contracts previously, now you have to give permissions to data directory to your user can read write and execute in this directory.
$ sudo chmod -R 667 data
$ cd ..
$ docker-compose up -d
Or
$ docker compose up -d
Depending on your docker version
Next, it is necessary to register your node identity, so execute the following command to register your node identity on smart contract:
$ curl -X POST -H 'content-type:application/json' --data '{}' http://localhost:5000/api/v1/network/organizations/self\?confirm\=true
It could take a few seconds to register your identity. Result of this command should be similar like this:
{«id»:»d16f0a0e-a24b-4596-9a01-fd6f103aad05âł,»did»:»did:firefly:org/XXXXXX»,»type»:»org»,»namespace»:»ff_system»,»name»:»XXXX»,»messages»:{«claim»:»8dbc7002-b647-40ea-abd3-43b12838c57d»,»verification»:null,»update»:null},»created»:»2022-06-16T22:39:28.674387388Z»,»updated»:»2022-06-16T22:39:28.67
Finally, we need to listen events related to token creation, so execute the following command to init token events:
$ curl -X POST -H 'content-type:application/json' http://localhost:5108/api/v1/init
It is done! Now you can access using these urls:
Check if the node is syncing blocks by getting the log of the Besu containter. Depending on your docker version, run:
$ docker-compose logs -f besu
Or:
$ docker compose logs -f besu
You should get a log similar to the following:
If you want or need to stop your node, please execute one of the following commands depending on your docker version:
$ docker-compose down
Or:
$ docker compose down
If you want to make some tests with a GAS limit that emulates the one you will be having in the Mainnet (see GAS limits associated to memberships), follow these steps:
If you havenât cloned this repository yet, please clone this repository now. It contains all the code necessary to send a transaction and change gas limit.
$ git clone https://github.com/LACNetNetworks/samples.git
Now download all the necessary dependencies:
$ cd samples/local
$ yarn install (If you havenât done it yet)
To send the transaction, please execute this script:
$ node changeGasLimit.js --gasLimit=10000000
Where gasLimit will be the new value set to gas limit on your local node. You will see your transaction sent and a new gas limit value set into the smart contract like this:
Tx hash: 0x936b7a20ce1da316ed31160751fb31f5fb7eec60ca968b16f845089edf5a44ee
New GasLimit set: 10000000
Thatâs all, you have sent a transaction and changed the GAS limit value on your local node.
Now you can continue and deploy a first smart contract in your node following this guide.
Check our terms and conditions, privacy policies, and cookies policy.
Copyright 2024 © All rights Reserved. Designed by LACNet