Ammolite Client Docker Container

What Is Ammolite

Ammolite is Arcology's network client package written in Python. It can interact with Arcology nodes through HTTP connections. Ammolite to Arcology is like web3.js to Ethereum.

Why Ammolite

Arcology supports all standard Ethereum RPC APIs. But the APIs lack the ability to handle batch data. Ammolite is specifically built for that purpose. It can send in millions of transactions to the network in seconds.

Prerequisites

The client docker is pretty much self-contained. You only need the following items in place:

  • A live Arcology testnet

  • Docker engine

The Package

The package consists of two major parts.

  • A client docker container

  • Pre-generated transactions for benchmarking

Pre-generated Transactions

The stand Arcology releases contain some pre-generated transaction files that can be used directly in testing. There files are not part of the client docker. You will need to get them from the installer package.

Download the latest installer, uncompress the package to a location of your choice, the folder structure should look like the below. There is a folder named ./testnet-installer/txscontaining all the pre-generated transaction files. You will need to mount the folder to the client docker to do the test.

Structure

The docker container image contains the following files and folders.

  • blockmon.py: Realtime blockchain monitor.

  • checkStatus.py: Script file to check the testnet status.

  • data: Data folder for transaction files.

  • ds_token: Scripts and data files for ds_token showcase.

  • parallel_kitties Scripts and data files for the parallel CryptoKitties showcase.

  • python: The last python executable.

  • sendtx.py: Send transactions to testnet.

  • sendtx.sh: Shell wrapper for sendtx.py.

  • tps.py: Realtime TPS observer.

  • uniswap: Scripts and data files for Uniswap showcase.

  • utils.py: Utility tools.

Work with the Client Container

The Ammolite client container is in a docker container image. with all the necessary modules and libraries installed to compile the solidity smart contracts and to interact with an Arcology testnet.

Start the Client Container

The following command starts the client container and mount the transaction data folder. Replace the folder /home/testnet-installer/txs with the directory where your pre-generated transitions reside.

sudo docker run --name ammo -p 32768:22 -v /home/testnet-installer/txs:/root/data  -d arcologynetwork/ammolite /usr/sbin/sshd  -D

Container Login

Run the command to log in to the container. Simply replace 192.168.1.103 with your host machine IP. Again, the host is the machine on which the client docker is running.

>ssh -p 32768 root@192.168.1.103

Use the credential below to log in to the client docker.

  • Username: root

  • Password: frY6CvAy8c9E

Connect to Arcology

In the client docker container, type in the command below to check if the client docker is successfully connected to an Arcology testnet. Replace the IP 192.168.1.103 with the Arcology Node IP that you are connected to.

>python checkStatus.py 192.168.1.103:8080

If you connect to the testnet from the Ammolite docker container image will see something like the below.

Send the Transactions

You will need to use sendtxs.py to load in a pre-generated transaction file and send transaction to an Arcology node through HTTP connections.

Syntax:

>python sendtxs.py [NODE_IP:8080] [TRANSACTION_FILES]

The command above calls th sendtxs.py to load a pre-generated transaction file and then send it to an Arcology node through port 8080. -->

Last updated