-
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
Feature verification state machine #84
Feature verification state machine #84
Conversation
…t, asset, validator, contract, and storage data. Allow Verification contracts write access to storage data
…in read/write data.
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.
This looks good to me at a high level, but someone familiar with the C# code should also review. Is it possible we could find a stronger condition than checking for length? In addition to length, the standard verification script should have other set properties as well, right?
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.
The executions of the verification functions are order-independent, but if the state modification is allowed in the validation functions, the transactions will lose the ability to be validate concurrently. So we disabled all state modification APIs in verification functions.
In addition, it is difficult to ensure that all nodes perform verification functions in the same order.
--- edit: feature already there, sorry --- |
I see the difficulty you have mentioned. Are the transactions ordered by the time they are verified via this method? Would it be possible to only perform this 'enhanced' level of verification when a node is calling |
Every node will call |
What should be the next steps in implementing this feature? |
Read-only access to storage would be a great start. Can we get this for now? |
It has been brought to my attention the read only |
* Create index.md * Create toc.yml * Update toc.yml * Update index.md * Update toc.yml * Create white-paper.md * Update white-paper.md * Update white-paper.md * Update white-paper.md * Update white-paper.md * Update toc.yml * Update toc.yml * de-de (#9) * Added getting-started.md for docs and sc folders, as well as introduction.md for sc
What is this change?
This PR changes the core
IVerifiable.VerifyScripts()
method which is implemented inneo/Core/Helper.cs
, and makes a small change to the smart contractStateMachine
so that it can optionally commit only storage api data.What does it fix?
Currently, there is no way for a smart contract to send assets ( Neo or NeoGas, for example) to another address other than through the
Runtime.Notify
observer mechanism. An ideal solution for this is to allow addresses to attempt to withdraw assets from a smart contract address. The mechanism which verifies whether an address can withdraw is currently implemented in theVerifyScripts()
method mentioned above.The current issue with the above approach is that a smart contract has no access to blockchain data or storage api data while performing the verification routine, so a smart contract similar to the following would not work:
The purpose of this change-set is to allow for an example similar to the above to work.
Considerations
Details