Giter Club home page Giter Club logo

human-protocol's Introduction

Lint Check Protocol Check Python SDK Check Node.js SDK Check
Subgraph Check Dashboard UI Check Faucet Server Check Meta Code Verify Check
Core NPM Publish Python SDK Publish Node.js SDK Publish Subgraph Deploy
Contract Deploy

All work on-chain

Tokenized, verified, rewarded.

Join us on Discord

What is the HUMAN Network?

HUMAN is a permissionless protocol to facilitate the exchange of HUMAN work, knowledge, and contribution. Using HUMAN, individuals, organizations or businesses can either create or complete tasks. These are tasks that cannot typically be automated or completed by a machine. The types of work that are currently being completed using the HUMAN Protocol are:

  • Data labeling - HUMAN is currently being used to label raw image data which can subsequently be used to train Machine Learning algorithms. Last month over 20 Million images were labeled by HUMAN workers: HUMAN Escrow Scanner
  • IMOO - An on-chain oracle for decentralized prediction markets
  • POH - A system that brings bot-blocking applications on-chain

Documentation

For a more detailed description of the HUMAN Protocol architecture and vision see here

Description

As part of our efforts to increase open source contributions we have consolidated all our codebase into a single monorepo. This monorepo provides an easy and reliable way to build applications that interact with the HUMAN Protocol. It has been designed so that it can be extended to meet the requirements of a wide variety of blockchain application use-cases involving human work or contribution. We have also included various example applications and reference implementations for the core infrastructure components that make up the HUMAN Protocol.

Contributing to this repository

The contribution guidelines are as per the CONTRIBUTING.MD file.

Project Structure

├── packages
│   ├── apps
│   │   ├── dashboard
│   │   │   ├── ui                           # A UI that queries The Graph for escrow data
│   │   │   ├── admin                        # Dashboard content admin app
│   │   ├── faucet-server                    # Faucet server
│   │   ├── fortune                          # Fortune application
│   │   ├── job-launcher                     # Job launcher server, and UI
│   │   ├── human-app                        # Human App server
│   │   ├── meta-code-verify                 # Browser extensions to verify code
│   │   │                                      running in the browser against a
│   │   │                                      published manifest
│   │   ├── reputation-oracle                # Reputation Oracle server
│   ├── core                                 # EVM compatible smart contracts for HUMAN
│   ├── examples
│   │   ├── cvat                             # An open source annotation tool for labeling video and images
│   ├── sdk
│   │   ├── python
│   │   │   ├── human-protocol-sdk           # Python SDK to interact with Human Protocol
│   │   ├── typescript
│   │   │   ├── human-protocol-sdk           # Node.js SDK to interact with Human Protocol
│   │   │   ├── subgraph                     # Human Protocol Subgraph

Smart contracts

To access comprehensive information about the smart contracts, please visit the following URL: https://tech-docs.humanprotocol.org/contracts. This resource provides detailed documentation that covers various aspects of the smart contracts used within the Human Protocol ecosystem.

How To Use This Repo

If you would like to join the HUMAN network as an operator please see the apps folder. Users may participate as any of the following roles:

Building New Applications for HUMAN

If you are a developer and would like to build on top of HUMAN please see examples and sdk folders.

Usage and Installation

Navigate to the folder that you would like to install and follow the instructions in the README file

LEGAL NOTICE

The Protocol is an open-source, blockchain-based network that organizes, evaluates, and compensates human labor (the “Protocol”). Your use of the Protocol is entirely at your own risk. The Protocol is available on an “as is” basis without warranties of any kind, either express or implied, including, but not limited to, warranties of merchantability, title, fitness for a particular purpose and non-infringement. You assume all risks associated with using the Protocol, and digital assets and decentralized systems generally, including but not limited to, that: (a) digital assets are highly volatile; (b) using digital assets is inherently risky due to both features of such assets and the potential unauthorized acts of third parties; (c) you may not have ready access to digital assets; and (d) you may lose some or all of your tokens or other digital assets. You agree that you will have no recourse against anyone else for any losses due to the use of the Protocol. For example, these losses may arise from or relate to: (i) incorrect information; (ii) software or network failures; (iii) corrupted digital wallet files; (iv) unauthorized access; (v) errors, mistakes, or inaccuracies; or (vi) third-party activities. The Protocol does not collect any personal data, and your interaction with the Protocol will solely be through your public digital wallet address. Any personal or other data that you may make available in connection with the Protocol may not be private or secure.

human-protocol's People

Contributors

portuu3 avatar leric7 avatar flopez7 avatar dependabot[bot] avatar m00n620 avatar eugenvoronov avatar macnablocky avatar mwblocky avatar mrhouzlane avatar spiritbroski avatar azizbardi avatar alidzm avatar vladned avatar dzeranov avatar github-actions[bot] avatar payvint avatar simulacrum6 avatar posix4e avatar jalal-1 avatar basit511 avatar sarthakvijayvergiya avatar foufrix avatar bartoszsolkabd avatar zhiltsov-max avatar hrik2001 avatar ivhus avatar adriannovapago avatar anshmasand avatar faouzijedidi1 avatar rafalbielickiim avatar

human-protocol's Issues

Worker login

