-
Notifications
You must be signed in to change notification settings - Fork 177
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
feat: add proposal vote cli arg #3275
base: master
Are you sure you want to change the base?
Conversation
This commit allows orchestrators to vote on active treasury proposal directly from the go-livepeer CLI.
This commit ensures that the contract bindings are up to date with the latest version of the livepeer/protocol repository.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3275 +/- ##
===================================================
- Coverage 33.75539% 31.74288% -2.01251%
===================================================
Files 141 142 +1
Lines 37357 39842 +2485
===================================================
+ Hits 12610 12647 +37
- Misses 24027 26475 +2448
Partials 720 720
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
This commit renames the internal reference to the LivepeerGovernor contract and improves the proposalVote handler data type parsing behavoir.
98fa9ab
to
8dc634f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one comment. Other than that looks good.
If we don't have testnet, then my suggestion is if @rickstaa, you try it with some real proposal with your local Orchestrator and then merge.
@@ -325,6 +330,23 @@ func (c *client) setContracts(opts *bind.TransactOpts) error { | |||
|
|||
glog.V(common.SHORT).Infof("LivepeerTokenFaucet: %v", c.faucetAddr.Hex()) | |||
|
|||
livepeerGovernorAddr, err := c.GetContract(crypto.Keccak256Hash([]byte("LivepeerGovernor"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break the local on-chain setup with the local chain livepeer/geth-with-livepeer-protocol:confluence
. It's not the end of the world, but a regression in the dev process.
Two options here:
- Quick => Make this resolution here optional (so don't fail if it's not resolved)
- Longer => Update
livepeer/geth-with-livepeer-protocol:confluence
Docker image to include the Governor contract
I think that actually Point 1 may be a better option because we don't risk introducing any regression anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leszko Do you know how that docker image is created? When we implemented the treasury I believe I updated the bootstrap scripts from livepeer/protocol
to deploy the governor as well. If the docker image is created by simply running that script on a fresh geth, maybe it will just work ®️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that making this optional would be an acceptable solution tho. Feel free to just do that to unblock this PR @rickstaa!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
{desc: "Vote in a poll", invoke: w.vote, orchestrator: true}, | ||
{desc: "Vote on a proposal", invoke: w.voteOnProposal, orchestrator: true}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc nit: WDYT of being more specific to avoid confusion?
{desc: "Vote in a poll", invoke: w.vote, orchestrator: true}, | |
{desc: "Vote on a proposal", invoke: w.voteOnProposal, orchestrator: true}, | |
{desc: "Vote in a governance poll", invoke: w.vote, orchestrator: true}, | |
{desc: "Vote on a treasury proposal", invoke: w.voteOnProposal, orchestrator: true}, |
confirm = w.readStringYesOrNo() | ||
} | ||
|
||
fmt.Printf("Do you want to provide a reason for your vote? (y/n) -") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be awesome to display these in the dashboard at some point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mike will be adding it to his vote tracker. At the moment it is just me and Titan setting the reason, but with this PR we might see a lot more Orchestrators add a reason to their vote.
@@ -325,6 +330,23 @@ func (c *client) setContracts(opts *bind.TransactOpts) error { | |||
|
|||
glog.V(common.SHORT).Infof("LivepeerTokenFaucet: %v", c.faucetAddr.Hex()) | |||
|
|||
livepeerGovernorAddr, err := c.GetContract(crypto.Keccak256Hash([]byte("LivepeerGovernor"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that making this optional would be an acceptable solution tho. Feel free to just do that to unblock this PR @rickstaa!
What does this pull request do? Explain your changes. (required)
This pull request gives orchestrators the ability to vote on active treasury proposal directly from the go-livepeer CLI.
Specific updates (required)
voteOnProposal
handler on the server.go generate client.go
. Can you check if these really need to be updated or that my setup is incorrect.How did you test each of these updates (required)
I wrote tests and tested the command line argument with a non-orchestrator wallet since we currently don't have a testnet. @victorges, @leszko if you reviewed this I can test with my actual wallet.
Does this pull request close any open issues?
Checklist:
make
runs successfully./test.sh
pass