Skip to content

Value validation can downgrade a structurally valid value to an invalid one on reboot #5339

Closed

Description

@bboston7

During a futurenet test, we rebooted a validator while it was voting on a non-existent tx set, but before it voted to skip that tx set. Upon restart, the node continued where it left off, but crashed on emitting a ballot referring to that tx set because a validity check failed. I believe this is due to the getTxSetWaitingTime check in this conditional. The intent of this check was to only allow values we had requested to proceed through SCP. However, data on tx set waiting times is not persisted like SCP messages are, and so this check fails on restart and the node crashes because it thinks it's voting for an invalid value (instead of a "structurally valid" value).

I think we probably want to solve this by removing the getTxSetWaitingTime check. I suspect this is left over from when wee had the distinction between kAwaitingDownload and kValidForPrepare, and there was (or should have been) a separate arm to distinguish the two cases. The change probably accidentally folded the kValidForPrepare case into the kInvalidValue case instead of the kStructurallyValidValue case. The value is certainly structurally valid regardless of whether we've requested the tx set or not.

Before committing to removing this check, we should think through the consequences a little more.

Activity

  1. self-assigned this
    on Jul 14, 2026
  2. added a commit that references this issue on Jul 14, 2026
    74833be
  3. marta-lokhova commented on Jul 20, 2026

    @marta-lokhova
    Contributor

    we rebooted a validator while it was voting on a non-existent tx set

    to clarify: the tx set existed on the network, but the local node did not have it. Is that right?

    crashed on emitting a ballot referring to that tx set because a validity check failed

    which assert was it? is this related to kInvalidValue being emitted here?

    res = SCPDriver::kInvalidValue;

  4. bboston7 commented on Jul 22, 2026

    @bboston7
    ContributorAuthor

    to clarify: the tx set existed on the network, but the local node did not have it. Is that right?

    No, it didn't exist on the network. There's a testing-only flag that causes round leaders to nominate non-existent values to trigger skip ledgers. That's what we were using for the test that triggered this. Otherwise there's no way we'd see any skip ledgers on futurenet.

    which assert was it? is this related to kInvalidValue being emitted here?

    No, it's this assertion in the ApplicableTxSetFrame constructor:

    releaseAssert(previousLedgerHash ==

    TxSetXDRFrame::prepareForApply calls into this at the end of the function.

  5. added 3 commits that reference this issue on Jul 23, 2026
    3d6886f
    33f6a2a
    79b5c44
  6. added a commit that references this issue on Jul 24, 2026
    c1706b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions