Scroll Rust Engineer Take-Home Assignments

This repo contains two take-home assignments for the Senior Rust Engineer role at Scroll.

Assignments

Assignment 1 (scroll-revm): Building on revm, create an EVM variant with a custom precompile. This custom precompile takes an address as its input, then reads the account's contract bytecode and returns the number of zero bytes in it. Add this custom precompile by implementing PrecompileCountZeroBytes and modifying create_evm. For details on revm, please refer to the revm book and the docs.

Assignment 2 (exex-scroll-indexer): Building on reth, implement an Executable Extension (ExEx) that indexes all Scroll batches into a local database. Your indexer should process two events: CommitBatch and RevertBatch. Implement the indexer by completing the scroll_indexer_exex function. Feel free to refer to reth's ExEx examples.

How to Submit?

  1. Clone this repo.
  2. Modify scroll-revm/src/main.rs and exex-scroll-indexer/src/main.rs.
  3. Commit your changes.
  4. Create a private repo on GitHub. (Please do not push your solution to a public repo!)
  5. Push your changes.
  6. Add Thegaram as an Admin to the repo.

Evaluation Criteria

  • Correctness.
  • Readability, clean code, maintainability.
  • Test coverage (if applicable).
  • Performance (if applicable).