pub enum StateRead {
KeyRange,
KeyRangeExtern,
PostKeyRange,
PostKeyRangeExtern,
}
Expand description
Operations related to reading state.
Variants§
KeyRange
0x80
: KRNG
Read a range of values at each key from state starting at the key into memory starting at the given memory address.
The key is lexographically incremented for each value read. All keys are assumed to be the same length.
An [index, len] pair is written into memory for each value, followed by
the values themselves. E.g. when reading values a and b, they will
be laid out in memory from the given mem_addr
as follows:
[a_addr, a_len, b_addr, b_len, a_value, b_value]
§Stack Input
[key_w0, ...key_wN, key_len, num_keys_to_read, mem_addr]
KeyRangeExtern
0x81
: KREX
Read a range of values at each key from external state starting at the key into memory starting at the given memory address.
The key is lexographically incremented for each value read. All keys are assumed to be the same length.
The external state is at the ext
address.
An [index, len] pair is written into memory for each value, followed by
the values themselves. E.g. when reading values a and b, they will
be laid out in memory from the given mem_addr
as follows:
[a_addr, a_len, b_addr, b_len, a_value, b_value]
§Stack Input
[ext_w0, ext_w1, ext_w2, ext_w3, key_w0, ...key_wN, key_len, num_keys_to_read, mem_addr]
PostKeyRange
0x82
: PKRNG
Read a range of values at each key from post state starting at the key into memory starting at the given memory address.
The key is lexographically incremented for each value read. All keys are assumed to be the same length.
An [index, len] pair is written into memory for each value, followed by
the values themselves. E.g. when reading values a and b, they will
be laid out in memory from the given mem_addr
as follows:
[a_addr, a_len, b_addr, b_len, a_value, b_value]
§Stack Input
[key_w0, ...key_wN, key_len, num_keys_to_read, mem_addr]
PostKeyRangeExtern
0x83
: PKREX
Read a range of values at each key from external post state starting at the key into memory starting at the given memory address.
The key is lexographically incremented for each value read. All keys are assumed to be the same length.
The external state is at the ext
address.
An [index, len] pair is written into memory for each value, followed by
the values themselves. E.g. when reading values a and b, they will
be laid out in memory from the given mem_addr
as follows:
[a_addr, a_len, b_addr, b_len, a_value, b_value]
§Stack Input
[ext_w0, ext_w1, ext_w2, ext_w3, key_w0, ...key_wN, key_len, num_keys_to_read, mem_addr]