Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(test):sign result #53
feat(test):sign result #53
Changes from 7 commits
f1715a2
4b0d65f
0e83fd7
9e33ca0
d464528
9b0f43f
f76693e
f78084a
79443fd
fb9a644
cf5021e
4177717
eac9d45
3c32ea3
da68cb6
5b67e9f
b5d5ceb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you ever observe duplicates? We should probably fail the test here if this list contains duplicates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there is a single entry for each share of the malicious party.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, more investigation is needed here. Each party runs multiple shares, but this code breaks on the first occurrence of
SignResult
, so we should only ever see one copy of the result. (Hence we should not have duplicates in the criminals list.) Perhaps we should switch to a wait group here similar to what's in production code. In any case, we don't have an explanation for why you are observing duplicates in the criminals list.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The result contains the
uid
of the criminal one time for each of his shares. I think it's logical because all shares that belong to the malicious party are registered as individual criminals, and multiple shares map to the sameuid
.Example: if a malicious party
A
has shares with tofn indices 0,1,2, thecriminal_list
will contain [0:Malicious, 1:Malicious, 2:Malicious] (which correspond to [tofn_index
,CrimeType
] for each pair).In tofnd, we examine the uid of the criminal, rather than his tofn share indices. This means that the criminal vector will become [A:Malicious, A:Malicious, A:Malicious] (which correspond to [
tofnd_index
,CrimeType
] for each pair).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conversion from
tofnd
totofn
index happens here:tofnd/src/gg20/proto_helpers.rs
Lines 71 to 76 in 192d954
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! As discussed, we need to decide how to report the criminals list to axelar-core:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: we also need to decide how tofnd should implement malicious behaviour over multiple subshares:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Option 1 is the simplest case for the current codebase in tofnd. Let's start with that and see if we need to fallback to option 2?