Giter VIP home page Giter VIP logo

hypfs-upgrade's Introduction

Hypercube on IPFS with Blockchain

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.

Status

Working on proof of location, simulated in a permissionless system.

Working on interactions between Python and Smart Contract.

Performance evaluation with startSimulation.py .

Install the Hypercube with Docker

Requirements
Commands
git clone
cd hypfs/server
docker build -t hypercube .
cd ../client
docker build -t hypercube-client .
cd ..
docker-compose up -d

Note: running the Hypercube in local mode

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

Usage the Hypercube

  1. Check status docker-compose logs -f for all services docker-compose logs -f hypercube_0 for an hypercube node `docker-compose logs -f ipfs

  2. Start client hash docker-compose run hypercube-client bash

  3. 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 7
    • client.pin_search(3,-1) to search using the keyword '3'
    • client.get_obj('QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o') will download an object from IPFS in the objects directory

Hypercube folders

./server
  • contains the hypercube and node implementation
  • /hop_counter contains an app for counting network hops
./client
  • 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.
client executables
  • menu.py: script that provides a user-friendly command line UI.
  • bench.py: script used for testing.

References

License

Apache License 2.0

TODO

  • 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

hypfs-upgrade's People

Contributors

michele971 avatar daduz11 avatar leuriniale96 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.