nimbus-eth1/nimbus/p2p
Jamie Lokier a4f92a6543
Transaction: Use same log level for all block rejection causes
Block validation failure isn't an error, it's correct rejection of a bad block
from the network.  All conditions that lead to block rejection return a simple
boolean.

When a block is rejected, most reasons log at `debug` level.  Only `stateRoot`
mismatch shouts a loud, highlighted, multi-line error message with big red
`error` alert.

Historically this was to assist EVM development, because it was more likely to
be a Nimbus EVM bug than a real bad block.  But now the EVM is in good shape,
has a large and thorough testsuite, and `stateRoot` mismatch is more likely to
be a real bad block that should be rejected with less fuss.

If there's a genuine EVM bug, we'll still get an alert: Consensus failure will
quickly become obvious, and the block where it happens is easily fetched.

So a big, loud error is no longer useful, and it became a problem during tests.
Recently a few hundred tests were added that trigger it, and now successful
test output is filled with attention-grabbing errors which aren't really errors
or particularly useful.

Since it's not really an error, the original motivation is now backwards, and
other reasons warn at `debug` level, make this like the others.

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-08 18:07:50 +01:00
..
validate use general lru_cache for EpochHashCache 2021-05-24 07:57:21 +01:00
chain.nim EVM: Remove most unused imports of `vm_*` files 2021-06-01 16:54:38 +01:00
dao.nim replace state_db with accounts_cache 2020-05-30 10:14:59 +07:00
executor.nim Transaction: Use same log level for all block rejection causes 2021-06-08 18:07:50 +01:00
validate.nim EVM: Remove `vm_types2` everywhere, use common forks list instead 2021-06-08 15:36:31 +01:00