Skip to content

Commit 487b298

Browse files
committed
Merge branch 'develop' into feat/job-launcher-server/abuse
2 parents 5284fd4 + 84c50f0 commit 487b298

File tree

1,111 files changed

+31842
-41392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,111 files changed

+31842
-41392
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,43 @@
1-
## Description
1+
## Issue tracking
2+
<!--
3+
Where is the progress of this issue being tracked?
4+
Where can one find the requirements for this issue?
5+
Where did this issue originated from?
26
3-
<!-- Describe the goal of this pull request. What does it change or fix? -->
7+
E.g. GitHub issue, Slack message, etc.
8+
-->
49

5-
## Summary of changes
10+
## Context behind the change
11+
<!--
12+
What changes have you made to the code, and why?
613
7-
<!-- At a high level, what parts of the code did you change and why? -->
14+
Describe the goal of this pull request. What does it change or fix?
15+
At a high level, what parts of the code did you change and why?
16+
-->
817

9-
## How test the changes
18+
## How has this been tested?
19+
<!--
20+
You should always test your changes.
1021
11-
<!-- If there are any special testing requirements, add them here -->
22+
Describe the steps you took to make sure your PR does what it's supposed to do.
23+
How we ensure that adjacent code/features are still working?
24+
Are there any performance implications?
25+
-->
1226

13-
## Related issues
14-
[Keywords for linking issues](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests)
27+
## Release plan
28+
<!--
29+
If not you, but somebody else will be deploying this, what they need to know/do to succeed?
1530
16-
<!-- Does this close any open issues? -->
31+
Add any action items that need to be done for the release (any step, before/during/after),
32+
e.g. running a DB migration, leaving a note about release in Slack, adding new envs, etc.
33+
-->
34+
35+
## Potential risks; What to monitor; Rollback plan
36+
<!--
37+
What might go wrong with deployment of this PR?
38+
Can it affect some other services/areas? In what way?
39+
What metrics/dashboards/etc. you should keep an eye on while/after deploying this?
40+
41+
How will we handle any issues if they arise? Do we need rollback plan?
42+
Do we need a second pair of eyes on this?
43+
-->

.github/workflows/ci-dependency-review.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
- name: "Checkout Repository"
1212
uses: actions/[email protected]
1313
- name: "Dependency Review"
14-
uses: actions/dependency-review-action@v4.3.4
14+
uses: actions/dependency-review-action@v4.4.0

.github/workflows/ci-lint-cvat-exchange-oracle.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
22-
- uses: actions/setup-python@v5
22+
- name: Install Poetry
23+
uses: snok/install-poetry@v1
2324
with:
24-
cache: 'pip'
25-
cache-dependency-path: ${{ env.WORKING_DIR }}/poetry.lock
26-
- run: python -m pip install poetry
25+
version: 1.8.4
2726
- uses: actions/setup-python@v5
2827
with:
2928
python-version: '3.10'

.github/workflows/ci-lint-cvat-recording-oracle.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
22-
- uses: actions/setup-python@v5
22+
- name: Install Poetry
23+
uses: snok/install-poetry@v1
2324
with:
24-
cache: 'pip'
25-
cache-dependency-path: ${{ env.WORKING_DIR }}/poetry.lock
26-
- run: python -m pip install poetry
25+
version: 1.8.4
2726
- uses: actions/setup-python@v5
2827
with:
2928
python-version: '3.10'

.github/workflows/ci-test-dashboard-ui.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/ci-test-faucet-server.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
paths:
99
- 'packages/core/**'
1010
- 'packages/sdk/typescript/human-protocol-sdk/**'
11-
- 'packages/apps/faucet-server/**'
11+
- 'packages/apps/faucet/server/**'
1212
workflow_dispatch:
1313

1414
jobs:
@@ -21,6 +21,6 @@ jobs:
2121
name: Install dependencies
2222
- run: cp .env.example .env
2323
name: Create .env file
24-
working-directory: packages/apps/faucet-server
24+
working-directory: packages/apps/faucet/server
2525
- run: yarn workspace @human-protocol/faucet-server test
26-
name: Run faucet-server test
26+
name: Run faucet/server test

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx lint-staged
52

63
# Format python file changes

docs/sdk/python/human_protocol_sdk.constants.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ Enum for KVStore keys
5454

