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

"--priv_key_type composite" is not supported #808

Closed
2 of 4 tasks
torao opened this issue Nov 25, 2022 · 2 comments · Fixed by #817
Closed
2 of 4 tasks

"--priv_key_type composite" is not supported #808

torao opened this issue Nov 25, 2022 · 2 comments · Fixed by #817
Labels
A: bug Something isn't working
Milestone

Comments

@torao
Copy link
Contributor

torao commented Nov 25, 2022

Summary of Bug

The simd help says that --priv_key_type composite is available.

--priv_key_type ed25519   specify validator's private key type (ed25519|composite).
                          set this to priv_key.type in priv_validator_key.json; default ed25519 (default "ed25519")

But an error occurs when I do an init with this key specified.

% ./build/simd init Alice --home ./alice --chain-id abc --priv_key_type composite
Error: cannot convert &{sign_key:<bls12:"\253\326\352 ^|$\355<\230\364\264M\210\005\256\351\304\364C\200^*o\253\033\300Fzf\177\362\007\316\004\010c\315\335\225\241\220I\217\014\332!\241" > vrf_key:<ed25519:"a\313l=S\311Ij\024\222h\232\355^\300.\260\003\034\025+=\326\313\t\372\227\354M1;\275" > } from Ostracon public key: invalid type

This is because the key generation and saving it to priv_validator.json is successful, but the decoding when reading the public key doesn't support composite type keys:

https://github.com/line/lbm-sdk/blob/main/crypto/codec/oc.go#L14-L28

Similarly, there appears to be no key implementation for composite.

https://github.com/line/lbm-sdk/tree/main/crypto/keys

It should be fixed so that the composite-key type can be used without error according to the help. Or, it should be clarified that it's not supported now and be fixed that the composite-key type cannot be specified.

Version

% simd version
0.46.0-rc2-287-g8679ec2425

Steps to Reproduce

% make build
% ./build/simd init Alice --home ./alice --chain-id abc --priv_key_type composite

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@torao torao added the A: bug Something isn't working label Nov 25, 2022
@zemyblue
Copy link
Member

As I know, the composite type is used to use BLS signature. But the BLS signature is in experimental for now. So I think it's good that lbm-sdk doesn't support it yet.

@torao
Copy link
Contributor Author

torao commented Nov 25, 2022

Understood. So, for now, the BLS signature aggregation feature is only for experimental use with Ostacon, and the lbm-sdk CLI will not support it now.

Therefore, we need to modify the CLI option included in lbm-sdk to refuse to specify --priv_key_type composite.

  1. Remove messages from the help of lbm-sdk CLI so that composite can be used.
  2. Remove composite support implementation from --priv_key_type specification in lbm-sdk CLI options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants