status-im / specs

Specifications for Status clients.
https://specs.status.im/
MIT License
14 stars 14 forks source link

Implement indexing layer #133

Open bgits opened 4 years ago

bgits commented 4 years ago

Currently all data is read from a node/node service (infura) using the JSON-RPC for ethereum data and IPFS for file storage.

A client may need to request and process more data than is necessary for a use case. This leads to more bandwidth consumption, longer load times and likely more battery consumption from data processing.

In the case of the JSON-RPC, there is also a lack of error codes so instead of a client receiving an error and handling appropriately it may receive malformed data and assume it to be correct.

An indexing layer can allow us to sidestep these issue by having the client construct efficient queries against it.

What is being described is effectively the REST or graphQL API clients interact with in standard client server applications.

Simply building a service would not be sufficient as it lacks decentralization so a protocol to incentivize data integrity and quality of service needs to be designed and implemented as well.

While the general API is relatively straight forward in that the playbook for designing and building time tested services exists the same can not be said for the protocol layer.

Currently I see three paths to implementation. 1) The Graph Has already created an indexing service with a roadmap to have a fully incentivized protocol. I'm not aware of any other attempt at this currently.

2) Fork graph-node and implement our own incentive layer around that.

3) Create our own indexer and incentive layer.