Joystream / Joystream/joystream

Bounties: Oracle should transfer rewards to workers or slash their accounts at the judgement stage

Open
#3,489 0 comments 1 reaction 1 assignee View on GitHub

@L3pereira is already working on this.

Since Apr 11, 2022.

bounty-pallet enhancement runtime
Dominant language
Rust
Stars
1.4k
Forks
116
PR merge metrics
No merged PRs in 30d

Description

When the oracle submits a judgement he already has to iterate the entries he is judging, when he decides an entry is a winner, the oracle must attribute a reward to that entry, if the oracle already knows the worker_member_id and the amount to reward, he can get the controller worker account id and transfer that amount right away.
If the oracle decides an entry is rejected he can slash the worker staking account immediately.

This saves the workers from having to call a new extrinsic and query the entries store.
This change makes the field EntryRecord::oracle_judgmnt_result useless

If a worker submitted some work that didn't get judged, he can unlock his stake by calling unlock_work_entrant_stake

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.