better error messages from `variant_to_binary`
Most of the plumbing to support better messages for `binary_to_variant` is there, it just has not been used yet. Also added option to shorten error message output such that it is bounded by a fixed upper limit (protects against malicious user input via ABI and the JSON provided to convert to binary). The default behavior of `variant_to_binary` is to provide verbose error messages. However, when the function is called from `abi_json_to_bin` within chain_plugin, it overrides the default behavior to shorten the error messages. In the future, this behavior should be modified based on a configuration parameter to at the very least enable very useful error messages on local nodes for debugging purposes.
Showing
想要评论请 注册 或 登录