Skip to content

Backport master to develop#1774

Merged
pratikspatil024 merged 16 commits into0xPolygon:developfrom
cffls:develop
Sep 18, 2025
Merged

Backport master to develop#1774
pratikspatil024 merged 16 commits into0xPolygon:developfrom
cffls:develop

Conversation

@cffls
Copy link
Copy Markdown
Contributor

@cffls cffls commented Sep 17, 2025

Description

Backporting changes from master to develop. Merge from a fork repo because there are a few merge conflicts to be resolved.

lucca30 and others added 16 commits September 10, 2025 11:34
* proper error handling for blockchain instantiation

* nil check on ethstats

* nil check over ourTD
…ne (0xPolygon#1757)

* purge whitelisted entries, bypass validation for incorrect milestone

* small log change

* small log change
)

* Periodically check canonical chain with latest milestone

Handle the edge case where a milestone arrives in the middle of chain import, where the imported chain is on a wrong fork.

* Address CR comment
When a milestone doesn't match a local block, we should return an hash mismatch error, so the milestone would be kept for future evaluation.
…entry (0xPolygon#1764)

* eth/downloader/whitelist: remove redundant read lock

* eth/downloader/whitelist: move metrics reporting to separate function for simplicity

* eth/downloader/whitelist: check for fork correctness after chain validation

* eth/downloader/whitelist: small comment changes

* eth/downloader/whitelist: use checkpoint as well for fork correctness

* eth/downloader/whitelist: check already validated blocks

* eth/downloader/whitelist: consider last known valid block for calculating limit

* eth/downloader/whitelist: fix build errors

* eth/downloader/whitelist: parameterize max fork correctness limit

* eth/downloader/whitelist: add fork correctness tests

* eth/downloader/whitelist: remove debug logs

* eth/downloader/whitelist: cache whole fork instead of just first block, update tests

* eth/downloader/whitelist: fix potential uint64 underflow

* eth/downloader/whitelist: debug logs for better observability

* eth/downloader/whitelist: use built-in map clear function

* eth, internal/cli: add feature flag to disable blind fork validation

* fix flag name

* eth/downloader/whitelist: set empty size if flag is disabled
@sonarqubecloud
Copy link
Copy Markdown

@cffls cffls requested a review from a team September 17, 2025 20:40
@pratikspatil024 pratikspatil024 merged commit b011b7b into 0xPolygon:develop Sep 18, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants