consensus/babe, core: read BABE authority updates from block consensus digests#595
consensus/babe, core: read BABE authority updates from block consensus digests#595noot merged 15 commits intodevelopmentfrom
Conversation
ryanchristo
left a comment
There was a problem hiding this comment.
Lookin' good. A few questions and comments.
| } | ||
|
|
||
| // TODO: our authority index should be in authData, if it isn't, we aren't authorities | ||
| // need to add our authority data to storage |
There was a problem hiding this comment.
Do we have an issue open to address this?
| } | ||
|
|
||
| func (s *Service) retrieveAuthorityData() ([]*babe.AuthorityData, error) { | ||
| // TODO: when we update to a new runtime, will need to pass in the latest block number |
There was a problem hiding this comment.
Looks like we should link these to an issue and update that runtime.
| } | ||
| } | ||
|
|
||
| // TODO: if this block is the first in the epoch and it doesn't have a consensus digest, this is an error |
There was a problem hiding this comment.
Why not return an error? Not sure I understand the todo item here.
There was a problem hiding this comment.
we don't have a way to check what slot in the epoch we're at from core, I can open an issue for it
edwardmack
left a comment
There was a problem hiding this comment.
Look great, I see some TODOs regarding newer runtime, do you know if there are a lot of differences between runtimes? Are the newer runtimes changing interfaces a lot?
|
@edwardmack it seems like the main change from the runtime we have to the current runtime is the length of the randomness, otherwise, it appears to be the same |
ryanchristo
left a comment
There was a problem hiding this comment.
Looks good to me. Nice work! If you feel inspired and we want to try a new format, maybe adding the issue numbers to todos that are being introduced in this pull request. Not necessary though.
…s digests (#595) * add NextEpochDescriptor which is what's put in the consensus digest at the first block of each epoch * add helper functions for AuthorityData * add Grandpa_authorities runtime call to retrieve authorities initially * add handleConsensusDigest function which is called after a block is imported to see if there is a NextEpochDescriptor
Changes
Tests:
Issues:
closes #575