Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion mina-p2p-messages/src/v2/manual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ impl EpochSeed {

impl CoinbaseStackData {
pub fn zero() -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

@tizoc That method should probably be renamed to empty ? To make it clear that it's value is not zero

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(and same for the callers which are currently named zero too)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

MinaBasePendingCoinbaseCoinbaseStackStableV1(BigInt::zero()).into()
// In OCaml: https://github.com/MinaProtocol/mina/blob/68b49fdaafabed0f2cd400c4c69f91e81db681e7/src/lib/mina_base/pending_coinbase.ml#L186
// let empty = Random_oracle.salt "CoinbaseStack" |> Random_oracle.digest
let empty = super::hash_noinputs("CoinbaseStack");
MinaBasePendingCoinbaseCoinbaseStackStableV1(empty.into()).into()
}
}

Expand Down