Skip to content

Conversation

@portuu3
Copy link
Collaborator

@portuu3 portuu3 commented Dec 4, 2024

Issue tracking

Context behind the change

  • Contract upgrades
    • New staking contract
    • Delete reward pool contract
    • Add events to escrow contract for better tracking
    • Add force complete to escrow contract
    • Add withdraw to escrow contract
  • Subgraph upgrades
    • New contracts indexing
    • Improve transactions indexing
  • Billing system
  • SDK updates
  • Dashboard improvements in transactions data
  • Add JL dashboard data
  • HUMAN App improvements
  • ....

How has this been tested?

Release plan

  1. Dashboard:
  • Set HCAPTCHA_STATS_ENABLED
  • Set NETWORK_USAGE_FILTER_MONTHS
  • Set NETWORKS_AVAILABLE_CACHE_TTL
  1. UI-2024:
  • Set VITE_ENABLED_CHAIN_IDS
  1. Human app server:
  • Set CACHE_TTL_JOB_TYPES
  1. Job launcher server:
  • Run migrations (CD)
  1. Core:
  • Deploy contracts
  1. Subgraph
  • Deploy new subgraphs
  1. SDK:
  • Update contract addresses and subgaph IDs

  • Deploy Python and Typescript new versions

  • Update changelog:

  • Update subgraph IDs.

  • Remove reward pool address because the contract has been deleted.

  • Update staking address to point to the new contract address.

  • Delete create and setup escrow functions. The new launching order is:

    1. Create
    2. Fund
    3. Setup
  • Delete the escrow abort function.

  • Add a withdraw function:

    • This allows trusted handlers to withdraw tokens from the escrow contract, even if they are not the funding token.
    • This change helps prevent tokens from being accidentally locked in the contract.
  • Add a force complete parameter to the bulk payout function, It forces escrow completion by sending the remaining balance of the escrow back to the job launcher.

  • Update the leader entity:

    • Remove amount allocated.
    • Remove reputation.
    • Add reputation networks.
  • Remove all allocation-related functions from the staking client.

  • Modify getTransactions in the transaction utils to include internal transaction data.

  1. CVAT Exchange Oracle:
  • Set TRACK_ESCROW_VALIDATIONS_INT
  • Set TRACK_ESCROW_VALIDATIONS_CHUNK_SIZE
  • Set CVAT_POLYGONS_IOU_THRESHOLD
  1. KVStore
  • Set job types in kvstore in snake case notation.
  1. Stripe
  • Set up production account. Not needed, fiat payments disabled.
  1. Update DOCS
  1. CVAT
  • Update SDK version
  1. Staking
  • Unstake from old contract and stake in the new one.

Potential risks; What to monitor; Rollback plan

