smartnode icon indicating copy to clipboard operation
smartnode copied to clipboard

Update V2 initialize voting to mirror v1 behaviour

Open thomaspanf opened this issue 1 year ago • 2 comments

rp p iv allows users to choose if they want to specify a delegate while initializing voting: InitializeVotingWithDelegate(delegate common.Address)

If not, voting power is initialized to their own node: InitializeVoting()

This PR ports this feature from V1 into V2

Specifying a delegate:

:~$ rp p iv

Would you like to specify a delegate that can vote on your behalf on Protocol DAO proposals? [y/n]
y

Please enter the delegate's address:
0x7ac4C35034D7d175583E9f5876257fBc59E9946E

+============== Suggested Gas Prices ==============+

Without specifying a delegate:

:~$ rp p iv

Would you like to specify a delegate that can vote on your behalf on Protocol DAO proposals? [y/n]
n

+============== Suggested Gas Prices ==============+

thomaspanf avatar Aug 05 '24 01:08 thomaspanf

Converted to Draft because there is discussion on changing this text.

thomaspanf avatar Aug 07 '24 15:08 thomaspanf

Reopening this PR now that #628 has been merged.

thomaspanf avatar Aug 20 '24 19:08 thomaspanf

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ :robot:
github.com/rocket-pool/smartnode/v2/client 0.95% (-0.00%) :thumbsdown:
github.com/rocket-pool/smartnode/v2/rocketpool-cli/commands/pdao 0.37% (-0.01%) :thumbsdown:
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/api/pdao 0.00% (ø)
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/common/rewards 1.43% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed :robot:
github.com/rocket-pool/smartnode/v2/client/pdao.go 0.28% (-0.00%) 352 (+6) 1 351 (+6) :thumbsdown:
github.com/rocket-pool/smartnode/v2/rocketpool-cli/commands/pdao/commands.go 6.03% (ø) 464 28 436
github.com/rocket-pool/smartnode/v2/rocketpool-cli/commands/pdao/initialize-voting.go 0.00% (ø) 322 (+169) 0 322 (+169)
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/api/pdao/handler.go 0.00% (ø) 39 0 39
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/api/pdao/initialize-voting-with-delegate.go 0.00% (ø) 157 (+157) 0 157 (+157)
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/api/pdao/initialize-voting.go 0.00% (ø) 156 (-1) 0 156 (-1)
github.com/rocket-pool/smartnode/v2/rocketpool-daemon/common/rewards/utils.go 3.50% (ø) 1484 52 1432

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

github-actions[bot] avatar Aug 26 '24 18:08 github-actions[bot]