-
Notifications
You must be signed in to change notification settings - Fork 0
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 builder specific information #14
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,8 @@ clap = { version = "4.4", features = ["derive", "env"] } | |
commit = { git = "https://github.com/EspressoSystems/commit.git" } | ||
derive_more = "0.99" | ||
futures = "0.3" | ||
hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.7.1" } | ||
#hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.7.1" } | ||
hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", branch = "main" } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wasn't the plan to wait for new tag in HotShot before switching to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh! I think you are right. I missed the conversation. |
||
serde = { version = "1.0", features = ["derive"] } | ||
sha2 = "0.10" | ||
snafu = { version = "0.7", features = ["backtraces"] } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
use std::{hash::Hash, marker::PhantomData}; | ||
|
||
use commit::{Commitment, Committable}; | ||
use hotshot_types::traits::{node_implementation::NodeType, BlockPayload}; | ||
use hotshot_types::{ | ||
traits::{node_implementation::NodeType, BlockPayload, signature_key::SignatureKey}, | ||
utils::BuilderCommitment | ||
}; | ||
use serde::{Deserialize, Serialize}; | ||
use sha2::{Digest, Sha256}; | ||
|
||
|
@@ -33,11 +36,22 @@ impl<I: NodeType> Committable for HashableBlock<I> { | |
} | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, PartialOrd, Ord, Hash)] | ||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, Hash)] | ||
#[serde(bound = "")] | ||
pub struct BlockMetadata<I: NodeType> { | ||
nyospe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
block_hash: BlockHash<I>, | ||
block_size: u64, | ||
offered_fee: u64, | ||
_phantom: PhantomData<I>, | ||
pub block_hash: BuilderCommitment, | ||
pub block_size: u64, | ||
pub offered_fee: u64, | ||
pub signature: <<I as NodeType>::SignatureKey as SignatureKey>::PureAssembledSignatureType, | ||
pub _phantom: PhantomData<I>, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Always put PhantomData last... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it actually needed here and in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We didn't need it when we had |
||
pub sender: <I as NodeType>::SignatureKey, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, Hash)] | ||
#[serde(bound = "")] | ||
pub struct Blockdata<I: NodeType> { | ||
nyospe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
pub block_payload: <I as NodeType>::BlockPayload, | ||
pub signature: <<I as NodeType>::SignatureKey as SignatureKey>::PureAssembledSignatureType, | ||
pub _phantom: PhantomData<I>, | ||
nyospe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
pub sender: <I as NodeType>::SignatureKey, | ||
} |
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.
👍 , but we'll want to pin again once there's an appropriate tage on HotShot.