adrian-oleskiewicz and others added 30 commits November 22, 2024 16:04
…ngle shape mode (#2832)

* [Exchange Oracle] Add PolygonTaskBuilder

* [Exchange Oracle] Enable single shape mode for polygons

* [Exchange Oracle] Move iou_threshold to cvat config

* [Exchange Oracle] Add CVAT_QUALITY_RETRIEVAL_TIMEOUT to .env.template

* Fix the env variable name

Co-authored-by: Maxim Zhiltsov <zhiltsov.max35@gmail.com>

---------

Co-authored-by: Maxim Zhiltsov <zhiltsov.max35@gmail.com>
#2837)

Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](actions/dependency-review-action@v4.4.0...v4.5.0)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [xdeployer](https://github.com/pcaversaccio/xdeployer) from 3.0.0 to 3.1.6.
- [Release notes](https://github.com/pcaversaccio/xdeployer/releases)
- [Commits](pcaversaccio/xdeployer@v3.0.0...v3.1.6)

---
updated-dependencies:
- dependency-name: xdeployer
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [stripe](https://github.com/stripe/stripe-node) from 17.3.1 to 17.4.0.
- [Release notes](https://github.com/stripe/stripe-node/releases)
- [Changelog](https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md)
- [Commits](stripe/stripe-node@v17.3.1...v17.4.0)

---
updated-dependencies:
- dependency-name: stripe
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.53.1 to 7.53.2.
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](react-hook-form/react-hook-form@v7.53.1...v7.53.2)

---
updated-dependencies:
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: add ui configuration module

* refactor: get rid of chain ids in oracles response
* Implemented oracle filter

* Reverted changes in rep oracle service

* Resolved comments

* Improved oracle discrovery service

* Updated comment

* Convert all chainIds values to type ChainId (#2765)

* Updated method name

* Fixed lint

* Removed console.log

* implemented unit test for processOracleDiscovery

* Updated function name

---------

Co-authored-by: portuu3 <adrian.portugues.mas@gmail.com>
* Updated configs

* Implemented available networks feature

* Updated env example

* Changed DEFAULT_NETWORK_USAGE_FILTER_MONTHS

* Lint fixed

* Added new constants

* Added check to not cache data from subgraph for disabled networks

* Migrate to network config service

* Removed unused module
* Allow manifest changes in recording oracle

* Fix linter

* Fix test

* Remove .env from test dockerfile

* Ignore nonexistent .env
* Fix a possible deadlock in create_escrow_validations

* Improve log message

* Don't expect projects in validation status in completed escrows

* Use limit from config

* USe a separate env var

* Polish some code

* Mark escrow validation completed after RO rejection webhook

* Fix potential deadlock on escrow validation inserts

* Satisfy linter

* Remove backward compatibility for env var

* Update tests, skip ro validation webhooks if no active validations

* Add db type check
* Implemented image polygons job type

* Removed console.log
* feat: add image_polygons to human-app

* feat: add image_polygons to ro
* Abuse system integration in Job Launcher server

* Add job launcher server migrations

* Create new component to setup card details

* Merge branch 'develop' into feat/job-launcher-server/abuse

* Create endpoints for the new billing flow:
- Remove Old PaymentInfo Table and Store CustomerId in User Table
- Update Endpoint to Create Customer and Add Payment Method
- Create Endpoint to List Payment Methods
- Create Endpoint to Remove a Payment Method
- Create Endpoint to Retrieve User Billing Details
- Create Endpoint to Edit Billing Details
- Create Endpoint to Change Default Payment Method

* Billing system implementation:
 - Modal to add card
 - Modal to delete card
 - Set as default button
 - Modal to select card
 - Edited fiat forms to use new billing system
 - Modal for billing details

* Billing system in Job launcher client

* Added unit tests for new methods

* Comment abuse code and solve comments

* Restore rate.service.ts change

* remove lint error
* Refactor and fix honeypot rerolls

* Fix and satisfy linter

* Add test

* Fix and refactor tests
* [Subgraph] Removed reputation from leader entity (#2450)

* Removed reputation from leader entity

* Merge branch 'subgraph-upgrades' into feature/sdk/remove-reputation-from-leader-entity

---------

Co-authored-by: eugenvoronov <eugene@hmt.ai>

* [Subgraph][SDK] Add registration data to leaders entity (#2451)

* Add registration data to leaders entity

* Add registration info to getReputationNetworkOperators

---------

Co-authored-by: Francisco López <francislopez977@gmail.com>

* [SDK] Added reputation networks (#2429)

* Added reputation networks

* Removed reputation network

* Handled null value

* Updated unit test

---------

Co-authored-by: portuu3 <adrian.portugues.mas@gmail.com>

* [Human App] Add registration info to oracles discovery response (#2452)

* Add registration data to leaders entity

* Add registration info to getReputationNetworkOperators

* Add wether registration is required to oracles discovery response

* Implemented reputation networks using SDK (#2458)

* [Subgraph] Remove eth_calls (#2397)

* Add events for data being read with eth_calls in subgraph

* Create new events to allow compatibility with old events

* Remove setupEventCount and rename SetupEvent to PendingEvent in Subgraph

* feat: add events and cancel method for erc20 token support (#2408)

* feat: add events and cancel method for erc20 token support

* fix: contract changes

* feat: sdk update

* feat: update sdk doc

* update subgraph

* update doc

* update doc

* revert doc summary delete

* remove create_and_setup_escrow function

* remove abort function

* fix cvat test

* fix cvat test

* fix cvat e2e

* apply optimization

* remove Payout event

* fix docs sdk files path

* regenerate doc

* [HUMAN App client] Add registration step (#2518)

* Add logic to register users in oracles

* Fix failing tests

---------

Co-authored-by: portuu3 <adrian.portugues.mas@gmail.com>

* [Subgraph][SDK] Refactor transactions (#2572)

* Refactor transactions in subgraph

* Update SDK

* Add compatibility with new transactions in dashboard server

* Add test for withdraw event

* Fix job launcher tests

* Solve errors on building human app frontend

* contract and subgraph deployment for sepolia

* replace subgraph deployment id

* subgraph transactions refactor

* refactor transactions indexing

* Update subgraph tests to new transactions

* Revert "[HUMAN App client] Add registration step (#2517)"

This reverts commit 26ebc9b.

* Revert "[Human App] Add registration info to oracles discovery response (#2452)"

This reverts commit 712232a.

* Revert "[Subgraph][SDK] Add registration data to leaders entity (#2451)"

This reverts commit cc79357.

* fix tests and lint errors

* add missing property to subgraph schema

* [Dashboard] Hyperlink role to oracle website (#2676)

* Hyperlink role to oracle website

* Created website field in Leader data in Subgraph and used it for hiperlink in dashboard

* [CORE][SDK] Remove allocation from Staking contract (#2651)

* Remove allocation from Staking contract and update SDK

* Updated subgraph tests

* Added withdrawFees to staking events

* enable staking events as main trx

* Update SDKs with the new transaction format

* Update Makefile

* Update docker-compose.yml

* Remove event tests for the events that have been removed

* Contracts upgrade

* Contracts upgrade

* Refactor Job Launcher to remove allocation

* Improve Staking and Escrow contracts

* Fix failing tests in python SDK

---------

Co-authored-by: portuu3 <adrian.portugues.mas@gmail.com>

* Update payout.service.ts

* fix migration after enums conversion to lower case

* deploy contracts and subgraph on sepolia

* Update staking contract to UUPS upgradeable

* add change staking address and minimum stake to escrow factory

* Remove upgradeable from Staking contract and update openzeppelin version to others contracts

* Fix failing tests

* Improve methods usage in EscrowFactory contract

* update deployment scripts and deploy new staking contract

* undo breaking change @openzeppelin/contracts-upgradeable upgrade and redeploy sepolia contracts

* update contracts deployment cd and deploy new sepolia subgraph

* Undo openzeppelin contract-upgradeable package update

* trigger preview

* add description

* add usdc support to sepolia

* remove private key and update doc

* deploy new contracts to bsc testnet

* deploy amoy

* fix faucet test

* fix lint issues

---------

Co-authored-by: eugenvoronov <eugene@hmt.ai>
Co-authored-by: Francisco López <francislopez977@gmail.com>
Co-authored-by: eugenvoronov <104138627+eugenvoronov@users.noreply.github.com>
Co-authored-by: Francisco López <50665615+flopez7@users.noreply.github.com>
Co-authored-by: Eric Lee <eric@hmt.ai>
Co-authored-by: Eric Lee <98655210+leric7@users.noreply.github.com>
…2937)

* refactoring: exception handling for `kyc` module

* fix: removed unused value from `KycErrorMessage`;
`userId` in `KycError` is not optional now;
* Disable fortune on mainnets

* Use Web3Env enum
* Show most recent jobs first

* Remove sortable fields in jobs table and specify filter parameter in the request
* Disable billing system

* Disable whitelist in server

* Disable whitelist tests untill it's enabled again

* Disable endpoints and reenable transactions page
…odule (#2944)

* refactoring: error handling for `qualification` module;
changed API schema for `/assign` and `/unassign`

* refactor: `NO_WORKERS_FOUND` now causes 422 HTTP error
* deployed fuji, xlayer testnet and moombase alpha

* deploy mainnet contracs and subgraphs, and update docs
@Dzeranov Dzeranov self-requested a review December 23, 2024 13:41
@portuu3 portuu3 merged commit 2e988b8 into main Dec 23, 2024
12 of 16 checks passed
@dnechay dnechay removed the do-not-merge PR shouldn't be merged until this label is removed label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.