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

Move trace calculation; refactor from method to function #340

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

FabijanC
Copy link
Contributor

@FabijanC FabijanC commented Feb 7, 2024

Usage related changes

None

Development related changes

  • Move trace calculation to a separate module
  • Replace Starknet self param with CachedState param in trace creation
  • Body of create_trace is basically unmodified, just moved

Checklist:

  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/clippy_check.sh
  • No unused dependencies - ./scripts/check_unused_deps.sh
  • Performed code self-review
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Documented the changes
  • Linked the issues which this PR resolves
  • Checked the TODO section in README.md if this PR resolves it
  • Updated the tests
  • All tests are passing - cargo test

@FabijanC FabijanC changed the title Move trace calculation Move trace calculation; refactor from method to function Feb 7, 2024
Copy link
Contributor

@marioiordanov marioiordanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it possible to pass an immutable state to create_trace, rather than mutable

@FabijanC
Copy link
Contributor Author

FabijanC commented Feb 8, 2024

Isn't it possible to pass an immutable state to create_trace, rather than mutable

I re-checked. I tried changing &mut to &, but eventually got to FunctionInvocation::try_from_call_info, which operates on state_reader::get_class_hash_at, which requires mutability.

@FabijanC FabijanC merged commit d7c168a into main Feb 8, 2024
1 check passed
@FabijanC FabijanC deleted the move-trace-calculation branch February 8, 2024 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants