Skip to content

refactor(verification): create vertex verifiers [part 1/5] #796

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

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Sep 29, 2023

Depends on #794

Motivation

This is the first PR in a 5-part series of PRs that completely move verification-related code out of the vertex model classes. This series is a continuation of the already merged #779.

In this PR, the module scaffolding introduced in the previous PR is changed to a classes structure that mimics the existing model classes structure. This allows easier incremental migration of code, as the inheritance tree is kept the same. In the future, if we untangle the inherited calls in verification methods, we may convert this back to modules, which would be the ideal solution in my opinion.

Acceptance Criteria

  • Move block_verification, transaction_verification, and token_creation_tx_verification modules to each respective new Verifier class. No logic should be changed, only moving module functions to class methods.
  • Also create a VertexVerifier superclass and a Verifier class for MergeMinedBlock, completing verifiers for all 4 vertex types, and setting up the same inheritance tree as the vertex class themselves.
  • Update VerificationService to receive the new VertexVerifiers named tuple, for injecting verifiers (this will be useful for the simulator). Also, update methods to use each respective verifier.
  • Update Builder and CliBuilder accordingly.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Sep 29, 2023
@glevco glevco changed the title refactor(verification): create vertex verifiers refactor(verification): create vertex verifiers [part 1] Sep 29, 2023
@glevco glevco changed the title refactor(verification): create vertex verifiers [part 1] refactor(verification): create vertex verifiers [part 1/5] Sep 29, 2023
@glevco glevco marked this pull request as ready for review September 29, 2023 20:46
@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

❗ No coverage uploaded for pull request base (refactor/genesis@88ef27f). Click here to learn what that means.

❗ Current head 8f2d608 differs from pull request most recent head 1cb8d78. Consider uploading reports for the commit 1cb8d78 to get more accurate results

Additional details and impacted files
@@                 Coverage Diff                 @@
##             refactor/genesis     #796   +/-   ##
===================================================
  Coverage                    ?   84.64%           
===================================================
  Files                       ?      266           
  Lines                       ?    22071           
  Branches                    ?     3369           
===================================================
  Hits                        ?    18683           
  Misses                      ?     2730           
  Partials                    ?      658           

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

jansegre
jansegre previously approved these changes Oct 3, 2023
@glevco glevco force-pushed the refactor/move-verification/create-verifiers branch from 8f2d608 to 462f90f Compare October 9, 2023 19:26
@glevco glevco force-pushed the refactor/move-verification/create-verifiers branch from 462f90f to f35ffce Compare October 9, 2023 23:57
msbrogli
msbrogli previously approved these changes Oct 10, 2023
@glevco glevco force-pushed the refactor/move-verification/create-verifiers branch from d43178a to 1cb8d78 Compare October 10, 2023 18:57
Base automatically changed from refactor/genesis to master October 10, 2023 20:31
@msbrogli msbrogli dismissed stale reviews from jansegre and themself October 10, 2023 20:31

The base branch was changed.

@msbrogli msbrogli merged commit 1cb8d78 into master Oct 10, 2023
@msbrogli msbrogli deleted the refactor/move-verification/create-verifiers branch October 10, 2023 20:33
This was referenced Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants