Skip to content

validator: disable API while recovery stream is active#2297

Merged
sergerad merged 10 commits into
nextfrom
sergerad-validator-xor-backup
Jun 30, 2026
Merged

validator: disable API while recovery stream is active#2297
sergerad merged 10 commits into
nextfrom
sergerad-validator-xor-backup

Conversation

@sergerad

@sergerad sergerad commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a RWLock to disable Validator RPCs when backup is occurring (and vice versa).

Status endpoint can still be used during backup.

Replaces #2283.

Changelog

[[entry]]
scope  = "validator"
impact = "changed"
description = "Disable API while recovery stream is active"

@sergerad sergerad changed the title Sergerad validator xor backup fix: Disable Validator RPC on backup Jun 29, 2026
@sergerad sergerad requested review from Mirko-von-Leipzig and kkovaacs and removed request for Mirko-von-Leipzig June 29, 2026 23:03

@Mirko-von-Leipzig Mirko-von-Leipzig left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@Mirko-von-Leipzig

Copy link
Copy Markdown
Collaborator

I think perhaps recovery is more accurate than backup for what's happening

@Mirko-von-Leipzig Mirko-von-Leipzig changed the title fix: Disable Validator RPC on backup validator: disable API while recovery stream is active Jun 30, 2026

@kkovaacs kkovaacs 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.

One potential issue is that since we allow subscribing with a future block (> current tip) and that subscription also takes the lock we're effectively deadlocked.

Should we maybe add a check that the subscription start block should be <= the current tip?

@Mirko-von-Leipzig

Copy link
Copy Markdown
Collaborator

One potential issue is that since we allow subscribing with a future block (> current tip) and that subscription also takes the lock we're effectively deadlocked.

Should we maybe add a check that the subscription start block should be <= the current tip?

Yeah I guess in a way this isn't really the same situation as the subscription streams we have in conventional RPC.

@sergerad sergerad merged commit a2717a4 into next Jun 30, 2026
24 checks passed
@sergerad sergerad deleted the sergerad-validator-xor-backup branch June 30, 2026 20:33
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