-
Notifications
You must be signed in to change notification settings - Fork 29
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Benchmark movements: |
46a6855
to
ccefd67
Compare
331d658
to
c9b7025
Compare
ccefd67
to
933c9cc
Compare
c9b7025
to
35ec17e
Compare
933c9cc
to
67bf93b
Compare
35ec17e
to
6db2fc2
Compare
Benchmark movements: |
5ee2f56
to
66c8e37
Compare
a8c33c3
to
cabd90b
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 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)
cabd90b
to
8e4ea82
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: 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 similarimplement_v3_tx_getters!
as done in the inner transaction types.
Done.
8e4ea82
to
f60e0d3
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 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)
);
f60e0d3
to
4010674
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: 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 implementFrom<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
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: 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.
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 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)
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: complete! all files reviewed, all discussions resolved (waiting on @DvirYo-starkware)
No description provided.