Skip to main content

generate

Function generate 

Source
pub fn generate() -> Result<(GenesisEntry, Attestation, Signature), Error>
Expand description

Generate the same tuple as the Elixir generate/0 would: {entry_signed, attestation, pop}. NOTE: at the moment, some required building blocks are not implemented in Rust:

  • Entry.sign/1 and pack/unpack equivalents are not present in consensus::entry
  • BIC.Base.call_exit/1 is not implemented (see bic::base::call_exit_todo)
  • Trainer keys source is unspecified (Elixir uses Application.fetch_env!)

Because deterministic ETF encoding order affects signatures/hashes, we keep the static values above. This function returns an explicit Unimplemented error with targeted questions for the integrator.