HotShot icon indicating copy to clipboard operation
HotShot copied to clipboard

[CX_CLEANUP] - Remove `BlockPayload` from `Leaf` and associated types.

Open jparr721 opened this issue 1 year ago • 0 comments

What is this task and why do we need to work on it?

From Jeb (edited to reflect the type name):

The one thing I think we can get rid of is the BlockPayload where we store the full payloads as a DA replica. I believe this is only used in consensus to populate the block_payload: Option<TYPES::BlockPayload> field of the leaf in decide events. We could potentially remove this field and the logic to populate it on Decide, since the application is not capable of retrieving the payload itself.

Essentially, we need to remove this type from HotShot-Types and it's associated implementation logic from HotShot

What work will need to be done to complete this task?

#[derive(Serialize, Deserialize, Clone, Debug, Derivative, Eq)]
#[serde(bound(deserialize = ""))]
pub struct Leaf<TYPES: NodeType> {
    /// CurView from leader when proposing leaf
    pub view_number: TYPES::Time,

    /// Per spec, justification
    pub justify_qc: QuorumCertificate<TYPES>,

    /// The hash of the parent `Leaf`
    /// So we can ask if it extends
    pub parent_commitment: Commitment<Self>,

    /// Block header.
    pub block_header: TYPES::BlockHeader,

-    /// Optional block payload.
-    ///
-    /// It may be empty for nodes not in the DA committee.
-    pub block_payload: Option<TYPES::BlockPayload>,

    /// the proposer id of the leaf
    pub proposer_id: TYPES::SignatureKey,
}

Are there any other details to include?

No response

What are the acceptance criteria to close this issue?

All tests pass.

Branch work will be merged to (if not the default branch)

No response

jparr721 avatar Mar 19 '24 14:03 jparr721