-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat(starknet_state_sync_types): add BlockInfo to SyncBlock #2927
Conversation
cf77aa9
to
f14d7fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @eitanm-starkware)
crates/starknet_state_sync_types/src/state_sync_types.rs
line 19 at r1 (raw file):
#[derive(Debug, Default, Clone, Serialize, Deserialize)] pub struct SyncBlock { pub state_diff: ThinStateDiff,
Put this at the bottom, or put transaction_hashes at the top right below state_diff
crates/papyrus_p2p_sync/src/client/header.rs
line 136 at r1 (raw file):
timestamp: sync_block.block_timestamp, l1_da_mode: sync_block.l1_da_mode, sequencer: sync_block.sequencer_address,
Call this sequencer if in starknet api it's called sequencer
crates/starknet_state_sync/src/lib.rs
line 84 at r1 (raw file):
fn get_block(&self, block_number: BlockNumber) -> StateSyncResult<Option<SyncBlock>> { let txn = self.storage_reader.begin_ro_txn()?; let block_header = txn.get_block_header(block_number)?;
Nice. I see you looked at the video I sent this morning :)
crates/starknet_batcher/src/batcher.rs
line 388 at r1 (raw file):
} let SyncBlock { state_diff, transaction_hashes, block_number, .. } = sync_block;
Add a TODO on @alonh5 to use the extra data
f14d7fe
to
d9bfa2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 4 of 5 files reviewed, 2 unresolved discussions (waiting on @alon and @ShahakShama)
crates/papyrus_p2p_sync/src/client/header.rs
line 136 at r1 (raw file):
Previously, ShahakShama wrote…
Call this sequencer if in starknet api it's called sequencer
Done.
crates/starknet_batcher/src/batcher.rs
line 388 at r1 (raw file):
Previously, ShahakShama wrote…
Add a TODO on @alonh5 to use the extra data
Done.
crates/starknet_state_sync/src/lib.rs
line 84 at r1 (raw file):
Previously, ShahakShama wrote…
Nice. I see you looked at the video I sent this morning :)
;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @alon and @eitanm-starkware)
crates/papyrus_p2p_sync/src/client/header.rs
line 136 at r1 (raw file):
Previously, eitanm-starkware wrote…
Done.
I don't see it. Forgot to push?
crates/starknet_batcher/src/batcher.rs
line 388 at r1 (raw file):
Previously, eitanm-starkware wrote…
Done.
I don't see it. Forgot to push?
d9bfa2e
to
b056c47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @eitanm-starkware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 5 files at r1, 3 of 5 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @eitanm-starkware)
crates/starknet_batcher/src/batcher_test.rs
line 529 at r1 (raw file):
block_number: INITIAL_HEIGHT.unchecked_next(), state_diff: Default::default(), transaction_hashes: Default::default(),
crates/starknet_state_sync_types/src/state_sync_types.rs
line 23 at r3 (raw file):
pub transaction_hashes: Vec<TransactionHash>, pub block_number: BlockNumber,
Why not use the BlockInfo struct that contains all of these?
b056c47
to
b575e4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 5 of 6 files reviewed, 1 unresolved discussion (waiting on @alonh5 and @ShahakShama)
crates/starknet_state_sync_types/src/state_sync_types.rs
line 23 at r3 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Why not use the BlockInfo struct that contains all of these?
Currently, because of the nonzerogasprice - blockinfo uses it while storage and sync dont. @ShahakShama had some longer term reasons as well from what i gathered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @alonh5)
crates/starknet_state_sync_types/src/state_sync_types.rs
line 23 at r3 (raw file):
Previously, eitanm-starkware wrote…
Currently, because of the nonzerogasprice - blockinfo uses it while storage and sync dont. @ShahakShama had some longer term reasons as well from what i gathered.
Yes. We want to be able to return zero gas prices if the header has zero gas prices
long term - SyncBlock should contain the entire header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @alonh5)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @eitanm-starkware)
crates/starknet_state_sync_types/src/state_sync_types.rs
line 23 at r3 (raw file):
Previously, ShahakShama wrote…
Yes. We want to be able to return zero gas prices if the header has zero gas prices
long term - SyncBlock should contain the entire header
After talking f2f, please check if we can use gas price 1.
b575e4b
to
368475b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 6 of 6 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @eitanm-starkware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 6 of 6 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @eitanm-starkware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 6 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @eitanm-starkware)
No description provided.