5555
#### public_key *= 'public_key'*
5656

57+
#### registration_instructions *= 'registration_instructions'*
58+
5759
#### registration_needed *= 'registration_needed'*
5860

5961
#### role *= 'role'*

docs/sdk/python/human_protocol_sdk.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@
5353
* [Module](human_protocol_sdk.kvstore.kvstore_client.md#module)
5454
* [`KVStoreClient`](human_protocol_sdk.kvstore.kvstore_client.md#human_protocol_sdk.kvstore.kvstore_client.KVStoreClient)
5555
* [`KVStoreClientError`](human_protocol_sdk.kvstore.kvstore_client.md#human_protocol_sdk.kvstore.kvstore_client.KVStoreClientError)
56+
* [human_protocol_sdk.kvstore.kvstore_utils module](human_protocol_sdk.kvstore.kvstore_utils.md)
57+
* [Code Example](human_protocol_sdk.kvstore.kvstore_utils.md#code-example)
58+
* [Module](human_protocol_sdk.kvstore.kvstore_utils.md#module)
59+
* [`KVStoreData`](human_protocol_sdk.kvstore.kvstore_utils.md#human_protocol_sdk.kvstore.kvstore_utils.KVStoreData)
60+
* [`KVStoreData.__init__()`](human_protocol_sdk.kvstore.kvstore_utils.md#human_protocol_sdk.kvstore.kvstore_utils.KVStoreData.__init__)
61+
* [`KVStoreUtils`](human_protocol_sdk.kvstore.kvstore_utils.md#human_protocol_sdk.kvstore.kvstore_utils.KVStoreUtils)
62+
* [`KVStoreUtils.get()`](human_protocol_sdk.kvstore.kvstore_utils.md#human_protocol_sdk.kvstore.kvstore_utils.KVStoreUtils.get)
63+
* [`KVStoreUtils.get_file_url_and_verify_hash()`](human_protocol_sdk.kvstore.kvstore_utils.md#human_protocol_sdk.kvstore.kvstore_utils.KVStoreUtils.get_file_url_and_verify_hash)
64+
* [`KVStoreUtils.get_kvstore_data()`](human_protocol_sdk.kvstore.kvstore_utils.md#human_protocol_sdk.kvstore.kvstore_utils.KVStoreUtils.get_kvstore_data)
65+
* [`KVStoreUtils.get_public_key()`](human_protocol_sdk.kvstore.kvstore_utils.md#human_protocol_sdk.kvstore.kvstore_utils.KVStoreUtils.get_public_key)
5666
* [human_protocol_sdk.operator package](human_protocol_sdk.operator.md)
5767
* [Submodules](human_protocol_sdk.operator.md#submodules)
5868
* [human_protocol_sdk.operator.operator_utils module](human_protocol_sdk.operator.operator_utils.md)
@@ -100,6 +110,14 @@
100110
* [`StorageFileNotFoundError`](human_protocol_sdk.storage.storage_client.md#human_protocol_sdk.storage.storage_client.StorageFileNotFoundError)
101111
* [human_protocol_sdk.storage.storage_utils module](human_protocol_sdk.storage.storage_utils.md)
102112
* [`StorageUtils`](human_protocol_sdk.storage.storage_utils.md#human_protocol_sdk.storage.storage_utils.StorageUtils)
113+
* [human_protocol_sdk.transaction package](human_protocol_sdk.transaction.md)
114+
* [Submodules](human_protocol_sdk.transaction.md#submodules)
115+
* [human_protocol_sdk.transaction.transaction_utils module](human_protocol_sdk.transaction.transaction_utils.md)
116+
* [Code Example](human_protocol_sdk.transaction.transaction_utils.md#code-example)
117+
* [Module](human_protocol_sdk.transaction.transaction_utils.md#module)
118+
* [`TransactionData`](human_protocol_sdk.transaction.transaction_utils.md#human_protocol_sdk.transaction.transaction_utils.TransactionData)
119+
* [`TransactionUtils`](human_protocol_sdk.transaction.transaction_utils.md#human_protocol_sdk.transaction.transaction_utils.TransactionUtils)
120+
* [`TransactionUtilsError`](human_protocol_sdk.transaction.transaction_utils.md#human_protocol_sdk.transaction.transaction_utils.TransactionUtilsError)
103121

104122
## Submodules
105123

@@ -127,6 +145,7 @@
127145
* [`KVStoreKeys.fee`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.fee)
128146
* [`KVStoreKeys.job_types`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.job_types)
129147
* [`KVStoreKeys.public_key`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.public_key)
148+
* [`KVStoreKeys.registration_instructions`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.registration_instructions)
130149
* [`KVStoreKeys.registration_needed`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.registration_needed)
131150
* [`KVStoreKeys.role`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.role)
132151
* [`KVStoreKeys.url`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.url)

docs/sdk/python/human_protocol_sdk.operator.operator_utils.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ print(
1717

1818
## Module
1919

20-
### *class* human_protocol_sdk.operator.operator_utils.LeaderData(chain_id, id, address, amount_staked, amount_allocated, amount_locked, locked_until_timestamp, amount_withdrawn, amount_slashed, reputation, reward, amount_jobs_processed, role=None, fee=None, public_key=None, webhook_url=None, url=None, job_types=None)
20+
### *class* human_protocol_sdk.operator.operator_utils.LeaderData(chain_id, id, address, amount_staked, amount_allocated, amount_locked, locked_until_timestamp, amount_withdrawn, amount_slashed, reputation, reward, amount_jobs_processed, role=None, fee=None, public_key=None, webhook_url=None, url=None, job_types=None, registration_needed=None, registration_instructions=None)
2121

2222
Bases: `object`
2323

24-
#### \_\_init_\_(chain_id, id, address, amount_staked, amount_allocated, amount_locked, locked_until_timestamp, amount_withdrawn, amount_slashed, reputation, reward, amount_jobs_processed, role=None, fee=None, public_key=None, webhook_url=None, url=None, job_types=None)
24+
#### \_\_init_\_(chain_id, id, address, amount_staked, amount_allocated, amount_locked, locked_until_timestamp, amount_withdrawn, amount_slashed, reputation, reward, amount_jobs_processed, role=None, fee=None, public_key=None, webhook_url=None, url=None, job_types=None, registration_needed=None, registration_instructions=None)
2525

2626
Initializes an LeaderData instance.
2727

@@ -44,6 +44,8 @@ Initializes an LeaderData instance.
4444
* **webhook_url** (`Optional`[`str`]) – Webhook url
4545
* **url** (`Optional`[`str`]) – Url
4646
* **job_types** (`Optional`[`List`[`str`]]) – Job types
47+
* **registration_needed** (`Optional`[`bool`]) – True,
48+
* **registration_instructions** (`Optional`[`str`]) – Instructions url,
4749

4850
### *class* human_protocol_sdk.operator.operator_utils.LeaderFilter(chain_id, role=None)
4951

@@ -59,17 +61,19 @@ Initializes a LeaderFilter instance.
5961
* **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Chain Id to request data
6062
* **role** (`Optional`[`str`]) – Leader role
6163

62-
### *class* human_protocol_sdk.operator.operator_utils.Operator(address, role, url='', job_types=[])
64+
### *class* human_protocol_sdk.operator.operator_utils.Operator(address, role, url='', job_types=[], registration_needed=None, registration_instructions=None)
6365

6466
Bases: `object`
6567

66-
#### \_\_init_\_(address, role, url='', job_types=[])
68+
#### \_\_init_\_(address, role, url='', job_types=[], registration_needed=None, registration_instructions=None)
6769

6870
Initializes an Operator instance.
6971

7072
* **Parameters:**
7173
* **address** (`str`) – Operator address
7274
* **role** (`str`) – Role of the operator
75+
* **registration_needed** (`Optional`[`bool`]) – True,
76+
* **registration_instructions** (`Optional`[`str`]) – Instructions url,
7377

7478
### *class* human_protocol_sdk.operator.operator_utils.OperatorUtils
7579

@@ -129,8 +133,6 @@ Get the reputation network operators of the specified address.
129133
* **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the reputation network exists
130134
* **address** (`str`) – Address of the reputation oracle
131135
* **role** (`Optional`[`str`]) – (Optional) Role of the operator
132-
* **Parem job_types:**
133-
(Optional) Job types of the operator
134136
* **Return type:**
135137
`List`[[`Operator`](#human_protocol_sdk.operator.operator_utils.Operator)]
136138
* **Returns:**

0 commit comments

Comments
 (0)