Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Job Launcher] Exchange Oracle webhook #849

Merged
merged 5 commits into from
Sep 1, 2023

Conversation

eugenvoronov
Copy link
Contributor

@eugenvoronov eugenvoronov commented Aug 30, 2023

Description

There may be a case where [CVAT] Exchange Oracle fails to create a task on the CVAT side and throws an error, and it should be able to notify the job launcher of this. Now, the job launcher will be notified about errors and performing the necessary actions with the escrow.

Summary of changes

  • Implemented new endpoint to controller.
  • Implemented webhook logic to the service.
  • Created and updated unit tests.

How test the changes

POST /cvat/escrow-failed-webhook

Payload:
{
  "escrow_address": "0x60C5185b06CEa5cA7d3BDE8f1292Bfb8729E24d5", 
  "chain_id": 80001, 
  "event_type": "task_creation_failed", 
  "reason": "invalid manifest"
}

Signature:
0x5c89bb473d912ec0299a3577f8ed73216f6647227b1de2dc45911b895944937300ec62c152eca353be21e3043437e1fb03d1f057abc0a7e24acc484df19004ff1b

Address:
0x93DcC58cDDCB026984821DF7bbef46400E20394C

yarn test

Related issues

[Job Launcher] [CVAT] Exchange Oracle notification webhook#790

@eugenvoronov eugenvoronov requested a review from portuu3 August 30, 2023 09:25
@eugenvoronov eugenvoronov self-assigned this Aug 30, 2023
@vercel
Copy link

vercel bot commented Aug 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
escrow-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 4:17pm
faucet-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 4:17pm
fortune-exchange-oracle ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 4:17pm
fortune-exchange-oracle-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 4:17pm
fortune-job-launcher-client ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 4:17pm
fortune-job-launcher-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 4:17pm
fortune-recording-oracle ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 4:17pm
fortune-reputation-oracle ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 4:17pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
job-launcher-server ⬜️ Ignored (Inspect) Visit Preview Aug 30, 2023 4:17pm

@eugenvoronov eugenvoronov linked an issue Aug 30, 2023 that may be closed by this pull request
@vercel vercel bot temporarily deployed to Preview – fortune-recording-oracle August 30, 2023 09:26 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-recording-oracle August 30, 2023 09:29 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-exchange-oracle August 30, 2023 09:33 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-reputation-oracle August 30, 2023 09:36 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-exchange-oracle-server August 30, 2023 09:38 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-job-launcher-client August 30, 2023 09:41 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-job-launcher-server August 30, 2023 09:44 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-job-launcher-server August 30, 2023 16:03 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-exchange-oracle-server August 30, 2023 16:05 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-reputation-oracle August 30, 2023 16:05 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-recording-oracle August 30, 2023 16:06 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-exchange-oracle August 30, 2023 16:07 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-job-launcher-client August 30, 2023 16:08 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-exchange-oracle August 30, 2023 16:14 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-job-launcher-client August 30, 2023 16:15 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-exchange-oracle-server August 30, 2023 16:15 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-job-launcher-server August 30, 2023 16:16 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-recording-oracle August 30, 2023 16:17 Inactive
@vercel vercel bot temporarily deployed to Preview – fortune-reputation-oracle August 30, 2023 16:17 Inactive
@eugenvoronov eugenvoronov merged commit b21b382 into develop Sep 1, 2023
@eugenvoronov eugenvoronov deleted the feature/launcher/failed-webhook branch September 1, 2023 07:39
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.

[Job Launcher] [CVAT] Exchange Oracle notification webhook
3 participants