-
Notifications
You must be signed in to change notification settings - Fork 113
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
Implement pdao status and signalling address commands #599
Conversation
Add RocketSignerRegistry to ServiceProvider
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.
PR is still in draft mode so I can't be too perturbed by the presence of commented out code, but good lord that's a lot of commented out code :)
rocketpool-daemon/api/pdao/status.go
Outdated
@@ -135,7 +135,8 @@ func (c *protocolDaoGetStatusContext) PrepareData(data *api.ProtocolDAOStatusRes | |||
|
|||
data.BlockNumber = uint32(c.blockNumber) | |||
data.IsNodeRegistered = c.isNodeRegistered | |||
// data.SignallingAddress = c.signallingAddress | |||
data.SignallingAddress = c.signallingAddress | |||
data.SignallingAddressFormatted = utils.GetFormattedAddress(c.ec, data.SignallingAddress) |
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.
we should probably rename this to "GetPrimaryENS" or something.
We need to rethink our whole approach to ens, though, so it's a job for later: #583 (comment)
Remove const, fix message and nil pointer
9b638f7
to
32a7c96
Compare
Snapshot isn't on holesky and I don't have a mainnet node so one of you guys should let me know if this works properly. That'd be much appreciated. It should look something like this:
|
Should We can close NMC#17 if this looks good, since all the EIP712 related logic resides in the smartnode now. |
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.
the eip712 package is too fundamentally testable to not have a unit test. Please add one :)
Co-authored-by: Jacob Shufro <[email protected]>
bleep bloop Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
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. Changed unit test files
|
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.
almost there! the general shape is now correct
shared/eip712/eip712.go
Outdated
const EIP712Length = 65 | ||
|
||
// Pretty print for EIP712Components | ||
func (e EIP712Components) String() { |
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.
rename this to Print(). Functions named String() should return a string to fulfill https://pkg.go.dev/fmt#Stringer
however, i think we want the Stringer interface to be implemented as:
func (e EIP712Components) String() string {
out, err := e.MarshalText()
if err != nil {
// MarshalText should never return an error
panic(err)
}
return string(out)
}
so that the "native" format is the 65 byte 0x-prefixed hex string.
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.
woops didn't mean to press approve yet
Merging this branch changes the coverage (1 decrease, 1 increase)
Coverage by fileChanged files (no unit tests)
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. Changed unit test files
|
rocketpool pdao status
rocketpool pdao set-signalling-address
rocketpool pdao clear-signalling-address