ChainSafe / blst-ts

Typescript wrapper for https://github.com/supranational/blst native bindings, a highly performant BLS12-381 signature library
Other
18 stars 13 forks source link

fix: small issues post merge #140

Closed matthewkeil closed 5 months ago

matthewkeil commented 5 months ago

Motivations

When doing the aggregate with randomness PR I noticed a couple of small issues. In particular the workflow was downloading the bindings with the install command instead of building the new version of the code and unit tests were failing because the new feature was not available in the bindings.

This needs to be handled first so I moved the other small changes over to here for clarity and separation of concerns.

Description of Changes

github-actions[bot] commented 5 months ago

Performance Report

✔️ no performance regression detected

Full benchmark results | Benchmark suite | Current: 2eec87570dec3b3992c39e7857441e09e9b985d5 | Previous: - | Ratio | |-|-|-|-| | PublicKey serialization | 963.00 ns/op | | PublicKey deserialize | 22.376 us/op | | PublicKey deserialize and validate - 1 keys | 83.367 us/op | | PublicKey deserialize and validate - 100 keys | 8.2555 ms/op | | PublicKey deserialize and validate - 10000 keys | 831.50 ms/op | | SecretKey.fromKeygen | 2.4050 us/op | | SecretKey serialization | 854.00 ns/op | | SecretKey deserialization | 1.4730 us/op | | SecretKey.toPublicKey | 138.12 us/op | | SecretKey.sign | 529.52 us/op | | Signature serialization | 1.0380 us/op | | Signature deserialize | 44.374 us/op | | Signatures deserialize and validate - 1 sets | 120.21 us/op | | Signatures deserialize and validate - 100 sets | 11.957 ms/op | | Signatures deserialize and validate - 10000 sets | 1.1977 s/op | | aggregatePublicKeys - 1 sets | 2.3900 us/op | | aggregatePublicKeys - 8 sets | 10.642 us/op | | aggregatePublicKeys - 32 sets | 37.569 us/op | | aggregatePublicKeys - 128 sets | 146.15 us/op | | aggregatePublicKeys - 256 sets | 293.33 us/op | | aggregateSignatures - 1 sets | 4.1460 us/op | | aggregateSignatures - 8 sets | 23.707 us/op | | aggregateSignatures - 32 sets | 90.585 us/op | | aggregateSignatures - 128 sets | 358.60 us/op | | aggregateSignatures - 256 sets | 719.43 us/op | | aggregateVerify - 1 sets | 1.5774 ms/op | | aggregateVerify - 8 sets | 5.7475 ms/op | | aggregateVerify - 32 sets | 20.356 ms/op | | aggregateVerify - 128 sets | 78.747 ms/op | | aggregateVerify - 256 sets | 156.60 ms/op | | verifyMultipleAggregateSignatures - 1 sets | 1.7459 ms/op | | verifyMultipleAggregateSignatures - 8 sets | 7.0556 ms/op | | verifyMultipleAggregateSignatures - 32 sets | 25.637 ms/op | | verifyMultipleAggregateSignatures - 128 sets | 99.847 ms/op | | verifyMultipleAggregateSignatures - 256 sets | 198.81 ms/op | | Same message - 1 sets | 1.7077 ms/op | | Same message - 8 sets | 2.5750 ms/op | | Same message - 32 sets | 5.6239 ms/op | | Same message - 128 sets | 17.435 ms/op | | Same message - 256 sets | 33.042 ms/op | | libuv multithreading - addVerificationRandomness true | 23.797 s/op | | libuv multithreading - addVerificationRandomness false | 23.757 s/op |

by benchmarkbot/action