In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail "what is the method of improving the protocol of NEO", the content is detailed, the steps are clear, and the details are handled properly. I hope that this article of "what is the method of improving the protocol of NEO" can help you solve your doubts.
Abstract
This NEP proposes NeoVM compute stack isolation to ensure the security of dynamic calls and to support new features in the future.
motivation
NEP-4 (dynamic invocation) has now been implemented, but because the NeoVM evaluation stack is not isolated, the contract for dynamic invocation may break the caller's stack at run time, causing the contract to not execute as expected.
On the other hand, some features, such as exception handling, also require stack isolation.
Principle
We need a new set of instructions so that each call creates a separate evaluation stack and automatically copies the parameters of the function to the new stack. After the function finishes running, the return value is automatically copied to the caller's stack. In this way, the modification of the stack by the calling contract does not affect the behavior of the caller.
Describe in detail
We added five new instructions to start the stack isolation call:
CALL_I,CALL_E,CALL_ED,CALL_ET,CALL_EDT .
CALL_I
The instruction CALL_I is very similar to the old instruction CALL. The difference is that CALL_I needs to be followed by an Operand to represent the number of parameters and the value returned to copy.
CALL_E
The instruction CALL_E is very similar to the old instruction APPCALL when used for static calls. The difference is that CALL_E needs to be followed by an Operand to represent the number of parameters and the value returned to copy.
CALL_ED
The instruction CALL_ED is very similar to the old instruction APPCALL when used for dynamic invocation. The difference is that CALL_ED needs to be followed by an Operand to represent the number of parameters and the value returned to copy.
CALL_ET
The instruction CALL_ET is very similar to the instruction CALL_E. The difference is that CALL_ET starts a tail call.
CALL_EDT
The instruction CALL_EDT is very similar to the instruction CALL_ED. The difference is that CALL_EDT starts a tail call.
Backward compatibility
All old contracts can be executed correctly in the original instruction set, but it is not recommended that new contracts continue to use old instructions. Avoid using old instructions when a new contract requires dynamic invocation.
After reading this, the article "what is the method to improve the NEO protocol" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it yourself. If you want to know more about the article, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.