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

Change Lotus Miner Participation API to avoid equivocations #599

Open
Kubuxu opened this issue Aug 28, 2024 · 1 comment · May be fixed by filecoin-project/lotus#12531
Open

Change Lotus Miner Participation API to avoid equivocations #599

Kubuxu opened this issue Aug 28, 2024 · 1 comment · May be fixed by filecoin-project/lotus#12531
Assignees
Labels

Comments

@Kubuxu
Copy link
Contributor

Kubuxu commented Aug 28, 2024

The current API does not prevent equivocations if requests are mirrored

@Kubuxu
Copy link
Contributor Author

Kubuxu commented Sep 20, 2024

Discussed: change the paticipation API to be per-instance, and both lotus and miner code should remember that leases were givinen out.
We need to give out future instance as well.

@masih masih added the P1 label Sep 23, 2024
@masih masih self-assigned this Sep 23, 2024
masih added a commit that referenced this issue Sep 26, 2024
The host implementation needs to know the progress of the current
instance for certificate storage and catch up purposes. As a result the
current instance must be safe to read from multiple goroutines. This was
achieved by a dedicated mutex that synchronised all access to the
current instanceID.

Separately, validation logic requires to know how far the current
instance has progressed in order to effectively validate incoming
messages.

The changes here simplify the locking by unifying the logic for checking
the progress of an instance: both validator and host can now get the
latest progress from the participant that is safe for concurrent use.
This is achieved by moving the progress observer mechanism out of
validator and into the participant, while introducing the concept of
`gpbft.Progress` a function that returns the current instance, round and
phase.

As part of this change, Lotus integration can now get the current round
and phase as well as current instance, which is useful for self
equivocation checking as well as debugging purposes.

Fixes #658
Relates to #599
github-merge-queue bot pushed a commit that referenced this issue Sep 27, 2024
The host implementation needs to know the progress of the current
instance for certificate storage and catch up purposes. As a result the
current instance must be safe to read from multiple goroutines. This was
achieved by a dedicated mutex that synchronised all access to the
current instanceID.

Separately, validation logic requires to know how far the current
instance has progressed in order to effectively validate incoming
messages.

The changes here simplify the locking by unifying the logic for checking
the progress of an instance: both validator and host can now get the
latest progress from the participant that is safe for concurrent use.
This is achieved by moving the progress observer mechanism out of
validator and into the participant, while introducing the concept of
`gpbft.Progress` a function that returns the current instance, round and
phase.

As part of this change, Lotus integration can now get the current round
and phase as well as current instance, which is useful for self
equivocation checking as well as debugging purposes.

Fixes #658
Relates to #599
masih added a commit that referenced this issue Sep 30, 2024
The root F3 instance holds reference to the `gpbftRunner`, not
`gpbftHost`. To allow access to current progress from Lotus, move the
`Progress` implementation to runner and expose at root `F3` type.

