-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Shed/post find #4355
Shed/post find #4355
Conversation
}, | ||
&cli.BoolFlag{ | ||
Name: "withpower", | ||
Usage: "only print addrs of miners with more than zero power", |
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.
Nit: it could well be handy in the future for this to be a continuous parameter rather than a zero/nonzero.
if err != nil { | ||
return err | ||
} | ||
if power.MinerPower.RawBytePower.GreaterThan(big.Zero()) { |
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.
Check with the requirements whether you want power (excl faults and miners below min size) or committed bytes.
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.
Good point. FYI no power reqs specified right, I included to see if it makes a difference today and if we should recommend that it be included.
_, seenBefore := postedMiners[msg.To] | ||
|
||
if shouldCheck && !seenBefore { | ||
if msg.Method == builtin.MethodsMiner.SubmitWindowedPoSt { |
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 this be true for a window post that is a pre spec actors v2 upgraded window post (with a previous network param)
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.
Yes, because the SubmitWindowedPoSt method number didn't change.
|
||
postedMiners := make(map[address.Address]struct{}) | ||
for _, msg := range msgs { | ||
_, shouldCheck := minersToCheck[msg.To] |
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.
Correctness nit: I think it's possible that a valid WindowedPost was submitted with the msg.To
being the miner's robust t2
address, which will not be in the minersToCheck
map.
Lotus doesn't do this by default, though, so maybe don't bother _address_ing this.
…ost-find Shed/post find
Shed util to print out all miners that have submitted a post in the last day.