-
Notifications
You must be signed in to change notification settings - Fork 27
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
Emit deterministic gas event #745
Conversation
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.
Reviewed 7 of 8 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @dzmitryhil and @ysv)
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.
Reviewed 7 of 8 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dzmitryhil and @wojtek-coreum)
x/deterministicgas/types/gas.go
line 152 at r2 (raw file):
} err := oldCtx.EventManager().EmitTypedEvent(&EventGas{
I'm not sure that this is the best place to emit this event.
The idea & name of the func is to report Metric but this code is not related to metric
x/deterministicgas/types/gas.go
line 154 at r2 (raw file):
err := oldCtx.EventManager().EmitTypedEvent(&EventGas{ MsgURL: msgURL, RealGas: realGas,
are we sure we want to expose this info ?
lets discuss with the team
x/deterministicgas/types/gas.go
line 158 at r2 (raw file):
}) if err != nil {
nit: this check is not needed
func WithStack(err error) error {
if err == nil {
return nil
}
return &withStack{
err,
callers(),
}
}
but if u find it more obvious I'm ok
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.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @dzmitryhil and @ysv)
x/deterministicgas/types/gas.go
line 152 at r2 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
I'm not sure that this is the best place to emit this event.
The idea & name of the func is to report Metric but this code is not related to metric
let's rename the function then
x/deterministicgas/types/gas.go
line 154 at r2 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
are we sure we want to expose this info ?
lets discuss with the team
why not?
x/deterministicgas/types/gas.go
line 158 at r2 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
nit: this check is not needed
func WithStack(err error) error { if err == nil { return nil } return &withStack{ err, callers(), } }
but if u find it more obvious I'm ok
I would do it as you propose, but last time someone (Dima?) commented that having this for nil error is counterintuitive
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.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @dzmitryhil and @ysv)
x/deterministicgas/types/gas.go
line 152 at r2 (raw file):
} err := oldCtx.EventManager().EmitTypedEvent(&EventGas{
include index of the message
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.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @dzmitryhil and @ysv)
x/deterministicgas/types/gas.go
line 158 at r2 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
I would do it as you propose, but last time someone (Dima?) commented that having this for nil error is counterintuitive
let's remove it
…nto wojtek/deterministicgas-event
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.
Reviewable status: 7 of 8 files reviewed, 2 unresolved discussions (waiting on @dzmitryhil, @miladz68, and @ysv)
x/deterministicgas/types/gas.go
line 152 at r2 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
include index of the message
I have no access to the index there
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.
Reviewable status: 7 of 8 files reviewed, 2 unresolved discussions (waiting on @miladz68 and @ysv)
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @miladz68)
Description
We ant to track real gas consumption by deterministic messages. We decided to emit an event describing deterministic behaviour.
Reviewers checklist:
Authors checklist
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)