Skip to content
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

RpcServer Plugin: unexpected invokecontractverify behaviour #552

Closed
AnnaShaleva opened this issue Mar 12, 2021 · 1 comment · Fixed by #564
Closed

RpcServer Plugin: unexpected invokecontractverify behaviour #552

AnnaShaleva opened this issue Mar 12, 2021 · 1 comment · Fixed by #564

Comments

@AnnaShaleva
Copy link
Member

Describe the bug
Initially, invokecontractverify RPC API was created to define network fee for contract witness verification (neo-project/neo#1977). But it performs a System.Contract.Call instead of behaving like Helper.VerifyWitness. So the resulting RPC verification fee got from invokecontractverify is different from the one we got during the real witness verification.

During real contract witness verification, the whole contract's script is loaded into VM, and then we jump to the verify method. Thus, to define the exact contract verification price, we should act like this (and not just perform the System.Contract.Call of the verify method).

Expected behavior
invokecontractverify behaviour should exactly match the Helper.VerifyWitness behaviour to calculate contract witness verification fee properly.

See nspcc-dev/neo-go#1825 for the reference implementation.

Platform:

  • Version: Neo 3
@Ashuaidehao
Copy link
Contributor

This api requires signers' private key in rpc node wallet, how to use it in client side? I wonder even after repair the behaviour, it cannot work properly in your scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants