-
Notifications
You must be signed in to change notification settings - Fork 251
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
Bumps solana-sbpf to v0.9.0 #3830
Conversation
The Firedancer team maintains a line-for-line reimplementation of the |
2c0e201
to
a9c8f59
Compare
ed52de2
to
9e667e9
Compare
bd28e00
to
8bed666
Compare
4161b3a
to
690c82a
Compare
e7a4940
to
32909f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we have a test for each one of the SBPF versions? At some point, we'll have all four of them running online.
I believe that at least such a test should exist for the program in programs/sbf
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, however currently these test binaries are manually constructed. We can revisit this topic once we have actual toolchain support for all these SBPF versions.
1a4b7f2
to
d1b8459
Compare
@@ -555,13 +555,13 @@ impl<'a> InvokeContext<'a> { | |||
// For now, only built-ins are invoked from here, so the VM and its Config are irrelevant. | |||
let mock_config = Config::default(); | |||
let empty_memory_mapping = | |||
MemoryMapping::new(Vec::new(), &mock_config, &SBPFVersion::V1).unwrap(); | |||
MemoryMapping::new(Vec::new(), &mock_config, SBPFVersion::V1).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be V0?
SBPFVersion::V1 | ||
} else { | ||
SBPFVersion::V0 | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a debug assert here to prevent min_sbpf_version
from being greater than the max_sbpf_version
.
I know we plan on enabling enable_sbpf_v3_deployment_and_execution
before activating disable_sbpf_v0_execution
, but any case different than that should error out (at least in debug mode).
@@ -12183,7 +12182,7 @@ fn test_feature_activation_loaded_programs_cache_preparation_phase() { | |||
result_with_feature_enabled, | |||
Err(TransactionError::InstructionError( | |||
0, | |||
InstructionError::InvalidAccountData | |||
InstructionError::UnsupportedProgramId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabling all features with let mut feature_set = FeatureSet::all_enabled();
did also activate remove_accounts_executable_flag_checks
which changes the error message here.
Problem
solana-sbpf v0.9.0 was released.
Summary of Changes
solana_rbpf
=>solana-sbpf
disable_sbpf_v1_execution
=>disable_sbpf_v0_execution
reenable_sbpf_v1_execution
=>reenable_sbpf_v0_execution
enable_sbpf_v1_deployment_and_execution
enable_sbpf_v2_deployment_and_execution
enable_sbpf_v3_deployment_and_execution
Not included in this PR