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

chore: refactor invoke as wrapper #93

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

ArniStarkware
Copy link
Contributor

@ArniStarkware ArniStarkware commented Jul 25, 2024

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

For internal deploy account transaction, the data is inseparable from the implementation.
The data of IntrnalInvokeTransaction and of InvokeTransaction (on the blockifier) is duplicated.

What is the new behavior?

  • Refactor InvokeTransaction as a wrapper of IntrnalInvokeTransaction while keeping the implementation.

Does this introduce a breaking change?

  • Yes
  • No

Other information


This change is Reviewable

Copy link
Contributor Author

ArniStarkware commented Jul 25, 2024

@ArniStarkware ArniStarkware marked this pull request as ready for review July 25, 2024 10:39
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/deploy_account branch from ff1164f to a491474 Compare July 31, 2024 09:43
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from 3f5ec5c to decc9f8 Compare July 31, 2024 09:43
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/deploy_account branch from a491474 to e90a275 Compare July 31, 2024 12:28
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from decc9f8 to 91422c2 Compare July 31, 2024 12:29
Copy link
Contributor

@MohammadNassar1 MohammadNassar1 left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware and @dafnamatsry)


crates/blockifier/src/transaction/transactions.rs line 495 at r3 (raw file):

        let common_fields = CommonAccountFields {
            transaction_hash: self.tx.tx_hash,
            version: self.tx.tx.version(),

and the same for the other fields pls

Suggestion:

self.tx.version()

@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/deploy_account branch from e90a275 to 8d26abe Compare August 1, 2024 06:24
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from 91422c2 to 01f2f9a Compare August 1, 2024 06:25
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/deploy_account branch from 8d26abe to 100b093 Compare August 1, 2024 14:04
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from 01f2f9a to a5eda93 Compare August 1, 2024 14:04
Copy link
Contributor Author

@ArniStarkware ArniStarkware 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, 1 unresolved discussion (waiting on @dafnamatsry and @MohammadNassar1)


crates/blockifier/src/transaction/transactions.rs line 495 at r3 (raw file):

Previously, MohammadNassar1 (mohammad-starkware) wrote…

and the same for the other fields pls

Done.

@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/deploy_account branch from 100b093 to fe6f0a3 Compare August 4, 2024 06:43
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from a5eda93 to 4b65ebe Compare August 4, 2024 06:43
Copy link
Contributor

@MohammadNassar1 MohammadNassar1 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 4 of 4 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dafnamatsry)

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 r1, 4 of 4 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ArniStarkware)

@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/deploy_account branch from fe6f0a3 to dd0da5e Compare August 12, 2024 08:54
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from 4b65ebe to 62b16c3 Compare August 12, 2024 08:54
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/deploy_account branch from dd0da5e to bdc47af Compare August 14, 2024 08:04
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from 62b16c3 to 747086b Compare August 14, 2024 08:04
@ArniStarkware
Copy link
Contributor Author

crates/gateway/src/utils.rs line 149 at r5 (raw file):

        },
        AccountTransaction::DeployAccount(tx) => tx.contract_address(),
        AccountTransaction::Invoke(tx) => match &tx.tx() {

Please review this change from the base commit.

Code quote:

 AccountTransaction::Invoke(tx) => match &tx.tx() {

@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/deploy_account branch from bdc47af to cfb3c39 Compare August 18, 2024 06:48
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from 747086b to 1a1fc1b Compare August 18, 2024 06:48
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/deploy_account branch from cfb3c39 to 78b45af Compare August 20, 2024 07:22
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from 1a1fc1b to a553ba4 Compare August 20, 2024 07:22
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 3 of 4 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ArniStarkware)

@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/deploy_account branch from 78b45af to 0fe0829 Compare August 20, 2024 11:35
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from a553ba4 to f23134e Compare August 20, 2024 11:35
Copy link
Contributor

@MohammadNassar1 MohammadNassar1 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 2 files at r7, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ArniStarkware)

Copy link
Contributor Author

ArniStarkware commented Aug 20, 2024

Merge activity

@ArniStarkware ArniStarkware changed the base branch from arni/refactor/account_tx_wrapper/deploy_account to graphite-base/93 August 20, 2024 12:36
@ArniStarkware ArniStarkware changed the base branch from graphite-base/93 to main August 20, 2024 12:36
@ArniStarkware ArniStarkware force-pushed the arni/refactor/account_tx_wrapper/invoke branch from f23134e to a9d464a Compare August 20, 2024 12:37
@ArniStarkware ArniStarkware merged commit d0ce811 into main Aug 20, 2024
13 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2024
@ArniStarkware ArniStarkware deleted the arni/refactor/account_tx_wrapper/invoke branch September 22, 2024 11:36
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