As we all know, an invalid block will be ignored and won't be propagated when a verifier finds its invalidity. However, if there is a need to get the records of all invalid blocks once have been mined for the purpose of statistics, how can we do that?
1 Answer
I don't think you can.
A bad block is (by definition) nonsense that is emitted by a node and subsequently ignored by peers. They're not propagated across the network because they're useless.
If I'm not mistaken, any attempt to do so would create an unacceptable DoS vulnerability because the network could become saturated with chit-chat about noise coming from malicious/malfunctioning nodes.
I'm not saying studying the issue isn't feasible. It would be interesting to have some insight into that. There's no handy central registry to query so data gathering would be a challenge. You need lots of nodes reporting what they see from lots of different perspectives.
Ethstats, mining pools, any other operations you can think of that are in a position to collect the info from large numbers of nodes.
Hope it helps.