-
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
neo3 ABI readonly methods #927
Comments
in order to implement it, could you especify what methods? |
The simplest example I have in mind is: Suppose you do the appcall On C# devpack, it could be an attribute: [ReadOnlyMethod]
BigInteger balanceOf(byte[] me) What happens, from wallet side, is that it process locally this invocation instead of issuing a transaction (unless you are forced to, via sendrawtransaction). To do that efficiently, we would need the state messages from blockchain or p2p, in order to properly calculate locally the whole state, with 100% confidence. Once in readonly application mode, you can never get out of it, even using dynamic/static invokes. |
@erikzhang is it exactly the same concept as |
Same. |
Maybe is better to call it |
Agree. And also we can move it to ABI. |
@igormcoelho isn't this the same as #829 ? We can keep the discussion here if you guys prefer |
No, we need to put this on NEP-3 Ammendment... another one. |
@igormcoelho could you describe the difference between this one and #829? Maybe we need to rename one of them because they look equal to me 😂 |
Ok, perhaps this is why I didn't understand it at first 😂 There are many situations where you could possibly "lock" state updates.
In short, if both are the same, good for us: we just need to rename |
No need to lock this feature to me. Focusing on other things first. |
Sorry @igormcoelho . I assigned you because you said you would like to work on this task later. I suppose someone else can do this while you are working on other tasks? |
@igormcoelho do you want to implement this? otherwise @lock9 you can assign it to me |
In order to proceed with this change , we need to be able to store some information inside neo/neo/SmartContract/InteropService.cs Line 554 in cf768c6
I propose to modify neo-vm for be able to extend the Proposed changes : neo-project/neo-vm#191 |
@shargon, I'm not sure that extending ExecutionContext is a good path... but I understand why you need this. |
Today is one flag, tomorrow two flags xD i don't like this model 😅 |
Ok, it's approved on the vm side: neo-project/neo-vm#191 |
Require #1048 |
This will be do o should be closed? |
This will be merged or should be closed? @neo-project/core |
Hi @shargon, let's continue the discussion here: neo-project/proposals#104 |
Neo3 should provide readonly identifier on manifest. When these functions are demanded, two things happen: offchain services execute operations by themselves (unless forced to send to chain); and two, a readonly storage context is provided. This way, a readonly invoked method will.not be able to invoke a read write method.
The text was updated successfully, but these errors were encountered: