This guide is not for deploying nodes in LACNet. Instead, it creates an isolated LACNet environment on your machine for testing and development purposes in a simulated LACChain Network. If what you want is to deploy a node in LACNet, 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 system: Linux, macOS
Recommended hardware features for the LACNet 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 https://docs.docker.com/engine/install/ 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 777 data
cd ..
docker-compose up -d
Or:
docker compose up -d
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
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.