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

Update Working Group Budget #2327

Closed
1 task
dmtrjsg opened this issue Feb 24, 2022 · 8 comments
Closed
1 task

Update Working Group Budget #2327

dmtrjsg opened this issue Feb 24, 2022 · 8 comments
Assignees
Labels
community-dev issue suitable for community-dev pipeline enhancement New feature or request qa-task qa-tested-ready-for-prod release:0.1.1 scope:proposals The "Proposals" page and related features

Comments

@dmtrjsg
Copy link
Contributor

dmtrjsg commented Feb 24, 2022

  • Update Working Group Budget
  • If budget_update is non-negative, then this it must be no less than the council budget, otherwise the absolute value must be no less than the current group budget.
@bwhm
Copy link
Member

bwhm commented Mar 6, 2022

@dmtrjsg
Note that there are some potential pitfalls here. The budget will often change in between the creation and potential execution of the proposal, for more than one reason:

  1. The budget may be increased/decreased due to another proposal
    • This would be FAR outside the scope of Olympia, but this can be somewhat accounted for by checking if there are any other active (budget) proposals for this group.
  2. The budget will change if there is a payout in between.
    • This change can be estimated, but as a group can hire/fire in between, it won't be correct.

Another risk is that you can't increase the budget with an amount larger than the Councils current budget. As the Councils budget will change quite frequently (reasons below), this could be even tougher to manage.

  1. The council budget is increased in increments
  • The expected change can be calculated at specific blocks, but even the refill can be changed through a proposal.
  1. The reward of CMs
  • Which can be changed by a proposal
  1. Other budgets being increased or decreased
  2. Council budget changed (extrinsic)

AFAICT, the best we can do here is provide some information and warnings to the user.

At creation
Show:

  • the current budget for the WG
  • the current budget for the Council
  • the expected size of the (next) payout(s)
  • the blockheight + expected time until the (next) payout(s)
    Warnings:
  • If the user wants to decrease - always warn "If the budget is less than this amount at attempted execution, this proposal will fail to execute, and the budget size will not be changed"
  • If the user wants to decrease more than the current budget warn "Unless the budget is increase between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed"
  • If the user wants to increase - always warn: "If the Councils budget is less than this amount at attempted execution, this proposal will fail to execute, and the budget size will not be changed"
  • If the user wants to increase - more than the current council budget warn: warn "Unless the Councils budget is increased between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed"

Proposals page
Assuming the proposal is created, in the proposal preview page
show:

  • the current budget for the WG
  • expected value of the WG budget assuming it gets passed?
  • the current budget for the Council
  • if the proposal is to decrease more than the current budget warn "Unless the budget is increase between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed"
  • if the proposal is to increase - more than the current council budget warn: warn "Unless the Councils budget is increased between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed"

Note that all the warnings needs some improvement :)

@dmtrjsg dmtrjsg added scope:proposals The "Proposals" page and related features enhancement New feature or request labels Aug 17, 2022
@dmtrjsg dmtrjsg assigned dmtrjsg and unassigned bwhm Oct 27, 2022
@dmtrjsg dmtrjsg changed the title Update Working Group Lead Budget Update Working Group Budget Oct 27, 2022
@dmtrjsg
Copy link
Contributor Author

dmtrjsg commented Oct 27, 2022

At creation
Show:

the current budget for the WG ✅ - Already done
the current budget for the Council - ✅ Already done
➕ 👉 the expected size of the (next) payout(s) + blockheight + expected time until the (next) payout(s). + message "Expected payouts can be impacted by hiring and firing decisions made before the date of payout."

WG payouts are done at regular times, and cover Lead and Workers salary.

➕ 👉 Add custom Warnings:
If the user wants to decrease - always warn "If the budget is less than this amount at attempted execution, this proposal will fail to execute, and the budget size will not be changed"

If the user wants to decrease more than the current budget warn "Unless the budget is increase between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed"~ - we have this covered by generic message:

If the user wants to increase - always warn: "If the Councils budget is less than this amount at attempted execution, this proposal will fail to execute, and the budget size will not be changed."

If the user wants to increase - more than the current council budget warn: warn "Unless the Councils budget is increased between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed."

Proposals page
Assuming the proposal is created, in the proposal preview page
show:

