Adds a feature ID for `enable_alt_bn128_syscall` (#28908)

Adds a feature ID for enable_alt_bn128_syscall.
This commit is contained in:
Alexander Meißner 2022-12-01 09:58:23 +01:00 committed by GitHub
parent e6cc5052c3
commit f766895f78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -32,11 +32,12 @@ use {
entrypoint::{BPF_ALIGN_OF_U128, MAX_PERMITTED_DATA_INCREASE, SUCCESS}, entrypoint::{BPF_ALIGN_OF_U128, MAX_PERMITTED_DATA_INCREASE, SUCCESS},
feature_set::FeatureSet, feature_set::FeatureSet,
feature_set::{ feature_set::{
self, alt_bn128_syscall_enabled, blake3_syscall_enabled, check_physical_overlapping, self, blake3_syscall_enabled, check_physical_overlapping,
check_syscall_outputs_do_not_overlap, curve25519_syscall_enabled, check_syscall_outputs_do_not_overlap, curve25519_syscall_enabled,
disable_cpi_setting_executable_and_rent_epoch, disable_fees_sysvar, disable_cpi_setting_executable_and_rent_epoch, disable_fees_sysvar,
enable_early_verification_of_account_modifications, libsecp256k1_0_5_upgrade_enabled, enable_alt_bn128_syscall, enable_early_verification_of_account_modifications,
limit_secp256k1_recovery_id, stop_sibling_instruction_search_at_parent, libsecp256k1_0_5_upgrade_enabled, limit_secp256k1_recovery_id,
stop_sibling_instruction_search_at_parent,
}, },
hash::{Hasher, HASH_BYTES}, hash::{Hasher, HASH_BYTES},
instruction::{ instruction::{
@ -149,7 +150,7 @@ pub fn register_syscalls<'a>(
feature_set: &FeatureSet, feature_set: &FeatureSet,
disable_deploy_of_alloc_free_syscall: bool, disable_deploy_of_alloc_free_syscall: bool,
) -> Result<SyscallRegistry<InvokeContext<'a>>, EbpfError> { ) -> Result<SyscallRegistry<InvokeContext<'a>>, EbpfError> {
let alt_bn128_syscall_enabled = feature_set.is_active(&alt_bn128_syscall_enabled::id()); let enable_alt_bn128_syscall = feature_set.is_active(&enable_alt_bn128_syscall::id());
let blake3_syscall_enabled = feature_set.is_active(&blake3_syscall_enabled::id()); let blake3_syscall_enabled = feature_set.is_active(&blake3_syscall_enabled::id());
let curve25519_syscall_enabled = feature_set.is_active(&curve25519_syscall_enabled::id()); let curve25519_syscall_enabled = feature_set.is_active(&curve25519_syscall_enabled::id());
let disable_fees_sysvar = feature_set.is_active(&disable_fees_sysvar::id()); let disable_fees_sysvar = feature_set.is_active(&disable_fees_sysvar::id());
@ -274,7 +275,7 @@ pub fn register_syscalls<'a>(
// Alt_bn128 // Alt_bn128
register_feature_gated_syscall!( register_feature_gated_syscall!(
syscall_registry, syscall_registry,
alt_bn128_syscall_enabled, enable_alt_bn128_syscall,
b"sol_alt_bn128_group_op", b"sol_alt_bn128_group_op",
SyscallAltBn128::call, SyscallAltBn128::call,
)?; )?;

View File

@ -546,8 +546,8 @@ pub mod cap_transaction_accounts_data_size {
solana_sdk::declare_id!("DdLwVYuvDz26JohmgSbA7mjpJFgX5zP2dkp8qsF2C33V"); solana_sdk::declare_id!("DdLwVYuvDz26JohmgSbA7mjpJFgX5zP2dkp8qsF2C33V");
} }
pub mod alt_bn128_syscall_enabled { pub mod enable_alt_bn128_syscall {
solana_sdk::declare_id!("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXALTBN128"); solana_sdk::declare_id!("A16q37opZdQMCbe5qJ6xpBB9usykfv8jZaMkxvZQi4GJ");
} }
lazy_static! { lazy_static! {
@ -681,7 +681,7 @@ lazy_static! {
(check_syscall_outputs_do_not_overlap::id(), "check syscall outputs do_not overlap #28600"), (check_syscall_outputs_do_not_overlap::id(), "check syscall outputs do_not overlap #28600"),
(enable_bpf_loader_set_authority_checked_ix::id(), "enable bpf upgradeable loader SetAuthorityChecked instruction #28424"), (enable_bpf_loader_set_authority_checked_ix::id(), "enable bpf upgradeable loader SetAuthorityChecked instruction #28424"),
(cap_transaction_accounts_data_size::id(), "cap transaction accounts data size up to its compute unit limits #27839"), (cap_transaction_accounts_data_size::id(), "cap transaction accounts data size up to its compute unit limits #27839"),
(alt_bn128_syscall_enabled::id(), "add alt_bn128 syscalls"), (enable_alt_bn128_syscall::id(), "add alt_bn128 syscalls #27961"),
/*************** ADD NEW FEATURES HERE ***************/ /*************** ADD NEW FEATURES HERE ***************/
] ]
.iter() .iter()