Skip to content

Faster ECDSA library #2

Description

@allocz

Under full validation (--no-checkpoints), signature verification becomes the main bottleneck, this means that the performance of the ecdsa library is critical for IBD speed.

libsecp256k1 is significantly faster than dcrec, would be nice to have an ecdsa package that uses libsecp256k1 when CGO is enabled and fallback to dcrec to keep being able to compile without requiring CGO.

Assuming that end users don't change btcd configuration, assumevalid will be used and ecdsa won't be the bottleneck. But for us, developers that need to perform IBD using full validation for testing purposes, better signature verification speed helps a lot.

To avoid the requirement of CGO to compile the project, compile tags can be used to link libsecp256k1 only when CGO is enabled, doing this we keep the nice feature of Go standardized compilation running just go build and also the nice support for cross compilation out of the box.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions