starknet_committer: add patricia paths forest reader/writer traits#13995
starknet_committer: add patricia paths forest reader/writer traits#13995ArielElp wants to merge 1 commit into
Conversation
2092a49 to
f0e3f55
Compare
8f39705 to
67c3d07
Compare
f0e3f55 to
6d8fca8
Compare
67c3d07 to
2ad18d3
Compare
6d8fca8 to
f34a751
Compare
99bf786 to
642dad1
Compare
540e432 to
48f73db
Compare
48f73db to
40a2552
Compare
642dad1 to
13b4b25
Compare
ArielElp
left a comment
There was a problem hiding this comment.
@ArielElp made 4 comments.
Reviewable status: 0 of 2 files reviewed, 4 unresolved discussions (waiting on yoavGrs).
crates/starknet_committer/src/db/forest_trait.rs line 53 at r1 (raw file):
Previously, yoavGrs wrote…
Please split between the action and the data.
Actually, how is it implemented for other metadata fields?
So far reverts neatly fit within the same write method, since revert is implemented as the "reverse" commitment. This is not so with witnesses, where I simply want to delete the digest and witnesses. This enum is introduced so that I can still use a single write_with_metadata_and_witnesses for both reverts and the regular flow. As long as I want a single write function (and I think that I do), I need to bundle the action.
I'm deleting the Skip variant, it's a remanent from a time when I thought this will become an argument in the existing flow.
crates/starknet_committer/src/db/forest_trait.rs line 62 at r1 (raw file):
Previously, yoavGrs wrote…
IMO
Renamed
crates/starknet_committer/src/db/forest_trait.rs line 122 at r1 (raw file):
Previously, yoavGrs wrote…
We already have
fn read_metadata.
I did not include witnesses in the metadata, only the digest
crates/starknet_committer/src/db/forest_trait.rs line 129 at r1 (raw file):
Previously, yoavGrs wrote…
I don't know what the implementation will be, but if you don't read from storage here, consider moving it out of a reader trait.
This will read from storage (will use fetch_patricia_paths)
d8b077c to
e34560b
Compare
yoavGrs
left a comment
There was a problem hiding this comment.
@yoavGrs reviewed 2 files and all commit messages, made 2 comments, and resolved 3 discussions.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on ArielElp).
crates/starknet_committer/src/db/forest_trait.rs line 117 at r2 (raw file):
#[cfg(feature = "os_input")] #[async_trait] pub trait ForestReaderWithWitnesses:
Consider
Suggestion:
trait WitnessesReader:e34560b to
99d2843
Compare
111d357 to
063f6b4
Compare
99d2843 to
ff8660f
Compare
e9e5c4e to
bfe1119
Compare
ff8660f to
1cd908c
Compare
bfe1119 to
f0b03b9
Compare
1cd908c to
adf5b0f
Compare
f0b03b9 to
cfe6585
Compare
adf5b0f to
7a90b25
Compare
7a90b25 to
9645f1b
Compare
8e92e61 to
fcb80de
Compare
a453d7a to
a0fc2ee
Compare
fcb80de to
8fb057b
Compare
a0fc2ee to
c02e5f3
Compare
a6fd9aa to
c39b0f2
Compare
c02e5f3 to
43250d7
Compare
c39b0f2 to
a5cc604
Compare
43250d7 to
1fffffe
Compare
a5cc604 to
7b294f1
Compare
1fffffe to
398ddb7
Compare

No description provided.