TezosX/L2Node: register Tezos RPC if Tezos runtime is on
What
Register the RPCs if the runtime is active. The backend is an empty shell for now.
Why
It will be much easier to access the Tezos accounts using tezos tooling. It doesn't require much work if we can reuse Tezlink work.
How
Two steps:
- read the kernel flag. We choose to read the info from the kernel rather than using another flag in the node. We can avoid completely inconsistent flags that way.
- register RPCs. For that we reuses the Tezlink RPC services. We switch to a new backend, empty for now.
Another option could be to register the RPCs one by one. That would allow use to avoid defining a backend mostly empty. In the end, we'll still add the same RPCs one by one, so the end result would be equivalent, but we would need to add the RPCs and the backend pieces one by one. By importing all the RPCs, we just have the backend to sort out, and what is missing is much clearer.
Manually testing the MR
When we have !20008 (merged) we can start implementing the backend for basic account info and test, starting with .../balance for example.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Pierre-Emmanuel CORNILLEAU