Deterministic state sync#145
Merged
marcello33 merged 17 commits intoMay 19, 2026
Merged
Conversation
Author
|
@claude review |
There was a problem hiding this comment.
Pull request overview
Adds a new Bor fork point to enable “deterministic state sync” behavior, switching bridge event-range resolution to Heimdall V2 height-based queries after the configured activation block.
Changes:
- Introduces
deterministicStateSyncBlockto Bor config/chainspecs and wires it through chain config + fork ID gathering. - Extends the bridge Heimdall client/service to resolve a deterministic end event ID via
block-height-by-time+state-syncs-at-height. - Adds bridge unit tests covering the deterministic path and key error/validation cases.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| polygon/chain/chainspecs/bor-devnet.json | Enables deterministic state sync fork on bor-devnet at block 500. |
| polygon/bridge/service.go | Implements deterministic event range resolution and adds waitForScraperByEventId. |
| polygon/bridge/service_test.go | Adds tests for deterministic state sync behavior and error handling. |
| polygon/bridge/event_record.go | Adds Heimdall V2 response type for block height-by-time. |
| polygon/bridge/client.go | Extends bridge client interface with deterministic state sync endpoints. |
| polygon/bridge/client_mock.go | Regenerates mocks for the extended client interface. |
| polygon/bridge/client_idle.go | Adds explicit errors for deterministic-only methods on IdleClient. |
| polygon/bridge/client_http.go | Implements Heimdall V2 HTTP calls for height lookup and at-height event fetching. |
| polygon/bor/borcfg/bor_config.go | Adds deterministic fork config field + accessors. |
| p2p/forkid/forkid.go | Includes Giugliano + deterministic state sync blocks in fork ID inputs. |
| p2p/forkid/forkid_test.go | Updates expected fork IDs for Polygon specs given added forks. |
| execution/chain/chain_config.go | Extends BorConfig interface + prints deterministic fork in config string. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Apr 1, 2026
lucca30
approved these changes
May 19, 2026
pratikspatil024
approved these changes
May 19, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the erigon side of deterministic state syncs for Polygon PoS.
Cross-repository changes