Part of #599
masih added a commit to filecoin-project/lotus that referenced this issue Sep 30, 2024
Implemented enhanced token-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tokens grant a temporary lease, allowing storage providers
to sign as part of the F3 consensus mechanism. This design ensures that
tokens are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing token. If the token is invalid or expired,
miners are directed to obtain a new token via `F3GetParticipationToken`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Sep 30, 2024
Implemented enhanced token-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tokens grant a temporary lease, allowing storage providers
to sign as part of the F3 consensus mechanism. This design ensures that
tokens are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing token. If the token is invalid or expired,
miners are directed to obtain a new token via `F3GetParticipationToken`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Sep 30, 2024
Implemented enhanced token-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tokens grant a temporary lease, allowing storage providers
to sign as part of the F3 consensus mechanism. This design ensures that
tokens are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing token. If the token is invalid or expired,
miners are directed to obtain a new token via `F3GetParticipationToken`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Sep 30, 2024
Implemented enhanced token-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tokens grant a temporary lease, allowing storage providers
to sign as part of the F3 consensus mechanism. This design ensures that
tokens are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing token. If the token is invalid or expired,
miners are directed to obtain a new token via `F3GetParticipationToken`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Oct 1, 2024
Implemented enhanced token-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tokens grant a temporary lease, allowing storage providers
to sign as part of the F3 consensus mechanism. This design ensures that
tokens are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing token. If the token is invalid or expired,
miners are directed to obtain a new token via `F3GetParticipationToken`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Oct 1, 2024
Implemented enhanced token-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tokens grant a temporary lease, allowing storage providers
to sign as part of the F3 consensus mechanism. This design ensures that
tokens are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing token. If the token is invalid or expired,
miners are directed to obtain a new token via `F3GetParticipationToken`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Oct 1, 2024
Implemented enhanced token-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tokens grant a temporary lease, allowing storage providers
to sign as part of the F3 consensus mechanism. This design ensures that
tokens are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing token. If the token is invalid or expired,
miners are directed to obtain a new token via `F3GetParticipationToken`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Oct 1, 2024
Implemented enhanced token-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tokens grant a temporary lease, allowing storage providers
to sign as part of the F3 consensus mechanism. This design ensures that
tokens are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing token. If the token is invalid or expired,
miners are directed to obtain a new token via `F3GetParticipationToken`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Oct 1, 2024
Implemented enhanced token-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tokens grant a temporary lease, allowing storage providers
to sign as part of the F3 consensus mechanism. This design ensures that
tokens are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing token. If the token is invalid or expired,
miners are directed to obtain a new token via `F3GetParticipationToken`.

Fixes filecoin-project/go-f3#599
masih added a commit that referenced this issue Oct 1, 2024
The root F3 instance holds reference to the `gpbftRunner`, not
`gpbftHost`. To allow access to current progress from Lotus, move the
`Progress` implementation to runner and expose at root `F3` type.

Part of #599
masih added a commit that referenced this issue Oct 1, 2024
The root F3 instance holds reference to the `gpbftRunner`, not
`gpbftHost`. To allow access to current progress from Lotus, move the
`Progress` implementation to runner and expose at root `F3` type.

Part of #599
masih added a commit to filecoin-project/lotus that referenced this issue Oct 1, 2024
Implemented enhanced token-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tokens grant a temporary lease, allowing storage providers
to sign as part of the F3 consensus mechanism. This design ensures that
tokens are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing token. If the token is invalid or expired,
miners are directed to obtain a new token via `F3GetParticipationToken`.

Fixes filecoin-project/go-f3#599
github-merge-queue bot pushed a commit that referenced this issue Oct 1, 2024
The root F3 instance holds reference to the `gpbftRunner`, not
`gpbftHost`. To allow access to current progress from Lotus, move the
`Progress` implementation to runner and expose at root `F3` type.

Part of #599
masih added a commit to filecoin-project/lotus that referenced this issue Oct 2, 2024
Implemented enhanced ticket-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tickets grant a temporary lease, allowing storage
providers to sign as part of the F3 consensus mechanism. This design ensures that
tickets are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing ticket. If the ticket is invalid or expired,
miners are directed to obtain a new ticket via
`F3GetOrRenewParticipationTicket`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Oct 2, 2024
Implemented enhanced ticket-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tickets grant a temporary lease, allowing storage
providers to sign as part of the F3 consensus mechanism. This design ensures that
tickets are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing ticket. If the ticket is invalid or expired,
miners are directed to obtain a new ticket via
`F3GetOrRenewParticipationTicket`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Oct 2, 2024
Implemented enhanced ticket-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tickets grant a temporary lease, allowing storage
providers to sign as part of the F3 consensus mechanism. This design ensures that
tickets are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing ticket. If the ticket is invalid or expired,
miners are directed to obtain a new ticket via
`F3GetOrRenewParticipationTicket`.

Fixes filecoin-project/go-f3#599
masih added a commit to filecoin-project/lotus that referenced this issue Oct 2, 2024
Implemented enhanced ticket-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tickets grant a temporary lease, allowing storage
providers to sign as part of the F3 consensus mechanism. This design ensures that
tickets are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing ticket. If the ticket is invalid or expired,
miners are directed to obtain a new ticket via
`F3GetOrRenewParticipationTicket`.

Fixes filecoin-project/go-f3#599
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In review
Development

Successfully merging a pull request may close this issue.

3 participants