Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c32cdac
Refactor token validation to use PaymentCurrency enum and add support…
flopez7 May 22, 2025
72b95f3
Refactor job creation to move webhook entity creation from fund to se…
flopez7 May 22, 2025
0048682
[HUMAN App] refactor: change KYC to IDV (#3368)
dnechay May 27, 2025
db2def5
[Dashboard] Join operators address view and the wallet address view (…
KirillKirill May 27, 2025
759a20f
refactor: docker setup & example env files (#3360)
dnechay May 27, 2025
7aebb1b
refactor: implement caching for public key retrieval in JwtHttpStrate…
flopez7 May 29, 2025
69c6b11
[Job Launcher] feat: remove audio duration and job bounty for Audino …
dnechay May 30, 2025
c6f6bfb
Make boxes thinner (#3374)
zhiltsov-max Jun 2, 2025
9fa7dd1
refactor: docker setup for local web3; dev env with local web3 (#3370)
dnechay Jun 2, 2025
1fbd6f8
[Job Launcher][Server] JobService tests (#3373)
flopez7 Jun 3, 2025
5728ddf
[Dashboard] - Refactor linter (#3375)
KirillKirill Jun 3, 2025
7e56787
[Dashboard] - Refactor theme (#3382)
KirillKirill Jun 6, 2025
606bec1
[Reputation Oracle] refactor: use module ref for factory method (#3390)
dnechay Jun 13, 2025
0dd0612
[Reputation Oracle] fix: logger mock (#3393)
dnechay Jun 13, 2025
9da418b
[SDK] Improve transactions filters (#3384)
flopez7 Jun 13, 2025
420abe5
[Subgraph][SDK] Fix subgraph bulkpayout problems (#3391)
flopez7 Jun 16, 2025
74380fa
[Dashboard] Approve transaction does not transfer funds (#3395)
KirillKirill Jun 18, 2025
46a311f
[SDK][Python] Align python sdk implementation with ts (#3380)
flopez7 Jun 18, 2025
04e1aff
chore(deps): bump actions/dependency-review-action from 4.7.0 to 4.7.…
dependabot[bot] Jun 20, 2025
9dd6957
feat: full support for Audino (#3408)
dnechay Jun 23, 2025
9f869bd
[Dashboard] - Refactor Project Structure (#3392)
KirillKirill Jun 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.husky
audits
docs
docker-setup
scripts
**/node_modules
**/build
Expand All @@ -22,3 +23,6 @@ scripts
.dockerignore
**/Dockerfile*
**/docker-compose*

# Local .env files
**/.env.local
23 changes: 10 additions & 13 deletions .github/workflows/cd-subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Subgraph deployment

on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -53,23 +52,21 @@ jobs:
- name: Build core package
if: steps.filter_networks.outputs.continue == 'true'
run: yarn build:core
- name: Install Graph CLI
if: steps.filter_networks.outputs.continue == 'true'
run: yarn global add @graphprotocol/graph-cli@0.71.2
- name: Authenticate Graph CLI
if: steps.filter_networks.outputs.continue == 'true'
run: graph auth --studio ${API_KEY}
env:
API_KEY: ${{ secrets.HP_GRAPH_API_KEY }}
- name: Generate and build Subgraph
if: steps.filter_networks.outputs.continue == 'true'
run: yarn generate && yarn build
working-directory: ./packages/sdk/typescript/subgraph
env:
NETWORK: ${{ matrix.network.name }}
- name: Deploy Subgraph
- name: Authenticate & Deploy
if: steps.filter_networks.outputs.continue == 'true'
run: graph deploy --studio ${NETWORK} -l ${{ github.event.inputs.label }}
working-directory: ./packages/sdk/typescript/subgraph
env:
NETWORK: ${{ matrix.network.name }}
API_KEY: ${{ secrets.HP_GRAPH_API_KEY }}
NETWORK: ${{ matrix.network.name }}
LABEL: ${{ github.event.inputs.label }}
working-directory: ./packages/sdk/typescript/subgraph
run: |
yarn dlx @graphprotocol/graph-cli@0.71.2 \
auth --studio "$API_KEY"
yarn dlx @graphprotocol/graph-cli@0.71.2 \
deploy --studio ${NETWORK} -l ${LABEL}
2 changes: 1 addition & 1 deletion .github/workflows/ci-dependency-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4.1.1
- name: Dependency Review
uses: actions/dependency-review-action@v4.7.0
uses: actions/dependency-review-action@v4.7.1
with:
show-openssf-scorecard: false
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,5 @@ dist
*.tsbuildinfo
hardhat-dependency-compiler

#cache
cache

#docker databases
docker-db
# cache
cache
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
yarn dlx lint-staged
yarn workspaces foreach --all -p run typecheck

# Format python file changes
cd packages/sdk/python/human-protocol-sdk
Expand Down
21 changes: 21 additions & 0 deletions docker-setup/.env.compose
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MINIO_PORT=9000

# NOTE: Avoid changing this since it impact KV store urls
BACKEND_APPS_INTERNAL_PORT=5000

REPUTATION_ORACLE_EXPOSED_PORT=5001
HUMAN_APP_SERVER_EXPOSED_PORT=5002
JOB_LAUNCHER_EXPOSED_PORT=5003
EXCHANGE_ORACLE_CVAT_EXPOSED_PORT=5004
RECORDING_ORACLE_CVAT_EXPOSED_PORT=5005
EXCHANGE_ORACLE_FORTUNE_EXPOSED_PORT=5006
RECORDING_ORACLE_FORTUNE_EXPOSED_PORT=5007

HUMAN_APP_CLIENT_EXPOSED_PORT=3001
JOB_LAUNCHER_CLIENT_EXPOSED_PORT=3002
FORTUNE_CLIENT_EXPOSED_PORT=3003

RPC_URL_POLYGON_AMOY=https://rpc-amoy.polygon.technology

# Might be empty
SUBGRAPH_API_KEY=
31 changes: 31 additions & 0 deletions docker-setup/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.PHONY: check-env-file \
infra-up infra-stop \
build-services services-up services-stop

DOCKER_PARALLEL ?= 4

check-env-file:
@if [ ! -f "./.env.compose.local" ]; then \
cp ./.env.compose ./.env.compose.local ; \
fi

infra-up: check-env-file
@docker compose --env-file .env.compose.local up -d postgres redis minio minio-client

infra-stop:
@docker compose --env-file .env.compose.local stop postgres redis minio minio-client

build-services: check-env-file
@docker compose --env-file .env.compose.local --parallel $(DOCKER_PARALLEL) up --no-start

services-up: check-env-file
@service_names="$(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))"; \
docker compose --env-file .env.compose.local --parallel $(DOCKER_PARALLEL) up -d $$service_names

services-stop:
@service_names="$(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))"; \
docker compose --env-file .env.compose.local stop $$service_names

# catch-all and noop; to avoid warnings when using MAKECMDGOALS
%:
@:
23 changes: 23 additions & 0 deletions docker-setup/Makefile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.PHONY: web3-up web3-down \
infra-up infra-stop infra-down

web3-up:
@docker compose -f docker-compose.dev.yml up -d blockchain-node ipfs graph-node-db graph-node

web3-down:
# also remove volumes to get the clean start after
@docker compose -f docker-compose.dev.yml down -v blockchain-node ipfs graph-node-db graph-node

infra-up:
@docker compose -f docker-compose.dev.yml up -d postgres minio minio-client

infra-stop:
@docker compose -f docker-compose.dev.yml stop postgres minio minio-client

infra-down:
# also remove volumes to get the clean start after
@docker compose -f docker-compose.dev.yml down -v postgres minio minio-client

# catch-all and noop; to avoid warnings when using MAKECMDGOALS
%:
@:
229 changes: 229 additions & 0 deletions docker-setup/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
name: human-protocol-local-dev

x-service-default-config:
restart: &default-restart unless-stopped
logging: &default-logging
options:
max-size: 10m
max-file: 3

x-hardcoded-vars:
graph_db_user: &graph_db_user graph-node
graph_db_passwrod: &graph_db_passwrod let-me-in
graph_db_name: &graph_db_name graph-node

x-general-env-variables:
postgres_user: &postgres_user ${POSTGRES_USER:-default}
postgres_password: &postgres_password ${POSTGRES_PASSWORD:-qwerty}
# MINIO VARS
minio_port: &minio_port ${MINIO_PORT:-9000}
minio_console_port: &minio_console_port ${MINIO_CONSOLE_PORT:-9001}
minio_root_user: &minio_root_user ${MINIO_ROOT_USER:-minioadmin}
minio_root_password: &minio_root_password ${MINIO_ROOT_PASSWORD:-minioadmin}
minio_services_access_key: &minio_services_access_key ${MINIO_SERVICES_ACCESS_KEY:-human-oracle}
minio_services_secret_key: &minio_services_secret_key ${MINIO_SERVICES_SECRET_KEY:-human-oracle-s3-secret}
# BUCKET NAMES
bucket_name_manifests: &bucket_name_manifests ${BUCKET_NAME_MANIFESTS:-manifests}
bucket_name_datasets: &bucket_name_datasets ${BUCKET_NAME_DATASETS:-datasets}
bucket_name_rep_o: &bucket_name_rep_o ${BUCKET_NAME_REPUTATION_ORACLE:-reputation-oracle}
bucket_name_fortune: &bucket_name_fortune ${BUCKEN_NAME_FORTUNE:-fortune}

services:
blockchain-node:
container_name: hp-dev-blockchain-node
image: human-protocol/hardhat-blockchain-node
pull_policy: build
restart: *default-restart
logging:
<<: *default-logging
build:
context: ../
dockerfile: packages/core/Dockerfile.local
healthcheck:
test: yarn local:readiness
interval: 15s
timeout: 30s
retries: 0
networks:
- human_protocol_web3
ports:
- name: node-port
target: 8545
published: ${BLOCKCHAIN_NODE_PORT:-8545}

ipfs:
container_name: hp-dev-ipfs
image: ipfs/kubo:v0.14.0
restart: *default-restart
logging:
<<: *default-logging
healthcheck:
test: ["CMD-SHELL", "ipfs id > /dev/null"]
interval: 10s
timeout: 5s
retries: 3
networks:
- human_protocol_web3
ports:
- name: ipfs-port
target: 5001
published: ${IPFS_PORT:-5010}
volumes:
- ipfs-data:/data/ipfs:Z

graph-node-db:
container_name: hp-dev-graph-node-db
image: postgres:latest
restart: *default-restart
logging:
<<: *default-logging
networks:
- human_protocol_web3
command:
[
"postgres",
"-cshared_preload_libraries=pg_stat_statements",
"-cmax_connections=200"
]
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- graph-node-db-data:/var/lib/postgresql/data:Z
environment:
POSTGRES_USER: *graph_db_user
POSTGRES_PASSWORD: *graph_db_passwrod
POSTGRES_DB: *graph_db_name
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"

graph-node:
container_name: hp-dev-graph-node
# In case of issues on Mac M1 rebuild the image for it locally
# https://github.com/graphprotocol/graph-node/blob/master/docker/README.md#running-graph-node-on-an-macbook-m1
image: graphprotocol/graph-node
restart: *default-restart
logging:
<<: *default-logging
networks:
- human_protocol_web3
ports:
- '8000:8000'
- '8001:8001'
- '8020:8020'
- '8030:8030'
- '8040:8040'
depends_on:
- blockchain-node
- ipfs
- graph-node-db
environment:
postgres_host: graph-node-db
postgres_user: *graph_db_user
postgres_pass: *graph_db_passwrod
postgres_db: *graph_db_name
ipfs: ipfs:5001
ethereum: localhost:http://blockchain-node:8545
GRAPH_LOG: info
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 8000 || exit 1"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s

postgres:
container_name: hp-dev-postgres
image: postgres:16
restart: *default-restart
logging:
<<: *default-logging
ports:
- name: instance_port
target: 5432
# default 5432 is used by CVAT installation
published: ${POSTGRES_PORT:-5433}
volumes:
- ./initdb:/docker-entrypoint-initdb.d
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: *postgres_user
POSTGRES_PASSWORD: *postgres_password
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5

minio:
container_name: hp-dev-minio
image: minio/minio:RELEASE.2024-12-18T13-15-44Z
restart: *default-restart
logging:
<<: *default-logging
entrypoint: 'sh'
ports:
- name: instance_port
target: 9000
published: *minio_port
- name: console_port
target: 9001
published: *minio_console_port
volumes:
- minio-data:/data
environment:
MINIO_ROOT_USER: *minio_root_user
MINIO_ROOT_PASSWORD: *minio_root_password
command:
-c "minio server /data --console-address ':9001'"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 3

minio-client:
container_name: hp-dev-minio-client
image: minio/mc:RELEASE.2024-11-21T17-21-54Z
depends_on:
minio:
condition: service_healthy
environment:
MINIO_ROOT_USER: *minio_root_user
MINIO_ROOT_PASSWORD: *minio_root_password
SERVICES_ACCESS_KEY: *minio_services_access_key
SERVICES_SECRET_KEY: *minio_services_secret_key
BUCKET_MANIFESTS: *bucket_name_manifests
BUCKET_DATASETS: *bucket_name_datasets
BUCKET_REPUTATION_ORACLE: *bucket_name_rep_o
BUCKET_FORTUNE: *bucket_name_fortune
entrypoint: >
/bin/sh -c "
mc alias set myminio http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD

mc admin user add myminio $$SERVICES_ACCESS_KEY $$SERVICES_SECRET_KEY
mc admin policy attach myminio readwrite --user=$$SERVICES_ACCESS_KEY

mc mb myminio/$$BUCKET_MANIFESTS;
mc anonymous set public myminio/$$BUCKET_MANIFESTS;

mc mb myminio/$$BUCKET_DATASETS;
mc anonymous set public myminio/$$BUCKET_DATASETS;

mc mb myminio/$$BUCKET_REPUTATION_ORACLE;
mc anonymous set public myminio/$$BUCKET_REPUTATION_ORACLE;

mc mb myminio/$$BUCKET_FORTUNE;
mc anonymous set public myminio/$$BUCKET_FORTUNE;
"

volumes:
ipfs-data:
graph-node-db-data:
postgres-data:
minio-data:

networks:
human_protocol_web3:
name: human-protocol-web3
Loading
Loading