You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a smart contract calls STORE(k,v) the maximum length for "value" depends on the length of "key".
The maximum length for "key" appears to be not sanitized and can be 2044 bytes.
If the key length is 2044 bytes, there is only 1 byte space for the value.
If the key length is 1192 byte, there is 1520 byte space for value.
This way it is possible to store approximately 1192+1520 = 2712 byte per key / value pair.
Exceeding the 2044 bytes key limit causes this error continously:
A grant from the Secret Discord Server allowed me to conduct mainnet testing to confirm the simulator results.
The tests performed focus on examining the storage gas limit (20000)
To accomplish the same testing conditions between the simulator and mainnet and to exclude human error, a php script was developed which executes the tests.
The script accepts these paramaters to interact with the SC: [test_number] [wallet ip] [port] [scid] [data_length] [encoding] [key_label]
The php script: call-mainnet-store-test-function.php
the smart contract: mainnet-store-test.bas
and the test protocol: protocol_1156286726650732687_20230927.txt
can be found in the attached file mainnet-store-tests.tar.gz
Dero Simulator Version: 3.5.3-140.DEROHE.STARGATE+13062023
If a smart contract calls STORE(k,v) the maximum length for "value" depends on the length of "key".
The maximum length for "key" appears to be not sanitized and can be 2044 bytes.
If the key length is 2044 bytes, there is only 1 byte space for the value.
If the key length is 1192 byte, there is 1520 byte space for value.
This way it is possible to store approximately 1192+1520 = 2712 byte per key / value pair.
Exceeding the 2044 bytes key limit causes this error continously:
The text was updated successfully, but these errors were encountered: