Skip to content

💰 Fix update payout proposal creation#4095

Merged
thesan merged 26 commits intoephesusfrom
fix/payout-proposal
Feb 3, 2023
Merged

💰 Fix update payout proposal creation#4095
thesan merged 26 commits intoephesusfrom
fix/payout-proposal

Conversation

@thesan
Copy link
Copy Markdown
Collaborator

@thesan thesan commented Jan 17, 2023

Follow up to #3906 on #3073

TODO before ready

QA

  1. Create the ChannelPayoutsVector.json based on the atlas-next network.
  2. From the Joystream mono repo (on the ephesus branch) run:
    cli/bin/run content:generateChannelPayoutsPayload -i path/to/ChannelPayoutsVector.json -o payload.bin
    note the COMMITMENT
  3. Create the proposal on https://dao-git-fix-payout-proposal-joystream.vercel.app/#?network-config=https://atlas-next.joystream.org/network/config.json
  4. Once the proposal is executed the DATA_OBJECT_ID can be queried on https://atlas-next.joystream.org/query-node/server/graphql using the COMMITMENT from step 2:
    {
      channelPayoutsUpdatedEvents (where: { commitment_eq: "COMMITMENT" }) {
        payloadDataObjectId
      }
    }
  5. Create a json file (lets call it upload.json):
    {
      "bagId": "static:council",
      "assets": [ { "objectId": "DATA_OBJECT_ID", "path": "path/to/payload.bin" } ]
    }
  6. Upload the payload using the json, by running:
    cli/bin/run content:reuploadAssets -i upload.json

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 17, 2023

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

Name Status Preview Comments Updated
dao ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 2, 2023 at 11:42AM (UTC)
pioneer-2 ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 2, 2023 at 11:42AM (UTC)
pioneer-2-storybook ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 2, 2023 at 11:42AM (UTC)

@dmtrjsg
Copy link
Copy Markdown
Contributor

dmtrjsg commented Jan 18, 2023

Screenshot 2023-01-18 at 15 03 02

@dmtrjsg
Copy link
Copy Markdown
Contributor

dmtrjsg commented Jan 24, 2023

When I try to upload a .bin file it still gives me this error:

Screenshot 2023-01-24 at 20 14 59

But allows to progress with the proposal


Proposal got executed:

https://dao-git-fix-payout-proposal-joystream.vercel.app/#/proposals/preview/21

Screenshot 2023-01-24 at 20 17 27

_____

Atlas side payments not showing to be claimed:

Screenshot 2023-01-24 at 20 19 34

Screenshot 2023-01-24 at 20 19 28

Screenshot 2023-01-24 at 20 19 22

_____

Copy link
Copy Markdown
Contributor

@WRadoslaw WRadoslaw left a comment

Choose a reason for hiding this comment

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

As for code LGTM, didn't click through it tho, sorry ;/

Few comments, but nothing game-breaking.

}

const request: WorkerRequest = { type, id: uniqueId(), file }
const result = messages.pipe(filter(({ data }) => data.id === request.id))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
const result = messages.pipe(filter(({ data }) => data.id === request.id))
const resultPipe = messages.pipe(filter(({ data }) => data.id === request.id))

result alone is kinda confusing since at this line we create only pipe from stream, but it's just a suggestion

worker = new Worker(new URL('./worker', import.meta.url), { type: 'module' })
messages = fromEvent<MessageEvent<WorkerResponse>>(worker, 'message')
} catch {
return compute(type, file)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I understand that if there isn't a worker and creation fails we want to compute the file on the main thread?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes I added this because the worker would fail on storybook but it didn't help and I had to alias @common/utils/crypto/worker anyway. So I might as well remove this

const minimumValidatorCount = useMinimumValidatorCount()
const maximumReferralCut = api?.consts.members.referralCutMaximumPercent
const minCashoutAllowed = joy(166, 6_666_666_660)
const maxCashoutAllowed = joy(1_666_666, 6_666_600_000)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No way to extract these from API?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not yet but it should be available soon: Joystream/joystream#4585

@thesan
Copy link
Copy Markdown
Collaborator Author

thesan commented Feb 3, 2023

As for code LGTM, didn't click through it tho, sorry ;/

No worries that's pretty a time consuming workflow but I really needed someone to double check the code.

Thanks a lot 🙇

@thesan thesan merged commit 94060a7 into ephesus Feb 3, 2023
@thesan thesan deleted the fix/payout-proposal branch February 3, 2023 10:10
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.

3 participants