Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Small tweaks to PSS adr for clarity #1619

Merged
merged 4 commits into from
Feb 14, 2024
Merged

docs: Small tweaks to PSS adr for clarity #1619

merged 4 commits into from
Feb 14, 2024

Conversation

jtremback
Copy link
Contributor

change emphasis on top-n and opt-in, generalize beyond invalid execution when talking about attacks, whitespace formatting

Please go to the Preview tab and select the appropriate sub-template:

  • Production code - for types fix, feat, and refactor.
  • Docs - for documentation changes.
  • Others - for changes that do not affect production code.

@jtremback jtremback requested a review from a team as a code owner February 1, 2024 21:31
@github-actions github-actions bot added C:Docs Assigned automatically by the PR labeler C:ADR Assigned automatically by the PR labeler labels Feb 1, 2024
@jtremback jtremback enabled auto-merge February 1, 2024 21:32
Copy link
Contributor

@p-offtermatt p-offtermatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


### Negative
- A consumer chain does not receive the same economic security as with Replicated Security (assuming a value of `SoftOptOutThreshold` is `5%`), unless it is a Top N chain with `N >= 95%`.

* A consumer chain does not receive the same economic security as with Replicated Security (assuming a value of `SoftOptOutThreshold` is `5%`), unless it is a Top N chain with `N >= 95%`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* A consumer chain does not receive the same economic security as with Replicated Security (assuming a value of `SoftOptOutThreshold` is `5%`), unless it is a Top N chain with `N >= 95%`.
* A consumer chain does not receive the same economic security as with Replicated Security (assuming the value of `SoftOptOutThreshold` is `5%`), unless it is a Top N chain with `N >= 95%`.

Additionally, by having `N >= 50%` (and hence `N > (VetoThreshold = 33.4%)`) we enable the top N validators to `Veto` any `ConsumerAdditionProposal` for consumer chains they do not want to validate.

If a proposal has the `top_N` argument wrongly set, it should get rejected in [ValidateBasic](https://github.com/cosmos/interchain-security/blob/v4.0.0/x/ccv/provider/types/proposal.go#L86).
If a proposal has the `top_N` argument wrongly set, it should get rejected in [ValidateBasic] (<https://github.com/cosmos/interchain-security/blob/v4.0.0/x/ccv/provider/types/proposal.go#L86>).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the < and > break the link? See diff below:
broken link

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm maybe something weird in my editor's formatting

@@ -42,25 +51,28 @@ For example, `53` corresponds to a Top 53% chain, meaning that the top `53%` pro
`top_N` can be `0` or include any value in `[50, 100]`. A chain can join with `top_N == 0` as an Opt In, or with `top_N ∈ [50, 100]` as a Top N chain.

In case of a Top N chain, we restrict the possible values of `top_N` from `(0, 100]` to `[50, 100]`.
By having `top_N >= 50` we can guarantee that we cannot have a successful invalid-execution attack, assuming that at most `1/3` of provider validators can be malicious.
This is because, a Top N chain with `N >= 50%` would have at least `1/3` honest validators, which is sufficient to stop invalid-execution attacks.
By having `top_N >= 50` we can guarantee that we cannot have a successful attack, assuming that at most `1/3` of provider validators can be malicious.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the >= 50 is rather specific to invalid-execution attacks. For instance, we do not ask for >= 50 to avoid equivocation attacks. So removing "invalid-execution" might be too general.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Obviously it's true that we care about other attacks, too, but the exact choice of N>=50 rather than N>=66 or whatever is because of what Karolos argued here afaict

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a way to resolve this is to leave the original, but then go on to say:
"Choosing N>=50 also prevents other attacks, like chaindeath/liveness attacks." to make clear we also consider other attacks


In an Opt In chain, a set of validators might attempt to perform an attack. To deter such potential attacks, PSS allows for the use of fraud votes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly to my previous comment, fraud votes deter a specific type of attack, so might be too vague if we remove the "invalid-execution" part.

Copy link
Contributor

@insumity insumity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm of the opinion that we should keep "invalid-execution" (see my comments) but otherwise LGTM.

@jtremback jtremback added this pull request to the merge queue Feb 2, 2024
@insumity insumity removed this pull request from the merge queue due to a manual request Feb 2, 2024
@p-offtermatt p-offtermatt changed the title Small tweaks to PSS adr for clarity docs: Small tweaks to PSS adr for clarity Feb 8, 2024
@p-offtermatt
Copy link
Contributor

markdown link failure is not related to this pr, so can merge despite it

@sainoe sainoe added this pull request to the merge queue Feb 14, 2024
Merged via the queue into main with commit ddfac3b Feb 14, 2024
13 of 15 checks passed
@sainoe sainoe deleted the pss-adr-tweaks branch February 14, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:ADR Assigned automatically by the PR labeler C:Docs Assigned automatically by the PR labeler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants