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

Tasks Extension #717

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Tasks Extension #717

wants to merge 4 commits into from

Conversation

kronosapiens
Copy link
Member

@kronosapiens kronosapiens commented Sep 24, 2019

Closes #733
Closes #79 (by setting the ExpenditureClaimDelay)

Tasks

Transparently re-implement Tasks in terms of Expenditures. Test suite is duplicated and runs parallel to the in-Colony task tests, as we are supporting both currently.

Note that only non-redundant events (i.e. those which lack parallels in the underlying Expenditure) are preserved. Redundant events (such as finalization, setting payouts, etc) should be inferred by listening for events on the underlying Expenditure.

Design

  • "Secure" vs. "Managed" is represented via a secure boolean on the Task struct (and another argument to makeTask). When secure == true, tasks follow the current multisig logic for changing properties. When secure == false, the task manager can edit task properties directly. Managed tasks cannot set an evaluator.

  • "Managed" tasks have no evaluator, and by extension no work submission nor rate-and-reveal flow. The dueDate can be set but has no effects: the manager can "finalize" the task at any time (through finalizeManagedTask), which simply finalizes the underlying expenditure (allowing payments to be claimed with an implicit rating of 2). The expectation is that the submission and evaluation of work occurs off-chain in a lightweight, trusted manner.

  • The manager can convert a task from "Managed" to "Secure" at any time. To convert from "Secure" to "Managed", a two-way multisig with the manager and worker is required. Converting from "Secure" to "Managed" automatically unassigns the evaluator.

Notes

  • In order to keep the Tasks.sol contract under the ethereum bytecode limit, numerous bytecode optimizations were made. Most significantly, most (if not all) require messages were reduced to 32 bytes (i.e. 32 characters). Secondly, most modifier logic was extracted into internal boolean-valued helper functions. This article provides more information how how these practices reduce a contract's bytecode.

  • Multisig task changes have been restricted to only "active" tasks, as this seems more in line with the semantics of the task (previously, tasks which were "complete" but not yet "finalized" could have multisig task changes. Now, tasks must not yet be completed.

  • Modifier usage has been made slightly more consistent (with the taskExists modifier being used more regularly).

@kronosapiens kronosapiens self-assigned this Sep 24, 2019
@kronosapiens kronosapiens force-pushed the feature/managed-task branch 2 times, most recently from b00ef43 to f963276 Compare September 29, 2019 15:10
@area area added this to the Sprint 36 milestone Oct 1, 2019
@kronosapiens kronosapiens force-pushed the feature/managed-task branch 8 times, most recently from 9c6f1e1 to 757b8f8 Compare October 7, 2019 08:13
@area area modified the milestones: Sprint 36, Sprint 37 Oct 14, 2019
@kronosapiens kronosapiens removed this from the Sprint 37 milestone Oct 28, 2019
@kronosapiens kronosapiens force-pushed the feature/managed-task branch 3 times, most recently from a8309d2 to b549c0b Compare October 30, 2019 08:11
@kronosapiens kronosapiens changed the title Introduce secure vs. managed tasks Introduce tasks-as-extension Oct 30, 2019
@kronosapiens kronosapiens changed the title Introduce tasks-as-extension Introduce Jan 21, 2020
@kronosapiens kronosapiens changed the title Introduce Introduce Managed Tasks Jan 21, 2020
@kronosapiens kronosapiens changed the title Introduce Managed Tasks Introduce Tasks Extension Mar 27, 2020
@kronosapiens kronosapiens added this to In progress in Lightweight Spaceship via automation Apr 3, 2020
@kronosapiens kronosapiens changed the title Introduce Tasks Extension Tasks Extension May 12, 2020
@collinvine
Copy link

@kronosapiens is this still being worked on, and is it still planned for LWSS? I'm thinking that this no longer a relevant feature. Thoughts?

@kronosapiens
Copy link
Member Author

@collinvine Alex and I discussed this today during sprint planning -- we can pick it up, but wanted to make sure it was still relevant. You're saying it's not? What's the reasoning?

@collinvine
Copy link

TBD, but plan is to simplify the task feature. Meaning, natively supporting expenditures & also support the 1tx payment via the extension manager. In the UI, the "task" feature would be drastically reduced. cc @jakzilla

@kronosapiens
Copy link
Member Author

@collinvine Ok, works for us. The nice thing is we can toss this in really whenever we want. The only consideration is when/how we deprecate the built-in task functionality, since the longer we leave it lying around the harder it will be to remove it later (that said, I doubt it's getting a lot of use currently).

@kronosapiens kronosapiens removed this from In progress in Lightweight Spaceship Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tasks Extension Paying out a Task Bounty
3 participants