hyperledger-iroha / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
438 stars 280 forks source link

perf: Make `PublicKey` decoding lazy inside WASM #5048

Closed dima74 closed 1 month ago

dima74 commented 1 month ago

Context

Fixes #5038

Solution

Make PublicKey decoding lazy inside WASM, since PublicKey in WASM is used mostly for comparison operations (==), and comparison can be performed without decoding (see #5038 for details). This givess approximatelly 400tps increase for single peer (from ~2450 to ~2850).

Review notes (optional)

Checklist

dima74 commented 1 month ago

Looks like this PR would fail I2::Dev::Wasm workflow. Please review latest commit with the fix