如何保存区块链创建的数据?

时间:2018-08-03 06:37:11

标签: node.js blockchain

我是区块链技术的新手。我已经使用此git存储库创建了一个包含一些数据的区块链。 https://github.com/arihantdaga/blockchain-basic-example-nodeJs

我的示例链数据如下所示

{
  "chain": [
    {
      "index": 0,
      "timestamp": 1533189709027,
      "data": {},
      "proof": 100,
      "previous_hash": 1
    },
    {
      "index": 1,
      "timestamp": 1533189713160,
      "data": {
        "userId": 1,
        "status": "new"
      },
      "proof": 35293,
      "previous_hash": "d716e5ed5c521d2b14c288ac8d219a578d2e3003c819ca45b51516a9cb5e4201"
    },
    {
      "index": 2,
      "timestamp": 1533190066205,
      "data": {
        "userId": 1,
        "status": "packing"
      },
      "proof": 35089,
      "previous_hash": "741ed13d02d795bd9e9b3d58de4ddf2c77b04ee7b32f10af5bf03ef0808a5fbe"
    },
    {
      "index": 3,
      "timestamp": 1533190071848,
      "data": {
        "userId": 1,
        "status": "shipping"
      },
      "proof": 119678,
      "previous_hash": "a7199b6cdee1b9b302b7c650d971dc20ee581dc154a8f21a41f079e47936d285"
    },
    {
      "index": 4,
      "timestamp": 1533190084032,
      "data": {
        "userId": 1,
        "status": "received"
      },
      "proof": 146502,
      "previous_hash": "f5b66daa350ca55d77584ca054f1ab243a4fb6742b721268634d177bfbb74df2"
    }
  ],
  "length": 5
}

我需要保存和检索该链的数据。 如何保存数据以及其他人将如何使用区块链访问和更新数据?

请分享一些建议以完成此操作。

0 个答案:

没有答案