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
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
Adding onto the major changes to transaction and action traces described in #6897, this will be a good opportunity (since transaction trace changes force replay for history_plugin users and may also have an impact on the definitions of the still alpha state history plugin) to add another value piece of information to the action trace: the error code.
The eosio_assert_code intrinsic allows contracts to signal the error with a simple uint64_t code rather than a full string. Error message maps in the ABI could be used to associate this code with a string to be included in the error message that is thrown (or included in action trace through maybe null except field). However, regardless of whether such a mapping exists, if an error code is thrown, the error code value should be included in the action trace.
So at a minimum a new field error_code of type optional<uint64_t> should be added to both base_action_trace and transaction_trace, and they should be set to the appropriate value if an action fails due to a call to eosio_assert_code. It would be good to also make the modifications to nodeos so that the exception thrown (and stored in the except field) includes the string associated with the error code in the contract's ABI (if present).
The text was updated successfully, but these errors were encountered:
Adding onto the major changes to transaction and action traces described in #6897, this will be a good opportunity (since transaction trace changes force replay for history_plugin users and may also have an impact on the definitions of the still alpha state history plugin) to add another value piece of information to the action trace: the error code.
The
eosio_assert_code
intrinsic allows contracts to signal the error with a simpleuint64_t
code rather than a full string. Error message maps in the ABI could be used to associate this code with a string to be included in the error message that is thrown (or included in action trace through maybe nullexcept
field). However, regardless of whether such a mapping exists, if an error code is thrown, the error code value should be included in the action trace.So at a minimum a new field
error_code
of typeoptional<uint64_t>
should be added to bothbase_action_trace
andtransaction_trace
, and they should be set to the appropriate value if an action fails due to a call toeosio_assert_code
. It would be good to also make the modifications to nodeos so that the exception thrown (and stored in theexcept
field) includes the string associated with the error code in the contract's ABI (if present).The text was updated successfully, but these errors were encountered: