package tezos-protocol-alpha
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Tx_rollup_l2_batch/V1/index.html
Module Tx_rollup_l2_batch.V1Source
type 'status operation_content = | Withdraw of {destination : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t;ticket_hash : Alpha_context.Ticket_hash.t;qty : Tx_rollup_l2_qty.t;
}(*A
*)Withdrawremovesqtyof the tickets represented byticket_hashfrom the operation's signer in layer-2, and permitsdestinationto retrieve those tickets in layer-1 through aTx_rollup_withdrawoperation.| Transfer of {destination : 'status Tx_rollup_l2_address.Indexable.t;ticket_hash : 'status Tx_rollup_l2_context_sig.Ticket_indexable.t;qty : Tx_rollup_l2_qty.t;
}(*A
*)Transfermovesqtyof the tickets represented byticket_hashfrom the operation's signer in layer-2 todestinationin layer-2.
type ('signer, 'content) operation = {signer : 'signer Signer_indexable.t;counter : int64;contents : 'content operation_content list;
}type ('signer, 'content) t = {contents : ('signer, 'content) transaction list;aggregated_signature : signature;
}val compact :
bits:int ->
(Indexable.unknown, Indexable.unknown) t
Tezos_protocol_environment_alpha.Data_encoding.Compact.tcompact ~bits is a specialized, space-efficient encoding for a batch of layer-2 operations, such as the bits first bits of the first byte of the resulting binary array are used to encode small lists of transactions.
val compact_transaction :
(Indexable.unknown, Indexable.unknown) transaction
Tezos_protocol_environment_alpha.Data_encoding.Compact.tA specialized, space-efficient encoding for transaction.
The first byte of the resulting binary array is used to encode the size of lists of less than 254 elements. For larger lists, the tag is 11111111 and the list is prefixed by its size, which consumes eight bytes.
val compact_transaction_signer_index :
(Indexable.index_only, Indexable.unknown) transaction
Tezos_protocol_environment_alpha.Data_encoding.Compact.tA specialized compact_transaction where the signers are indexes only.
val transaction_encoding :
(Indexable.unknown, Indexable.unknown) transaction
Tezos_protocol_environment_alpha.Data_encoding.tThe encoding of reference used to sign a transaction. It is derived from compact_transaction.
val compact_operation :
(Indexable.unknown, Indexable.unknown) operation
Tezos_protocol_environment_alpha.Data_encoding.Compact.tA specialized, space-efficient encoding for operation.
The first byte of the binary output describes precisely the layout of the encoded value.
Considering the tag ooooccss, ss describes the format of signer, cc of counter and oooo of contents.
More precisely, for signer,
00means an index fitting on 1 byte.01means an index fitting on 2 bytes.10means an index fitting on 4 bytes.11means a value of typeBls.Public_key.t.
The counter field follows a similar logic,
00means an index fitting on 1 byte.01means an index fitting on 2 bytes.10means an index fitting on 4 bytes.11means an integer fitting on 8 bytes.
Finally, the contents field follows this pattern
- From
0000to1110, the tag encodes the size of the list ofoperation_content, e.g.,0010means that there is two elements incontents. 1111means thatcontentsis prefixed by its number of elements.
val compact_operation_content :
Indexable.unknown operation_content
Tezos_protocol_environment_alpha.Data_encoding.Compact.tA specialized, space-efficient encoding for operation_content.
The first byte of the binary output describes precisely the layout of the encoded value.
Considering the tag 0qqttddd, ddd describes the format of destination, tt of ticket_hash and qq of qty. More precisely, for destination,
000means a layer-1 address.100means an index for a layer-2 address, fitting on 1 byte.101means an index for a layer-2 address, fitting on 2 bytes.110means an index for a layer-2 address, fitting on 4 bytes.111means a value (of typeTx_rollup_l2_address.t, that is a layer-2 address.
The ticket_hash is encoded using this logic:
00means an index for a ticket hash, fitting on 1 byte.01means an index for a ticket hash, fitting on 2 bytes.10means an index for a ticket hash, fitting on 4 bytes.11means a value (of typeTicket_hash.t.
The qty field follows a similar logic,
00means an integer fitting on 1 byte.01means an integer fitting on 2 bytes.10means an integer fitting on 4 bytes.11means an integer fitting on 8 bytes.
If used to read, respectively write, a value where the the destination is a layer-1 address and the ticket_hash is an index, which is not allowed by the layer-2 protocol, then a
Data_encoding.Binary.Read_error (Exception_raised_in_user_function ...),
respectively
Data_encoding.Binary.Write_error (Exception_raised_in_user_function ...)
exception is raised.