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

Python investigation renames #75

Conversation

jonasnick
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@real-or-random real-or-random left a comment

Choose a reason for hiding this comment

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

Concept ACK, that's nice

@@ -101,7 +101,7 @@ async def participant(
state2, eq_round1 = participant_step2(hostseckey, state1, cmsg1)
except UnknownFaultyParticipantOrCoordinatorError as e:
if blame_mode:
Copy link
Collaborator

Choose a reason for hiding this comment

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

investigation_mode?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@@ -129,7 +129,7 @@ async def coordinator(
# If the coordinator implements blame mode and it is enabled, it sends an
# extra message to the participants.
if blame_mode:
blame_msgs = coordinator_blame(pmsgs1)
blame_msgs = coordinator_investigate(pmsgs1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
blame_msgs = coordinator_investigate(pmsgs1)
inv_msgs = coordinator_investigate(pmsgs1)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

python/tests.py Outdated
@@ -249,10 +249,10 @@ def simulate_chilldkg(
def simulate_chilldkg_full(
hostseckeys,
t,
blame: bool,
investigation: bool,
) -> List[Optional[Tuple[chilldkg.DKGOutput, chilldkg.RecoveryData]]]:
# blaming is not supported by this wrapper
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# blaming is not supported by this wrapper
# Investigating is not supported by this wrapper

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

) -> NoReturn:
simpl_blame_state, enc_secshare, pads = blame_state
enc_partial_secshares, partial_pubshares = cblame
simpl_blame_state, enc_secshare, pads = error.blame_state
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
simpl_blame_state, enc_secshare, pads = error.blame_state
simpl_invstate, enc_secshare, pads = error.invstate

cblame: CoordinatorBlameMsg,
def participant_investigate(
error: UnknownFaultyParticipantOrCoordinatorError,
cinvestigation: CoordinatorInvestigationMsg,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can use a short form "inv" in variable names (everywhere):

Suggested change
cinvestigation: CoordinatorInvestigationMsg,
cinv: CoordinatorInvestigationMsg,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@jonasnick jonasnick force-pushed the python-investigation-renames branch from fe66c7a to 23547a7 Compare December 18, 2024 16:13
participant_blame -> participant_investigate
coordinator_blame -> coordinator_investigate
CoordinatorBlameMsg -> CoordinatorInvestigationMsg
cblame -> cinv
blame_mode -> investigation_mode
blame_msg -> inv_msg

Leaving the "blame state" to be fixed in the next commit.
@jonasnick jonasnick force-pushed the python-investigation-renames branch from 23547a7 to be83df9 Compare December 18, 2024 16:14
@jonasnick
Copy link
Collaborator Author

First commit should be ready for review now. Still working on the second commit.

@jonasnick jonasnick force-pushed the python-investigation-renames branch from be83df9 to c3298c9 Compare December 18, 2024 16:44
@jonasnick jonasnick marked this pull request as ready for review December 18, 2024 16:44
@jonasnick
Copy link
Collaborator Author

Ready for review now

Copy link
Collaborator

@real-or-random real-or-random left a comment

Choose a reason for hiding this comment

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

ACK

@real-or-random real-or-random merged commit bfa0612 into BlockstreamResearch:master Dec 18, 2024
1 check passed
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.

2 participants