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 #125 by making the sequence number optional in transaction inputs.
Linked Issues / Tickets
Closes #125
Testing Procedure
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.
[x] I have added new unit tests
[x] All tests pass locally
[x] I have tested manually in my local environment
Checklist:
[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have updated CHANGELOG.md with my changes
[x] I have run npm run doc and npm run lint one final time before requesting a review
[x] I have run npm version patch so that my changes will trigger a new version to be released when they are merged
Description of Changes
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 #125 by making the sequence number optional in transaction inputs.
Linked Issues / Tickets
Closes #125
Testing Procedure
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.
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