You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary or problem description invokefunction and invokescript RPC calls support passing script hashes for verifying that are to be used by System.Runtime.CheckWitness syscall (thanks to neo-project/neo#335 and #214 changes). It's a very useful feature, but these hashes are not processed the way they will be processed when they're added as Cosigners for a transaction (and that's what is supposed to happen with a lot of these test invocations, trying first and then sending a real transaction) because transactions use scoped signatures since neo-project/neo#968 merge. It may affect the result of test invocation and lead to differences with execution on real network.
Do you have any solution you want to propose?
I propose replacing current script hashes parameter (which is just the last parameter for current invokefunction and invokescript that is supposed to be an array of hex-encoded 20-byte script hashes) with cosigners parameter that is to be represented as an array of JSON-serialized Cosigner structures (that are well-defined).
Side note: we have it now implemented as an extension in neo-go, so it accepts both an array of hashes (that are treated like cosigners with Global scope) and an array of proper Cosigners.
Summary or problem description
invokefunction
andinvokescript
RPC calls support passing script hashes for verifying that are to be used bySystem.Runtime.CheckWitness
syscall (thanks to neo-project/neo#335 and #214 changes). It's a very useful feature, but these hashes are not processed the way they will be processed when they're added as Cosigners for a transaction (and that's what is supposed to happen with a lot of these test invocations, trying first and then sending a real transaction) because transactions use scoped signatures since neo-project/neo#968 merge. It may affect the result of test invocation and lead to differences with execution on real network.Do you have any solution you want to propose?
I propose replacing current script hashes parameter (which is just the last parameter for current
invokefunction
andinvokescript
that is supposed to be an array of hex-encoded 20-byte script hashes) with cosigners parameter that is to be represented as an array of JSON-serializedCosigner
structures (that are well-defined).Example request using this format (similar to https://docs.neo.org/v3/docs/en-us/reference/rpc/latest-version/api/invokefunction.html):
Where in the software does this update applies to?
The text was updated successfully, but these errors were encountered: