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

refactor(katana): encapsulate all the tx execution logic into a single function #1968

Merged
merged 2 commits into from
May 16, 2024

Conversation

kariy
Copy link
Member

@kariy kariy commented May 15, 2024

Description

put all the logic that is required for every tx execution (ie building the receipt, exec info, etc) into a single unit of execution (ie transact).

this allow us to simplify testing/benchmarking tx execution, bcs all the necessary steps are now included in a single function that we can easily test, without having to create the entire BlockExecutor trait.

Related issue

Tests

  • Yes
  • No, because they aren't needed
  • No, because I need help

Added to documentation?

  • README.md
  • Dojo Book
  • No documentation needed

Checklist

  • I've formatted my code (scripts/prettier.sh, scripts/rust_fmt.sh, scripts/cairo_fmt.sh)
  • I've linted my code (scripts/clippy.sh, scripts/docs.sh)
  • I've commented my code
  • I've requested a review after addressing the comments

@kariy
Copy link
Member Author

kariy commented May 15, 2024

@kariy kariy changed the title single unit execution function refactor(katana): encapsulate all the tx execution logic into a single function unit May 15, 2024
@kariy kariy marked this pull request as ready for review May 15, 2024 14:17
@kariy kariy changed the title refactor(katana): encapsulate all the tx execution logic into a single function unit refactor(katana): encapsulate all the tx execution logic into a single function May 15, 2024
Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 56.58915% with 56 lines in your changes are missing coverage. Please review.

Project coverage is 69.74%. Comparing base (49f0a4e) to head (87d6943).
Report is 1 commits behind head on main.

Current head 87d6943 differs from pull request most recent head e202651

Please upload reports for the commit e202651 to get more accurate results.

Files Patch % Lines
crates/katana/storage/provider/src/test_utils.rs 0.00% 49 Missing ⚠️
...tana/executor/src/implementation/blockifier/mod.rs 79.16% 5 Missing ⚠️
...na/executor/src/implementation/blockifier/utils.rs 98.03% 1 Missing ⚠️
crates/katana/executor/src/utils.rs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1968      +/-   ##
==========================================
- Coverage   69.81%   69.74%   -0.07%     
==========================================
  Files         313      314       +1     
  Lines       35562    35628      +66     
==========================================
+ Hits        24828    24850      +22     
- Misses      10734    10778      +44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kariy
Copy link
Member Author

kariy commented May 16, 2024

Merge activity

  • May 16, 3:54 PM EDT: @kariy started a stack merge that includes this pull request via Graphite.
  • May 16, 3:56 PM EDT: Graphite rebased this pull request as part of a merge.
  • May 16, 3:58 PM EDT: @kariy merged this pull request with Graphite.

Base automatically changed from prov-test-utils2 to main May 16, 2024 19:55
@kariy kariy merged commit 6e972b5 into main May 16, 2024
10 of 11 checks passed
@kariy kariy deleted the single-exec-unit branch May 16, 2024 19:58
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.

1 participant