Skip to content

Misc qbft test fixes#581

Merged
GalRogozinski merged 3 commits intossvlabs:mainfrom
Zacholme7:adjust-fulldata-and-roots
Sep 16, 2025
Merged

Misc qbft test fixes#581
GalRogozinski merged 3 commits intossvlabs:mainfrom
Zacholme7:adjust-fulldata-and-roots

Conversation

@Zacholme7
Copy link
Contributor

This pr addresses a few issues that I had while implementing the QBFT spec tests

  1. All fulldata was mocked to a [1,2,3,4] byte sequence which we do not allow to be run with qbft. To address this, I moved TestingQBFTFullData to be valid data. Alongside this, the TestingQbftRootData was also fixed. This also applies to the DifferentFullData which I adjusted to be different valid data.

  2. Fix the double hash in the create proposal hash for the create message spectests. The root was being passed it which was leading to a double hash so I adjusted it to pass in the fulldata instead

  3. Fix ending roots in create message tests. The expected roots were hardcoded in and after I changed the fulldata and hash of fulldata, I also had to adjust the expected ending root for comparison

  4. I removed some test

  • invalid_val_check.go: this was testing that a decided message should pass validation even if it has invalid data which should not be possible
  • invalid_identifier.go & no_instance_running.go: these felt like implementation detail tests. we are initializing new qbft instances for new identifiers that we encounter as long as it passes validation to account for slow BNs
  1. adjust round change justifications in create_proposal_previously_not_prepared. the round change justifications were for round 2 but the round is being overridden for 10, so the justifications should be for 10. same applies for create_proposal_previously_prepared

Copy link
Collaborator

@dknopik dknopik left a comment

Choose a reason for hiding this comment

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

LGTM

@GalRogozinski GalRogozinski merged commit 34ed4a8 into ssvlabs:main Sep 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants