-
Notifications
You must be signed in to change notification settings - Fork 115
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
go/roothash: Refactor runtime messages #3448
Conversation
575b343
to
defd97a
Compare
03a811d
to
7848257
Compare
c8ca0dd
to
a2ef300
Compare
// Make sure somebody actually handled the message, otherwise treat as unsupported. | ||
if err == tmapi.ErrNoSubscribers { | ||
err = roothash.ErrInvalidArgument | ||
} |
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.
Maybe we should have a different/new error for this case to help distinguish it from the actual unsupported message error above?
754ad83
to
7a4b16d
Compare
7a4b16d
to
746c5ff
Compare
05d664b
to
2661a29
Compare
746c5ff
to
4209836
Compare
Codecov Report
@@ Coverage Diff @@
## master #3448 +/- ##
==========================================
+ Coverage 66.44% 66.46% +0.02%
==========================================
Files 373 377 +4
Lines 34029 34270 +241
==========================================
+ Hits 22611 22778 +167
- Misses 8138 8187 +49
- Partials 3280 3305 +25
Continue to review full report at Codecov.
|
75ff7e4
to
6442aa3
Compare
6442aa3
to
64136db
Compare
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.
Some minor comments
|
||
// LastNormalRound is the runtime round which was normally processed by the runtime. This is | ||
// also the round that contains the message results for the last processed runtime messages. | ||
LastNormalRound uint64 `json:"last_normal_round"` |
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.
Maybe LastNonEmpty{Round,Height}
would be more descriptive? Don't have any better suggestion, but i feel "Normal" is not the most descriptive.
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.
The reason why I used "Normal" is that this is the header type (HeaderType
) of "normal" (:grin:) blocks. I agree that it is not the best term.
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.
Ah yeah that makes sense :-) Potentially could use LastNormalBlock{Round,Height}
, but i'm also fine if it stays at it is.
Use recently introduced message passing between apps instead.
64136db
to
443b4f5
Compare
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.
Looks good, thanks for the updates!
Fixes #3430
TODO
MaxMessages
against globalMaxRuntimeMessages
roothash consensus parameter.