Skip to content

chore: fix fork_choice test cases - #119

Draft
SoarinSkySagar wants to merge 7 commits into
grandinetech:devnet-5from
SoarinSkySagar:ci-fix
Draft

chore: fix fork_choice test cases#119
SoarinSkySagar wants to merge 7 commits into
grandinetech:devnet-5from
SoarinSkySagar:ci-fix

Conversation

@SoarinSkySagar

@SoarinSkySagar SoarinSkySagar commented Jul 26, 2026

Copy link
Copy Markdown

closes #116

@SoarinSkySagar
SoarinSkySagar changed the base branch from main to devnet-5 July 26, 2026 16:38
@SoarinSkySagar
SoarinSkySagar marked this pull request as draft July 26, 2026 17:02
@SoarinSkySagar SoarinSkySagar changed the title chore: fix CI test issues chore: fix fork_choice test cases Jul 26, 2026
@SoarinSkySagar
SoarinSkySagar marked this pull request as ready for review July 26, 2026 17:17
Comment thread lean_client/containers/src/state.rs Outdated
/// Maximum number of distinct AttestationData entries per block (spec: chain/config.py:36).
/// Used by the import-side validation so we accept any spec-valid block from other clients.
pub(crate) const MAX_ATTESTATIONS_DATA: usize = 8;
pub(crate) const MAX_ATTESTATIONS_DATA: usize = 16;

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.

Suggested change
pub(crate) const MAX_ATTESTATIONS_DATA: usize = 16;
pub(crate) const MAX_ATTESTATIONS_DATA: usize = 8;

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.

Please do not change this

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.

Agreed, what's the point of changing this? Looks like spec restricts attestation count to 8?

https://github.com/leanEthereum/leanSpec/blob/0f5b8e58e58c0e155ae8b95eabbbde0b9ad8840a/src/lean_spec/spec/forks/lstar/config.py#L58-L59

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

3 test cases have blocks for testing with 16 distinct attestation data, and the tests are expecting them to be declared valid by the client. These tests were failing because MAX_ATTESTATIONS_DATA was 8 which is too low. Changing this to 16 makes those 3 cases pass (and no new failing cases)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Looks like spec restricts attestation count to 8?

@ArtiomTr looks like there is a mismatch between the tests and the spec then. Which should we follow?

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.

which test cases? maybe those test cases are just outdated? do they still exist in latest leanSpec revision?

@SoarinSkySagar SoarinSkySagar Jul 27, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

maybe those test cases are just outdated?

yes. I will update the tests instead of the const

@SoarinSkySagar

Copy link
Copy Markdown
Author

converting this PR to draft for now. work on this can continue after #120 is merged

@SoarinSkySagar
SoarinSkySagar marked this pull request as draft July 28, 2026 11:19
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