Skip to content
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

Merged
merged 2 commits into from
Feb 13, 2024
Merged

Conversation

move47
Copy link
Contributor

@move47 move47 commented Feb 7, 2024

It adds some extra information to api's response from the builder. Moreover, it also imports BuilderCommitment from Hotshot.

@CLAassistant
Copy link

CLAassistant commented Feb 7, 2024

CLA assistant check
All committers have signed the CLA.

@@ -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" }
Copy link
Contributor

@QuentinI QuentinI Feb 7, 2024

Choose a reason for hiding this comment

The 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 BuilderCommitment?
cc: @nyospe

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! I think you are right. I missed the conversation.

Copy link
Contributor

@nyospe nyospe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, aside from a couple of minor formatting nits.

@@ -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" }
Copy link
Contributor

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.

src/block_metadata.rs Outdated Show resolved Hide resolved
pub block_size: u64,
pub offered_fee: u64,
pub signature: <<I as NodeType>::SignatureKey as SignatureKey>::PureAssembledSignatureType,
pub _phantom: PhantomData<I>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always put PhantomData last...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it actually needed here and in Blockdata anyways? I is already used in other fields

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signature only binds SignatureKey::PureAssembledSignatureType, it cannot guarantee that there is a specific unique I: NodeType for that binding. Same for block_payload. We know it is whatever NodeType constrains BlockPayload to be, but we don't get the I bound to the struct.

We didn't need it when we had block_hash: BlockHash<I>, though...

src/block_metadata.rs Outdated Show resolved Hide resolved
src/block_metadata.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@nyospe nyospe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits, but we can merge first...

But run cargo fmt.

@move47 move47 merged commit cab6219 into main Feb 13, 2024
3 of 5 checks passed
@move47 move47 deleted the builder_specific_information branch February 13, 2024 20:59
@move47
Copy link
Contributor Author

move47 commented Feb 13, 2024

Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants