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

BuiltinProgram::new_mock: use max_call_depth=64 #566

Closed

Conversation

alessandrod
Copy link

I'm adding code to bpf_loader in the validator that asserts that max_call_depth is the same value as solana_program_runtime::compute_budget::MAX_CALL_DEPTH. This change is needed so that the tests that use BuiltinProgram::new_mock() in the validator don't trigger the assert.

Matches the value used (and now asserted) by the validator.
@Lichtso
Copy link

Lichtso commented May 28, 2024

We can probably adjust the Config::default() here instead. That way the other tests in this crate also get the more realistic setup.

@alessandrod
Copy link
Author

We can probably adjust the Config::default() here instead. That way the other tests in this crate also get the more realistic setup.

The reason I didn't want to do this is that I think it's good to test more than one value. But I'm also ok changing the default to 64 and then testing != 64 explicitly

@Lichtso
Copy link

Lichtso commented May 28, 2024

I adjusted tests (test_bpf_to_bpf_depth() and test_err_reg_stack_depth()) to run on the previous and the new value in #574.

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.

None yet

2 participants