-
Notifications
You must be signed in to change notification settings - Fork 7
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
adding verifiers to ProofService #5
Conversation
Hello @gupadhyaya, I have a suggestion how we can improve your approach. The problem here is that extending input arguments is not the generic way that me and @Wondertan were trying to achieve in the library. For example, in celestia-node we don't need statemachine verifier but with these changes we will have to keep nil. |
Agree with @vgonkivs. Also:
Instead, I suggest adding a new method to FraudService. Something like |
@vgonkivs @Wondertan thanks for your suggestion. agree that we should keep the validate interface stateless. will update the FraudService with AddVerifier approach and invoke the verifier as part of processingIncoming. |
@vgonkivs @Wondertan ready for re-review. thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- What if we will allow to register multiple verifiers per proofType? wdyt?
- Please add a mutex for verifiers
(verifiersLK sync.RWMutex
)
|
Co-authored-by: Viacheslav <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Lets wait for @Wondertan review and merge
…s to separate function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now.
Thank you, @gupadhyaya!
@Wondertan @vgonkivs could you merge and make a release? thanks. |
@gupadhyaya, I was in the series of calls, so could not do, but glad that you have permissions now |
Fixes #4. As part of rollkit/rollkit#982, we would like to have a facility to invoke a state machine verifier as part of
Proof.Validate
, such that we can move theproxyApp.VerifyFraudProofSync
toProof.Validate
. If the state machine verifier is not passed (or nil),Proof.Validate
can safely ignore it. An example, usage is: