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

Simplify schema provider definition #8829

Merged
merged 9 commits into from
Nov 11, 2024

Conversation

tbenr
Copy link
Contributor

@tbenr tbenr commented Nov 8, 2024

Removes the need to specify constant or variable schema provider when defining them via builder.
With this PR the non-changing instance across multiple forks is automatically guaranteed via an equality check.

This approach provide a nice benefit: you don't need to care about if the schema is changing or not. If the shema is an "high order" schema that looks up in the registry to pick the schemas for the fields, you don't know if those fields are changing across forks. This way we can be sure that we will always keep the new one whenever the new schema is semantically different from the previous one.

There are some edge cases in which the equality check may not do what we want (maybe?) so I provided a way to disable it.

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

LGTM just few nits

@tbenr tbenr enabled auto-merge (squash) November 11, 2024 12:28
@tbenr tbenr merged commit 19e01e9 into Consensys:master Nov 11, 2024
16 of 17 checks passed
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.

2 participants