Worker will be able to login using their credentials.

  • This will consist of implementing integration with Reputation Oracle POST /auth/signin endpoint.
  • The backend will mirror the request parameters and response structure from reputation oracle as it will be a pure proxy endpoint.

Worker registration

Worker will be able to register by providing a verified email and password.

  • This will consist of implementing integration with Reputation Oracle POST /auth/signup endpoint.
  • The backend will mirror the request parameters and response structure from reputation oracle as it will be a pure proxy endpoint.

Oracles discovery

Using HumanProtocol SDK(source) the backend application will read a list of available Exchange Oracles from KVStore and cache it in Redis with 1 day expiry time.

There will be an endpoint to get Exchange Oracles that will be used by the frontend application. The app will first check the Redis instance for cached response from the Subgraph, then if it’s not present/expired it will query the Subgraph through the SDK to get up-to-date information.

Acceptance criteria:

  • The backend application must be capable of fetching a list of available Exchange Oracles from the Subgraph using the HumanProtocol SDK.
  • Upon successful fetching, the list must be cached in a Redis instance with a set expiry time of 1 day (24 hours).
  • The endpoint must first attempt to retrieve the data from the Redis cache.
  • If the data is not present in the cache or if it has expired, the endpoint must fetch up-to-date information from the Subgraph via the HumanProtocol SDK and update the cache with this new data before responding to the request.

SDK function:
https://sdk.humanprotocol.org/typescript-sdk/operator/operator.operatorutils#getreputationnetworkoperators

Example call:
chainId: ChainId.POLYGON_MUMBAI
Address: 0x4708354213453af0cdC33eb75d94fBC00045841E
Role: 'Exchange Oracle' (https://sdk.humanprotocol.org/python-sdk/human_protocol_sdk.constants#exchange_oracle-exchange-oracle)

Exchange Oracle statistics forwarding

Human APP will query and cache Exchange oracle for both overall(/stats) and per user(/stats/assignment) statistics. The /stats endpoint response will have 12 hours expiry time and /stats/assignment will have 15 minutes expiry time.

Acceptance criteria:

The application must be capable of querying the Exchange Oracle for statistical data using two distinct endpoints: /stats for overall statistics and /stats/assignment for per-user statistics.
The cache for the /stats endpoint has an expiry time of 12 hours
The cache for the /stats/assignment endpoint has an expiry time of 15 minutes.

Statistics

Human APP will query and cache Exchange oracle for both overall(/stats) and per user(/stats/assignment) statistics. The /stats endpoint response will have 12 hours expiry time and /stats/assignment will have 15 minutes expiry time.

Acceptance criteria:

  • The application must be capable of querying the Exchange Oracle for statistical data using two distinct endpoints: /stats for overall statistics and /stats/assignment for per-user statistics.
  • The cache for the /stats endpoint has an expiry time of 12 hours
  • The cache for the /stats/assignment endpoint has an expiry time of 15 minutes.

Job assignment

The backend application will receive selected escrow_address, chain_id and EXCHANGE_ORACLE_URL, then sends a POST [EXCHANGE_ORACLE_URL]/assignment request to the Exchange Oracle.

The user will be able to see all of the jobs assigned to him by given Exchange Oracle using GET [EXCHANGE_ORACLE_URL]/assignment. This solution should support all fields mentioned in the tech-docs.

Acceptance criteria:

  • The backend must be capable of communicating with the Exchange Oracle via POST and GET requests to the specified endpoint.
  • The backend can send a POST request to [EXCHANGE_ORACLE_URL]/assignment with the escrow_address and chain_id included in the request body or as parameters, according to the Exchange Oracle's API specifications.
  • Users should be able to retrieve a list of jobs assigned to them from the Exchange Oracle by sending a GET request to [EXCHANGE_ORACLE_URL]/assignment. This request must support all additional parameters mentioned in tech-docs.

Operator registration

Operator will be able to connect wallet using Human App backend.

  • This will consist of implementing integration with Reputation Oracle POST /auth/web3/signup endpoint.
  • The backend will mirror the request parameters and response structure from reputation oracle as it will be a pure proxy endpoint.
  • It will be just the Web3 login as mentioned in Human Tech Docs

Jobs Discovery

The backend application will receive selected Exchange Oracle address in the request, then query GET [EXCHANGE_ORACLE_URL]/job for available jobs and return them as a response. This won’t involve any caching for now. This solution should support all fields mentioned in the tech-docs.

Acceptance criteria:

  • The backend must accept requests containing a selected Exchange Oracle address. This address should be used to construct the target URL for querying available jobs (e.g., [EXCHANGE_ORACLE_URL]/job).
  • The request to the Exchange Oracle can include all fields mentioned in the tech-docs.

Notes:

  • Discuss possibility of validating the EXCHANGE_ORACLE_URL with Redis cache to avoid requesting non-existing oracles

Project setup

  • The application will be setup and implemented in HumanProtocol GitHub monorepo.
  • The technology stack of the application will be similar to reputation-oracle/server/.
  • The application directory will be named “packages/apps/human-app/server”
  • There will be a framework for writing unit tests with one example unit test implemented
  • There will be a framework for writing integration/end2end tests with one example integration test implemented

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.