Skip to content

Commit a48667f

Browse files
authored
Merge pull request #2721 from humanprotocol/develop
Release 20241030
2 parents 8c38171 + 385bf0f commit a48667f

File tree

573 files changed

+20651
-7174
lines changed

Some content is hidden

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

573 files changed

+20651
-7174
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'

.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:**

docs/sdk/python/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ pip install human-protocol-sdk[agreement]
3232
* [Submodules](human_protocol_sdk.escrow.md#submodules)
3333
* [human_protocol_sdk.kvstore package](human_protocol_sdk.kvstore.md)
3434
* [Submodules](human_protocol_sdk.kvstore.md#submodules)
35+
* [human_protocol_sdk.kvstore.kvstore_utils module](human_protocol_sdk.kvstore.kvstore_utils.md)
36+
* [Code Example](human_protocol_sdk.kvstore.kvstore_utils.md#code-example)
37+
* [Module](human_protocol_sdk.kvstore.kvstore_utils.md#module)
38+
* [`KVStoreData`](human_protocol_sdk.kvstore.kvstore_utils.md#human_protocol_sdk.kvstore.kvstore_utils.KVStoreData)
39+
* [`KVStoreUtils`](human_protocol_sdk.kvstore.kvstore_utils.md#human_protocol_sdk.kvstore.kvstore_utils.KVStoreUtils)
3540
* [human_protocol_sdk.operator package](human_protocol_sdk.operator.md)
3641
* [Submodules](human_protocol_sdk.operator.md#submodules)
3742
* [human_protocol_sdk.staking package](human_protocol_sdk.staking.md)
@@ -40,6 +45,8 @@ pip install human-protocol-sdk[agreement]
4045
* [Submodules](human_protocol_sdk.statistics.md#submodules)
4146
* [human_protocol_sdk.storage package](human_protocol_sdk.storage.md)
4247
* [Submodules](human_protocol_sdk.storage.md#submodules)
48+
* [human_protocol_sdk.transaction package](human_protocol_sdk.transaction.md)
49+
* [Submodules](human_protocol_sdk.transaction.md#submodules)
4350
* [Submodules](human_protocol_sdk.md#submodules)
4451
* [human_protocol_sdk.constants module](human_protocol_sdk.constants.md)
4552
* [`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)

docs/sdk/typescript/base/classes/BaseEthersClient.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The network information required to connect to the contracts
4040

4141
#### Defined in
4242

43-
[base.ts:20](https://github.com/humanprotocol/human-protocol/blob/11c280a968c4e19e21e43f468baa71bfd0766e56/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20)
43+
[base.ts:20](https://github.com/humanprotocol/human-protocol/blob/95ed623c67878973c127c8529a78774329277e86/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20)
4444

4545
## Properties
4646

@@ -50,7 +50,7 @@ The network information required to connect to the contracts
5050
5151
#### Defined in
5252

53-
[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/11c280a968c4e19e21e43f468baa71bfd0766e56/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12)
53+
[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/95ed623c67878973c127c8529a78774329277e86/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12)
5454

5555
***
5656

@@ -60,4 +60,4 @@ The network information required to connect to the contracts
6060
6161
#### Defined in
6262

63-
[base.ts:11](https://github.com/humanprotocol/human-protocol/blob/11c280a968c4e19e21e43f468baa71bfd0766e56/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11)
63+
[base.ts:11](https://github.com/humanprotocol/human-protocol/blob/95ed623c67878973c127c8529a78774329277e86/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11)

0 commit comments

Comments
 (0)