When a rolling Cartesi machine returns from a manual yield with the new request, it checks the value of the least significant 32 bits of HTIF fromhost CSR to know if it received an advance-state request (value 0) or an inspect-state request (value 1).
The /dev/rollup header rollup.h defines constants for these magic numbers, but these constants do not exist in other APIs that may need them:
Context
When a rolling Cartesi machine returns from a manual yield with the new request, it checks the value of the least significant 32 bits of HTIF
fromhost
CSR to know if it received an advance-state request (value 0) or an inspect-state request (value 1).The
/dev/rollup
headerrollup.h
defines constants for these magic numbers, but these constants do not exist in other APIs that may need them:Perhaps these should be defined instead in the
/dev/yield
driveryield.h
, since it already defines constantsThe Cartesi Machine documentation lists them under the yield driver as:
Possible solutions
The
machine
API (C++, C, Lua) should include these constants.How can we make these constants available in JSONRPC?
Subtasks
rollup.h
toyield.h
/dev/rollup
driver to use new constant names