Skip to content

Optimize BLS key usage #3902

Open
@StephenButtolph

Description

@StephenButtolph

There are three different representations of BLS public keys used by avalanchego:

  1. In-memory blst pointer
  2. bytes in the uncompressed format
  3. bytes in the compressed format

We currently convert (2) and (3) to (1) and pass (1) around. However, there are instances where we repeatedly convert between the formats.

For example, during ICM verification, we may:

  1. Read (2) from disk here
  2. Convert to (1) to apply the validator diff
  3. Convert to (2) to send over the grpc server
  4. Convert to (1) to convert back from the grpc format
  5. Convert to (2) to convert to the canonical warp format

This PR #1445 did some of the work (removes 4,5) but we should probably do a holistic pass over how we represent public keys.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Backlog 🧊

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions