Module Evm_node_lib_dev.Sequencer_blueprint

type Tezos_base.TzPervasives.error +=
  1. | Not_a_blueprint
  2. | Bad_chunk_index of {
    1. expected : int;
    2. actual : int;
    }
  3. | Bad_nb_chunks of {
    1. expected : int;
    2. actual : int;
    3. chunk_index : int;
    }
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 chunked_blueprint
val nb_chunks : chunked_blueprint -> int

nb_chunks blueprint computes in constant time the number of chunks of blueprint.

type unsigned_chunked_blueprint = private unsigned_chunk list
val unsafe_drop_signatures : chunked_blueprint -> unsigned_chunked_blueprint

unsafe_drop_signatures chunks gives back the content of chunks without checking if their signatures are valid. See check_signatures if you want to get the unsigned content iff the signature is correct.

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

chunks_of_external_messages payload attempts to decode payload as a chunked blueprint.

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

val create_inbox_payload : smart_rollup_address:string -> chunks:chunked_blueprint -> 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 : chunked_blueprint -> 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.