Skip to content

Commit

Permalink
Revert "Add missing commitments to the block struct. (#138)"
Browse files Browse the repository at this point in the history
This reverts commit df6a9b8.
  • Loading branch information
dan-starkware committed Nov 7, 2023
1 parent 063a053 commit a8d0d25
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use crate::transaction::{Transaction, TransactionHash, TransactionOutput};
pub struct Block {
pub header: BlockHeader,
pub body: BlockBody,
pub commitments: BlockBodyCommitments,
}

/// The header of a [Block](`crate::block::Block`).
Expand All @@ -30,8 +29,7 @@ pub struct BlockHeader {
pub state_root: GlobalRoot,
pub sequencer: ContractAddress,
pub timestamp: BlockTimestamp,
pub n_transactions: u64,
pub n_events: u64,
// TODO: add missing commitments.
}

/// The [transactions](`crate::transaction::Transaction`) and their
Expand All @@ -43,13 +41,6 @@ pub struct BlockBody {
pub transaction_hashes: Vec<TransactionHash>,
}

/// The commitments of the elements in a [BlockBody](`crate::block::BlockBody`).
#[derive(Debug, Default, Clone, Eq, PartialEq, Hash, Deserialize, Serialize, PartialOrd, Ord)]
pub struct BlockBodyCommitments {
pub transactions_commitment: StarkHash,
pub events_commitment: StarkHash,
}

/// The status of a [Block](`crate::block::Block`).
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Deserialize, Serialize, PartialOrd, Ord)]
pub enum BlockStatus {
Expand Down

0 comments on commit a8d0d25

Please sign in to comment.