Implementation of a DApp (Decentralized Application) using decentralized keywords Search Engine based on a hypercube structure; integrated with IPFS and Algorand blockchain using Python.
Smart Contracts are developed with Reach language and are located inside SmartContract_UI.
The folder /SmartContract_UI/test-suite contains some smart contracts and the simulation scripts.
Working on proof of location, simulated in a permissionless system.
Working on interactions between Python and Smart Contract.
Performance evaluation with startSimulation.py .
- Docker
- Docker Compose -> install
git clone
cd hypfs/server
docker build -t hypercube .
cd ../client
docker build -t hypercube-client .
cd ..
docker-compose up -d
To run in "local mode" skip usage section and use:
docker run -d --name ipfs_host -e IPFS_PROFILE=server -v $ipfs_staging:/export -v $ipfs_data:/data/ipfs -p 4001:4001 -p 4001:4001/udp -p 127.0.0.1:8080:8080 -p 127.0.0.1:5001:5001 ipfs/go-ipfs:latest
: this allow to start an IPFS docker container Source- Install both the requirements.txt inside client and server directories
pip3 install -r requirements.txt
- Start the server:
python server.py 8881
, where 8881 is the port - Start the client:
python menu.py /ip4/127.0.0.1/tcp/5001 1
-
Check status
docker-compose logs -f
for all servicesdocker-compose logs -f hypercube_0
for an hypercube node `docker-compose logs -f ipfs -
Start client hash
docker-compose run hypercube-client bash
-
Work with the client bash
python menu.py /ip4/127.0.0.1/tcp/5001 1
- the first parameter is your IPFS node API address
- the second parameter is the ID one Hypercube node (are configured to be from 1 to 8)
python
- to open a python console, then:
from client import Client
client = Client('/ip4/127.0.0.1/tcp/5001',1)
(a warning will appear)client.add_obj('test.txt',3)
for adding an object, use only keywords from 0 to 7client.pin_search(3,-1)
to search using the keyword '3'client.get_obj('QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o')
will download an object from IPFS in theobjects
directory
- contains the hypercube and node implementation
- /hop_counter contains an app for counting network hops
- contains all the client for interacting with nodes
- /results: contains the results of tests carried out with the bench.py script.
- /demo: contains a library for the interface of the menu.py script.
- /objects: contains the objects downloaded from IPFS.
- menu.py: script that provides a user-friendly command line UI.
- bench.py: script used for testing.
- Zichichi M., Serena L., Ferretti S., D'Angelo G., Governing Decentralized Complex Queries Through a DAO, in Proc. of the Conference on Information Technology for Social Good (GoodIT). 9-11 September 2021
- Zichichi M., Serena L., Ferretti S., D'Angelo G., Towards Decentralized Complex Queries over Distributed Ledgers: a Data Marketplace Use-case , in Proc. of the 30th IEEE International Conference on Computer Communications and Networks (ICCCN). 3rd International Workshop on Social (Media) Sensing. 19-22 July 2021
- writeobblockchain file: Remove the passphase
- writeobblockchain file: Send the transaction to a specific address: the address of the COMPANY
- SmartContract_UI/index.rsh: Notify the attacher when he is inserting a new position. If his DID already exists, the position will not be added to the map
- SmartContract_UI/index.mjs: Refactoring the amount sent by Verifier to smart contract
- SmartContract_UI: recover the address of users in the map passing a specific row of the map to frontend. Then split and passed the address to backend
- SmartContract_UI/index.rsh: add the timeout to the first API (insert_position)
- Display the whole map to the Verifier, when he required for that