From cbedc6fa96d1d98d622bbe55ceeafd3ff8cfcce8 Mon Sep 17 00:00:00 2001 From: wacban Date: Tue, 3 Oct 2023 16:41:32 +0100 Subject: [PATCH 1/5] enable resharding v2 --- core/primitives-core/src/version.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/primitives-core/src/version.rs b/core/primitives-core/src/version.rs index facb41058ae..7d30f4aca99 100644 --- a/core/primitives-core/src/version.rs +++ b/core/primitives-core/src/version.rs @@ -110,6 +110,7 @@ pub enum ProtocolFeature { /// as it hardcodes preparation v2 code into the generated assembly. NearVmRuntime, BlockHeaderV4, + SimpleNightshadeV2, /// In case not all validator seats are occupied our algorithm provide incorrect minimal seat /// price - it reports as alpha * sum_stake instead of alpha * sum_stake / (1 - alpha), where /// alpha is min stake ratio @@ -120,7 +121,6 @@ pub enum ProtocolFeature { FixContractLoadingCost, #[cfg(feature = "protocol_feature_reject_blocks_with_outdated_protocol_version")] RejectBlocksWithOutdatedProtocolVersions, - SimpleNightshadeV2, RestrictTla, /// Increases the number of chunk producers. TestnetFewerBlockProducers, @@ -172,6 +172,7 @@ impl ProtocolFeature { ProtocolFeature::PreparationV2 | ProtocolFeature::NearVmRuntime => 62, ProtocolFeature::BlockHeaderV4 => 63, ProtocolFeature::RestrictTla | ProtocolFeature::TestnetFewerBlockProducers => 64, + ProtocolFeature::SimpleNightshadeV2 => 64, // Nightly features #[cfg(feature = "protocol_feature_fix_staking_threshold")] @@ -180,7 +181,6 @@ impl ProtocolFeature { ProtocolFeature::FixContractLoadingCost => 129, #[cfg(feature = "protocol_feature_reject_blocks_with_outdated_protocol_version")] ProtocolFeature::RejectBlocksWithOutdatedProtocolVersions => 132, - ProtocolFeature::SimpleNightshadeV2 => 135, ProtocolFeature::ChunkValidation => 137, ProtocolFeature::EthImplicitAccounts => 138, } From 086e4c478645fc456aad4adce4a826ecc7c3701e Mon Sep 17 00:00:00 2001 From: wacban Date: Wed, 6 Dec 2023 09:08:44 +0000 Subject: [PATCH 2/5] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84df77a5eae..d28ed5c190a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ### Protocol Changes +* Resharding v2 - new implementation for resharding and a new shard layout for production networks + * TODO PR link + * [NEP-0508](https://github.com/near/NEPs/pull/508) * Restrict the creation of non-implicit top-level account that are longer than 32 bytes. Only the registrar account can create them. [#9589](https://github.com/near/nearcore/pull/9589) * Adjust the number of block producers and chunk producers on testnet to facilitate testing of chunk-only producers [#9563](https://github.com/near/nearcore/pull/9563) From bd7ed394d7fc4184cbea752255eda6ae7c7e271b Mon Sep 17 00:00:00 2001 From: wacban Date: Wed, 6 Dec 2023 09:14:24 +0000 Subject: [PATCH 3/5] add the pr link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d28ed5c190a..61822e6495f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### Protocol Changes * Resharding v2 - new implementation for resharding and a new shard layout for production networks - * TODO PR link + * [#10303](https://github.com/near/nearcore/pull/10303) * [NEP-0508](https://github.com/near/NEPs/pull/508) * Restrict the creation of non-implicit top-level account that are longer than 32 bytes. Only the registrar account can create them. [#9589](https://github.com/near/nearcore/pull/9589) * Adjust the number of block producers and chunk producers on testnet to facilitate testing of chunk-only producers [#9563](https://github.com/near/nearcore/pull/9563) From 9e89c0206704d33e268cfc0ba9edf6fb2023f16c Mon Sep 17 00:00:00 2001 From: wacban Date: Wed, 6 Dec 2023 09:16:29 +0000 Subject: [PATCH 4/5] formatting changelog --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61822e6495f..2bf49e280dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,7 @@ ### Protocol Changes -* Resharding v2 - new implementation for resharding and a new shard layout for production networks - * [#10303](https://github.com/near/nearcore/pull/10303) - * [NEP-0508](https://github.com/near/NEPs/pull/508) +* Resharding v2 - new implementation for resharding and a new shard layout for production networks. [#10303](https://github.com/near/nearcore/pull/10303), [NEP-0508](https://github.com/near/NEPs/pull/508) * Restrict the creation of non-implicit top-level account that are longer than 32 bytes. Only the registrar account can create them. [#9589](https://github.com/near/nearcore/pull/9589) * Adjust the number of block producers and chunk producers on testnet to facilitate testing of chunk-only producers [#9563](https://github.com/near/nearcore/pull/9563) From 39e7e3a49c67c29dacf4ab7cc92def624ca603b5 Mon Sep 17 00:00:00 2001 From: wacban Date: Wed, 6 Dec 2023 09:18:18 +0000 Subject: [PATCH 5/5] added comment --- core/primitives-core/src/version.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/primitives-core/src/version.rs b/core/primitives-core/src/version.rs index 7d30f4aca99..eb1911f2105 100644 --- a/core/primitives-core/src/version.rs +++ b/core/primitives-core/src/version.rs @@ -110,6 +110,8 @@ pub enum ProtocolFeature { /// as it hardcodes preparation v2 code into the generated assembly. NearVmRuntime, BlockHeaderV4, + /// Resharding V2. A new implementation for resharding and a new shard + /// layout for the production networks. SimpleNightshadeV2, /// In case not all validator seats are occupied our algorithm provide incorrect minimal seat /// price - it reports as alpha * sum_stake instead of alpha * sum_stake / (1 - alpha), where @@ -171,8 +173,9 @@ impl ProtocolFeature { ProtocolFeature::ComputeCosts | ProtocolFeature::FlatStorageReads => 61, ProtocolFeature::PreparationV2 | ProtocolFeature::NearVmRuntime => 62, ProtocolFeature::BlockHeaderV4 => 63, - ProtocolFeature::RestrictTla | ProtocolFeature::TestnetFewerBlockProducers => 64, - ProtocolFeature::SimpleNightshadeV2 => 64, + ProtocolFeature::RestrictTla + | ProtocolFeature::TestnetFewerBlockProducers + | ProtocolFeature::SimpleNightshadeV2 => 64, // Nightly features #[cfg(feature = "protocol_feature_fix_staking_threshold")]