ckb-std icon indicating copy to clipboard operation
ckb-std copied to clipboard

Document `SysError::LengthNotEnough` intended usage

Open phroi opened this issue 6 months ago • 9 comments

Following @XuJiandong advice:

The load_cell_data function can load all cell data at once. However, the cell data might be very large, potentially consuming all available memory in certain scenarios. It is recommended to use the following low-level syscall to load only a portion of the cell data

I switched iCKB load_cell_data calls from the highlevel to syscall. At that point all the contracts stopped validating, completely.

After too much digging I understood theSysError::LengthNotEnough lifecycle in correlation to syscalls from load_data implementation. I did not found any other documentation except that private function, not even in the relative RFC.

Please, could you update the syscall documentation with this crucial information about SysError::LengthNotEnough?

Keep up the great work :muscle: Phroi

phroi avatar Aug 12 '24 17:08 phroi