-
Notifications
You must be signed in to change notification settings - Fork 12
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
Don't prepare blocks when not a validator. #70
Comments
Unassigning for now. This is just a warning and doesn't break the network, so I'll work on the contract changes first. |
Does it throw an error for the current version of pos contracts? I removed |
Also, those warnings are supposed to appear when |
Yes, it still behaves the same way with poanetwork/posdao-contracts@50b4c19. The contracts aren't at fault here.
That's when they appear currently, yes, because Note that it's not even warnings, just trace and debug messages:
But they show that the miner determines (via both |
Ok, we could deal with this, I guess? |
Yes, it shouldn't break anything. It would still be nice to fix it, to avoid a lot of spam in the logs and wasted CPU time. |
Problem: can |
That's a good point; maybe we should just set some fixed limit for the size of the cache. (Did you mean to post in #97 instead?) |
The ideal fix for this would:
In particular we need to find out when exactly
I'm confused but it looks like preparing a new block is considered whenever new transactions or blocks are imported as well as periodically on a timeout. Since in our case |
Just to put it here: it looks like new transactions, indeed, can cause a reseal of the block, depending on configuration:
|
Possibly this option is not taking a proper effect because |
When adding a non-validator node, I see lots of warnings. It looks like
on_close_block
Miner::prepare_block
is called anyway! One missing piece that's marked asTODO
is extendingEngine::seals_internally
, so that it returnsSome(false)
if I'm not a validator (or it's not my turn, I guess).But I'm not even sure whether that will solve the problem.
The text was updated successfully, but these errors were encountered: