-
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
feat: daemon: improvemens to the consensus slasher #10979
Conversation
missing bare minimum instruction on how to run this thing |
gentle ping |
Run |
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.
I won't block the review but will advocate for maintaining logging that provides useful information. This might mean logging when the fault is detected and the information is available or maybe going back and using typed errors instead of a bool.
With regards to "missing bare minimum instruction on how to run this thing" I have recently learned that this is a good place to put such things
cmd/lotus/daemon.go
Outdated
log.Errorf("slash detector errored: %s", err) | ||
continue | ||
} | ||
if fault { | ||
log.Errorf("<!!> SLASH FILTER ERROR: %s", err) |
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.
I think we are losing information here. Before this change the error contained information about the slashing condition being hit and the problem blocks. Now I think this err will just be nil
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 catch, thank you -- fixing.
miner/miner.go
Outdated
} | ||
|
||
if fault { | ||
log.Errorf("<!!> SLASH FILTER DETECTED FAULT due to witness %s", witness) |
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.
Again I think the old error log had more information about the slashing condition and blocks causing it.
My previous log error: MpoolPushMessage error log is %s not %w |
c4d4ed9
to
5279a0f
Compare
5279a0f
to
7180b52
Compare
Related Issues
Improvements to the new consensus slasher that was created in #10871
Proposed Changes
Additional Info
Run
lotus daemon --slash-consensus=true --slashdb-dir="/mnt/data/.slasher" >> /mnt/data/slash.log 2>&1 &
to run the consensus slasher.--slashdb-dir
is used to supply the path to the slasher database.--slasher-sender
can optionally be used to specify the account to send theReportConsensusFault
message from.Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps