Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[?] Add support for new /local preflight query parameters #149

Open
Randynamic opened this issue Jan 25, 2023 · 2 comments
Open

[?] Add support for new /local preflight query parameters #149

Randynamic opened this issue Jan 25, 2023 · 2 comments
Labels
discussion Needs (architectual) discussion to make a decision no-issue-activity

Comments

@Randynamic
Copy link
Contributor

kadena-io/chainweb-node#1585

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.

@Randynamic Randynamic changed the title Add support for new local preflight options Add support for new /local preflight query parameters Jan 25, 2023
@alber70g alber70g changed the title Add support for new /local preflight query parameters [client] Add support for new /local preflight query parameters Jan 27, 2023
@alber70g alber70g changed the title [client] Add support for new /local preflight query parameters [@kadena/client] Add support for new /local preflight query parameters Jan 27, 2023
@alber70g alber70g changed the title [@kadena/client] Add support for new /local preflight query parameters [?] Add support for new /local preflight query parameters Jan 27, 2023
@alber70g alber70g added the discussion Needs (architectual) discussion to make a decision label Feb 21, 2023
@alber70g
Copy link
Member

Duplicate of #103 ?

@github-actions
Copy link
Contributor

This issue is stale because it is open for 60 days with no activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Needs (architectual) discussion to make a decision no-issue-activity
Projects
None yet
Development

No branches or pull requests

2 participants