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

IF: signature-provider for BLS keys #2060

Closed
Tracked by #1508
heifner opened this issue Jan 9, 2024 · 0 comments · Fixed by #2066
Closed
Tracked by #1508

IF: signature-provider for BLS keys #2060

heifner opened this issue Jan 9, 2024 · 0 comments · Fixed by #2066
Assignees
Labels
👍 lgtm OCI Work exclusive to OCI team

Comments

@heifner
Copy link
Member

heifner commented Jan 9, 2024

Currently signature-provider for BLS keys are specified as:

--signature-provider PUB_BLS_PAD80INyOVD3K0KJdl/7b5+UQGT0nrr8MDxO0tB80HMmaQS+X8YWRrYyyb7slAYFbOV69KN/skAFJfIFgdEEvD00MNhyaSJaJ1NGJjdKfq+OARJKoMBoBvj5/78n6BgLDpoJ7A===KEY:PVT_BLS_cvOsv1fAUDVgcK/J1j3U1DfQWMrmSFZDMiu4E0yJCEDWWZl3

The separator between the public key and private key is =KEY:. This can cause confusion since the base64 encoded public key also often ends in =. This follows the current separator between EOS keys:

--signature-provider EOS5VLjLL9nY5b2QymL8QVpwRnUDEhaedeHvVJ4vU8tpaEbxAwDc3=KEY:5JpgeNa7fAf4mXukVHmnNPqcN7qHbrp4NkMJQp32c1MbrLLdwYz

Consider a different separator for BLS keys provided to signature-provider.

Also the current implementation finds the first = and uses it to separate out the public key from the private key. This is clearly wrong for base64 encoded keys.
https://github.com/AntelopeIO/leap/blob/hotstuff_integration/plugins/signature_provider_plugin/signature_provider_plugin.cpp#L43

If the existing separator of =KEY: is maintained the parsing needs to be fixed.

Currently malformed signature-provider specifications do not stop nodeos. It ignores the error and continues. Seems this should stop nodeos from starting.

error 2024-01-09T22:46:19.780 nodeos    producer_plugin.cpp:1143      plugin_initialize    ] Malformed signature provider: "PUB_BLS_PAD80INyOVD3K0KJdl/7b5+UQGT0nrr8MDxO0tB80HMmaQS+X8YWRrYyyb7slAYFbOV69KN/skAFJfIFgdEEvD00MNhyaSJaJ1NGJjdKfq+OARJKoMBoBvj5/78n6BgLDpoJ7A===KEY:PVT_BLS_cvOsv1fAUDVgcK/J1j3U1DfQWMrmSFZDMiu4E0yJCEDWWZl3": {"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"common.hpp","line":61,"method":"apply","hostname":"","thread_name":"nodeos","timestamp":"2024-01-09T22:46:19.780"},"format":"false: No matching suite type for ${prefix}_${data}","data":{"prefix":"BLS","data":"PAD80INyOVD3K0KJdl/7b5+UQGT0nrr8MDxO0tB80HMmaQS+X8YWRrYyyb7slAYFbOV69KN/skAFJfIFgdEEvD00MNhyaSJaJ1NGJjdKfq+OARJKoMBoBvj5/78n6BgLDpoJ7A"}}]}, ignoring!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👍 lgtm OCI Work exclusive to OCI team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants