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

feat : add jobs pallet rpc calls #397

Merged
merged 6 commits into from
Jan 4, 2024
Merged

feat : add jobs pallet rpc calls #397

merged 6 commits into from
Jan 4, 2024

Conversation

1xstj
Copy link
Contributor

@1xstj 1xstj commented Jan 3, 2024

Summary of changes
Changes introduced in this pull request:

  • Adds jobs pallet rpc calls

How to use

Example : queryNextJobId

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "jobs_queryNextJobId", "params": [null]}' http://localhost:9944/
{"jsonrpc":"2.0","result":1,"id":1}

Example : queryJobsByValidator

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "jobs_queryJobsByValidator", "params": [null, "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"]}' http://localhost:9944/
{"jsonrpc":"2.0","result":[{"job_id":0,"job_type":{"DKGTSSPhaseOne":{"participants":["5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY","5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty","5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y"],"threshold":1,"permitted_caller":null,"role_type":"TssGG20"}},"participants":null,"threshold":null,"key":null}],"id":1}

Reference issue to close (if applicable)
Part of #302

@1xstj 1xstj requested a review from shekohex January 3, 2024 21:45
@1xstj 1xstj self-assigned this Jan 3, 2024
@1xstj 1xstj marked this pull request as ready for review January 3, 2024 21:46
Copy link
Contributor

@drewstone drewstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comment. If intentional it LGTM.

pallets/jobs/src/rpc.rs Show resolved Hide resolved
@tbraun96
Copy link
Contributor

tbraun96 commented Jan 4, 2024

Tested this PR locally on the ECDSA gadget branch, and it works.

Copy link
Contributor

@shekohex shekohex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@1xstj 1xstj merged commit 14847f3 into main Jan 4, 2024
6 checks passed
@1xstj 1xstj deleted the jobs-rpc-impl branch January 4, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed ✅
Development

Successfully merging this pull request may close these issues.

4 participants