juno
juno copied to clipboard
Separate L1 and L2 during sync
Fixes #309
Description
Right now there is tight coupling in the sync process (mostly centered around the enormous Synchronizer
struct).
This PR "modularizes" the sync process by making the changes described below.
Changes:
- Cleanly separate the L1 and L2 sync into two different "sync services." These are named
L1SyncService
andL2SyncService
, respectively. - Take advantage of geth's amazing bindgen tool to generate golang bindings to the Starknet contracts. This gives us type safety and fantastic support for iterating over logs.
- Related to the last point: we can now seamlessly create unit and integration tests for the sync process using a
SimulatedBackend
. - Remove the option to sync the state from the feeder gateway. This feature increases our API surface and is outside the scope of a StarkNet full node.
Types of changes
- Breaking change: we remove the option to sync state from the feeder gateway.
- Documentation Update: TODO
- Refactoring
- Build related changes: slight edit to the Makefile to generate the starknet contract ABI bindings
Testing
Requires testing Yes
Did you write tests? TODO
Documentation
If this requires a documentation update, did you add one? TODO