Skip to content

Precomputed signature hash caching #21

@MatthewLM

Description

@MatthewLM

The hashes from the new PrecomputeHasher sub-classes in the 9-tr-sighash branch can be cached for use across input signature hashes. A new PrecomputedSignatureHashes class can hold data for signature hashes and provide both double hashes (non-taproot) and single hashes (taproot).

The new cache objects can be carried by a Transaction and passed to the WitnessSignatureHasher and TaprootSignatureHasher classes. When a transaction is signed, the object can be passed to the new Transaction object to retain the cached signatures between signings. A new object can be constructed for new Transaction objects from the addInput() and addOutput methods with the invalidated hashes removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions