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

Remove PBC based cryptography #71

Merged
merged 5 commits into from
Jul 21, 2021
Merged

Conversation

xandkar
Copy link
Contributor

@xandkar xandkar commented Jul 1, 2021

fixes #70

@xandkar xandkar force-pushed the sk/remove-pbc-compatibility branch from d5042c5 to 76db063 Compare July 1, 2021 15:35
@xandkar xandkar force-pushed the sk/remove-pbc-compatibility branch from 76db063 to d558860 Compare July 1, 2021 15:59
src/hbbft_cc.erl Outdated Show resolved Hide resolved
@vihu
Copy link
Member

vihu commented Jul 1, 2021

Nice work and good riddance tpke/pbc (they will not be missed!)

It would be good to run this branch with miner and do a local run.sh, start stop some nodes, ensure that things come back alive and progress is made

@xandkar
Copy link
Contributor Author

xandkar commented Jul 2, 2021

There's still dangling code that remains. Now that curve is only ever 'BLS12-381' - it may make sense to remove it as a parameter as well? Possible future support for more curves can be structured differently anyway (as an implementation of some common interface, for instance).

Thoughts @vihu @Vagabond @evanmcc ?

@xandkar
Copy link
Contributor Author

xandkar commented Jul 2, 2021

Nice work and good riddance tpke/pbc (they will not be missed!)

It would be good to run this branch with miner and do a local run.sh, start stop some nodes, ensure that things come back alive and progress is made

Thanks! Will do so.

@Vagabond
Copy link
Contributor

Vagabond commented Jul 2, 2021

Yes we can probably remove the curve parameter now.

@xandkar
Copy link
Contributor Author

xandkar commented Jul 6, 2021

Yes we can probably remove the curve parameter now.

Removed 5ab4d22

src/hbbft.erl Outdated

-record(hbbft_data, {
batch_size :: pos_integer(),
curve :: curve(),
key_share :: key_share(),
key_share :: undefined | tc_key_share:tc_key_share(),
Copy link
Contributor

Choose a reason for hiding this comment

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

When can the key share be undefined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Vagabond Great question. I simply replaced:

-type key_share() :: undefined | tc_key_share:tc_key_share() | tpke_privkey:privkey().
...
key_share :: key_share(),

with

key_share :: undefined | tc_key_share:tc_key_share(),

without checking if undefined is still needed at all.

Will check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Vagabond Indeed it doesn't look possible, since init requires it and it never appears to be removed.

Do we (still) need have_key/1 then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@vihu vihu left a comment

Choose a reason for hiding this comment

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

Looks good to me. All tests pass locally for me and have also ran run.sh in miner with this branch with some basic start/stop testing.

@evanmcc evanmcc merged commit d252363 into master Jul 21, 2021
@evanmcc evanmcc deleted the sk/remove-pbc-compatibility branch July 21, 2021 21:11
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.

Remove PBC based cryptography
4 participants