Closed ty-everett closed 1 month ago
Closed #127 because of this branch, which now incorporates all changes.
For the record, the #127 PR was:
Refactor the verify method to make use of a queuee and only verify transactions in a given graph once, thereby increasing performance significantly.
Also, add a benchmarking suite that tests SPV verification in a number of different scenarios, enabling us to measure the impact of future changes on verification speed.
Finally, address https://github.com/bitcoin-sv/ts-sdk/issues/125 by making the sequence number optional in transaction inputs.
Closes https://github.com/bitcoin-sv/ts-sdk/issues/125
Added benchmarking suite. Previous to the change, it took 30,000 ms to verify the 5-deep fanout-3 transaction on my machine. After the change, it takes 1,300 ms to perform the same verification.
Keen on getting this merged very soon! @BraydenLangley please evaluate impacts on Overlay Services, and feel free to provide a review.
Those tabs and spaces don't look right to me, make sure npm run lint
was indeed run - I get a different result when I run locally.
This is amazing! Nice work, so much faster 🔥
Description of Changes
Optimize ECDSA verification time by utilizing BigInt primitives.
Testing Procedure
Added timing statements around signature verification.
Observed a reduction in time spent from 80 to 20 ms.
Checklist:
CHANGELOG.md
with my changesnpm run doc
andnpm run lint
one final time before requesting a reviewnpm version patch
so that my changes will trigger a new version to be released when they are merged