Docs
  • Welcome to the ipEHR docs
  • Concepts
    • Basics
      • What is EHR?
      • What is ipEHR?
      • ipEHR and the problems it solves
      • How ipEHR works
    • Components
      • Gateway
      • Datastore Node
      • Document Index
      • Users Directory
      • Access Management
      • Data publishing
    • Encryption
  • Guides
    • Install
      • Contracts deployment
      • Gateway
      • Stat
  • Reference
    • APIs
      • Gateway HTTP REST API
      • Stat HTTP REST API
    • Contracts
      • EhrIndexer
      • Users
      • AccessStore
      • DataStore
Powered by GitBook
On this page
  • Overview
  • Store document workflow
  • Retrieve document workflow
  1. Concepts
  2. Components

Datastore Node

PreviousGatewayNextDocument Index

Last updated 1 year ago

Overview

Documents are saved to the IPFS network for quick access. The system requires connection to at least one IPFS node. The connection addresses are specified in the ipEHR gateway configuration file.

For long-term storage of documents, the decentralized file storage Filecoin is used.

A deployed Lotus node is required as a connection point to the Filecoin network for file storage transactions

On the Lotus node a wallet must be created with a positive balance of FIL tokens, which are used to pay for file storage transactions.

By default, file storage transactions are for a period of 6 months.

Attention! At the moment the functionality of storage extension is not implemented. After the expiration of this period the availability of documents is not guaranteed. Extension of transactions will be implemented in the next versions.

Store document workflow

  • validation

  • compression and encryption

  • saving to IPFS

  • saving the document to Filecoin:

    • signing a deal with the miner in the Filecoin network

    • transaction status tracking

Retrieve document workflow

  • checking access rights to the document

  • Search for meta-information about the document in the smart contract

  • searching for the document in IPFS by CID

  • if the document is not found in IPFS, the recovery procedure from Filecoin is launched

    • loading the document by DealCID and minerAddress

    • saving to IPFS

  • the document is decrypted and transmitted to the user

saving in a on the blockchain the meta-information about the document

saving meaningful information from a document into a on the blockchain using homomorphic encryption for search and filtering purposes

searching for a suitable miner to conclude a transaction using the service, taking into account the criteria: overall rating, minimum/maximum data size, statistics on previous transactions, price, etc.

smart contract
smart contract
FilRep