Installation

Installation

For Windows start 'Git Bash'. The commands are typed in there.

Clone the repository

git clone https://github.com/ethernity-cloud/mvp-pox-client.git

Create the config file

Write the blockchain wallets keypairs inside the config file.

cd mvp-pox-client
cat << EOF > config
ADDRESS=0x1602562d48d6Dee651D357f0111963431AdBca68
PRIVATE_KEY=ecc73d25230fa2b8eb6f8d4a7786600ad9e19ce1c58a620fcad41d4eefa986bf
EOF

Please review the Blockchain Wallets section to generate the keypairs yourself and fund the wallets:

Start the client

The client takes 2 parameters:

-s is the script that should run inside the remote enclave -f is the fileset that is uploaded together with the script

Included in the repository there are two scripts:

cos-bench.py and uppercase.py

./pox-do -s scripts/cos-bench/cos-bench.py -f scripts/cos-bench/fileset
./pox-do was not initialized yet
Requirements fot the ./pox-do are the following:
1. ipfs daemon running and listening on localhost:5000
2. python3 with pip
3. ipfshttpclient python module
4. web3 python module
Proceed with automated initalization [Y/n]: y
Initializing... done
2020-12-19 10:37:17.132170 Submitting transaction for DO request
2020-12-19 10:37:24.624422 Request 377 created successfuly!
2020-12-19 10:37:24.625400 TX Hash: 0x7fe587cc6b04c12a801e9963cecda35ddb0367266d225f02ecd441176221ac41
.......................................................

Some errors might show during Initialization, however if the client submits a request and a transaction is created, the errors can be ignored.

The initialization occurs only the first time the client it started. What the initialization does is install the required python modules and then download and start the ipfs daemon. It connects the ipfs daemon to ipfs.ethernity.cloud for faster hash propagation.

Your own python script

Using the -s and -f parameters you can run your own python scripts. Currently there are some limitations on what python modules and libraries are included on the python enclave. If you need specific python libraries or modules, please contact us.