-
Notifications
You must be signed in to change notification settings - Fork 4
JSON-RPC communication between Native Chain and Meta Chain #80
Comments
@DieHard073055: There are no 'area' labels on this issue. Adding an appropriate label will greatly expedite the process for us. You can add as many area as you see fit. If you are unsure what to do you can ignore this! You can add area labels by leaving a DetailsI am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
Why |
|
Protobuf offers strict typing and aids versioning for various messages used in RPC calls, so we decided to have a protobuf spec which represents the existing JSON RPC implementation and support both gRPC and JSON RPC endpoints (JSON schema is autogenerated from protobuf types and is meant to be backward-compatible). If defid needs to invoke an RPC endpoint, then it's easier to add the protobuf spec and use the generated client code directly (which will provide the necessary types and functions to perform that call). Long-term goal is to segregate the RPC handling (both server and client) out of ain. |
It should be noted that this doesn't change anything in metachain (the incoming RPC request will still be JSON) - it's only a matter of how we decided to go about RPC implementation in ain. |
Sounds good! Do we have an integration timeline for this? |
For the avoidance of doubt, is this what you mean? graph LR
nb --JSON RPC---> ma
subgraph DeFiCh/metachain
ma[RPC Server] --> mb[MetaChain Consensus]
end
subgraph DeFiCh/ain
na[NativeChain Consensus]
nb["NativeChain 'RPC Client'"]
nc["*.proto Defintions"]
na --> nb
nb --> nc
end
|
As for the protobuf-based RPC client code, the work is already in place, it's just a matter of fixing library linkage on different platforms. Hopefully will be able to merge it today or tomorrow.
That's accurate. |
Awesome thanks! |
/assign @wafflespeanut let me assign this to you since you're working on #106 |
What would you like to be added:
JSON-RPC communication between Native Chain and Meta Chain.
This includes creating
*.proto
definitions on the NativeChain side that auto-generate client code for DMC to call.Why is this needed:
For the JSON RPC client generator to generate code for the RPC calls.
related
PR
DeFiCh/libain-rs#19
The text was updated successfully, but these errors were encountered: