diff --git a/chain/chain/Cargo.toml b/chain/chain/Cargo.toml index 8c6c33a8b10..c97f95b4889 100644 --- a/chain/chain/Cargo.toml +++ b/chain/chain/Cargo.toml @@ -52,6 +52,8 @@ no_cache = ["near-store/no_cache"] protocol_feature_flat_state = ["near-store/protocol_feature_flat_state"] protocol_feature_reject_blocks_with_outdated_protocol_version = ["near-primitives/protocol_feature_reject_blocks_with_outdated_protocol_version"] +shardnet = ["protocol_feature_reject_blocks_with_outdated_protocol_version"] + nightly = [ "nightly_protocol", ] diff --git a/core/primitives/Cargo.toml b/core/primitives/Cargo.toml index 0da55de70d8..5a06d22a442 100644 --- a/core/primitives/Cargo.toml +++ b/core/primitives/Cargo.toml @@ -57,7 +57,7 @@ nightly_protocol = [] # Shardnet is the experimental network that we deploy for chunk-only producer testing. -shardnet = [] +shardnet = ["protocol_feature_reject_blocks_with_outdated_protocol_version"] deepsize_feature = [ "deepsize", diff --git a/core/primitives/src/version.rs b/core/primitives/src/version.rs index 796ed6d24f6..f757b2f03c2 100644 --- a/core/primitives/src/version.rs +++ b/core/primitives/src/version.rs @@ -265,7 +265,13 @@ impl ProtocolFeature { #[cfg(feature = "protocol_feature_account_id_in_function_call_permission")] ProtocolFeature::AccountIdInFunctionCallPermission => 130, #[cfg(feature = "protocol_feature_reject_blocks_with_outdated_protocol_version")] - ProtocolFeature::RejectBlocksWithOutdatedProtocolVersions => 132, + ProtocolFeature::RejectBlocksWithOutdatedProtocolVersions => { + if cfg!(feature = "shardnet") { + 102 + } else { + 132 + } + } #[cfg(feature = "shardnet")] ProtocolFeature::ShardnetShardLayoutUpgrade => 102, }