Evm_node_lib_dev.Sequencer_blueprint
type unsigned_chunk = private {
value : bytes;
number : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
nb_chunks : int;
chunk_index : int;
}
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.
val check_signature :
Tezos_base.TzPervasives.Signature.public_key ->
t ->
unsigned_chunk Tezos_base.TzPervasives.tzresult
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.
val chunk_encoding : t Tezos_base.TzPervasives.Data_encoding.t
val chunk_to_rlp : t -> Evm_node_lib_dev_encoding.Rlp.item
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.
maximum_usable_size_in_blueprint chunks_count
returns the available space for transactions in a blueprint composed of chunks_count
chunks.
type kernel_blueprint = {
parent_hash : Evm_node_lib_dev_encoding.Ethereum_types.block_hash;
delayed_transactions : Evm_node_lib_dev_encoding.Ethereum_types.hash list;
transactions : string list;
timestamp : Tezos_base.TzPervasives.Time.Protocol.t;
}
val make_blueprint_chunks :
number:Evm_node_lib_dev_encoding.Ethereum_types.quantity ->
kernel_blueprint ->
unsigned_chunk list
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.
val kernel_blueprint_parent_hash_of_payload :
Tezos_base.TzPervasives.Signature.public_key ->
Blueprint_types.payload ->
Evm_node_lib_dev_encoding.Ethereum_types.block_hash option
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
.