-
Notifications
You must be signed in to change notification settings - Fork 20
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
runtime/consensus: Add support for querying round roots #1564
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1564 +/- ##
==========================================
- Coverage 60.51% 60.44% -0.07%
==========================================
Files 139 139
Lines 9942 9955 +13
==========================================
+ Hits 6016 6017 +1
- Misses 3884 3896 +12
Partials 42 42 ☔ View full report in Codecov by Sentry. |
a6b0094
to
08e8d4e
Compare
#[repr(u8)] | ||
pub enum RootKind { | ||
#[default] | ||
Invalid = 0, |
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.
Can we remove this?
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.
This follows the same pattern as it is already used by the other internal call in the code (consensus.TakeReceipt
). Not actually sure, but I guessed we have the invalid as the default variant as an additional safeguard, since the cbor encoding can be a bit messy in soldity. Or my other guess would be it has to do with gas costs in evm (to ensure it's the same regardless of the kind).
@kostko please confirm what is the reasoning and if it makes sense to have it here as well.
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.
I'm not sure why this would be useful, we could just drop the invalid variant and start the valid ones with 1 (as it is now).
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.
Ok I removed the Invalid variant here.
4dd442c
to
a5bbbc3
Compare
tests/e2e/.vscode/settings.json
Outdated
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.
Do not commit this, consider adding to gitignore.
} | ||
|
||
/* | ||
// Round Roots not exposed in the go roothash client at the moment :( |
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.
Feel free to add the query.
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.
Will do but don't want to block this PR until the next oasis-core release.
#[repr(u8)] | ||
pub enum RootKind { | ||
#[default] | ||
Invalid = 0, |
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.
I'm not sure why this would be useful, we could just drop the invalid variant and start the valid ones with 1 (as it is now).
f74737f
to
d153ab0
Compare
d153ab0
to
4628dbd
Compare
…trus/feature/round-roots runtime/consensus: Add support for querying round roots aa11ed5
…/ptrus/feature/round-roots runtime/consensus: Add support for querying round roots aa11ed5
No description provided.