Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

try-runtime: RPC endpoint / Node Integration #13563

Closed
kianenigma opened this issue Mar 8, 2023 · 4 comments
Closed

try-runtime: RPC endpoint / Node Integration #13563

kianenigma opened this issue Mar 8, 2023 · 4 comments
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known. T1-runtime This PR/Issue is related to the topic “runtime”. Z4-involved Can be fixed by an expert coder with good knowledge of the codebase.

Comments

@kianenigma
Copy link
Contributor

When we do follow-chain, it would be useful to have the basic RPCs implemented and exposed on a specific port, so that you can connect PJS Apps to your fake chain.

An alternative for this is to actually integrate this in the node. #12537 envisioned that you would be able to run a node that is normally syncing, but instead of calling Core_execute_block, it would call into TryRuntime_execute_block. This would give us a fully working client.

@kianenigma kianenigma added the J2-unconfirmed Issue might be valid, but it’s not yet known. label Mar 8, 2023
@kianenigma
Copy link
Contributor Author

not sure yet which is worthwhile, if any.

@kianenigma kianenigma added the Z4-involved Can be fixed by an expert coder with good knowledge of the codebase. label Mar 8, 2023
@kianenigma
Copy link
Contributor Author

atm it has to be either:

  • native
  • wasm-override

@kianenigma
Copy link
Contributor Author

the scenario that he is interested in is:

You run execute-block or fast-forward, and once the block have all executed, you want to inspect the state.

one way to approach this is to make try-runtime cli programmable, so you can define more tests to be written, but this is a holy PITA in Rust.

an easier way, which Alan from Moonbeam is also asking is, to make the try-runtime cli capable of implementing a few important RPCs like state_getStorage and so on, and then we query it with Polkadot JS api/apps.

in principle, I think this is not hard, but I have no idea how hard it is.

So, imagine the try-runtime CLI being able to return a value to a subset of the RPC requests, namely all of the ones that can be answered by having a state.

because end of the day, try-runtime-cli is just a wrapper for remote-externalities, which is a "test state".

the problem though is that the underlying remote-ext can have a partial state etc. So there are a lot of edge cases that we may not be able to handle, and developers might confuse themselves.

For example, you would run:

try-runtime fast-forward 1000 --rpc and this will run 1000 empty blocks for you, and the process is still running, hosting an RPC server.

@liamaharon liamaharon moved this from Backlog to To Do in Runtime / FRAME Apr 12, 2023
@liamaharon liamaharon moved this from To Do to Backlog in Runtime / FRAME Apr 12, 2023
@liamaharon liamaharon moved this from Backlog to To Do in Runtime / FRAME Apr 12, 2023
@liamaharon liamaharon moved this from To Do to Backlog in Runtime / FRAME Apr 12, 2023
@juangirini juangirini added the T1-runtime This PR/Issue is related to the topic “runtime”. label Jun 7, 2023
@liamaharon
Copy link
Contributor

Moved: paritytech/try-runtime-cli#9

@github-project-automation github-project-automation bot moved this from Backlog to Done in Runtime / FRAME Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known. T1-runtime This PR/Issue is related to the topic “runtime”. Z4-involved Can be fixed by an expert coder with good knowledge of the codebase.
Projects
Status: Done
Development

No branches or pull requests

3 participants