Skip to content

feat: new cli flag to enable unsafe sync#8706

Open
PoulavBhowmick03 wants to merge 4 commits intosigp:unstablefrom
PoulavBhowmick03:feat/enable_unsafe_sync
Open

feat: new cli flag to enable unsafe sync#8706
PoulavBhowmick03 wants to merge 4 commits intosigp:unstablefrom
PoulavBhowmick03:feat/enable_unsafe_sync

Conversation

@PoulavBhowmick03
Copy link
Contributor

Issue Addressed

Addresses #7011

Proposed Changes

  1. Introduced a new CLI flag: --enable-unsafe-sync , disabled by default
  2. DA window check in builder.rs on start
    • After loading the head snapshot, compares head epoch against the DA boundary
    • If head is outside the DA window, logs error and exits
    • If --enable-unsafe-sync is true, continues
  3. New config field: enable_unsafe_sync

@PoulavBhowmick03 PoulavBhowmick03 changed the title new CLI flag to enable unsafe sync feat: new cli flag to enable unsafe sync Jan 27, 2026
@eserilev eserilev added ready-for-review The code is ready for review syncing hardening labels Jan 27, 2026
.display_order(0)
)
.arg(
Arg::new("enable-unsafe-sync")
Copy link
Member

Choose a reason for hiding this comment

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

Could we add a test for this new flag? There are example tests for other flags you can pretty much copy paste

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure! doing so

Comment on lines 871 to 872
"Your node's head is from before the DA window (~18 days). \
Lighthouse cannot independently verify blob availability for historical blocks. \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"Your node's head is from before the DA window (~18 days). \
Lighthouse cannot independently verify blob availability for historical blocks. \
"Your node's head is outside the DA window (~18 days). \
Lighthouse cannot independently verify blob availability for historical blocks. \

Comment on lines 878 to 879
"Head epoch {} is before DA boundary epoch {}. \
Use --enable-unsafe-sync to bypass.",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"Head epoch {} is before DA boundary epoch {}. \
Use --enable-unsafe-sync to bypass.",
"Head epoch {} is before DA boundary epoch {}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hardening ready-for-review The code is ready for review syncing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants