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

sovereign extra header verifier in runtype components #6140

Conversation

axenteoctavian
Copy link

Reasoning behind the pull request

  • Sovereign extra header verifier in runtype components

Proposed changes

Testing procedure

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@axenteoctavian axenteoctavian marked this pull request as ready for review April 24, 2024 15:44
…factor-sov-runtype-comp-16

# Conflicts:
#	factory/runType/sovereignRunTypeComponents.go
#	testscommon/components/components.go
…factor-sov-runtype-comp-16

# Conflicts:
#	testscommon/components/components.go
@mariusmihaic mariusmihaic self-requested a review April 26, 2024 10:35
@@ -202,7 +196,11 @@ func (rcf *sovereignRunTypeComponentsFactory) Create() (*runTypeComponents, erro

expiryTime := time.Second * time.Duration(rcf.sovConfig.OutgoingSubscribedEvents.TimeToWaitForUnconfirmedOutGoingOperationInSeconds)

err = rtc.extraHeaderSigVerifierHandler.RegisterExtraHeaderSigVerifier(rcf.extraVerifier)
sovHeaderSigVerifier, err := headerCheck.NewSovereignHeaderSigVerifier(rcf.cryptoComponents.BlockSigner())
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this also removed from normal run type ?

Copy link
Author

Choose a reason for hiding this comment

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

Normal RunType doesn't use an extra header sig verifier, it's just:
extraHeaderSigVerifierHandler: headerCheck.NewExtraHeaderSigVerifierHolder(),

Copy link
Contributor

Choose a reason for hiding this comment

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

The name of the variable was wrong and confused me;
extraHeaderSigVerifierHandler -> this is a holder, not a handler, please rename it

@@ -202,7 +196,11 @@ func (rcf *sovereignRunTypeComponentsFactory) Create() (*runTypeComponents, erro

expiryTime := time.Second * time.Duration(rcf.sovConfig.OutgoingSubscribedEvents.TimeToWaitForUnconfirmedOutGoingOperationInSeconds)

err = rtc.extraHeaderSigVerifierHandler.RegisterExtraHeaderSigVerifier(rcf.extraVerifier)
sovHeaderSigVerifier, err := headerCheck.NewSovereignHeaderSigVerifier(rcf.cryptoComponents.BlockSigner())
Copy link
Contributor

Choose a reason for hiding this comment

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

The name of the variable was wrong and confused me;
extraHeaderSigVerifierHandler -> this is a holder, not a handler, please rename it

@@ -544,16 +544,16 @@ func (mrc *managedRunTypeComponents) TxPreProcessorCreator() preprocess.TxPrePro
return mrc.runTypeComponents.txPreProcessorCreator
}

// ExtraHeaderSigVerifierHandler returns the extra header sig verifier handler
func (mrc *managedRunTypeComponents) ExtraHeaderSigVerifierHandler() headerCheck.ExtraHeaderSigVerifierHolder {
// ExtraHeaderSigVerifierHolder returns the extra header sig verifier handler
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// ExtraHeaderSigVerifierHolder returns the extra header sig verifier handler
// ExtraHeaderSigVerifierHolder returns the extra header sig verifier holder

Base automatically changed from MX-15315-refactor-sov-runtype-comp-14 to feat/refactor-runtype-components May 13, 2024 08:09
@raduchis raduchis self-requested a review May 13, 2024 12:06
@axenteoctavian axenteoctavian merged commit 3552ab2 into feat/refactor-runtype-components May 13, 2024
4 checks passed
@axenteoctavian axenteoctavian deleted the MX-15315-refactor-sov-runtype-comp-16 branch May 13, 2024 12:20
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.

None yet

3 participants