DMS integration with Oracle to get blockchain data
Description
Click to expand
Who
- @sntshk -- DMS developer;
- @joao.castro5 -- Oracle developer;
- @safiullahmubashir08 -- blockchain advisor;
- @kabir.kbr @janaina.senna @dagiopia -- advice and help related to the architecture, reviewers.
What
- NuNet Oracle is a NuNet platform component which implements (at least a part) of Compute API and Tokenomics API;
- NuNet Oracle is an off-chain component and is therefore chain-agnostic, as the whole platform -- therefore it will need to integrate with any chain that NuNet will be using (the first one is Cardano);
- For Public Alpha, NuNet Oracle doesn't interact with the on-chain smart contract/script directly. It sends information to DMS, DMS to the WebApp/ManagementDashboard and these apps to the blockchain via wallet browser extension integration.
- The communication between the DMS and the WebApp/ManagementDashboard is described here.
- The communication between the DMS and the Oracle uses gRPC (Oracle is the server) and is described on the next section.
How
@safiullahmubashir08: review this section, please.
Implement two calls to the Oracle using gRPC (Oracle is the server). Follows the description of each of these two functionalities:
request service
- inputs
- none
- outputs
- signature
- oracle message
request reward
- inputs
- job status (running, finished without errors, finished with errors)
- job duration (in minutes)
- estimated job duration (in minutes)
- log path
- outputs
- signature
- oracle message
- reward type (withdraw, refund, distribute)
Why
- In order to build the economy of compute processes, NuNet will have to make sure that compute providers get compensated for correctly executed workflows as well as compute users pay only for the correctly executed work;
- Agreements and settlements between all platform constituents (currently compute providers, service providers and users) will be done via NuNet's smart contract and using NTX token; Current implementation uses cardano blockchain and is developed in https://gitlab.com/nunet/tokenomics-api/tokenomics-api-cardano.
When
- This issue is related to this one about Oracle.
Acceptance Criteria
Click to expand
- gRPC calls to Oracle implemented;
- Correctly interacts with Oracle sending parameters and getting information to be used on the blockchain;
- All implemented functions exposed via APIs.
Work Breakdown Structure (WBS)
Task | Description | Duration | Status | Start Date | End Date | Comment |
---|---|---|---|---|---|---|
A | Add submodule and compile proto file | 6-8 hrs | Done | 13th Mar | 14th Mar |
|
B | Integrate request reward | 8 hrs | Doing | 15th Mar | 15th Mar | Works with dummy data |
C | Split the endpoints for blockchain/deployment | 8 hrs | Done | 16th Mar | 20th Mar | |
D | Integrate request service | 4 hrs | Done | 16th Mar | 20th Mar |
Edited by Santosh Kumar