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

fix(katana): l1/l2 messaging hash computations #1981

Merged
merged 2 commits into from
May 23, 2024
Merged

Conversation

kariy
Copy link
Member

@kariy kariy commented May 18, 2024

Description

l1 -> l2 messaging should be using a different hash computation, but instead we were using the hash computation for l2 -> l1 message.

this pr adds a new compute_l1_to_l2_message_hash function for computing the hash of a l1 -> l2 message.

ref : https://docs.starknet.io/documentation/architecture_and_concepts/Network_Architecture/messaging-mechanism/#l1-l2-messages

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 18, 2024

@kariy kariy mentioned this pull request May 18, 2024
10 tasks
@kariy kariy changed the title fix hash computation for l1 -> l2 messaging fix(katana): l1/l2 messaging hash computations May 18, 2024
@kariy kariy marked this pull request as ready for review May 18, 2024 05:52
Copy link

codecov bot commented May 22, 2024

Codecov Report

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

Project coverage is 69.81%. Comparing base (9aa4301) to head (50e98e4).
Report is 3 commits behind head on main.

Current head 50e98e4 differs from pull request most recent head 1742c41

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

Files Patch % Lines
crates/saya/core/src/prover/program_input.rs 0.00% 27 Missing ⚠️
crates/katana/rpc/rpc-types/src/message.rs 0.00% 6 Missing ⚠️
crates/katana/storage/provider/src/lib.rs 37.50% 5 Missing ⚠️
crates/saya/provider/src/rpc/mod.rs 0.00% 5 Missing ⚠️
crates/saya/core/src/lib.rs 0.00% 2 Missing ⚠️
crates/katana/rpc/rpc/src/saya.rs 97.43% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1981      +/-   ##
==========================================
+ Coverage   69.71%   69.81%   +0.10%     
==========================================
  Files         314      314              
  Lines       35766    35685      -81     
==========================================
- Hits        24933    24913      -20     
+ Misses      10833    10772      -61     

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

@glihm glihm added the katana This issue is related to Katana label May 23, 2024
@kariy
Copy link
Member Author

kariy commented May 23, 2024

Merge activity

  • May 23, 9:16 AM EDT: @kariy started a stack merge that includes this pull request via Graphite.
  • May 23, 9:21 AM EDT: Graphite rebased this pull request as part of a merge.
  • May 23, 9:23 AM EDT: @kariy merged this pull request with Graphite.

Base automatically changed from l1-handler-tx-doc to main May 23, 2024 13:20
@kariy kariy merged commit 3b71225 into main May 23, 2024
10 of 11 checks passed
@kariy kariy deleted the l1-l2-message-hash branch May 23, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
katana This issue is related to Katana
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants