Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
994ef9c
Merge branch 'master' into gav-xcm-v3
KiChjang Jun 20, 2022
cfcb797
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Jun 21, 2022
34a969b
Fixes
KiChjang Jun 22, 2022
b63a68a
Spelling
KiChjang Jun 22, 2022
6b28a4b
Fixes
KiChjang Jun 22, 2022
99bf04d
Fix codec index of VersionedXcm
KiChjang Jun 23, 2022
21a59c2
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Jun 24, 2022
119a494
Allows to customize how calls are dispatched from XCM (#5657)
nanocryk Jun 29, 2022
6810d06
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Jun 29, 2022
b4f0aee
Update comment `NoteAssetLocked` -> `NoteUnlockable`
KiChjang Jul 26, 2022
2608ec9
Merge branch 'master' into gav-xcm-v3
KiChjang Aug 10, 2022
81b3068
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Aug 14, 2022
8a8e831
pin gha versions (#5916)
sergejparity Aug 22, 2022
0ace38a
Companion to Substrate PR 12006 (#5913)
nazar-pc Aug 22, 2022
c548525
Fix output file for updating weights in run_benches_for_runtime.sh (#…
mordamax Aug 22, 2022
7540583
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Aug 23, 2022
bdca1c9
Bump hyper from 0.14.19 to 0.14.20 (#5901)
dependabot[bot] Aug 23, 2022
a69eba0
Bump proc-macro2 from 1.0.40 to 1.0.43 (#5878)
dependabot[bot] Aug 23, 2022
1903e3d
Bump indexmap from 1.9.0 to 1.9.1 (#5918)
dependabot[bot] Aug 23, 2022
f23b883
chore: bump zombienet version (#5914)
pepoviola Aug 23, 2022
dc5bb37
Fixes
KiChjang Aug 24, 2022
29499ba
Fixes
KiChjang Aug 24, 2022
54a299f
Send back empty votes + log in approval-voting in case candidate entr…
eskimor Aug 24, 2022
a7741c1
Bump async-trait from 0.1.56 to 0.1.57 (#5919)
dependabot[bot] Aug 24, 2022
c3d5882
Clean up MigrateToV10 (#5921)
coderobe Aug 25, 2022
e75f891
update weights (#5911)
coderobe Aug 25, 2022
157a123
Fix wrong logic. (#5931)
eskimor Aug 25, 2022
7e4afec
Update Substrate to make companion check happy (#5934)
bkchr Aug 26, 2022
ee15e98
use generated preimage weight (#5904)
shawntabrizi Aug 28, 2022
18b0f3f
Companion for 12095 (#5924)
kianenigma Aug 28, 2022
81a969c
Bump futures-util from 0.3.21 to 0.3.23 (#5922)
dependabot[bot] Aug 29, 2022
99d6b55
version bumps (0.9.28) (#5933)
coderobe Aug 29, 2022
6628e73
Fix some typos in dispute-coordinator (#5941)
tdimitrov Aug 29, 2022
270fb1e
Change validation & collation protocol names to include genesis hash …
dmitry-markin Aug 30, 2022
6573248
fix cargo check -p polkadot-node-core-provisioner --all-features (#5942)
ordian Aug 30, 2022
2eb7672
Companion for Weight v1.5 (#5943)
shawntabrizi Aug 31, 2022
57ca93e
Don't store available data on disputes (#5950)
eskimor Sep 1, 2022
e9c2bd2
companion `try-state` (#5907)
kianenigma Sep 1, 2022
91580f1
[Feature] Make XCM benchmarks more reusable and remove a redundant be…
ruseinov Sep 1, 2022
de9e147
Companion for Weight v1.5 Follow Up (#5949)
shawntabrizi Sep 1, 2022
00f8731
candidate-validation: info logs on failure (#5957)
ordian Sep 2, 2022
88798fb
Companion of paritytech/substrate#12157 (#5964)
KiChjang Sep 2, 2022
db86e04
Bump dlmalloc from 0.2.3 to 0.2.4 (#5927)
dependabot[bot] Sep 2, 2022
66374ef
Reflect benchmarking fn signature change (#5959)
notlesh Sep 2, 2022
d4d648e
Use custom type for ProtocolName (#5963)
dmitry-markin Sep 3, 2022
054f0c6
Doc comments for metrics in provisioner (#5967)
tdimitrov Sep 5, 2022
1975c34
Double approval checking timeout. (#5951)
eskimor Sep 5, 2022
b91e8ef
Companion - Read babe config parameters from runtime (#5842)
davxy Sep 6, 2022
b2ff4c0
Companion for: `try-runtime`::`follow-chain` - keep connection (#5968)
pmikolajczyk41 Sep 6, 2022
d100210
[Companion] Metadata delete on dissolve_pool (#5955)
ruseinov Sep 6, 2022
5756285
Bump docker/setup-buildx-action from 1.7.0 to 2.0.0 (#5976)
dependabot[bot] Sep 7, 2022
850d1f5
Companion for paritytech/substrate#12183 (#5971)
KiChjang Sep 8, 2022
7449579
Service: Use weak dependency features (#5966)
bkchr Sep 8, 2022
7222d32
Update Substrate (#5981)
bkchr Sep 8, 2022
00fed3b
Update Rococo to mirror Kusama (#5617)
NachoPal Sep 8, 2022
9ec372c
pvf-checker: enable subsystem on all chains (#5977)
slumber Sep 8, 2022
d7dc28d
disputes rewards (#5862)
ordian Sep 8, 2022
87d6cfc
zombienet: add BEEFY justifications import test (#5855)
acatangiu Sep 8, 2022
5de9b7f
Sync versions with current release (v0.9.29) (#5982)
coderobe Sep 9, 2022
39d2e6b
remove stale polkadot call filter (#5969)
kianenigma Sep 9, 2022
6b141d2
update weights (sync with v0.9.29) (#5989)
coderobe Sep 12, 2022
53253de
Companion for #11981 (#5915)
Szegoo Sep 12, 2022
000a47d
Update Westend Trusted Teleporters (#5985)
joepetrowski Sep 13, 2022
564f9b9
Update cid to 0.8.6 (#5994)
altonen Sep 13, 2022
2dda7bb
Remove CanAuthorWith trait (#5986)
michalkucharczyk Sep 13, 2022
2b0d832
Companion for paritytech/substrate#12219 (#5987)
KiChjang Sep 13, 2022
e044149
update memory-lru:0.1.1 (#6012)
nbaztec Sep 14, 2022
7725d4b
Co #11976: Enable rust features (#5983)
ggwpez Sep 14, 2022
8bd9817
Bump enumn from 0.1.4 to 0.1.5 (#5938)
dependabot[bot] Sep 15, 2022
28912dd
node/core/pvf: strip some deps (#6016)
ordian Sep 15, 2022
28acc78
Bump blake2 from 0.10.2 to 0.10.4 (#6019)
davxy Sep 15, 2022
d17f062
[Substrate Companion] Part 1: add TargetList for validator ranking (#…
ruseinov Sep 18, 2022
bc0cc9d
Use correct file header for 'benchmark overhead' (#5984)
ggwpez Sep 19, 2022
966588d
gossip-support: disconnect when we're no longer in other's reserved s…
ordian Sep 19, 2022
4421789
Improved dispute votes import in provisioner (#5567)
tdimitrov Sep 19, 2022
6d2bae4
Adjust MultiAssets weights based on new wild card variants
KiChjang Sep 20, 2022
57f7cab
[ci] Revert cancel-pipeline job (#6028)
alvicsam Sep 20, 2022
7ed7345
runtime/disputes: slashing (#5535)
ordian Sep 20, 2022
9581849
[Zombienet] add upgrade test (#5970)
pepoviola Sep 20, 2022
bf26e0d
Fixes
KiChjang Sep 20, 2022
afbc64e
Rename Origin (#6020)
Szegoo Sep 20, 2022
c57e69b
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Sep 21, 2022
e2da6e5
[Companion] Get rid of HistoryDepth storage (#5996)
Ank4n Sep 21, 2022
e0d906a
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Sep 21, 2022
4f5d45a
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Sep 21, 2022
7bd9d5f
Fixes
KiChjang Sep 21, 2022
ecdea05
Fixes
KiChjang Sep 21, 2022
64b2996
Fixes
KiChjang Sep 22, 2022
3c21067
Fixes
KiChjang Sep 22, 2022
9ffe6e9
Change visibility of `open_database` for use in cumulus (#6034)
skunert Sep 22, 2022
50c514d
Companion for #12283 (Anon -> Pure Proxy) (#6038)
shawntabrizi Sep 22, 2022
f895642
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Sep 22, 2022
788264d
Increase BlockHashCount parameter (#6037)
marcin-cb Sep 22, 2022
2edb8ad
Some more information on disputes for the guide (#6006)
eskimor Sep 23, 2022
d2974e5
Companion - Independence of Slot-based algorithms from Timestamp (#5997)
davxy Sep 23, 2022
d07588e
Companion for substrate#11983. (#5992)
hzy1919 Sep 26, 2022
403c3e1
[ci] Split gitlab-ci config to separate files (#6031)
alvicsam Sep 26, 2022
2b2376d
orchestra: hide subsystem cycle warnings by default (#6047)
ordian Sep 26, 2022
0e50e33
Companion for paritytech/substrate#12264 (#5973)
altonen Sep 26, 2022
59f899a
paras: unblock offboarding when pvf-check concludes (#6032)
slumber Sep 26, 2022
f7bf844
[orchestra] fix: require the initialization with `F: FnOnce` to be `S…
drahnr Sep 26, 2022
e0a5f58
staking miner: CLI make request and connection timeout configurable (…
niklasad1 Sep 26, 2022
b5157a3
make spellcheck green again (#6059)
ordian Sep 27, 2022
6b67d86
Bump bytes from 1.1.0 to 1.2.1 (#6017)
dependabot[bot] Sep 27, 2022
1cbab5a
Remove executed runtime migrations (nompools MigrateToV3, InitiateNom…
coderobe Sep 27, 2022
c620450
add fast-unstsake pallet to all runtimes (#6050)
kianenigma Sep 28, 2022
3014ee0
Update substrate dependencies
coderobe Sep 28, 2022
637bac9
Bump crate versions
coderobe Sep 28, 2022
df2c1b6
Bump spec_version to 9300
coderobe Sep 28, 2022
816cb64
Rename zombienet extension (#6073)
wirednkod Sep 29, 2022
cea8893
Validate chunks from disk in availability-recovery (#6078)
eskimor Sep 29, 2022
89990bd
Demote warning (#6080)
eskimor Sep 29, 2022
b4632ad
Bump transaction_version for polkadot
coderobe Sep 29, 2022
a7d79b8
Bump transaction_version for kusama
coderobe Sep 29, 2022
c1b5125
Bump transaction_version for rococo
coderobe Sep 29, 2022
6aeaf92
Bump transaction_version for westend
coderobe Sep 29, 2022
702d4fc
add para_id to fetch_pov logging (#6084)
sandreim Sep 30, 2022
980e7a7
Fix: minor typo (#6088)
omahs Oct 1, 2022
3dbe515
Companion for pallet-mmr: generate historical proofs (#6061)
serban300 Oct 2, 2022
be4639b
Remove orchestra and metered channel (#6086)
sandreim Oct 3, 2022
9f65619
Companion for substrate#12124: add BEEFY request response protocol (#…
acatangiu Oct 3, 2022
3fbf6e4
Governance v2 (Kusama only) (#5205)
gavofyork Oct 3, 2022
789ef2f
Use active_leaves instead of known_leaves (#6068)
eskimor Oct 4, 2022
4c54eea
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
bkontur Oct 4, 2022
4ddf0ff
Companion for BEEFY: Simplify hashing for pallet-beefy-mmr (#6098)
serban300 Oct 4, 2022
f073155
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
bkontur Oct 4, 2022
60554e1
Keep sessions in window for the full unfinalized chain (#6054)
sandreim Oct 4, 2022
efb82ef
Bump lru from 0.7.8 to 0.8.0 (#6060)
dependabot[bot] Oct 4, 2022
ce430c2
Batch vote import in dispute-distribution (#5894)
eskimor Oct 4, 2022
c913107
Add unknown words (#6105)
eskimor Oct 4, 2022
edd6499
Buffered connection management for collator-protocol (#6022)
slumber Oct 5, 2022
1879039
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
bkontur Oct 5, 2022
3eb61f8
Properly migrate weights to v2 (#6091)
KiChjang Oct 5, 2022
df4a1c3
Pass through `runtime-benchmark` feature (#6110)
athei Oct 5, 2022
7870daf
Companion for #11649: Bound uses of `Call` (#5729)
gavofyork Oct 5, 2022
3646202
update kvdb & co (#6111)
ordian Oct 5, 2022
d12042f
Skip `unexpected metric type`
bkontur Oct 6, 2022
09f340c
service: use MmrRootProvider as custom BEEFY payload provider (compan…
acatangiu Oct 6, 2022
0645360
update substrate
coderobe Oct 6, 2022
3d6b563
Maximum value for `MultiplierUpdate` (#6021)
Szegoo Oct 6, 2022
9c22a85
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
gavofyork Oct 7, 2022
1c786b3
Companion for upgrading pin-project (#6118)
bkchr Oct 7, 2022
fbc4327
Some late fixes for XCMv3 (#5237)
gavofyork Oct 7, 2022
fb0dd8e
Companion for 12109 (#5929)
Lezek123 Oct 9, 2022
f85f96c
Add event to asset claim (#6029)
girazoki Oct 10, 2022
e36cc59
Fix flaky test (#6131)
slumber Oct 10, 2022
c7a4d93
ci/guide: install mdbook-graphviz (#6119)
ordian Oct 10, 2022
f479d1e
Companion for paritytech/substrate#12441 (#6117)
altonen Oct 10, 2022
84cd6d3
Update tests for Rust 1.64 (#6124)
rcny Oct 10, 2022
9f4eae7
Companion for #12328 (#6058)
lexnv Oct 11, 2022
3147616
Expose node subcommands in Malus CLI (#6135)
sandreim Oct 11, 2022
da5c4f2
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Oct 11, 2022
37e49df
Update Substrate
KiChjang Oct 11, 2022
15709ee
Manual Para Lock (#5451)
shawntabrizi Oct 11, 2022
0398050
refactor grid topology to expose more info to subsystems (#6140)
rphmeier Oct 12, 2022
a28b257
Malus: add disputed block percentage (#6100)
bredamatt Oct 13, 2022
851a108
Separate preparation timeouts for PVF prechecking and execution (#6139)
mrcnski Oct 13, 2022
ae4fe22
pallet-mmr: RPC and Runtime APIs work with block numbers (#6072)
Szegoo Oct 13, 2022
8c28930
lingua.dic is not managed by CI team (#6148)
ordian Oct 13, 2022
4ac7d94
bump zombienet version (#6142)
pepoviola Oct 13, 2022
e307a26
First round of implementers guide fixes (#6146)
BradleyOlson64 Oct 13, 2022
fa54983
Re-export `pub` stuff from universal_exports.rs + removed unecessary …
bkontur Oct 13, 2022
efcaa57
BlockId removal refactor: Backend::state_at (#6149)
michalkucharczyk Oct 14, 2022
828fa9e
Fix fuzzing builds xcm-fuzz and erasure-coding fuzzer (#6153)
code-terror Oct 16, 2022
9d4e1a1
Add `force_open_hrmp_channel` Call (#6155)
joepetrowski Oct 17, 2022
8e57f2c
Update clap to version 4 (#6128)
skunert Oct 18, 2022
4e4fb31
availability-recovery: use `IfDisconnected::TryConnect` for chunks (#…
ordian Oct 18, 2022
6e1baff
BlockId removal: refactor: StorageProvider (#6160)
michalkucharczyk Oct 18, 2022
503d8e1
Bump substrate (#6164)
skunert Oct 18, 2022
f1e36fe
companion for #12212 (#6162)
niklasad1 Oct 18, 2022
41a9d84
Bump docker/setup-buildx-action from 2.0.0 to 2.1.0 (#6141)
dependabot[bot] Oct 19, 2022
5161f47
Bump crate versions
coderobe Oct 19, 2022
d681c7c
Bump spec_version to 9310
coderobe Oct 19, 2022
bc9e71c
Bump crate versions (.31)
coderobe Oct 19, 2022
50c541c
bump transaction_version (0.9.31) (#6171)
coderobe Oct 20, 2022
e269a0a
bump substrate
coderobe Oct 24, 2022
6476ab8
update weights, attempt two (0.9.31) (#6189)
coderobe Oct 28, 2022
3117b81
clean up executed runtime migrations (0.9.31) (#6205)
coderobe Oct 29, 2022
32dd0c9
Make ValidateUnsigned available on all chains for paras. (#6214)
eskimor Oct 30, 2022
b297b16
Merge remote-tracking branch 'origin/gav-xcm-v3' into HEAD
arturgontijo Nov 2, 2022
d21002a
Merge remote-tracking branch 'origin/release-v0.9.30' into HEAD
arturgontijo Nov 2, 2022
82ea76e
Merge remote-tracking branch 'origin/release-v0.9.31' into HEAD
arturgontijo Nov 2, 2022
ddc2ee5
[XCMv3] v0.9.31 + Rococo with FixedWeightBounds
arturgontijo Nov 2, 2022
f5fdb54
[XCMv3] Adding pallet-uniques to xcm-simulator-example
arturgontijo Nov 2, 2022
2748f84
[XCMv3] node/test/service fix.
arturgontijo Nov 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Some more information on disputes for the guide (#6006)
* Add some notes about treatment of already finalized blocks.

* More info in the guide as discussed with Jakob.

* Remove references to private repo.
  • Loading branch information
eskimor authored Sep 23, 2022
commit 2edb8ad1472f8f3f5a16510f607f91e96388c0cf
159 changes: 144 additions & 15 deletions roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dispute Coordinator

The coordinator is the central subsystem of the node-side components which
participate in disputes. It wraps a database, which used to track statements
participate in disputes. It wraps a database, which is used to track statements
observed by _all_ validators over some window of sessions. Votes older than this
session window are pruned.

Expand Down Expand Up @@ -318,12 +318,12 @@ at some stage in the pipeline).
To ensure to only spend significant work on genuine disputes, we only trigger
participation at all on any _vote import_ if any of the following holds true:

- We saw the disputed candidate included on at least one fork of the chain
- We have "our" availability chunk available for that candidate as this suggests
that either availability was at least run, although it might not have
succeeded or we have been a backing node of the candidate. In both cases the
candidate is at least not completely made up and there has been some effort
already flown into that candidate.
- We saw the disputed candidate included in some not yet finalized block on at
least one fork of the chain.
- We have seen the disputed candidate backed in some not yet finalized block on
at least one fork of the chain. This ensures the candidate is at least not
completely made up and there has been some effort already flown into that
candidate.
- The dispute is already confirmed: Meaning that 1/3+1 nodes already
participated, as this suggests in our threat model that there was at least one
honest node that already voted, so the dispute must be genuine.
Expand All @@ -332,7 +332,7 @@ Note: A node might be out of sync with the chain and we might only learn about a
block including a candidate, after we learned about the dispute. This means, we
have to re-evaluate participation decisions on block import!

With this nodes won't waste significant resources on completely made up
With this, nodes won't waste significant resources on completely made up
candidates. The next step is to process dispute participation in a (globally)
ordered fashion. Meaning a majority of validators should arrive at at least
roughly at the same ordering of participation, for disputes to get resolved one
Expand Down Expand Up @@ -380,13 +380,102 @@ candidates for approval votes a similar argument holds (if they come from
approval-voting), but we also don't import them until a dispute already
concluded. For actual dispute votes, we need two opposing votes, so there must be
an explicit `invalid` vote in the import. Only a third of the validators can be
malicious, so spam disk usage is limited to ```2*vote_size*n/3*NUM_SPAM_SLOTS```, with
n being the number of validators.
-
More reasoning behind spam considerations can be found on
this sr-lab ticket: https://github.com/paritytech/srlabs_findings/issues/179

## Disputes for Non Included Candidates
malicious, so spam disk usage is limited to `2*vote_size*n/3*NUM_SPAM_SLOTS`, with
`n` being the number of validators.

## Attacks & Considerations

The following attacks on the priority queue and best-effort queues are
considered in above design.

### Priority Queue

On the priority queue, we will only queue participations for candidates we have
seen included on any chain. Any attack attempt would start with a candidate
included on some chain, but an attacker could try to only reveal the including
relay chain blocks to just some honest validators and stop as soon as it learns
that some honest validator would have a relevant approval assignment.

Without revealing the including block to any honest validator, we don't really
have an attack yet. Once the block is revealed though, the above is actually
very hard. Each honest validator will re-distribute the block it just learned
about. This means an attacker would need to pull of a targeted DoS attack, which
allows the validator to send its assignment, but prevents it from forwarding and
sharing the relay chain block.

This sounds already hard enough, provided that we also start participation if
we learned about an including block after the dispute has been raised already
(we need to update participation queues on new leaves), but to be even safer
we choose to have an additional best-effort queue.

### Best-Effort Queue

While attacking the priority queue is already pretty hard, attacking the
best-effort queue is even harder. For a candidate to be a threat, it has to be
included on some chain. For it to be included, it has to have been backed before
and at least n/3 honest nodes must have seen that block, so availability
(inclusion) can be reached. Making a full third of the nodes not further
propagate a block, while at the same time allowing them to fetch chunks, sign
and distribute bitfields seems almost infeasible and even if accomplished, those
nodes would be enough to confirm a dispute and we have not even touched the
above fact that in addition, for an attack, the following including block must
be shared with honest validators as well.

It is worth mentioning that a successful attack on the priority queue as
outlined above is already outside of our threat model, as it assumes n/3
malicious nodes + additionally malfunctioning/DoSed nodes. Even more so for
attacks on the best-effort queue, as our threat model only allows for n/3
malicious _or_ malfunctioning nodes in total. It would therefore be a valid
decision to ditch the best-effort queue, if it proves to become a burden or
creates other issues.

One issue we should not be worried about though is spam. For abusing best-effort
for spam, the following scenario would be necessary:

An attacker controls a backing group: The attacker can then have candidates
backed and choose to not provide chunks. This should come at a cost to miss out
on rewards for backing, so is not free. At the same time it is rate limited, as
a backing group can only back so many candidates legitimately. (~ 1 per slot):

1. They have to wait until a malicious actor becomes block producer (for causing
additional forks via equivocation for example).
2. Forks are possible, but if caused by equivocation also not free.
3. For each fork the attacker has to wait until the candidate times out, for
backing another one.

Assuming there can only be a handful of forks, 2) together with 3) the candidate
timeout restriction, frequency should indeed be in the ballpark of once per
slot. Scaling linearly in the number of controlled backing groups, so two groups
would mean 2 backings per slot, ...

So by this reasoning an attacker could only do very limited harm and at the same
time will have to pay some price for it (it will miss out on rewards). Overall
the work done by the network might even be in the same ballpark as if actors
just behaved honestly:

1. Validators would have fetched chunks
2. Approval checkers would have done approval checks

While because of the attack (backing, not providing chunks and afterwards
disputing the candidate), the work for 1000 validators would be:

All validators sending out ~ 1000 tiny requests over already established
connections, with also tiny (byte) responses.

This means around a million requests, while in the honest case it would be ~
10000 (30 approval checkers x330) - where each request triggers a response in
the range of kilobytes. Hence network load alone will likely be higher in the
honest case than in the DoS attempt case, which would mean the DoS attempt
actually reduces load, while also costing rewards.

In the worst case this can happen multiple times, as we would retry that on
every vote import. The effect would still be in the same ballpark as honest
behavior though and can also be mitigated by chilling repeated availability
recovery requests for example.

## Out of Scope

### No Disputes for Non Included Candidates

We only ever care about disputes for candidates that have been included on at
least some chain (became available). This is because the availability system was
Expand Down Expand Up @@ -421,6 +510,46 @@ even weaken it as attackers are warned before availability is reached, while at
the same time adding signficant amount of complexity. We therefore punt on such
disputes and concentrate on disputes the system was designed to handle.

### No Disputes for Already Finalized Blocks

Note that by above rules in the `Participation` section, we will not participate
in disputes concerning a candidate in an already finalized block. This is
because, disputing an already finalized block is simply too late and therefore
of little value. Once finalized, bridges have already processed the block for
example, so we have to assume the damage is already done. Governance has to step
in and fix what can be fixed.

Making disputes for already finalized blocks possible would only provide two
features:

1. We can at least still slash attackers.
2. We can freeze the chain to some governance only mode, in an attempt to
minimize potential harm done.

Both seem kind of worthwhile, although as argued above, it is likely that there
is not too much that can be done in 2 and we would likely only ending up DoSing
the whole system without much we can do. 1 can also be achieved via governance
mechanisms.

In any case, our focus should be making as sure as reasonably possible that any
potentially invalid block does not get finalized in the first place. Not
allowing disputing already finalized blocks actually helps a great deal with
this goal as it massively reduces the amount of candidates that can be disputed.

This makes attempts to overwhelm the system with disputes significantly harder
and counter measures way easier. We can limit inclusion for example (as
suggested [here](https://github.com/paritytech/polkadot/issues/5898) in case of
high dispute load. Another measure we have at our disposal is that on finality
lag block production will slow down, implicitly reducing the rate of new
candidates that can be disputed. Hence, the cutting-off of the unlimited
candidate supply of already finalized blocks, guarantees the necessary DoS
protection and ensures we can have measures in place to keep up with processing
of disputes.

If we allowed participation for disputes for already finalized candidates, the
above spam protection mechanisms would be insufficient/relying 100% on full and
quick disabling of spamming validators.

## Database Schema

We use an underlying Key-Value database where we assume we have the following operations available:
Expand Down