Skip to content

Conversation

@shargon
Copy link
Member

@shargon shargon commented Nov 3, 2023

Close #2915
Required for #2932

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))
Copy link
Contributor

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?

Copy link
Member Author

@shargon shargon Nov 4, 2023

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

Copy link
Member

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.

@shargon shargon requested a review from AnnaShaleva November 5, 2023 07:46
@shargon
Copy link
Member Author

shargon commented Nov 5, 2023

Ready to merge and continue with the upgrade? @Liaojinghui @AnnaShaleva

@shargon shargon merged commit 3fc8895 into master Nov 5, 2023
@shargon shargon deleted the merge-NativeUpdateHistory-hardforks branch November 5, 2023 10:54
shargon added a commit that referenced this pull request Nov 7, 2023
shargon added a commit that referenced this pull request Nov 7, 2023
shargon added a commit that referenced this pull request Feb 23, 2024
* 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 <[email protected]>

* Fix net standard

* Add ut

* Fix update

* Fix update

---------

Co-authored-by: Jimmy <[email protected]>
shargon added a commit that referenced this pull request Mar 2, 2024
* 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 <[email protected]>

* Fix net standard

* Add ut

* Fix update

* Fix update

* Expose `GetCommitteeAddress`

* Update src/Neo/SmartContract/Native/NeoToken.cs

---------

Co-authored-by: Jimmy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hide NativeUpdateHistory behind hardforks

6 participants