src: Add router and factory contracts#64
Conversation
|
running tests locally, getting this error(?) Failing tests:
Encountered 1 failing test in test/Runner.t.sol:LibSchnorrTest
[FAIL: vm.ffi: ffi command ["bin/schnorr", "verify", "0xcd9e5ef86f5507d722f33c38cf464847a9f9d9b3b6ee8962dffcbc5a62c59e2d", "111152381934228515415595626444103415338628090826835458543833089952094993277432", "21811480841643729370490367897939243167629827005923146460314362903928336880352", "0xe24c6067fea799a902ec4fd51bf86fd3d654f4e85a10744c376a0e94b9bdaf35", "0x3Beca9eD7D8a4B96b205790898c1e5630F1fa4e9"] exited with code 1. stderr: Error: unknown command "verify" for "schnorr"
Run 'schnorr --help' for usage.
testFuzzDifferentialOracleSuite_verifySignature(uint256[],bytes32) (runs: 0, μ: 0, ~: 0)
🦄 bin/schnorr --help
Usage:
schnorr [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
construct-poke-message Print poke message
help Help about any command
sign Sign message with set of private keys
Flags:
-h, --help help for schnorr
-v, --verbose verbose output
--version version for schnorr
Use "schnorr [command] --help" for more information about a command. |
|
You seem to be using an older binary, see https://github.com/chronicleprotocol/suite/blob/main/cmd/schnorr/cmd_verify.go. To test without the differential fuzz tests, use: $ forge test --nmt "FuzzDifferentialOracleSuite" |
| int answer = 0; | ||
| return answer; |
There was a problem hiding this comment.
Separated into two statements to allow forge coverage to mark the function as fully tested, ie achieve 100% test coverage.
| } | ||
|
|
||
| /// @inheritdoc IScribeRouter | ||
| function setScribe(address scribe_) external auth { |
There was a problem hiding this comment.
could add a zero addr + EOA guard?
There was a problem hiding this comment.
Good catch, no strong opinion either way. However, keeping in mind that only governance will have auth, ie subject to timelock and extensive spell review, I don't think we need to add those checks.
| /** | ||
| * @dev Contract overwrite to deploy contract instances with specific naming. | ||
| */ | ||
| contract ScribeFactory_COUNTER is ScribeFactory { |
There was a problem hiding this comment.
doesn't follow instances/ pattern? guess that emerged with VAO ...
There was a problem hiding this comment.
Yeah correct, I tried to not update the pattern here. IIRC instances/ evolved somewhere after scribe but before vao 🤷
| scribe.setBar(cfg.bar); | ||
|
|
||
| // Rely authed and kiss tolled. | ||
| for (uint i; i < cfg.authed.length; i++) { |
There was a problem hiding this comment.
guess its possible to plant a "pre-bricked" Scribe if cfg.authed isn't checked to not be empty. operationally more of a headache than anything I guess
There was a problem hiding this comment.
True, imho bearable though taking into account how automated the deployments are nowadays.
8c73f90 to
0d8987d
Compare
|
Force push to rebase on main. |
No description provided.