Skip to content

test: slash on bad attestation#23184

Merged
alexghr merged 1 commit into
merge-train/spartanfrom
ag/bad-attestation-tests
May 15, 2026
Merged

test: slash on bad attestation#23184
alexghr merged 1 commit into
merge-train/spartanfrom
ag/bad-attestation-tests

Conversation

@alexghr
Copy link
Copy Markdown
Contributor

@alexghr alexghr commented May 12, 2026

Builds on top of #23180

@alexghr alexghr marked this pull request as draft May 12, 2026 11:53
@alexghr alexghr added the ci-draft Run CI on draft PRs. label May 12, 2026
@alexghr alexghr force-pushed the ag/slash-bad-attestation branch from 7849cda to b6ab9ce Compare May 12, 2026 12:44
@alexghr alexghr force-pushed the ag/bad-attestation-tests branch from 6b87d1f to 15ab87c Compare May 12, 2026 12:45
@alexghr alexghr marked this pull request as ready for review May 12, 2026 13:18
@alexghr alexghr force-pushed the ag/bad-attestation-tests branch from 56235c7 to 97e7ae6 Compare May 12, 2026 13:24
@alexghr alexghr mentioned this pull request May 12, 2026
Base automatically changed from ag/slash-bad-attestation to merge-train/spartan May 13, 2026 08:59
@alexghr alexghr force-pushed the ag/bad-attestation-tests branch 2 times, most recently from 114bc7a to 872b751 Compare May 13, 2026 12:11
@alexghr alexghr changed the title test: add tests fix: update bad attestation slashing condition May 13, 2026
@alexghr alexghr force-pushed the ag/bad-attestation-tests branch 2 times, most recently from 114bc7a to c5f8135 Compare May 13, 2026 16:47
@alexghr alexghr changed the title fix: update bad attestation slashing condition test: slash on bad attestation May 14, 2026
@alexghr alexghr force-pushed the ag/bad-attestation-tests branch from c5f8135 to a8e3fb0 Compare May 14, 2026 16:32
Copy link
Copy Markdown
Contributor

@spalladino spalladino left a comment

Choose a reason for hiding this comment

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

LGTM. I wonder if the two tests could be merged in the interest of lowering running time, like asserting the offense, and then checking it's cleared once you push the equivocation. That'd also allow to inline the create scenario helper maybe.

Comment on lines +269 to +274
await t.waitForP2PMeshConnectivity(nodes, NUM_VALIDATORS, 30, 0.1, [
TopicType.tx,
TopicType.block_proposal,
TopicType.checkpoint_proposal,
TopicType.checkpoint_attestation,
]);
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.

I think you shouldn't need this under mockGossipSubNetwork

Comment on lines +434 to +439
for (const { description, validator, offenseType } of expectedSlashOffenses) {
const offense = findExpectedOffense(validator, offenseType);
expect(offense).toBeDefined();
expect(offense!.amount).toBeGreaterThan(0n);
t.logger.warn(`Observed expected slash offense: ${description}`, { offense });
}
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.

Isn't this the same as the retryUntil above?

@alexghr alexghr force-pushed the ag/bad-attestation-tests branch from a8e3fb0 to 9f010ee Compare May 15, 2026 10:48
@alexghr alexghr force-pushed the ag/bad-attestation-tests branch from 9f010ee to 081fc7c Compare May 15, 2026 13:36
@alexghr alexghr enabled auto-merge (squash) May 15, 2026 15:18
@alexghr alexghr merged commit fed608b into merge-train/spartan May 15, 2026
20 of 22 checks passed
@alexghr alexghr deleted the ag/bad-attestation-tests branch May 15, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants