-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add cryptarchia consensus service #612
Conversation
8e4c68a
to
3c18ac4
Compare
fn try_apply_header(&self, header: &Header) -> Result<Self, Error> { | ||
let header = header.cryptarchia(); |
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.
Why not simply take cryptarchia::Header
here and force the caller to prove an instance of cryptarchia::Header
?
This seems falsely general (i.e. type sig claims to work for any header)
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.
fair enough
let ledger = self.ledger.try_update( | ||
id, | ||
parent, | ||
header.slot(), |
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.
header.slot()
is stored in the slot
variable above.
Is header moved in this call to try_update()
? If not, you could inline all the variables (id()|parent()|slot())
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. I'll open a PR for the mixnet network adapter for the cryptarchia consensus service.
3421375
to
89e9b09
Compare
89e9b09
to
a4c3f80
Compare
First PR for adding cryptarchia support in nomos node.
Leadership and tests will come in following iterations