chronicleprotocol / scribe

Extremely performant EVM oracle utilizing aggregated Schnorr signatures
Other
53 stars 6 forks source link

Refactor test-suite to use `forge-std`'s native private key to public key conversion #14

Closed pmerkleplant closed 1 year ago

pmerkleplant commented 1 year ago

The test suite's performance can be considerably increased by using forge-std's new vm.createWallet(uint privateKey) external returns (Wallet memory wallet); cheatcode to compute a private key's public key instead of doing it via raw Solidity.

A simple grep -rn "derivePublicKey" src/ script/ will yield occurrences to optimize.

Note that this issue is blocked by forge-std releasing a new version as we do not want to clone directly from master/main.

pmerkleplant commented 1 year ago

And here we go: https://github.com/foundry-rs/forge-std/releases/tag/v1.6.1