Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Improve parachain liveness by reducing required number of backing votes #5016

Merged
merged 3 commits into from
Mar 8, 2022

Conversation

eskimor
Copy link
Member

@eskimor eskimor commented Mar 1, 2022

Second (node side) part of: #4386

Can be merged - Polkadot runtime has been upgraded already.

in the runtime and hopefully improve liveness of parachains by means of
that.
@eskimor eskimor added A0-please_review Pull request needs code review. B1-releasenotes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels Mar 1, 2022
@eskimor eskimor added this to the v0.9.18 : Polkadot disputes milestone Mar 1, 2022
@rphmeier
Copy link
Contributor

rphmeier commented Mar 1, 2022

This does have security consequences in that it means fewer validators are on the hook and that effective backing group sizes of >3 are impractical. I wonder if we'd rather address this on the governance side by just setting group size to 3. Although 2-of-5 is less likely to fail than 2-of-3

@rphmeier
Copy link
Contributor

rphmeier commented Mar 1, 2022

Eventually, this should come with the ability for validators to provide backing statements after-the-fact so that they're not cut off from rewards by malicious block authors who omit their statements. That's already a problem, this just makes it slightly worse.

@eskimor
Copy link
Member Author

eskimor commented Mar 1, 2022

This does have security consequences in that it means fewer validators are on the hook and that effective backing group sizes of >3 are impractical. I wonder if we'd rather address this on the governance side by just setting group size to 3. Although 2-of-5 is less likely to fail than 2-of-3

Exactly - for liveliness purposes a larger group, but lower threshold increases the likelihood of getting a candidate in. this is meant as an intermediate improvement, until we have async backing.

Eventually, this should come with the ability for validators to provide backing statements after-the-fact so that they're not cut off from rewards by malicious block authors who omit their statements. That's already a problem, this just makes it slightly worse.

It makes it worse in the sense, that now we will be able to successfully back with less votes. But without this, the candidate would not be backed at all in that case and no validator will get any reward - so it should be a net improvement.

If the additional vote comes on time, we will still include it as backing always keeps the provisioner up to date on received votes.

@eskimor eskimor removed this from the v0.9.18 : Polkadot disputes milestone Mar 1, 2022
@rphmeier
Copy link
Contributor

rphmeier commented Mar 1, 2022

If the additional vote comes on time, we will still include it as backing always keeps the provisioner up to date on received votes.

Let's update our threat models, please - we are writing economic games more so than software. Incentives matter, and reward-points are zero-sum. Yes, our 'honest' node implementation does not discard votes. Validator operator groups will fork and update our code over the next years to grind out every possible profitable edge. This is also why the runtime is the source of truth.

@eskimor eskimor added this to the v0.9.19 milestone Mar 7, 2022
@eskimor
Copy link
Member Author

eskimor commented Mar 8, 2022

bot merge

@paritytech-processbot paritytech-processbot bot merged commit c1a8115 into master Mar 8, 2022
@paritytech-processbot paritytech-processbot bot deleted the rk-collator-improvements-part2 branch March 8, 2022 20:33
@burdges
Copy link
Contributor

burdges commented Mar 9, 2022

At the theory level we do not yet know if this has any real optimization consequences elsewhere, but..

Intuitively I always worked with one validator being 100% slashed when playing around with the simulator that Jacob Lell extracted from Rob's code, so this should be fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants