perf(crypto): make address network byte check part of serde#3000
perf(crypto): make address network byte check part of serde#3000
Conversation
The ajv address schema calls `Base58.decodeCheck` to validate the network byte. But during transaction serialization, the address is also decoded, so we end up doing it again. By performing the network byte validation during transaction serialization we can get rid of the decode call during schema validation. This makes multipayment processing approx. 25% faster.
|
This pull request introduces 1 alert when merging b90dc92 into 575234e - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## develop #3000 +/- ##
==========================================
Coverage ? 29.79%
==========================================
Files ? 424
Lines ? 10168
Branches ? 538
==========================================
Hits ? 3030
Misses ? 7093
Partials ? 45
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## develop #3000 +/- ##
==========================================
Coverage ? 65.83%
==========================================
Files ? 424
Lines ? 10168
Branches ? 538
==========================================
Hits ? 6694
Misses ? 3429
Partials ? 45
Continue to review full report at Codecov.
|
Summary
The ajv address schema calls
Base58.decodeCheckto validate the network byte. But during transaction serialization, the address is also decoded, so we end up doing it again. By performing the network byte validation during transaction serialization we can get rid of the decode call during schema validation. This makes multipayment processing approx. 25% faster.Checklist