Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

RPC to dry run a transaction #6298

Closed
xlc opened this issue Jun 9, 2020 · 3 comments · Fixed by #6300
Closed

RPC to dry run a transaction #6298

xlc opened this issue Jun 9, 2020 · 3 comments · Fixed by #6300
Labels
J0-enhancement An additional feature request.

Comments

@xlc
Copy link
Contributor

xlc commented Jun 9, 2020

A new RPC to allow user submit transaction and dry run it and return all events.

It should respect to weight limits so this cannot be used to DOS the node.

Should have an option to disable signature validation to make this more useful (able to detect transaction will not success before asking user to sign).

state_call with BlockBuilder_apply_extrinsic may be able to achieve something similar but it is way too hard to use and does not expose events.

This will need to be an unsafe RPC to avoid ddos nodes.

@xlc xlc mentioned this issue Jun 9, 2020
2 tasks
@bkchr
Copy link
Member

bkchr commented Jun 9, 2020

And this is an unsafe RPC?

@xlc
Copy link
Contributor Author

xlc commented Jun 9, 2020

In terms of safeness, I think this is similar to submit extrinsic? or state_call?

Any places for me to check is state_call unsafe other than reading the code?

@bkchr
Copy link
Member

bkchr commented Jun 9, 2020

I mean, if you open a RPC where everyone can send you transactions to dry run them. They can ddos your node. Especially if they can disable signature checking.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants