Run the Examples
Arcology provides several concurrent examples to help you get started. These examples demonstrate the basics of building concurrent applications on the Arcology Network using Arcologyβs concurrent library.
Prerequisites
You need the following tools installed on your machine:
Node.js 20.x or upper
Yarn
Git
Docker
VS Code
Hardhat
Minimum Hardware
4 CPU cores
16GB RAM
100GB free disk space
2 cores and 8 GB RAM are fine for developmentβjust not for benchmarking.
Benchmark Hardware
32 CPU cores or upper
256GB RAM or more
1000GB (NVMe SSD) free disk space or more
Set up the DevNet
Creates env var localip for your machineβs local IP (example shown: 192.168.1.109). Then start the Arcology DevNet Docker container, replacing the IP address with your machine's local IP.
Linux
macOS
Download and start the DevNet docker image:
You should see an output similar to this:
Check the Docker Container
Check if the Docker container is running properly:
Check the DevNet Status
Install the Arcology frontend tools globally:
Check if your DevNet is running properly by using the arcology.net-monitor tool:
If the DevNet is running properly, you should see an output similar to this:
Install the Examples
Pull the latest Arcology examples repository and install the Arcology frontend tools:
Structure
The examples are organized into folders.
Account: Testing accounts. Columns: private key, account address, initial balance (wei).
Scaffold: Starting point for building concurrent applications.
eth-examples: Parallelized examples derived from some of the Ethereum examples (see https://docs.soliditylang.org/en/v0.8.24/solidity-by-example.html).
ds-token: A parallelized version of ds-token (https://github.com/dapphub/ds-token).
uniswap: A parallelized version of uniswap v3 (https://github.com/Uniswap/uniswap-v3-core).
Run an Example
Benchmarking
The benchmark folder in each example contains transaction generation scripts, each in its own subfolder. For example, the Like project has its transaction generation script at:
Generating Transactions
This process may take quite a while, depending on the number of transactions you want to generate and your machine's performance.
A transaction generation script is located under each /benchmark/<project>/. Run the following script to generate transactions for the Like under scaffold:
You should see an output similar to this:
The generated transaction files can be found in the txs folder. For like, they are at:
There could be multiple transaction files in the folder, each containing a batch of transactions.
Benchmarking Metrics
realtimeTps
Real-time TPS during the benchmarking.
maxTps
Maximum TPS achieved during the benchmarking.
Total
Total number of transactions sent in the block.
Success
Number of successful transactions in the block.
Fail
Number of failed transactions in the block.
realtimeGasBurned
Real-time gas consumed during the benchmarking.
maxGasBurned
Maximum gas consumed in a single block during benchmarking.
Last updated