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: add the gateway compiler to appstate #391

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

ArniStarkware
Copy link
Contributor

@ArniStarkware ArniStarkware commented Jul 8, 2024

This change is Reviewable

Copy link
Contributor Author

ArniStarkware commented Jul 8, 2024

@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.21%. Comparing base (ffb8b05) to head (33dbd4d).

Files Patch % Lines
crates/gateway/src/config.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
+ Coverage   83.18%   83.21%   +0.03%     
==========================================
  Files          37       37              
  Lines        1748     1752       +4     
  Branches     1748     1752       +4     
==========================================
+ Hits         1454     1458       +4     
  Misses        215      215              
  Partials       79       79              

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

Copy link
Contributor

@yair-starkware yair-starkware 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 r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dafnamatsry and @Yael-Starkware)

@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/gateway_compilar_struct branch from 9622e9a to 0f5d3d2 Compare July 8, 2024 10:27
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch 2 times, most recently from 132a963 to 4590db3 Compare July 8, 2024 10:31
Copy link
Contributor

@yair-starkware yair-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 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dafnamatsry and @Yael-Starkware)

@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/gateway_compilar_struct branch from 0f5d3d2 to cebb807 Compare July 9, 2024 08:17
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch from 4590db3 to e5c5da7 Compare July 9, 2024 08:17
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/gateway_compilar_struct branch from cebb807 to e2a1f5e Compare July 9, 2024 10:48
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch from e5c5da7 to f44908d Compare July 9, 2024 10:48
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/gateway_compilar_struct branch from e2a1f5e to 152b7ca Compare July 10, 2024 08:39
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch from f44908d to 6e110c6 Compare July 10, 2024 08:39
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/gateway_compilar_struct branch from 152b7ca to fdf9ddd Compare July 10, 2024 10:00
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch from 6e110c6 to 2474874 Compare July 10, 2024 10:00
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/gateway_compilar_struct branch 2 times, most recently from 4cbcaea to acc2304 Compare July 11, 2024 04:08
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch 2 times, most recently from f14e790 to d4ee11d Compare July 11, 2024 04:11
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/gateway_compilar_struct branch from acc2304 to bfbbcc2 Compare July 11, 2024 07:45
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch from d4ee11d to 9152413 Compare July 11, 2024 07:45
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 4 files at r3, 3 of 3 files at r4, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ArniStarkware and @Yael-Starkware)


crates/gateway/src/gateway.rs line 57 at r4 (raw file):

            }),
            state_reader_factory,
            gateway_compiler: GatewayCompiler { config: config.compiler_config.clone() },

Please accept the compiler as an argument to new.
(as discussed before, we also want to do this for the stateless/stateful validators).

Code quote:

gateway_compiler: GatewayCompiler { config: config.compiler_config.clone() },

crates/gateway/src/gateway_test.rs line 117 at r4 (raw file):

    let optional_class_info = match &external_tx {
        RPCTransaction::Declare(declare_tx) => Some(
            GatewayCompiler { config: GatewayCompilerConfig {} }

Use the AppState's compiler.

Code quote:

GatewayCompiler { config: GatewayCompilerConfig {} }

@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/gateway_compilar_struct branch from bfbbcc2 to f454e22 Compare July 11, 2024 08:26
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch 2 times, most recently from 6265f87 to e470743 Compare July 11, 2024 08:43
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: 2 of 5 files reviewed, 2 unresolved discussions (waiting on @dafnamatsry and @Yael-Starkware)


crates/gateway/src/gateway.rs line 57 at r4 (raw file):

Previously, dafnamatsry wrote…

Please accept the compiler as an argument to new.
(as discussed before, we also want to do this for the stateless/stateful validators).

Done.


crates/gateway/src/gateway_test.rs line 117 at r4 (raw file):

Previously, dafnamatsry wrote…

Use the AppState's compiler.

Done.

@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/gateway_compilar_struct branch from f454e22 to 48314a4 Compare July 11, 2024 11:13
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch from e470743 to 87825c1 Compare July 11, 2024 11:13
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 4 of 4 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Yael-Starkware)

@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/gateway_compilar_struct branch from 48314a4 to 542d4c3 Compare July 14, 2024 07:59
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch from 87825c1 to e59df3a Compare July 14, 2024 07:59
Copy link
Contributor Author

ArniStarkware commented Jul 14, 2024

Merge activity

@ArniStarkware ArniStarkware changed the base branch from arni/declare/compilation/gateway_compilar_struct to main July 14, 2024 11:12
@ArniStarkware ArniStarkware force-pushed the arni/declare/compilation/add_to_app_state branch from e59df3a to 33dbd4d Compare July 14, 2024 11:13
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.

Reviewed 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Yael-Starkware)

@ArniStarkware ArniStarkware merged commit 47925f1 into main Jul 14, 2024
8 checks passed
@ArniStarkware ArniStarkware deleted the arni/declare/compilation/add_to_app_state branch August 21, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants