-
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
Adding keccak256 #2925
Adding keccak256 #2925
Conversation
* 'master' of github.com:neo-project/neo: 3.6.0 (neo-project#2893)
* 'master' of github.com:neo-project/neo: Update CalculateNetworkFee (neo-project#2920) fix contract trust FromStackItem `ContractPermissionDescriptor.Create(StackItem item)` (neo-project#2901) Reduce max depth (neo-project#2912) String element length (neo-project#2854) Interop syscall for current tx signers (neo-project#2827)
mistakenly deleted previous branch |
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.
@Liaojinghui ,maybe we need more test cases on edge cases.
It would be good to add more.
Furthermore, what is the idea for future resync and forks? @vang1ong7ang
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.
Decide about the possible attack as on 3.6.0 upgrade, and also verify more tests.
Hi vitor, what this means? |
@shargon Tests ok and ready for merge. |
@vncoelho what this means? |
Nowadays, we don't have this syscall,right? These are the ForkTriggers @vang1ong7ang tried to explain. I did not test yet, but we can try that. If that is a call from Native contract the attack will probably be possible.. |
@vncoelho previous transactions can not call this cause this not yet exist, only if this is added will developers be able to call it, since this will not affect previous transactions at all, no fork will introduce here. |
If I am right, the attack is very serious, in the same way as reported in #2910, please take some time to understand the previous issue and how critical and dangerous it was. It looks like the same issue could happen here if someone perform a malicious transaction before nodes receive the update. Exactly because "can not call this cause this not yet exist". There are combinations/logics that can be done that will cause Fork and even revert Token transactions (if, in the future, a re-sync occurs). If the attack can proceed, this PR should not be merged without an agreement to definitely solve the issue of updating native functions, etc... (or, at least, use a fork tag precisely connected to the nodes update time). @vang1ong7ang @dusmart. |
@vncoelho Oh, I see what you mean now. |
That is why this needs to be solved before this PR is merged. I did not reject the PR for nothing, there is a reason this should not be merged. First, solve, then add new features. Otherwise, be prepared because at some point some attack will come...The attack is well known nowadays. |
versioning things, consensus version, vm version all matters,,,,,,even plugin versions......... |
will reopen after a proper solution to the version is found |
Require #2942 |
It will be merged in |
@AnnaShaleva @roman-khimov neo-go will update accordingly. |
Sure, will be implemented together with native contracts update. |
Port neo-project/neo#2925. Closes #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Port neo-project/neo#2925. Close #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Port neo-project/neo#2925. Close #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Port neo-project/neo#2925. Close #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Port neo-project/neo#2925. Close #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Port neo-project/neo#2925. Close #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Port neo-project/neo#2925. Close #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Port neo-project/neo#2925. Close #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Port neo-project/neo#2925. Close #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
* 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>
Port neo-project/neo#2925. Close #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Port neo-project/neo#2925. Close #3295 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
With all associated native API changes ported from neo-project/neo#2925 and neo-project/neo#3154. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
With all associated native API changes ported from neo-project/neo#2925 and neo-project/neo#3154. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
With all associated native API changes ported from neo-project/neo#2925 and neo-project/neo#3154. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
With all associated native API changes ported from neo-project/neo#2925 and neo-project/neo#3154. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
With all associated native API changes ported from neo-project/neo#2925 and neo-project/neo#3154. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
With all associated native API changes ported from neo-project/neo#2925 and neo-project/neo#3154. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
With all associated native API changes ported from neo-project/neo#2925 and neo-project/neo#3154. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
With all associated native API changes ported from neo-project/neo#2925 and neo-project/neo#3154. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
No description provided.