-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Native: include DeprecatedIn hardfork into usedHardforks #3245
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DeprecatedIn hardfork of every native method (if not null) should be included into the set of used hardforks, otherwise no contract update will be performed on this hardfork activation: https://github.com/neo-project/neo/blob/08f2dfc56762bb43be33e873bc3659bad368d4d6/src/Neo/SmartContract/Native/NativeContract.cs#L279-L284 https://github.com/neo-project/neo/blob/08f2dfc56762bb43be33e873bc3659bad368d4d6/src/Neo/SmartContract/Native/ContractManagement.cs#L69-L73 This commit should be a part of #3234 and a part of 3.7.4. Luckily, this new DeprecatedIn functionality is used only for the old native CryptoLib's verifyWithECDsa method with Cockatrice hardfork. And luckily, there are other CryptoLib's methods with ActiveIn set to Cockatrice hardfork. Due to these two facts this bug does not affect mainnet/testnet, and thus we don't need 3.7.5 with this fix included. So this fix may safely be postponed to 3.8.0. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
I thought about this, but will there be a case where the hf only has deprecated? |
Jim8y
approved these changes
May 20, 2024
vncoelho
approved these changes
May 20, 2024
There might be this case if we decide to remove some method from native contract. I think it's better to have it properly handled, just in case. |
Jim8y
approved these changes
May 20, 2024
cschuchardt88
approved these changes
May 21, 2024
shargon
approved these changes
May 21, 2024
Jim8y
added a commit
to Jim8y/neo
that referenced
this pull request
May 25, 2024
…gins * 'latest-plugins' of github.com:Jim8y/neo: (21 commits) fix: custom plugins won't shown by command `plugins` (neo-project#3269) COVERALL: Improve maintenance and readbility of some variables (neo-project#3248) Update nuget (neo-project#3262) [**Part-2**] Neo module/master fixes (neo-project#3244) Fix `dotnet pack` error (neo-project#3266) Fix and Update devcontainer.json to use Dockerfile (neo-project#3259) Add optimization to template (neo-project#3247) Optimize plugin's models (neo-project#3246) fix CancelTransaction !signers.Any() (neo-project#3263) COVERALL: fix broken by changing report from lcov to cobertura (neo-project#3252) fix TraverseIterator count (neo-project#3261) Native: include DeprecatedIn hardfork into usedHardforks (neo-project#3245) [**Part-1**] `neo-module/master` (neo-project#3232) Make `ApplicationEngine.LoadContext` protection level `public` (neo-project#3243) improve parse method in neo-cli (neo-project#3204) Fix neo-project#3239 (neo-project#3242) Neo.CLI: enable hardforks for NeoFS mainnet (neo-project#3240) v3.7.4 (neo-project#3237) fix hardfork issues (neo-project#3234) Update src/Neo.CLI/CLI/MainService.Plugins.cs ... # Conflicts: # src/Neo.CLI/CLI/MainService.Plugins.cs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
DeprecatedIn
hardfork of every native method (if not null) should be included into the set of used hardforks, otherwise no contract update will be performed during this hardfork activation:neo/src/Neo/SmartContract/Native/NativeContract.cs
Lines 279 to 284 in 08f2dfc
neo/src/Neo/SmartContract/Native/ContractManagement.cs
Lines 69 to 73 in 08f2dfc
This commit should be a part of #3234 and a part of 3.7.4. Luckily, this new
DeprecatedIn
functionality is used only for the old native CryptoLib's verifyWithECDsa method with Cockatrice hardfork. And luckily, there are other CryptoLib's methods withActiveIn
set to Cockatrice hardfork. Due to these two facts this bug does not affect mainnet/testnet, and thus we don't need 3.7.5 with this fix included. So this fix may safely be postponed to 3.8.0.Type of change
How Has This Been Tested?
Checklist: