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

Extensible call_stack information via FFI non-breaking #2021

Closed
mpapierski opened this issue Sep 1, 2021 · 4 comments
Closed

Extensible call_stack information via FFI non-breaking #2021

mpapierski opened this issue Sep 1, 2021 · 4 comments
Assignees
Labels
execution engine rc-5 Release Candidate 5 release blocker PR to be merged before releasing
Milestone

Comments

@mpapierski
Copy link
Collaborator

mpapierski commented Sep 1, 2021

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.

@mpapierski mpapierski added this to the 1.4.0 milestone Sep 1, 2021
@MParlikar
Copy link
Contributor

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.

@piotr-dziubecki piotr-dziubecki modified the milestones: 1.4.0, 1.5.0 Oct 18, 2021
@piotr-dziubecki piotr-dziubecki removed this from the 1.5.0 milestone Dec 13, 2021
@devendran-m
Copy link
Contributor

Karan to verify if this has already been solved.

@devendran-m
Copy link
Contributor

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.

@devendran-m
Copy link
Contributor

A separate story based on the remark from Medha created - #4908 .

@devendran-m devendran-m added this to the 2.0.0 milestone Oct 7, 2024
@devendran-m devendran-m added the rc-5 Release Candidate 5 label Oct 7, 2024
@devendran-m devendran-m changed the title Optimize get_call_stack on host side Extensible call_stack information via FFI non-breaking Oct 7, 2024
@devendran-m devendran-m added the release blocker PR to be merged before releasing label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execution engine rc-5 Release Candidate 5 release blocker PR to be merged before releasing
Projects
None yet
Development

No branches or pull requests

5 participants