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

Replay protection contributes to App Hash #3284

Merged
merged 7 commits into from
May 24, 2024

Conversation

batconjurer
Copy link
Member

Describe your changes

Replay protection entries need to be verifiable and thus should contribute to the app hash. This PR makes a cryptographic commitment to all replay protection entries (the root of some implicit merkle tree) which is itself merklized.

Indicate on which release or other PRs this topic is based on

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@batconjurer batconjurer requested a review from grarco May 21, 2024 13:53
Copy link

codecov bot commented May 21, 2024

Codecov Report

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

Project coverage is 53.80%. Comparing base (c7d79f4) to head (e1f94b1).
Report is 3 commits behind head on main.

Files Patch % Lines
crates/namada/src/ledger/protocol/mod.rs 0.00% 6 Missing ⚠️
crates/core/src/address.rs 90.00% 1 Missing ⚠️
crates/core/src/hash.rs 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3284      +/-   ##
==========================================
+ Coverage   53.79%   53.80%   +0.01%     
==========================================
  Files         314      314              
  Lines      105784   105828      +44     
==========================================
+ Hits        56903    56941      +38     
- Misses      48881    48887       +6     

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

crates/core/src/address.rs Outdated Show resolved Hide resolved
crates/core/src/address.rs Outdated Show resolved Hide resolved
crates/core/src/address/raw.rs Outdated Show resolved Hide resolved
crates/core/src/hash.rs Outdated Show resolved Hide resolved
crates/state/src/wl_state.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@sug0 sug0 left a comment

Choose a reason for hiding this comment

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

from my end: basically only missing a rebase on v0.36.1, and running make fmt, which CI was complaining about

crates/core/src/hash.rs Outdated Show resolved Hide resolved
@batconjurer batconjurer force-pushed the bat/reprot-merklized-commitment branch from 0b44ee9 to c7d358c Compare May 22, 2024 13:30
@batconjurer batconjurer requested a review from sug0 May 22, 2024 13:32
sug0
sug0 previously approved these changes May 22, 2024
@brentstone brentstone mentioned this pull request May 23, 2024
2 tasks
Copy link
Contributor

@grarco grarco left a comment

Choose a reason for hiding this comment

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

LGTM!

tzemanovic added a commit that referenced this pull request May 23, 2024
* origin/bat/reprot-merklized-commitment:
  Fix write to storage
  Only initialize a hasher if necessary
  Reworking hash concatenation
  Update crates/core/src/address.rs
  Update crates/core/src/address.rs
  changelog
  [feat]: A commitment to all replay protection entries is now merklized and contributes to the total app hash
brentstone added a commit that referenced this pull request May 23, 2024
* origin/bat/reprot-merklized-commitment:
  Fix write to storage
  Only initialize a hasher if necessary
  Reworking hash concatenation
  Update crates/core/src/address.rs
  Update crates/core/src/address.rs
  changelog
  [feat]: A commitment to all replay protection entries is now merklized and contributes to the total app hash
@brentstone brentstone merged commit 25f3edd into main May 24, 2024
17 of 19 checks passed
@brentstone brentstone deleted the bat/reprot-merklized-commitment branch May 24, 2024 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants