Module Evm_node_lib_dev.Sequencer_blueprint

type unsigned_chunk = private {
  1. value : bytes;
  2. number : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
  3. nb_chunks : int;
  4. chunk_index : int;
}
type t
val unsafe_drop_signature : t -> unsigned_chunk

unsafe_drop_signature chunk gives back the content of chunk without checking if its signature is valid. See check_signature if you want to get the unsigned content iff the signature is correct.

check_signature pubkey chunk will return the (unsigned) chunk content in the case that it was indeed signed for pubkey. Otherwise it returns an error. See unsafe_drop_signature if you want to skip the signature verification and just get the unsigned content.

chunk_to_rlp chunk encodes a chunk into its RLP format.

val chunk_of_external_message : [ `External of string ] -> t Tezos_base.TzPervasives.tzresult

chunk_of_external_message msg attempts to decode msg as a blueprint chunk.

val sign : signer:Signer.t -> chunks:unsigned_chunk list -> t list Tezos_base.TzPervasives.tzresult Lwt.t

sign ~signer ~chunks serializes and signs a list of chunks.

val create_inbox_payload : smart_rollup_address:string -> chunks:t list -> Blueprint_types.payload

create_inbox_payload ~smart_rollup_address ~chunks encodes the chunks into message(s) that can be read from the inbox by the kernel.

val create_dal_payloads : t list -> string list

create_dal_payloads chunks encodes the chunks into messages that can be read from DAL slots by the kernel. The chunks are prefixed by a tag.

val maximum_usable_space_in_blueprint : int -> int

maximum_usable_size_in_blueprint chunks_count returns the available space for transactions in a blueprint composed of chunks_count chunks.

val maximum_chunks_per_l1_level : int
type kernel_blueprint = {
  1. parent_hash : Evm_node_lib_dev_encoding.Ethereum_types.block_hash;
  2. delayed_transactions : Evm_node_lib_dev_encoding.Ethereum_types.hash list;
  3. transactions : string list;
  4. timestamp : Tezos_base.TzPervasives.Time.Protocol.t;
}

make_blueprint_chunks ~number kernel_blueprint serializes the kernel_blueprint whose number is number and splits the result into chunks small enough to fit in inbox messages.

kernel_blueprint_parent_hash_of_payload sequencer bytes partially decodes fields of a kernel_blueprint and return the kernel_blueprint.parent_hash. Verify the signature of each chunk against public key sequencer.

type Tezos_base.TzPervasives.error +=
  1. | Not_a_blueprint