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

Switch usage from EmitEvent to EmitTypedEvent #968

Closed
4 tasks
rahulghangas opened this issue Nov 7, 2022 · 5 comments · Fixed by #1030
Closed
4 tasks

Switch usage from EmitEvent to EmitTypedEvent #968

rahulghangas opened this issue Nov 7, 2022 · 5 comments · Fixed by #1030
Assignees
Labels
enhancement New feature or request

Comments

@rahulghangas
Copy link
Contributor

Summary

Change EmitEvent in favour of EmitTypedEvent

Problem Definition

EmitEvent has been deprecated

Proposal

We should switch to EmitTypedEvent and define relavnt type(s) in protobuf. Changes need to be done both in payment and qgb module, primarily x/payment/keeper/keeper.go and x/qgb/keeper/keeper_attestation.go

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@rahulghangas rahulghangas added the enhancement New feature or request label Nov 7, 2022
@evan-forbes
Copy link
Member

this will be a nice improvement. After #954, the only instance should be the payment module as listed above.

@vidhanarya
Copy link
Contributor

vidhanarya commented Nov 9, 2022

I can pick this up, have a few doubts though (taking the example of SetAttestationRequest):

  • Is any downstream service consuming from this event AttestationRequest (Idea is to change event name to EventAttestationRequest)
  • For reference can someone point me to a relevant doc/ADR for this flow (data store)

Thinking of implementing message and event as below

message AttestationRequest {
  string module = 1;
  string nonce = 2;
}
ctx.EventManager().EmitTypedEvent(&qgb.AttestationRequest{
	Module: types.ModuleName,
	Nonce:  fmt.Sprint(at.GetNonce()),
})

Open to suggestion if you have something else in mind @rahulghangas @evan-forbes

@rahulghangas
Copy link
Contributor Author

@vidhanarya

Is any downstream service consuming from this event AttestationRequest (Idea is to change event name to EventAttestationRequest)

Yes, events are consumed by other services

Also, I don't think there's a need to change the qgb event, since we're doing some major refactoring to the qgb module (see Evan's comment above)

@vidhanarya
Copy link
Contributor

So as a part of this issue, we only want to change payment module i.e. payfordata event?

@rahulghangas
Copy link
Contributor Author

yessir

@rahulghangas rahulghangas self-assigned this Nov 17, 2022
rahulghangas added a commit that referenced this issue Dec 15, 2022
- [x] switch to typed event for `blob` module'
- [ ] ~~Refactor integration test~~
- [x] Closes #968
rootulp pushed a commit to rootulp/celestia-app that referenced this issue Dec 19, 2022
- [x] switch to typed event for `blob` module'
- [ ] ~~Refactor integration test~~
- [x] Closes celestiaorg#968
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants