starknet_committer: add patricia paths forest reader/writer traits#13995
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
2e82fa4 to
d978ebb
Compare
c6695e5 to
96591a7
Compare
ArielElp
left a comment
There was a problem hiding this comment.
@ArielElp made 3 comments.
Reviewable status: 2 of 3 files reviewed, 4 unresolved discussions (waiting on dorimedini-starkware).
crates/starknet_committer/src/db/forest_trait_witnesses.rs line 31 at r3 (raw file):
just so I understand: this enum is just to allow a single function to do both revert and commit?
Yes (maybe more specifically, a single function that does all the writes)
i.e. a "revert" is a reverse commit?
In the standard commit flow this is true, so you don't need a special treatment for reverts at the API level.
I changed the names a bit and added an explicit type for the Write variant, I think it's clearer now.
crates/starknet_committer/src/db/forest_trait_witnesses.rs line 53 at r3 (raw file):
Previously, dorimedini-starkware wrote…
shouldn't this be mutable? non-blocking, can be done later anyway
No, we only read from this layer (a few PRs from away)
crates/starknet_committer/src/db/forest_trait_witnesses.rs line 57 at r3 (raw file):
Previously, dorimedini-starkware wrote…
why optionally?
Not optionally indeed, removed.
55863a3 to
65c50ec
Compare
057831d to
1f3d5ed
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 1 file and all commit messages, and resolved 3 discussions.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ArielElp).
65c50ec to
74268e4
Compare
1f3d5ed to
401e67a
Compare
74268e4 to
134280e
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on ArielElp).
134280e to
02806e0
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on ArielElp).
crates/starknet_committer/src/db/index_db/db.rs line 89 at r6 (raw file):
/// Prefix for accessed-keys digest metadata (committed per block). #[cfg_attr(not(feature = "os_input"), allow(dead_code))]
we try to use expect when we can, to catch redundant annotations as they come
Suggestion:
expect(dead_code)02806e0 to
102f542
Compare
ArielElp
left a comment
There was a problem hiding this comment.
@ArielElp made 1 comment.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on dorimedini-starkware).
crates/starknet_committer/src/db/index_db/db.rs line 89 at r6 (raw file):
Previously, dorimedini-starkware wrote…
we try to use
expectwhen we can, to catch redundant annotations as they come
Done.
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 1 file and all commit messages, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ArielElp).
102f542 to
c0fd617
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c0fd617. Configure here.
ArielElp
left a comment
There was a problem hiding this comment.
@ArielElp resolved 1 discussion.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on dorimedini-starkware).
c0fd617 to
1d6ae67
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on ArielElp).
crates/starknet_committer/src/db/index_db/db.rs line 96 at r9 (raw file):
pub(crate) static PATRICIA_PATHS_PREFIX: LazyLock<[u8; 32]> = LazyLock::new(|| { (Felt::from_bytes_be(&ACCESSED_KEYS_DIGEST_METADATA_PREFIX) + Felt::ONE).to_bytes_be() });
Suggestion:
/// Prefix for Patricia proofs payload (per block).
#[cfg_attr(not(feature = "os_input"), expect(dead_code))]
pub(crate) static PATRICIA_PATHS_PREFIX: LazyLock<[u8; 32]> = LazyLock::new(|| {
(Felt::from_bytes_be(&ACCESSED_KEYS_DIGEST_METADATA_PREFIX) + Felt::ONE).to_bytes_be()
});
ArielElp
left a comment
There was a problem hiding this comment.
@ArielElp made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on dorimedini-starkware).
crates/starknet_committer/src/db/index_db/db.rs line 96 at r9 (raw file):
pub(crate) static PATRICIA_PATHS_PREFIX: LazyLock<[u8; 32]> = LazyLock::new(|| { (Felt::from_bytes_be(&ACCESSED_KEYS_DIGEST_METADATA_PREFIX) + Felt::ONE).to_bytes_be() });
at the moment it is still not used, this is changed up the stack (2 PRs up)
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ArielElp).
ArielElp
left a comment
There was a problem hiding this comment.
@ArielElp resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on ArielElp).


No description provided.