➕ 👉 the current budget for the WG ( As widget)
➕ 👉 expected value of the WG budget assuming it gets passed (As widget, title = Expected if passed)
➕ 👉 the current budget for the Council (as widget)
➕ 👉 Warnings: (similar style to the warning message that we use on Proposal creation, but placed underneath the widgets and above discussion threads)

If the proposal is to decrease more than the current budget warn "Unless the budget is increase between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed."

if the proposal is to increase - more than the current council budget warn: warn "Unless the Councils budget is increased between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed."

@ivanturlakov
Copy link

Tested on https://dao-git-dev-joystream.vercel.app/#/proposals/current
wss://34.230.5.182.nip.io/ws-rpc

Creation

✅ the expected size of the (next) payout(s) + blockheight + expected time until the (next) payout(s). + message "Expected payouts can be impacted by hiring and firing decisions made before the date of payout."
✅ If the user wants to increase - always warn: "If the Councils budget is less than this amount at attempted execution, this proposal will fail to execute, and the budget size will not be changed."
Снимок экрана 2022-12-03 в 19 08 56

✅ If the user wants to decrease - always warn "If the budget is less than this amount at attempted execution, this proposal will fail to execute, and the budget size will not be changed"
✅ If the user wants to decrease more than the current budget warn "Unless the budget is increase between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed"
Снимок экрана 2022-12-03 в 19 09 57

✅ If the user wants to increase - more than the current council budget warn: warn "Unless the Councils budget is increased between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed."
Снимок экрана 2022-12-03 в 19 18 16

Proposals page

✅ the current budget for the WG ( As widget)
✅ expected value of the WG budget assuming it gets passed (As widget, title = Expected if passed)
✅ the current budget for the Council (as widget)
✅ If the proposal is to decrease more than the current budget warn "Unless the budget is increase between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed."
Снимок экрана 2022-12-03 в 19 22 20

@dmtrjsg I faced just one problem here

🚫 if the proposal is to increase - more than the current council budget warn: warn "Unless the Councils budget is increased between now and attempted execution, this proposal will fail to execute, and the budget size will not be changed."

An error occurred while creating a proposal to increase the WG budget(more than the current council budget - 1,028,471,198.3). When trying to open(vote) a proposal.

Снимок экрана 2022-12-03 в 19 36 24

But proposals page is ok
Снимок экрана 2022-12-03 в 19 41 02
https://dao-git-dev-joystream.vercel.app/#/proposals/preview/28

@traumschule
Copy link
Contributor

This shows it needs an upper limit of 1000000000000000 using new BN(): 10x that throws

> new BN(10000000000000000)
Uncaught Error: Assertion failed
    at assert (/home/debian/pioneer/node_modules/bn.js/lib/bn.js:6:21)
    at BN._initNumber (/home/debian/pioneer/node_modules/bn.js/lib/bn.js:128:7)
    at BN.init [as _init] (/home/debian/pioneer/node_modules/bn.js/lib/bn.js:82:19)
    at new BN (/home/debian/pioneer/node_modules/bn.js/lib/bn.js:39:12)

prop28-amount

@traumschule
Copy link
Contributor

Considering decimals the limit is awful low: #3920
@dmtrjsg what do we do?

maxAmount

@thesan
Copy link
Member

thesan commented Dec 9, 2022

needs an upper limit of 1000000000000000 using new B

@traumschule I don't think there is a limit to BN values but when the value is more than Number.MAX_SAFE_INTEGER it should be passed as a string instead of a JavaScript number unlike in the screenshot.

@traumschule traumschule assigned chrlschwb and unassigned WRadoslaw and dmtrjsg Dec 9, 2022
@traumschule traumschule added the community-dev issue suitable for community-dev pipeline label Dec 9, 2022
@traumschule
Copy link
Contributor

@chrlschwb can you please test this solution and create a PR based on #3920.

@thesan
Copy link
Member

thesan commented Jan 6, 2023

This is out of scope because it was a result of both:

Apart from that the QA looks successful to me.

@thesan thesan closed this as completed Jan 6, 2023
Pioneer Community Product Development automation moved this from Ready to Test to Closed - On Prod Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-dev issue suitable for community-dev pipeline enhancement New feature or request qa-task qa-tested-ready-for-prod release:0.1.1 scope:proposals The "Proposals" page and related features
Projects
Development

No branches or pull requests

7 participants