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

Make reth data pipeline privacy aware #1

Merged
merged 34 commits into from
Sep 24, 2024
Merged

Make reth data pipeline privacy aware #1

merged 34 commits into from
Sep 24, 2024

Conversation

phexyz
Copy link
Collaborator

@phexyz phexyz commented Sep 17, 2024

Overall changes:

the value type was U256 before but it is FlaggedStorage, per changes from seismic-revm SeismicSystems/seismic-revm#9. Revm inspectors needed to run this
SeismicSystems/seismic-revm-inspectors#1

Testing:

run make test. 2 lock-file-test will fail per paradigmxyz/reth#9381

Modified seismic-reth/crates/storage/provider/src/writer/mod.rs:731 to check if is_private flag is committed to database from evm execution outcome
Modified seismic-reth/crates/trie/trie/src/state.rs:347 to check if is_private flag is propagated from hashedStorages to postHashedStorages

Diff doc:

  1. State root calculation: we don’t encode the is_private flag during the state_root calculation ([code](5a69f1e#diff-a69280a7601140010b48c98e07c58431efd9e6f45180dcfcd2e0d423e4588a98R162)). However, we might want to include is_private as part of the state since a storage slot can transition from public to private
  2. RPC: if is_private is true, we return 0 when called eth_storageAt ([code](f26de3b)) The reason is that given your storage can go from private to public, you might be leaking information by just enumerating the storage type. Second issue is that returning zero might be misleading if there is really any value being stored. For complete set of code paths where this choice affected, please to for all places where encode_fixed_size() is called. All other rpc calls are not impacted by this PR
  3. we put is_private flag along with addr_key as the key instead of combining with the value during parallelization of StorageHashingStage seismic-reth/crates/stages/stages/src/stages/hashing_storage.rs:106

@phexyz phexyz requested a review from sfyll September 17, 2024 17:43
Copy link
Contributor

@sfyll sfyll left a comment

Choose a reason for hiding this comment

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

100 push ups

@sfyll sfyll merged commit 8799068 into seismic Sep 24, 2024
@sfyll sfyll deleted the storage branch September 24, 2024 15:18
ameya-deshmukh pushed a commit that referenced this pull request Sep 24, 2024
* Added leaf node privacy flag. Default to false

* default

* add default keyword

* working branch node with privacy flag

* made changes for storageSlot; TODO: need to change EVM

* changed how hasing storage is done

* baseline point for working reth. need to work on channeling changes to include is_private flag

* passed test

* latest

* latest

* working revm-inspctors

* debugging

* debugging

* debugging

* debugging

* build completed

* test compiled

* removing comment

* rm comment

* Use seismic's versions of alloy & revm dependencies (#2)

* patch correct versions of seismic-reth

* patch correct versions, builds

* comment out alloy-core

* test compiled

* addressed comments

* get rid of warnings

* fix warnings

* make test succeed

* correct cargo.toml

* restores cargo.toml

* restores cargo.toml

* added tests

* fix fomrat

---------

Co-authored-by: SFYLL <sd@seismic.systems>
Co-authored-by: Christian Drappi <c@seismic.systems>
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.

3 participants