-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move serialisation out of ValidatorSigner (#12422)
Currently we add a method to `ValidatorSigner` for every data type we want to sign. I'm not sure what exactly is a benefit of doing that, but such approach results in quite a few annoying issues: * Overly verbose code: need to add 3 methods for every data type to be signed. * Not consistent with signature verification: we just call `verify` method on public key passing signature and bytes, why should signing be any different? * It blows up `ValidatorSigner` public API making it awkward to work with. This PR repurposes `sign_chunk_contract_accesses` to be a generic `sign_bytes` method and replaces usage for witness contract code distribution related types. The rest will be addressed in a separate PR.
- Loading branch information
Showing
3 changed files
with
14 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters