-
Notifications
You must be signed in to change notification settings - Fork 25
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
chore: split transaction file part one fields dedicated file #1219
chore: split transaction file part one fields dedicated file #1219
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @ArniStarkware and the rest of your teammates on Graphite |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1219 +/- ##
===========================================
- Coverage 74.18% 63.78% -10.41%
===========================================
Files 359 345 -14
Lines 36240 37177 +937
Branches 36240 37177 +937
===========================================
- Hits 26886 23713 -3173
- Misses 7220 11507 +4287
+ Partials 2134 1957 -177
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
The file transaction.rs
is over 1000 lines long and holds more than transactions. As a first step, let us split the fields
into a dedicated file.
Reviewable status: 0 of 4 files reviewed, 4 unresolved discussions
crates/blockifier/src/transaction/objects.rs
line 11 at r1 (raw file):
AccountDeploymentData, AllResourceBounds, Fee,
Remove this file from the PR.
Code quote:
use std::collections::HashMap;
use cairo_vm::types::builtin_name::BuiltinName;
use cairo_vm::vm::runners::cairo_runner::ExecutionResources;
use starknet_api::core::{ContractAddress, Nonce};
use starknet_api::data_availability::DataAvailabilityMode;
use starknet_api::transaction::fields::signed_tx_version;
use starknet_api::transaction::{
AccountDeploymentData,
AllResourceBounds,
Fee,
crates/starknet_api/src/transaction.rs
line 19 at r1 (raw file):
// TODO(Arni): Remove the use of pub use. pub use crate::transaction::fields::{ AccountDeploymentData,
add
Suggestion:
signed_tx_version, signed_tx_version_from_tx, AccountDeploymentData,
crates/starknet_api/src/transaction.rs
line 52 at r1 (raw file):
// TODO(Arni): Remove the use of pub use. pub mod fields; pub use crate::transaction::fields::{TransactionOptions, QUERY_VERSION_BASE_BIT};
Squash into the other pub use.
Code quote:
// TODO(Arni): Remove the use of pub use.
pub mod fields;
pub use crate::transaction::fields::{TransactionOptions, QUERY_VERSION_BASE_BIT};
crates/starknet_api/src/transaction_hash.rs
line 13 at r1 (raw file):
DeclareTransaction, DeclareTransactionV0V1, DeclareTransactionV2,
remove this file from the PR.
Code quote:
use std::sync::LazyLock;
use starknet_types_core::felt::Felt;
use crate::block::BlockNumber;
use crate::core::{ascii_as_felt, calculate_contract_address, ChainId, ContractAddress};
use crate::crypto::utils::HashChain;
use crate::data_availability::DataAvailabilityMode;
use crate::transaction::fields::signed_tx_version_from_tx;
use crate::transaction::{
DeclareTransaction,
DeclareTransactionV0V1,
DeclareTransactionV2,
9df9c1b
to
e7ed4ba
Compare
a4cd793
to
310adde
Compare
e7ed4ba
to
fbcdc88
Compare
02ca477
to
2c21ba4
Compare
fbcdc88
to
303545a
Compare
Benchmark movements: |
2c21ba4
to
b11a15b
Compare
b11a15b
to
3ee6938
Compare
3ee6938
to
2582986
Compare
303545a
to
94bfef7
Compare
0ccf6f3
to
023cf22
Compare
This change is