ligo/src/proto/bootstrap/block_repr.mli

41 lines
1.3 KiB
OCaml
Raw Normal View History

2016-09-08 21:13:10 +04:00
(**************************************************************************)
(* *)
(* Copyright (c) 2014 - 2016. *)
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
open Tezos_hash
(** Exported type *)
type header = {
shell: Updater.shell_block_header ;
proto: proto_header ;
signature: Ed25519.signature ;
}
and proto_header = {
mining_slot: mining_slot ;
seed_nonce_hash: Nonce_hash.t ;
proof_of_work_nonce: MBytes.t ;
}
and mining_slot = Raw_level_repr.t * Int32.t
val mining_slot_encoding: mining_slot Data_encoding.encoding
(** The maximum size of block headers in bytes *)
val max_header_length: int
(** Parse the protocol-specific part of a block header. *)
val parse_header: Updater.raw_block_header -> header tzresult
val unsigned_header_encoding:
(Updater.shell_block_header * proto_header) Data_encoding.encoding
val forge_header:
Updater.shell_block_header -> proto_header -> MBytes.t