Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SBPFv1 tests to the CI pipeline #5126

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

LucasSte
Copy link

@LucasSte LucasSte commented Mar 3, 2025

Problem

There are three new SBPF versions already released in the platform tools that are compatible with the current validator configuration, but we do not test them actively in the CI.

Summary of Changes

  1. Modify the CI script to test SBPFv1
  2. Add a new command to the programs/sbf folder Makefile.
  3. Revamp tests that failed in SBPFv1.

@LucasSte LucasSte force-pushed the v1-test branch 3 times, most recently from 74c6878 to dd3fbc8 Compare March 4, 2025 21:13
@LucasSte LucasSte changed the title Add SBPFv1 to the CI pipeline Add SBPFv1 tests to the CI pipeline Mar 4, 2025
@LucasSte LucasSte requested a review from Lichtso March 4, 2025 22:33
@LucasSte LucasSte marked this pull request as ready for review March 4, 2025 22:33
for i in 10..MAX_CALL_DEPTH {
let stack = &mut stack[i * STACK_FRAME_SIZE..][..STACK_FRAME_SIZE];
assert!(stack == &ZEROS[..STACK_FRAME_SIZE], "stack not zeroed");
stack.fill(42);
}

#[cfg(feature = "dynamic-frames")]
Copy link

Choose a reason for hiding this comment

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

Numbers here should not be hard coded but calculated from the constants (MAX_CALL_DEPTH * STACK_FRAME_SIZE).

Copy link
Author

Choose a reason for hiding this comment

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

I can make a guesstimate of (MAX_CALL_DEPTH - 2) * STACK_FRAM_SIZE for here, but the truth is that estimating the number of zeroed bytes with STACK_FRAME_SIZE = 4096 is more intricate now, since stack frames have no predefined size.

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