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

refactor(blockifier_reexecution): add chain ID to SerializableOfflineReexecutionData #1972

Conversation

dorimedini-starkware
Copy link
Collaborator

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 42.17%. Comparing base (e3165c4) to head (60702e2).
Report is 506 commits behind head on main.

Files with missing lines Patch % Lines
...s/blockifier_reexecution/src/state_reader/utils.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1972      +/-   ##
==========================================
+ Coverage   40.10%   42.17%   +2.06%     
==========================================
  Files          26      204     +178     
  Lines        1895    23935   +22040     
  Branches     1895    23935   +22040     
==========================================
+ Hits          760    10094    +9334     
- Misses       1100    13375   +12275     
- Partials       35      466     +431     

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


🚨 Try these New Features:

@dorimedini-starkware dorimedini-starkware force-pushed the 11-12-refactor_blockifier_reexecution_add_chain_id_to_teststatereader branch from 3d59ffc to c4b1621 Compare November 12, 2024 08:41
@dorimedini-starkware dorimedini-starkware force-pushed the 11-12-refactor_blockifier_reexecution_add_chain_id_to_serializableofflinereexecutiondata branch from c4c7ff2 to a4d664b Compare November 12, 2024 08:41
@dorimedini-starkware dorimedini-starkware force-pushed the 11-12-refactor_blockifier_reexecution_add_chain_id_to_teststatereader branch from c4b1621 to 79580d0 Compare November 12, 2024 11:28
@dorimedini-starkware dorimedini-starkware force-pushed the 11-12-refactor_blockifier_reexecution_add_chain_id_to_serializableofflinereexecutiondata branch from a4d664b to 74cb405 Compare November 12, 2024 11:28
@dorimedini-starkware dorimedini-starkware changed the base branch from 11-12-refactor_blockifier_reexecution_add_chain_id_to_teststatereader to graphite-base/1972 November 13, 2024 11:15
@dorimedini-starkware dorimedini-starkware force-pushed the 11-12-refactor_blockifier_reexecution_add_chain_id_to_serializableofflinereexecutiondata branch from 74cb405 to 141a523 Compare November 13, 2024 11:25
Copy link
Contributor

@aner-starkware aner-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 221 files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware and @dorimedini-starkware)


crates/blockifier_reexecution/src/main.rs line 137 at r1 (raw file):

                serializable_data_prev_block,
                serializable_data_next_block,
                chain_id: ChainId::Mainnet,

Is this really what we want? I mean, we probably want to save data for reexecution tests for Mainnet; do we also want to save and run tests for other networks; If not, then it should just be explicitly entered in the CLI, not saved in the file.

Code quote:

chain_id: ChainId::Mainnet,

Copy link
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 221 files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)


crates/blockifier_reexecution/src/main.rs line 137 at r1 (raw file):

Previously, aner-starkware wrote…

Is this really what we want? I mean, we probably want to save data for reexecution tests for Mainnet; do we also want to save and run tests for other networks; If not, then it should just be explicitly entered in the CLI, not saved in the file.

still relevant?
the idea is:

  1. RPC tests guess the chain ID from the node URL; or, get the chain ID explicitly if you want to override
  2. offline tests need to fetch the chain ID from the JSON (hence the addition of the chain ID to the JSON struct)

@dorimedini-starkware dorimedini-starkware force-pushed the 11-12-refactor_blockifier_reexecution_add_chain_id_to_serializableofflinereexecutiondata branch from 141a523 to 0c076ba Compare November 13, 2024 14:41
@aner-starkware
Copy link
Contributor

crates/blockifier_reexecution/src/main.rs line 137 at r1 (raw file):

Previously, dorimedini-starkware wrote…

still relevant?
the idea is:

  1. RPC tests guess the chain ID from the node URL; or, get the chain ID explicitly if you want to override
  2. offline tests need to fetch the chain ID from the JSON (hence the addition of the chain ID to the JSON struct)

Are we planning to run reexecution in other networks often or in tests?

Copy link
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 221 files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)


crates/blockifier_reexecution/src/main.rs line 137 at r1 (raw file):

Previously, aner-starkware wrote…

Are we planning to run reexecution in other networks often or in tests?

if we see interesting edge cases pop up in other networks, yes, I would like to be prepared.
maybe it will never but used in the CI but it was already useful for me, to manually test specific blocks from testnet

@aner-starkware
Copy link
Contributor

crates/blockifier_reexecution/src/main.rs line 137 at r1 (raw file):

Previously, dorimedini-starkware wrote…

if we see interesting edge cases pop up in other networks, yes, I would like to be prepared.
maybe it will never but used in the CI but it was already useful for me, to manually test specific blocks from testnet

I understand that testing in other networks is useful, but why do we need to store the network in the file?

Copy link
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 221 files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)


crates/blockifier_reexecution/src/main.rs line 137 at r1 (raw file):

Previously, aner-starkware wrote…

I understand that testing in other networks is useful, but why do we need to store the network in the file?

because we need the block info for offline execution, right? the chain info requires knowledge of the network (in principle - in practice I think since the fee token addresses are the same it isn't really required, but good to have this for forward compatibility). no?

@aner-starkware
Copy link
Contributor

crates/blockifier_reexecution/src/main.rs line 137 at r1 (raw file):

Previously, dorimedini-starkware wrote…

because we need the block info for offline execution, right? the chain info requires knowledge of the network (in principle - in practice I think since the fee token addresses are the same it isn't really required, but good to have this for forward compatibility). no?

I don't think it's necessary to add it right to the file—this seems like something we might never really use, and if we need it, the user can add the network via CLI. Adding the network to the file means we plan to make tests that rely on it, but at the moment, there's nothing to suggest such tests will ever be needed. For all the current networks, the behaviour is the same.

@aner-starkware
Copy link
Contributor

crates/blockifier_reexecution/src/main.rs line 137 at r1 (raw file):

Previously, aner-starkware wrote…

I don't think it's necessary to add it right to the file—this seems like something we might never really use, and if we need it, the user can add the network via CLI. Adding the network to the file means we plan to make tests that rely on it, but at the moment, there's nothing to suggest such tests will ever be needed. For all the current networks, the behaviour is the same.

*right now

Copy link
Contributor

@aner-starkware aner-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: 0 of 221 files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware and @dorimedini-starkware)

Copy link
Contributor

@aner-starkware aner-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 221 files at r2, 219 of 219 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware and @dorimedini-starkware)

@dorimedini-starkware dorimedini-starkware force-pushed the 11-12-refactor_blockifier_reexecution_add_chain_id_to_serializableofflinereexecutiondata branch from 0c076ba to c40fd02 Compare November 18, 2024 14:39
Copy link
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a 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 @aner-starkware and @AvivYossef-starkware)


crates/blockifier_reexecution/src/main.rs line 137 at r1 (raw file):

Previously, aner-starkware wrote…

*right now

resolved offline

Copy link

Artifacts upload triggered. View details here

@dorimedini-starkware dorimedini-starkware force-pushed the 11-12-refactor_blockifier_reexecution_add_chain_id_to_serializableofflinereexecutiondata branch from c40fd02 to db6726d Compare November 18, 2024 19:15
Copy link
Contributor

@aner-starkware aner-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 115 of 221 files reviewed, all discussions resolved (waiting on @AvivYossef-starkware)

Copy link
Contributor

@aner-starkware aner-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 106 of 106 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AvivYossef-starkware)

@dorimedini-starkware dorimedini-starkware force-pushed the 11-12-refactor_blockifier_reexecution_add_chain_id_to_serializableofflinereexecutiondata branch from db6726d to 60702e2 Compare November 19, 2024 14:52
@dorimedini-starkware dorimedini-starkware changed the base branch from graphite-base/1972 to main November 19, 2024 14:52
@dorimedini-starkware dorimedini-starkware force-pushed the 11-12-refactor_blockifier_reexecution_add_chain_id_to_serializableofflinereexecutiondata branch from 60702e2 to ac4acfa Compare November 19, 2024 14:52
Copy link
Collaborator Author

dorimedini-starkware commented Nov 19, 2024

Merge activity

  • Nov 19, 10:11 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Nov 19, 10:12 AM EST: A user merged this pull request with Graphite.

@dorimedini-starkware dorimedini-starkware merged commit 0506033 into main Nov 19, 2024
10 of 20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants