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
As it turns out, runtime::get_call_stack is an essential function call for smart contract security purposes. But unfortunately, it is a costly one: it calls 2 host functions, deserializes the whole vector of CallStackElement, and the enum serialized is rather big.
There are at least two use cases of it:
Returns the immediate caller. We can turn this into a host function that will return only one CallStackElement.
Returns the bottom of the call stack to (i.e. get_caller) ensure a session is a caller.
Find the cheapest way to query the call stack to achieve the results.
The text was updated successfully, but these errors were encountered:
Adding a comment here to include an additional feature to enhance the call stack frames to return gas cost, errors and other pertinent information from each call.
The following remark from Medha is a separate story. To do: @devendran-m to create a new ticket for this.
Adding a comment here to include an additional feature to enhance the call stack frames to return gas cost, errors and other pertinent information from each call.
As it turns out,
runtime::get_call_stack
is an essential function call for smart contract security purposes. But unfortunately, it is a costly one: it calls 2 host functions, deserializes the whole vector of CallStackElement, and the enum serialized is rather big.There are at least two use cases of it:
CallStackElement.
Find the cheapest way to query the call stack to achieve the results.
The text was updated successfully, but these errors were encountered: