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

feat(consensus): add declare transaction for cende #2921

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

Yael-Starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [34.699 ms 35.161 ms 35.710 ms]
change: [+1.2372% +2.6553% +4.3054%] (p = 0.00 < 0.05)
Performance has regressed.
Found 14 outliers among 100 measurements (14.00%)
4 (4.00%) high mild
10 (10.00%) high severe

@Yael-Starkware Yael-Starkware force-pushed the yael/central_deploy_account_transaction branch from 46a6855 to ccefd67 Compare December 25, 2024 15:03
@Yael-Starkware Yael-Starkware force-pushed the yael/central_declare_transaction branch from 331d658 to c9b7025 Compare December 26, 2024 10:04
@Yael-Starkware Yael-Starkware force-pushed the yael/central_deploy_account_transaction branch from ccefd67 to 933c9cc Compare December 26, 2024 13:58
@Yael-Starkware Yael-Starkware force-pushed the yael/central_declare_transaction branch from c9b7025 to 35ec17e Compare December 26, 2024 13:59
@Yael-Starkware Yael-Starkware force-pushed the yael/central_deploy_account_transaction branch from 933c9cc to 67bf93b Compare December 26, 2024 14:04
@Yael-Starkware Yael-Starkware force-pushed the yael/central_declare_transaction branch from 35ec17e to 6db2fc2 Compare December 26, 2024 14:12
Copy link

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [34.662 ms 35.163 ms 35.757 ms]
change: [+1.5239% +2.9734% +4.8646%] (p = 0.00 < 0.05)
Performance has regressed.
Found 9 outliers among 100 measurements (9.00%)
1 (1.00%) high mild
8 (8.00%) high severe

@Yael-Starkware Yael-Starkware force-pushed the yael/central_deploy_account_transaction branch 2 times, most recently from 5ee2f56 to 66c8e37 Compare December 29, 2024 12:07
@Yael-Starkware Yael-Starkware force-pushed the yael/central_declare_transaction branch 2 times, most recently from a8c33c3 to cabd90b Compare December 30, 2024 11:35
@Yael-Starkware Yael-Starkware changed the base branch from yael/central_deploy_account_transaction to main December 30, 2024 11:35
Copy link
Collaborator

@dafnamatsry dafnamatsry left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r1, 1 of 3 files at r2, all commit messages.
Reviewable status: 2 of 4 files reviewed, 2 unresolved discussions (waiting on @DvirYo-starkware and @Yael-Starkware)


crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs line 120 at r3 (raw file):

}

impl From<CentralSierraVersion> for (String, String, String) {

Where is this being used?


crates/starknet_api/src/executable_transaction.rs line 162 at r3 (raw file):

        (account_deployment_data, AccountDeploymentData),
        (compiled_class_hash, CompiledClassHash),
        (resource_bounds, ValidResourceBounds)

Note that you are adding here getters for all tx versionsm that panics for versions that don't have those field.
I think it is fine but at least worth documenting it.
Or add a similar implement_v3_tx_getters! as done in the inner transaction types.

Code quote:

        (tip, Tip),
        (nonce_data_availability_mode, DataAvailabilityMode),
        (fee_data_availability_mode, DataAvailabilityMode),
        (paymaster_data, PaymasterData),
        (account_deployment_data, AccountDeploymentData),
        (compiled_class_hash, CompiledClassHash),
        (resource_bounds, ValidResourceBounds)

@Yael-Starkware Yael-Starkware force-pushed the yael/central_declare_transaction branch from cabd90b to 8e4ea82 Compare December 30, 2024 13:41
Copy link
Contributor Author

@Yael-Starkware Yael-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 4 files reviewed, 2 unresolved discussions (waiting on @dafnamatsry and @DvirYo-starkware)


crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs line 120 at r3 (raw file):

Previously, dafnamatsry wrote…

Where is this being used?

when serializing this object, it needs to be serialized as a hex string.


crates/starknet_api/src/executable_transaction.rs line 162 at r3 (raw file):

Previously, dafnamatsry wrote…

Note that you are adding here getters for all tx versionsm that panics for versions that don't have those field.
I think it is fine but at least worth documenting it.
Or add a similar implement_v3_tx_getters! as done in the inner transaction types.

Done.

Copy link
Collaborator

@dafnamatsry dafnamatsry 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 4 files reviewed, 2 unresolved discussions (waiting on @DvirYo-starkware and @Yael-Starkware)


crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs line 120 at r3 (raw file):

Previously, Yael-Starkware (YaelD) wrote…

when serializing this object, it needs to be serialized as a hex string.

So why do we need this object (CentralSierraVersion) at all if we convert it to string tuple?
You can define the sierra_version directly as (String, String, String), and implement From<SierraVersion> for (String, String, String)


crates/starknet_api/src/executable_transaction.rs line 172 at r5 (raw file):

        (account_deployment_data, AccountDeploymentData),
        (resource_bounds, ValidResourceBounds)
    );

Suggestion:

    implement_inner_tx_getter_calls!(
        (class_hash, ClassHash),
        (nonce, Nonce),
        (sender_address, ContractAddress),
        (signature, TransactionSignature),
        (version, TransactionVersion),
        
        // compiled_class_hash is only supported in V2 and V3, otherwise the getter panics.
        (compiled_class_hash, CompiledClassHash),
        
        // The following fields are only supported in V3, otherwise the getter panics.
        (tip, Tip),
        (nonce_data_availability_mode, DataAvailabilityMode),
        (fee_data_availability_mode, DataAvailabilityMode),
        (paymaster_data, PaymasterData),
        (account_deployment_data, AccountDeploymentData),
        (resource_bounds, ValidResourceBounds)
    );

@Yael-Starkware Yael-Starkware force-pushed the yael/central_declare_transaction branch from f60e0d3 to 4010674 Compare December 31, 2024 13:56
Copy link
Contributor Author

@Yael-Starkware Yael-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 4 files reviewed, 2 unresolved discussions (waiting on @dafnamatsry and @DvirYo-starkware)


crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs line 120 at r3 (raw file):

Previously, dafnamatsry wrote…

So why do we need this object (CentralSierraVersion) at all if we convert it to string tuple?
You can define the sierra_version directly as (String, String, String), and implement From<SierraVersion> for (String, String, String)

can't impl From in this file due to rust orphan rule.
but I defined my own into_string_tuple function instead.


crates/starknet_api/src/executable_transaction.rs line 172 at r5 (raw file):

        (account_deployment_data, AccountDeploymentData),
        (resource_bounds, ValidResourceBounds)
    );

can't add blank lines here due to auto-formatting

Copy link
Contributor Author

@Yael-Starkware Yael-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 4 files reviewed, 2 unresolved discussions (waiting on @dafnamatsry and @DvirYo-starkware)


crates/sequencing/papyrus_consensus_orchestrator/src/cende/central_objects.rs line 120 at r3 (raw file):

Previously, Yael-Starkware (YaelD) wrote…

can't impl From in this file due to rust orphan rule.
but I defined my own into_string_tuple function instead.

done.

Copy link
Collaborator

@dafnamatsry dafnamatsry left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 3 files at r2, 1 of 2 files at r4, 1 of 2 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @DvirYo-starkware)

Copy link
Collaborator

@dafnamatsry dafnamatsry 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @DvirYo-starkware)

@Yael-Starkware Yael-Starkware added this pull request to the merge queue Jan 1, 2025
Merged via the queue into main with commit cfb6d01 Jan 1, 2025
17 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 3, 2025
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