Skip to content

eth/downloader: disable snap mode after committing pivot block - #35402

Merged
rjl493456442 merged 2 commits into
ethereum:masterfrom
rjl493456442:fix-pivot-move
Jul 23, 2026
Merged

eth/downloader: disable snap mode after committing pivot block#35402
rjl493456442 merged 2 commits into
ethereum:masterfrom
rjl493456442:fix-pivot-move

Conversation

@rjl493456442

@rjl493456442 rjl493456442 commented Jul 23, 2026

Copy link
Copy Markdown
Member

This PR improves the sync mode management, disabling the snap mode once
the pivot block is committed.

Originally the mode will only be flipped from snap to full once the entire sync
cycle is completed. However, it's theoretically possible to cancel the sync cycle
after committing the pivot but before inserting the remaining blocks. It drags
the following sync cycle back to the snap mode.

The snap mode should only be used if the head state is missing and unrecoverable.
Enabling the snap mode for multiple times should be strictly prevented.

What's more, it brings a fix to pivot block management, that once the pivot block
is committed, the pivot block marker should be no longer advanced, preventing
the situation that the real pivot state is below the pivot marker.

@jrhea jrhea left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rjl493456442
rjl493456442 merged commit 81ab8b5 into ethereum:master Jul 23, 2026
19 of 22 checks passed
@rjl493456442 rjl493456442 added this to the 1.17.5 milestone Jul 23, 2026
@Mohammedsapry

Copy link
Copy Markdown

تعمل هذه المراجعة على تحسين إدارة وضع المزامنة، وتعطيل وضع الالتقاط بمجرد تثبيت كتلة المحور.

في الأصل، لا يتم تغيير الوضع من وضع الالتقاط إلى الوضع الكامل إلا بعد اكتمال دورة المزامنة بالكامل. ومع ذلك، من الممكن نظريًا إلغاء دورة المزامنة بعد تثبيت المحور ولكن قبل إدراج الكتل المتبقية. يؤدي ذلك إلى إعادة دورة المزامنة التالية إلى وضع الالتقاط.

لا يُستخدم وضع الالتقاط إلا في حال فقدان حالة الرأس وعدم إمكانية استعادتها. ويجب منع تفعيل وضع الالتقاط عدة مرات منعاً باتاً.

علاوة على ذلك، فإنه يقدم حلاً لإدارة كتلة المحور، بحيث بمجرد الالتزام بكتلة المحور، لا ينبغي أن يتقدم مؤشر كتلة المحور، مما يمنع حدوث حالة المحور الحقيقية أسفل مؤشر المحور.

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.

3 participants