Skip to content

Commit

Permalink
Rework and document blame exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random committed Dec 4, 2024
1 parent 6f03713 commit 513e340
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ participant is indeed faulty.

This exception is raised only by the coordinator code. Some faulty behavior
by participants will be detected by the other participants instead.
See FaultyParticipantOrCoordinatorError for details.
See `FaultyParticipantOrCoordinatorError` for details.

*Attributes*:

Expand Down Expand Up @@ -996,7 +996,7 @@ participant).

This exception is raised only by the participant code. Some faulty behavior
by participants will be detected by the coordinator instead. See
FaultyParticipantError for details.
`FaultyParticipantError` for details.

*Attributes*:

Expand Down Expand Up @@ -1030,7 +1030,7 @@ information to determine which participant should be suspected.

To determine a suspected participant, the raising participant may choose to
run the optional blame step of the protocol, which requires obtaining a
blame message by the coordinator. See the participant_blame function for
blame message by the coordinator. See the `participant_blame` function for
details.

This is only raised for specific faulty behavior by another participant
Expand All @@ -1039,7 +1039,8 @@ the coordinator (namely, sending invalid encrypted secret shares).

*Attributes*:

- `blame_state` _BlameState_ - To be given to the participant_blame function.
- `blame_state` _BlameState_ - To be passed to the `participant_blame`
function.
<!--end of pydoc.md-->

## Changelog
Expand Down
9 changes: 5 additions & 4 deletions python/chilldkg_ref/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class FaultyParticipantError(ProtocolError):
This exception is raised only by the coordinator code. Some faulty behavior
by participants will be detected by the other participants instead.
See FaultyParticipantOrCoordinatorError for details.
See `FaultyParticipantOrCoordinatorError` for details.
Attributes:
participant (int): Index of the faulty participant.
Expand Down Expand Up @@ -64,7 +64,7 @@ class FaultyParticipantOrCoordinatorError(ProtocolError):
This exception is raised only by the participant code. Some faulty behavior
by participants will be detected by the coordinator instead. See
FaultyParticipantError for details.
`FaultyParticipantError` for details.
Attributes:
participant (int): Index of the suspected participant.
Expand Down Expand Up @@ -95,15 +95,16 @@ class UnknownFaultyParticipantOrCoordinatorError(ProtocolError):
To determine a suspected participant, the raising participant may choose to
run the optional blame step of the protocol, which requires obtaining a
blame message by the coordinator. See the participant_blame function for
blame message by the coordinator. See the `participant_blame` function for
details.
This is only raised for specific faulty behavior by another participant
which cannot be attributed to another participant without further help of
the coordinator (namely, sending invalid encrypted secret shares).
Attributes:
blame_state (BlameState): To be given to the participant_blame function.
blame_state (BlameState): To be passed to the `participant_blame`
function.
"""

def __init__(self, blame_state: Any, *args: Any):
Expand Down

0 comments on commit 513e340

Please sign in to comment.