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

FIP-0086 updates from implementation #1022

Merged
merged 8 commits into from
Jul 15, 2024
Merged

FIP-0086 updates from implementation #1022

merged 8 commits into from
Jul 15, 2024

Conversation

anorth
Copy link
Member

@anorth anorth commented Jun 18, 2024

Two notable changes feeding back from the implementation, plus some smaller improvements:

  • There is not (yet) any mechanism to slow F3 if EC is producing only empty tipsets
  • The mayHaveStrongQuorum function is changed to treat boundary conditions "correctly"
  • Described F3 committee lookback
  • Specified filters to power table eligibility (TODO: confirm with @Stebalien, especially around ticket math)
  • Specified power scaling/truncation
  • Specified values for step numbers

Tightened up some language and formatting:

  • Removed some unnecessary phrases.
  • Removed lingering tab characters.
  • Unified commenting style in pseudocode to use //.
  • Replaced some academic argument-style language (especially use of"we") with declarative statements.

A potentially clarifying change we could make would be a change in terminology from power table & power (EC concepts) to committee and weight (F3 concepts). These terms are currently a bit ambiguous since the concepts are not 1:1. I refrained for now.

FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
@anorth anorth force-pushed the anorth/86-alignment branch 2 times, most recently from e5b14c9 to 3cb71d2 Compare June 25, 2024 01:02
@anorth anorth marked this pull request as ready for review June 25, 2024 01:29
Given an EC chain state at some epoch, the corresponding F3 committee comprises all miner actors with:
- at least 10TiB of quality-adjusted power;
- zero fee debt; and
- no active consensus fault.
Copy link
Member Author

Choose a reason for hiding this comment

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

@Kubuxu could you please check the EC leader election and confirm there are no other relevant checks? I'm aware that in EC these are applied against both lookback state and current state: we can only do one.

Copy link
Contributor

Choose a reason for hiding this comment

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

In the code, I'm using the same rules that apply to the EC election but without the Finality lookback.

Copy link
Member Author

Choose a reason for hiding this comment

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

That sounds great. Can you please clarify that I have captured those rules here? Are there any more?

Copy link
Contributor

Choose a reason for hiding this comment

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

There is a caveat about not having enough miners (if there are fewer miners than X, the minimum power no longer applies). Other than that, it is the 3 checks you mentioned.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add that line here that the number of miners must be X to reach consensus?

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we add that line here that the number of miners must be X to reach consensus?

There's no minimum on the number of participants, except implicitly 1. The protocol would be unable to recover from dropping below any such number.

FIPS/fip-0086.md Outdated Show resolved Hide resolved
anorth and others added 2 commits July 2, 2024 08:42
* Specify backoff when EC produces empty tipsets

Update FIP to backoff when starting a new instance when EC produces
empty tipsets.

Relates to filecoin-project/go-f3#371

* Document the increment function of start backoff

Introduce a function to concretely document the increment of start
backoff and explicitly mention that it must be consistent across all
participants for a given instance number.

Change the start backoff to epochs for a more concrete unit.
@anorth
Copy link
Member Author

anorth commented Jul 2, 2024

Thanks for the contributions @masih @Stebalien.

This PR is ready for editorial and detailed technical review, and then merging.

FIPS/fip-0086.md Outdated Show resolved Hide resolved
Copy link
Contributor

@Kubuxu Kubuxu left a comment

Choose a reason for hiding this comment

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

LGTM

FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
* **Liveness.** Implementing F3 introduces the risk that an adversary controlling at least ⅓ QAP prevents termination of a GossiPBFT instance. In that case, the F3 component would halt, not finalizing any tipset anymore. At the same time, EC would still operate, outputting tipsets and considering them final after 900 epochs. The liveness of the system is thus not affected by attacks on the liveness of F3.
* **Safety.** Implementing F3 ensures the safety of finalized outputs during regular or even congested networks against a Byzantine adversary controlling less than ⅓ QAP. For stronger adversaries, F3 provides mitigations to prevent censorship attacks, as outlined above. If deemed necessary, the punishment and recovery from coalitions in the event of an attempted attack on safety can be explored in future FIPs. Note that the (safe) finality time is already significantly improved by F3 compared to the status quo: F3 provides safety of finalized outputs two orders of magnitude faster than the current parameter of 900 epochs during regular network operation.
* **Denial-of-service (DoS).** The implementation of the F3 preserves resistance against DoS attacks currently ensured by Filecoin, thanks to the fully leaderless nature of GossiPBFT and to the use of a VRF to self-assign tickets during the CONVERGE step.
* **Committees.** This FIP proposes to have all participants run all instances of GossiPBFT. While this ensures optimal resilience against a Byzantine adversary, it can render the system unusable if the number of participants grows too large. While we are still evaluating the maximum practical number of participants in F3, it is expected to be at least one order of magnitude greater than the current number of participants in Filecoin. This introduces an attack vector: if the scalability limit is 100,000 participants, a participant holding as little as 3% of the current QAP can perform a Sybil attack to render the system unusable, with the minimum QAP required per identity. As a result, the implementation should favor the messages of the more powerful participants if the number of participants grows too large. Given that favoring more powerful participants discriminates against the rest, affecting decentralization, amending F3 to use committees in the event of the number of participants exceeding the practical limit will be the topic of a future FIP, as well as the analysis of optimized message aggregation in the presence of self-selected committees.
* **Committees.** This FIP proposes to have all eligible EC participants run all instances of GossiPBFT. While this ensures optimal resilience against a Byzantine adversary, it can render the system unusable if the number of participants grows too large. This introduces an attack vector: if the scalability limit is 100,000 participants, a participant holding as little as 3% of the current QAP can perform a Sybil attack to render the system unusable, with the minimum QAP required per identity. As a result, the implementation should favor the messages of the more powerful participants if the number of participants grows too large. Given that favoring more powerful participants discriminates against the rest, affecting decentralization, amending F3 to use committees in the event of the number of participants exceeding the practical limit might be the topic of a future FIP, as well as the analysis of optimized message aggregation in the presence of self-selected committees.
Copy link
Member

Choose a reason for hiding this comment

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

what's the practical scalability limit today, i.e., if participant # is approaching X, a FIP is necessary to harden the protocol further?

@jennijuju
Copy link
Member

editorial ✅

@jsoares
Copy link
Member

jsoares commented Jul 15, 2024

I'm hoping to still read through today, assuming it's not merged before.

Copy link
Member

@jsoares jsoares left a comment

Choose a reason for hiding this comment

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

part 1/3

FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
Copy link
Member

@jsoares jsoares left a comment

Choose a reason for hiding this comment

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

part 2/3

FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
@@ -591,32 +656,27 @@ OR (step=COMMIT | valid COMMIT eviden
OR (step = DECIDE | valid DECIDE evidence
AND (∃ M: IsStrongQuorum(M) AND evidence=Aggregate(M)| is a strong quorum
AND ∀ m’ ∈ M: m’.step = COMMIT | of COMMIT messages
AND ∀ m’,m'' ∈ M: m’.round = m''.round | from the same round
AND ∀ m’,m’’ ∈ M: m’.round = m’’.round | from the same (any) round as each other
Copy link
Member

Choose a reason for hiding this comment

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

Not sure the added "any" contributes to clarity.

FIPS/fip-0086.md Outdated Show resolved Hide resolved
Copy link
Member

@jsoares jsoares left a comment

Choose a reason for hiding this comment

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

3/3

editorial ✅

FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
FIPS/fip-0086.md Outdated Show resolved Hide resolved
anorth and others added 3 commits July 16, 2024 09:23
Co-authored-by: MollyM <momack2@users.noreply.github.com>
Co-authored-by: Jorge M. Soares <547492+jsoares@users.noreply.github.com>
@anorth anorth merged commit ecddc3d into master Jul 15, 2024
1 check passed
@anorth anorth deleted the anorth/86-alignment branch July 15, 2024 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants