koinos / koinos/koinos-sdk-cpp
[FEATURE]: make the max_buffer_size constant a variable accessible by the contract developers
- Dominant language
- C++
- Stars
- 4
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### New feature
As a contract developer I would like to be able to set the size of the buffer used by the system calls, this would allow me to retrieve data that's larger than the default value, 1024 bytes.
For example, pulling the bytecode into the contract requires to have a buffer that's at least as large as the bytecode + some bytes.
### Anything else?
[Link to the current max buffer constant implementation](https://github.com/koinos/koinos-sdk-cpp/blob/master/libraries/koinos_api_cpp/include/koinos/system/system_calls.hpp#L17)
Contributor guide
Research direction
Start with libraries/koinos_api_cpp/include/koinos/system/system_calls.hpp at the linked max_buffer_size constant and trace how system calls use it. Define how contract developers can set the buffer beyond the 1024-byte default, then verify that larger data such as contract bytecode can be retrieved without truncation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100