-
Notifications
You must be signed in to change notification settings - Fork 33
Log if not producing because of stale production #1385
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
Conversation
|
curiously when I tried this I got and then output ceased. What causes only 2 logs to be printed instead of continuing at each slot? |
Either no longer the producer for that slot or a recent block received. |
|
Just running |
This allows two messages before it stops because it is waiting for a block. Thanks for pointing this out. I believe the correct behavior here is to set |
| if (!_production_enabled) { | ||
| _pending_block_mode = pending_block_mode::speculating; | ||
| if (_producers.find(scheduled_producer.producer_name) != _producers.end()) { | ||
| fc_elog(_log, "Not producing block because stale production not enabled, block ${t}", ("t", block_time)); |
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.
Do you want to log the producer name?
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 thought about it, but none of the other Not producing block because log statements log the producer. I didn't want to change any of the existing ones and just kept this consistent. Under normal operation the BP should know their one and only one producer name.
Add a log of
Not producing block because stale production not enabledwhich was the only cases that didn't already log when a node would produce but doesn't for some reason. Noticed this on a recent test failure when looking at the logs.Also sets the flag that prevents the
producer_pluginfrom going into an infinite wait for a block. Since you are a configured producer you should keep trying to produce.