zksync-era
zksync-era copied to clipboard
feat(en): Check recipient contract and function selector in consistency checker
What ❔
- Checks the recipient contract (should be equal to the main L1 contract address) and the Solidity function selector (should correspond to
commitBlocks/commitBatchesselector) in the consistency checker. - Reworks error handling in the consistency checker to be more maintainable.
Why ❔
Not checking these values allows to more-or-less easily fool the checker into accepting a commit transaction which is not really a commit transaction.
Checklist
- [x] PR title corresponds to the body of PR (we generate changelog entries from PRs).
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] Code has been formatted via
zk fmtandzk lint. - [x] Spellcheck has been run via
zk spellcheck. - [x] Linkcheck has been run via
zk linkcheck.