allow CheckWitness to work when using invokescript#335
allow CheckWitness to work when using invokescript#335shargon merged 9 commits intoneo-project:masterfrom trueinsider:invokescript-checkwitness
Conversation
|
@erikzhang could you please take a look? |
|
Perhaps creating a real |
|
@erikzhang That is the way I tried it at first, but unsuccessfully. To spoof witness with |
|
You can attach a https://github.com/neo-project/neo/blob/master/neo/Core/TransactionAttributeUsage.cs#L25 |
|
FWIW: neo-one has an additional rpc method |
|
I'm trying to develop an AVM execution Simulator for Neo on JavaScript, that will serve for these situations when you want the exact execution output, without the actual execution. |
|
@igormcoelho fyi: we've already implemented a full javascript (well, typescript) vm in neo-one that we've been using in production for over a year now. |
|
Good to hear that! I never found some vm codes on js, even recently looked at neo-one ,so I just assumed it has never been fully implemented. Im also reproducing application engine on js too... but I imagine you may also have that too. In this case, I reinforce that price calculation should be done on interfaces, not rpc nodes, using neo-one or any other js client vm. |
|
I like it, is the same behavior that i use in unit testing. We should be able to do that |
|
Conflicts with SVM |
|
I think it's very meaningful to be able to use CheckWitness in invokescript. This way we can get the specific gas to be consumed before sending the transaction and add the system fee accordingly. |
|
I will set this as a goal for NEO 3.0 because for 2.x it will surely not be merged. In this sense, we can keep this discussion thinking in the new design for NEO 3. |
|
Very good idea @wowoyinwei . In fact, I always thought that was already the current behavior... hahahah it's always possible to improve things indeed :) We are in another discussion for Neo 3, regarding what should be accepted for verification, and how to charge for it. But I believe it will be compatible with this proposal as well. |
|
@wowoyinwei, do you need help with this? If you could rebase / fix conflicts, I think it is ready to merge. |
|
@shargon we have to checkout to the branch and fix some issues. Is it possible for us to do that without having to wait for him? We made @trueinsider wait too much, it is understandable that he may have lost interest in it 😢 |
|
I will fix it soon |
lock9
left a comment
There was a problem hiding this comment.
Any chance we add this to neo 2? Looks quite simple and very impacting.
|
@lock9 you know my opinion, neo2 just for fix bugs |
|
@lock9, @vncoelho, @igormcoelho, @shargon, @erikzhang , guys: |
|
Well, you just used the words "user" and "complaining" in the same phrase, for me this is enough arguments why this should be implemented 😂 |
|
We can do that |
|
Any news on when this will be released on NEO2? |
|
@gsmachado Please, could you create an issue? |
* Create exchange.md * Create blank * Add files via upload * Delete blank * Update exchange.md * Update exchange.md * Update exchange.md * Delete gasflow_jp.PNG * Create blank * Add files via upload * Delete blank * Create dumpprivkey.md * Create getnewaddress.md * Create getblocksysfee.md * Update toc.yml * Update api.md * Update api.md * Delete gasflow_jp.png * Create blank * Add files via upload * Delete blank * Create getting-started-python.md * Added Getting Started (Python) document * Create compiler.md * Added Python Compiler * Create whitepaper.md * Update whitepaper.md * Added consensus document links * Create contributors.md * Added Contributors link * Update exchange.md * Update dumpprivkey.md * Update getnewaddress.md * Update getting-started-python.md * Update compiler.md * Update whitepaper.md * Update contributors.md * Update contributors.md * Update contributors.md * Create invokefunction.md * Create invokescript.md * Create sendmany.md * Create validateaddress.md * Create invoke.md * Create getversion.md * Create getpeers.md * Update sendmany.md * Update getpeers.md * Update invoke.md * Update invokefunction.md * Update invokescript.md * Update toc.yml * Update api.md * Update api.md * Update api.md * Update contributors.md
* allow CheckWitness to work when using invokescript * Fix * Update RpcServer.cs * Allow more than one signature * Reorder properties
This change will allow execution of smart contracts with
CheckWitnesscall inside them by passing script hash (as optional parameter) for whichCheckWitnessshould be successful toinvokescript.This change was made with this issue in mind: nos/client#133 but I hope it will make life of smart contract devs easier.
cc @deanpress @mhuggins @jeroenptrs