Obtaining Data
Target release | Mercury |
|---|---|
Epic | |
Document status | complete |
Document owner | @Medha Parlikar (Unlicensed) |
Designer | |
Developers | |
QA |
Goals
Provide mechanisms for users to obtain data from the Blockchain
Background and strategic fit
Both users and dApp Developers will want block data pertaining to their transactions and dApps
Assumptions
This class of users do not want to run a validating node. They do not want to put up stake in the network.
This class of users wants to run a distributed application, and obtain data from the application, so they can run analytics and mine the data from the blockchain.
Requirements
# | Title | User Story | Importance | Notes | Ticket |
|---|---|---|---|---|---|
1 | Code Deployment | As a dApp developer, I get an answer back when the code is deployed if the code runs to completion, or an out of Phlo error | Must Have |
|
|
2 | Transaction Receipts | As a dApp developer, when a deploy takes place with a name or set of names from my code api, I get to listen on the name for blocks. As a child shard, I need to listen for events taking place in the parent shard. As a shard validator, I need to listen for events taking place in my shard so that the sharding client can create the correct events in the parent shard. | Must Have |
| https://rchain.atlassian.net/browse/RHOL-441 |
3 | Exploratory Deployment | As a dApp developer, I want to learn about the state of specific processes. @Medha Parlikar (Unlicensed): Code block for a query. User should only need to add the names they want queried | Must Have |
Option:
|
|
4 | Streaming API |
|
|
|
|
5 | Full validation | As a dApp developer, I want all the block data for a shard. | Nice to have |
|
|
6 | Read Only Node | As a dApp developer, I want all the block data for a shard | Must Have |
| Done. |
7 | Gossip all blocks | As a dApp developer, I want all the block data for a shard. | Nice to have |
|
|
8 | Harden against DOS | As a Node Operator, I want to know that my node cannot be subject to DOS attack via these API's | Must Have |
| Out of scope of the platform |
User interaction and design
Will need to include the API design for retrieving data.
Here's an example of some JS code that uses Rchain-API to query for results: https://gist.github.com/JoshOrndorff/b0fe7aed93d16beabc2885484c6e8c54
Related Requirements
Requirement | Description | Priority | Notes | Status | |
|---|---|---|---|---|---|
| 1 | Retrieve data asynchronously | As a mobile app developer, I need to send all my request asynchronously, so that my apps are fast. | Must Have |
|
|
| 2 | Monitor Requests for Data | As a validator, I need to know how much of my node's resources are spent on data access requests so that I can set the prices for transactions properly. | Must Have |
|
|
| 3 | Performance | In principle, A dApp developer will want to provide a user a transaction receipt with at least the same speed at which the transaction itself is processed. | Must Have |
|
|
| 4 | Deployment ID | Each deployment has a userid and timestamp, userid (public key associated with private key used to sign transaction ) for that particular deployment by the client software. These keys should be looked up in the block store. | Must Have |
|
|