Skip to content

chore: test#23037

Closed
alexghr wants to merge 1 commit into
merge-train/spartanfrom
ag/invalid_attest
Closed

chore: test#23037
alexghr wants to merge 1 commit into
merge-train/spartanfrom
ag/invalid_attest

Conversation

@alexghr
Copy link
Copy Markdown
Contributor

@alexghr alexghr commented May 7, 2026

Test for A-521

Comment on lines +610 to +611
checkpointProposalOptions.broadcastInvalidCheckpointProposal ||=
blocksInCheckpoint.at(-1)?.indexWithinCheckpoint === this.config.invalidBlockProposalIndexWithinCheckpoint;
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.

Shouldn't this be the blockProposalOptions?

): Promise<BlockProposal> {
// For testing: change the new archive to trigger state_mismatch validation failure
if (options.broadcastInvalidBlockProposal) {
if (options.broadcastInvalidBlockProposal || options.broadcastInvalidThisBlockProposal) {
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.

What's the difference between the two?

Comment on lines +28 to +30
const TEST_TIMEOUT = 1_000_000;

jest.setTimeout(TEST_TIMEOUT);
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 was going to comment on this, but I see we already have a test with this timeout, damn

Comment on lines +223 to +228
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'd run this test with mocked gossipsub network

blocks: await Promise.all(
badCheckpointBlockHashes.map(async block => ({
...block,
worldStateHash: await getArchiveLeafHash(node, block.number),
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.

Why not just issue a getBlockData on the node and compare the block hashes?

@alexghr
Copy link
Copy Markdown
Contributor Author

alexghr commented May 12, 2026

Closing in favour of #23184

@alexghr alexghr closed this May 12, 2026
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.

2 participants