Update contract without change the hash#2044
Conversation
|
@erikzhang Need your review. It's important to Preview4. Only several days left before code frozen. |
|
@superboyiii could your team test it? |
|
It seems that |
@ProDog will test this tommorrow. |
You don't think that it's a useful information only with 4 bytes? |
|
Same error when deploy contract: #1973 (comment) |
|
@shargon Could you check this: neo-project/neo-devpack-dotnet#378 (comment) |
|
@superboyiii Please use neo-project/neo-node#676 and neo-project/neo-devpack-dotnet#388 This only require to change the hash in the manifest. |
|
@erikzhang now dev-pack always generate the abi with the current scriptHash, how can we tell him the old scriptHash, because update will require the old one in the manifest. |
Maybe we can remove the hash from abi? |
| /// Script | ||
| /// </summary> | ||
| public byte[] Script { get; set; } | ||
| public const int MaxScriptLength = 1024 * 1024; |
There was a problem hiding this comment.
I'm not sure that should it be smaller then 1 MB?
There was a problem hiding this comment.
We can remove it and check PayloadMaxSize they will pay for it
|
UT failed |
|
Merge? I've retested it and it works well. |
* Update without hash change * Specify version * Update ContractState.cs * Update ApplicationEngine.Contract.cs * Update ApplicationEngine.Contract.cs * Update ApplicationEngine.Contract.cs * Change to ushort * Return Id * Update ContractState.cs * Remove hash_new check * Update ApplicationEngine.Contract.cs * Fix UT * Remove Hash from ABI and change hash strategy * Clean code * Remove MaxLength * Change script size verification to nefFile * Rename Version to UpdateCounter * Rename ContractState.ScriptHash to Hash * Some Erik's suggestions * Some Erik's suggestions * Move CanCall * Remove Script hash from NefFile * Move to Helper * Simplify ContractState * Erik's review * NefFile.GetHash() * Remove double check * Some fixes * Some fixes * Reduce changes * Move GetContractHash to Helper * Use GetContractHash for native contracts * Fix UT paritially * Some fixes * Fix UT * Rename parameters * Update NefFile.cs * Update NefFile.cs * Change version to string * Increase to 32 * Fix * Fix UT Co-authored-by: Erik Zhang <erik@neo.org>
* Update without hash change * Specify version * Update ContractState.cs * Update ApplicationEngine.Contract.cs * Update ApplicationEngine.Contract.cs * Update ApplicationEngine.Contract.cs * Change to ushort * Return Id * Update ContractState.cs * Remove hash_new check * Update ApplicationEngine.Contract.cs * Fix UT * Remove Hash from ABI and change hash strategy * Clean code * Remove MaxLength * Change script size verification to nefFile * Rename Version to UpdateCounter * Rename ContractState.ScriptHash to Hash * Some Erik's suggestions * Some Erik's suggestions * Move CanCall * Remove Script hash from NefFile * Move to Helper * Simplify ContractState * Erik's review * NefFile.GetHash() * Remove double check * Some fixes * Some fixes * Reduce changes * Move GetContractHash to Helper * Use GetContractHash for native contracts * Fix UT paritially * Some fixes * Fix UT * Rename parameters * Update NefFile.cs * Update NefFile.cs * Change version to string * Increase to 32 * Fix * Fix UT Co-authored-by: Erik Zhang <erik@neo.org>
stopped trying to fix tests, they're changing too much (also in the future)
Alternative to #1973
Related to #1961 (comment)
Produce changes in neo-project/proposals#121 (review)
Close #2002 #2021 #1973