-
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
Merge NativeUpdateHistory with HardForks #2941
Conversation
if (updates.Length == 0 || updates[0] != engine.PersistingBlock.Index) | ||
continue; | ||
engine.Snapshot.Add(CreateStorageKey(Prefix_Contract).Add(contract.Hash), new StorageItem(new ContractState | ||
if (contract.IsInitializeBlock(engine.ProtocolSettings, engine.PersistingBlock.Index)) |
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.
How to update contracts with this?
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.
That's the next step, this pr is only for merge the logics,but I want to create the manifest according to the HardFork
and create a property in ContractMethod
for the HardFork activation
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.
That is good. It will be a great improvement.
Ready to merge and continue with the upgrade? @Liaojinghui @AnnaShaleva |
* Update manifest * Fix comment * Format & fix methods * Fix new * Initialize storage fixes * Fix IsInitializeBlock * Fix update * Fix GetContractState * Optimize * Fix first invoke without sync * Remove current methods * Clean usings * Improve reading Initialize * Clean OnManifestCompose * Use cache for all native contracts * Fix ut * Move cache to ApplicationEngine * Clean code * Allow nullable attribute * Update src/Neo/SmartContract/Native/ContractEventAttribute.cs * Add base call * Fix one #2941 (comment) * Fix IsInitializeBlock #2941 (comment) * Add ContractEventAttribute constructors for ActiveIn * Ensure ommited hfs * Rename * Case insensitive hf config * Increase coverage * More uts * Rename * Update src/Neo/SmartContract/Native/ContractManagement.cs * format code * Fix ProtocolSettings * Update src/Neo/SmartContract/ApplicationEngine.cs * format * reorder using * Fix UT * Adding keccak256 (#2925) * Create codeql.yml * Keccak256 * Delete .github/workflows/codeql.yml * Update src/Neo/SmartContract/Native/CryptoLib.cs * add more keccak256 test cases as required * Create codeql.yml * Keccak256 * Delete .github/workflows/codeql.yml * Update src/Neo/SmartContract/Native/CryptoLib.cs * add more keccak256 test cases as required * HF_Manticore * Fix copyright * Create codeql.yml * Keccak256 * Delete .github/workflows/codeql.yml * Update src/Neo/SmartContract/Native/CryptoLib.cs * add more keccak256 test cases as required * Create codeql.yml * Keccak256 * Delete .github/workflows/codeql.yml * Update src/Neo/SmartContract/Native/CryptoLib.cs * add more keccak256 test cases as required * HF_Manticore * Fix copyright * HF_Manticore * Update CryptoLib.cs * Update CryptoLib.cs * Update UT_CryptoLib.cs * Apply suggestions from code review * clean usings --------- Co-authored-by: Shargon <shargon@gmail.com> * Fix net standard * Add ut * Fix update * Fix update --------- Co-authored-by: Jimmy <jinghui@wayne.edu>
* Update manifest * Fix comment * Format & fix methods * Fix new * Initialize storage fixes * Fix IsInitializeBlock * Fix update * Fix GetContractState * Optimize * Fix first invoke without sync * Remove current methods * Clean usings * Improve reading Initialize * Clean OnManifestCompose * Use cache for all native contracts * Fix ut * Move cache to ApplicationEngine * Clean code * Allow nullable attribute * Update src/Neo/SmartContract/Native/ContractEventAttribute.cs * Add base call * Fix one #2941 (comment) * Fix IsInitializeBlock #2941 (comment) * Add ContractEventAttribute constructors for ActiveIn * Ensure ommited hfs * Rename * Case insensitive hf config * Increase coverage * More uts * Rename * Update src/Neo/SmartContract/Native/ContractManagement.cs * format code * Fix ProtocolSettings * Update src/Neo/SmartContract/ApplicationEngine.cs * format * reorder using * Fix UT * Adding keccak256 (#2925) * Create codeql.yml * Keccak256 * Delete .github/workflows/codeql.yml * Update src/Neo/SmartContract/Native/CryptoLib.cs * add more keccak256 test cases as required * Create codeql.yml * Keccak256 * Delete .github/workflows/codeql.yml * Update src/Neo/SmartContract/Native/CryptoLib.cs * add more keccak256 test cases as required * HF_Manticore * Fix copyright * Create codeql.yml * Keccak256 * Delete .github/workflows/codeql.yml * Update src/Neo/SmartContract/Native/CryptoLib.cs * add more keccak256 test cases as required * Create codeql.yml * Keccak256 * Delete .github/workflows/codeql.yml * Update src/Neo/SmartContract/Native/CryptoLib.cs * add more keccak256 test cases as required * HF_Manticore * Fix copyright * HF_Manticore * Update CryptoLib.cs * Update CryptoLib.cs * Update UT_CryptoLib.cs * Apply suggestions from code review * clean usings --------- Co-authored-by: Shargon <shargon@gmail.com> * Fix net standard * Add ut * Fix update * Fix update * Expose `GetCommitteeAddress` * Update src/Neo/SmartContract/Native/NeoToken.cs --------- Co-authored-by: Jimmy <jinghui@wayne.edu>
Close #2915
Required for #2932