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

one-time-feat: shed: FIP0036 post poll result processing #9375

Closed
wants to merge 5 commits into from

Conversation

jennijuju
Copy link
Member

What the heck is this?

ICYMI
We've got an FIP-0036
Then we've got an FilPoll for FIP-0036 - GO VOTE if you haven't already, before that DYOR!
Then we've got some governance rules - in which we got Who gets to vote?

This is a set of shed cmd to process the poll result according to the governance rule.

Disclaimer: code reviews are welcomed - its possible something was mess-up somewhere, we are going to keep it updated base on feedbacks!

So.. how?

We use the offline mode here to inspect the state that the poll snapshot was taken.

A couple source needed:

  • a lotus chain datastore that has the state of height 2162760, state root bafy2bzacebdnzh43hw66bmvguk65wiwr5ssaejlq44fpdei2ysfh3eefpdlqs (according to filscan)
  • your daemon node thats linked with the datastore needs to be stopped given we need to lock the datastore for accessing the state
  • you will need to know who voted: https://api.filpoll.io/api/polls/16/view-votes
  • the shed cmd are developed based on the facts/assumption that
    • fil-poll doesn't take duplicated entry from the same signer
    • we only use fil-poll to get signer address & their vote option
    • vote option can either be 49 - approve, or 50- reject
    • everything else, we get the data from the chain state, includes account balances, multisig info, deal info and miner actor info.
  • the shed tool took two argument, first one being the state root, the second one being a json file contains the votes that have attributes signerAddress and optionId for each vote entry.
NAME:
   lotus-shed fip36poll - Process the FIP0036 FilPoll result

USAGE:
   lotus-shed fip36poll command [command options] [state root, votes]

COMMANDS:
   sp  get poll result for storage group. Weighted by RBP(raw byte power) and deal bytes stored in valid deals.
Note that: if both owner key and worker key has voted, the vote made by owner key will be casted the storage provider actor.
   client        get poll result for client, weighted by deal bytes that are in valid deals in the storage market.
   token-holder  get poll result for token holder group. balance includes, regular wallet accounts, multisig wallet that has valid vote that meets threshold, and the available balance of the storage miner actors that voted
   help, h       Shows a list of commands or help for one command

OPTIONS:
   --repo value  (default: "~/.lotus")
   --help, -h    show help (default: false)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant