In Chainweb 2.17, we removed error reporting from /send. However, we didn't have "best simulations" for users to try their code out in as close to real world context as possible. /local used to fill this gap, but it was not robust enough. This PR enhances the /local endpoint to allow the user toggle on or off "preflight" (as close as we can get to mainnet) simulations, as well as the ability for the user to specify rewinds and simulation at a particular block height, and the ability to bypass user signature verification.
The usage is thus:
The behavior of the bare /local endpoint has not changed, allowing people to keep their work flows.
The /local?preflight=<bool> query flag allows people to run their commands against the full mainnet workflow. If false or left unspecified, reverts to the legacy behavior (running a tx through the interpreter to get outputs)
The /local?rewindDepth=<word (non-negative integer)> parameter allows people to rewind to a particular block height rewindDepth-many block heights in the past and run their commands (think: regressing against forks). If left unspecified, defaults to running at the most current block height on that chain.
The /local?signatureVerification=<bool> query flag allows people to run their commands with or without user signature verification (useful in the case of detached signature signing). If unspecified, defaults to verifying the tx.
An example full query would be /local?preflight=true&rewindDepth=100&signatureVerification=true to run a full command workflow at a blockheight 100 heights in the past, with full signature verification.
KadenaJs needs to support these new query parameters for the local call.
https://github.com/kadena-io/chainweb-node/pull/1585
KadenaJs needs to support these new query parameters for the local call.