Skip to content

Improve BLS Public Key Handling #1327

@aaronbuchwald

Description

@aaronbuchwald

When handling BLS Public Keys, we often re-verify an already verified BLS public key. However, the BLS Public Keys are verified before being added to the P-Chain, so the keys that are already part of the validator set do not need to be re-verified every time.

We should add support for handling both trusted/untrusted BLS Public Keys (may be applicable to other objects from the blst library as well) to reduce the overhead of re-verification.

Specifically, the CPU profile from the new GetValidatorSet over gRPC (#1326) shows that the majority of time is spent in CGO. This may add unnecessary overhead in both compressing the key and re-validating the key:

When serving these public keys over gRPC, they have already been verified, so we can treat them as trusted input and reduce the overhead here.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions