Commit 85826e6
committed
Trace invalid blocks in unviable quarantine
A block may become unviable for two main reasons:
* the fork it was on is orphaned by chain finality - ie the block was
valid in some history, but not any more in the canonical one
* the block is invalid, either because it is itself invalid or it builds
on an invalid block
Until now we've treated both kinds the same when it comes to the
`unviable` quarantine - because of this, when checking gossip rules the
client has in some cases opted for the more lenient "IGNORE" respons
instead of using "REJECT".
This PR brings the client more closely in line with ignore/reject rules
by tracking the original error that led to the unviablility.
* use `minilru` instead of `OrderedTable` for simplified capacity
management and performance
* simplify quarantine operations that deal with unviables
* remove unused quarantine events
* keep track of the block being processed to avoid it being readded to
the quarantine during processing1 parent 80ade8d commit 85826e6
File tree
10 files changed
+406
-341
lines changed- beacon_chain
- consensus_object_pools
- gossip_processing
- tests
- vendor
10 files changed
+406
-341
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
960 | 959 | | |
961 | | - | |
| 960 | + | |
962 | 961 | | |
963 | 962 | | |
964 | 963 | | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
969 | 973 | | |
970 | 974 | | |
971 | 975 | | |
| |||
0 commit comments