-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
PoA Block Signing #718
PoA Block Signing #718
Conversation
Zeroize support in fuel-crypto has been merged. A non-breaking release of fuel-crypto should be doable, so it requires no changes here. |
* Create a BlockId type for safe conversion to Message * fmt * Clippy * Remove direct dep to fuel-crypto, as it's re-exported by fuel-vm * Allow Into impl for clippy * Fix lint name
Also, maybe we can clean up "TODO: Do not use." and related code=) |
Will defer devops configuration of the secret key to a follow-up PR pending some investigation. |
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.
Mostly looks good, just a few suggestions
} | ||
|
||
impl Database { | ||
pub fn get_sealed_block( |
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.
Should we check for mismatches here? Like the header having a different consensus type then the FuelBlockConsensus
?
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.
we could, although there's not really much the application can do if it gets into that state 🤔
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 think we should defer this checking until we have more than one kind of consensus variant, as rust won't let me even write the error case right 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.
Looks good
* add block signing and db models for sealed blocks * add integ tests for checking sealed blocks * mock setting the block height after production * Create a BlockId type for safe conversion to Message (#719) * Create a BlockId type for safe conversion to Message * fmt * Clippy * Remove direct dep to fuel-crypto, as it's re-exported by fuel-vm * Allow Into impl for clippy * Fix lint name * replace [u8;32] with secret key & secret key wrapper * clippy * use derive_more for newtype traits * remove unneeded duplicate insert check * add as_message to block id & block_producer getter to consensus data * use real consensus data in the Interpreter::coinbase method * add error context * wean off of deref() Co-authored-by: Hannes Karppila <hannes.karppila@gmail.com>
Initial implementation of PoA block signing & persistence of fuel consensus data.
Todo:
In the future, we should use the keystore traits provided by fuel-crypto to allow for a pluggable signing backend.
closes: #668
closes: #673