Skip to content

Conversation

@itamar-starkware
Copy link
Contributor

@itamar-starkware itamar-starkware commented Nov 19, 2025

Make versioned_constants_overrides optional in the StatefulTransactionValidatorConfig.

What changed?

  • Changed the type of versioned_constants_overrides in StatefulTransactionValidatorConfig from VersionedConstantsOverrides to Option<VersionedConstantsOverrides>
  • Updated the default implementation to wrap the default VersionedConstantsOverrides in Some()
  • Modified the dump() method to handle the optional case by using unwrap_or_default()
  • Updated the StatefulTransactionValidatorFactory to pass the overrides directly without wrapping in `Some()

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

itamar-starkware commented Nov 19, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-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:

@Itay-Tsabary-Starkware reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)

@itamar-starkware itamar-starkware force-pushed the 11-18-apollo_batcher_make_versioned_constants_override_optional branch from 8ad7b5a to bc65161 Compare November 24, 2025 06:47
@itamar-starkware itamar-starkware force-pushed the 11-19-apollo_gateway_insert_optional_versioned_constant_overrides_to_gateway branch 2 times, most recently from 23c9984 to e981a1d Compare November 24, 2025 11:34
Copy link
Contributor

@TzahiTaub TzahiTaub left a comment

Choose a reason for hiding this comment

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

@TzahiTaub reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @itamar-starkware)


crates/apollo_gateway_config/src/config.rs line 225 at r2 (raw file):

            max_nonce_for_validation_skip: Nonce(Felt::ONE),
            min_gas_price_percentage: 100,
            versioned_constants_overrides: Some(VersionedConstantsOverrides::default()),

I think that this should either be None (and the default impl should be removed), or the default should return None.

Code quote:

Some(VersionedConstantsOverrides::default()),

Copy link
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

@Yoni-Starkware reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @itamar-starkware and @TzahiTaub)


crates/apollo_gateway_config/src/config.rs line 225 at r2 (raw file):

I think that this should either be None (and the default impl should be removed)

+1

@itamar-starkware itamar-starkware force-pushed the 11-18-apollo_batcher_make_versioned_constants_override_optional branch from 03bd26a to 4f24f7a Compare November 26, 2025 14:01
@itamar-starkware itamar-starkware force-pushed the 11-19-apollo_gateway_insert_optional_versioned_constant_overrides_to_gateway branch from e981a1d to 5ad1ea7 Compare November 26, 2025 14:01
Copy link
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

:lgtm:

@ShahakShama reviewed all commit messages.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @itamar-starkware, @Itay-Tsabary-Starkware, and @TzahiTaub)

Copy link
Contributor

@TzahiTaub TzahiTaub left a comment

Choose a reason for hiding this comment

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

@TzahiTaub reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @itamar-starkware)

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.

7 participants