#include <data_copy.hpp>
|
| uint64_t | min (uint64_t a, uint64_t b) |
| |
Definition at line 15 of file data_copy.hpp.
◆ DataCopy()
◆ cd_copy()
Writes calldata into dst_addr. There is slight difference in how enqueued and nested contexts are handled, this is mostly encapsulated in context.get_calldata()
Notes on DataCopy: The simulation for DataCopy has a lot of subtle complexity due to the requirements of the circuit constraints. The main complexity comes from the need to have the following 32-bit range checks (1) Computing the data_index_upper_bound via min, which is used to determine the final index in the cd/rd to read up to. (2) In error handling to check that reads and writes are within bounds of the memory. (3) In computing the actual number of elements from calldata/returndata to read (i.e. from [offset, data_index_upper_bound])
- Parameters
-
| copy_size | The size of calldata to copy (u32). |
| offset | The offset in calldata to start copying from (u32). |
| dst_addr | The address in memory to write the calldata to. |
- Exceptions
-
Implements bb::avm2::simulation::DataCopyInterface.
Definition at line 98 of file data_copy.cpp.
◆ min()
| uint64_t bb::avm2::simulation::DataCopy::min |
( |
uint64_t |
a, |
|
|
uint64_t |
b |
|
) |
| |
|
private |
◆ rd_copy()
Copies returndata from the last executed context to the dst_addr.
- Parameters
-
| copy_size | The size of returndata to copy (u32). |
| offset | The offset in returndata to start copying from (u32). |
| dst_addr | The address in memory to write the returndata to. |
- Exceptions
-
Implements bb::avm2::simulation::DataCopyInterface.
Definition at line 154 of file data_copy.cpp.
◆ events
◆ execution_id_manager
◆ gt
The documentation for this class was generated from the following files: