Bring getblockchaininfo up to date #54

Open
opened 2022-06-11 07:20:54 +02:00 by roylee17 · 2 comments
roylee17 commented 2022-06-11 07:20:54 +02:00 (Migrated from github.com)

Bring getblockchaininfo up to date (v0.23)

On lbcd:

{
  "chain": "mainnet",
  "blocks": 1174511,
  "headers": 1174511,
  "bestblockhash": "bb9a8030f84f710b88a91521e80289facb4924eb24e08702757e1294997452c6",
  "difficulty": 1369713051994.9846,
  "mediantime": 1654923545,
  "pruned": false,
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "bit": 0,
      "startTime": 0,
      "start_time": 1462060800,
      "timeout": 1493596800,
      "since": 200000
    },
    "dummy": {
      "status": "failed",
      "bit": 28,
      "startTime": 0,
      "start_time": 1199145601,
      "timeout": 1230767999,
      "since": 0
    },
    "segwit": {
      "status": "active",
      "bit": 1,
      "startTime": 0,
      "start_time": 1547942400,
      "timeout": 1548288000,
      "since": 680770
    },
    "taproot": {
      "status": "failed",
      "bit": 0,
      "startTime": 0,
      "start_time": 0,
      "timeout": 0,
      "since": 0
    }
  }
}

On lbrycrd (0.17 based):

{
  "chain": "lbrycrd",
  "blocks": 1174511,
  "headers": 1174511,
  "bestblockhash": "bb9a8030f84f710b88a91521e80289facb4924eb24e08702757e1294997452c6",
  "difficulty": 1369713051994.985,
  "mediantime": 1654923545,
  "verificationprogress": 0.999194946520285,
  "initialblockdownload": false,
  "chainwork": "000000000000000000000000000000000000000000000970cda1e06046741a5e",
  "size_on_disk": 90879066566,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 6048
    },
    "segwit": {
      "status": "active",
      "startTime": 1547942400,
      "timeout": 1548288000,
      "since": 508032
    }
  },
  "warnings": ""
}
Bring `getblockchaininfo` [up to date (v0.23)](https://developer.bitcoin.org/reference/rpc/getblockchaininfo.html) On lbcd: ``` { "chain": "mainnet", "blocks": 1174511, "headers": 1174511, "bestblockhash": "bb9a8030f84f710b88a91521e80289facb4924eb24e08702757e1294997452c6", "difficulty": 1369713051994.9846, "mediantime": 1654923545, "pruned": false, "bip9_softforks": { "csv": { "status": "active", "bit": 0, "startTime": 0, "start_time": 1462060800, "timeout": 1493596800, "since": 200000 }, "dummy": { "status": "failed", "bit": 28, "startTime": 0, "start_time": 1199145601, "timeout": 1230767999, "since": 0 }, "segwit": { "status": "active", "bit": 1, "startTime": 0, "start_time": 1547942400, "timeout": 1548288000, "since": 680770 }, "taproot": { "status": "failed", "bit": 0, "startTime": 0, "start_time": 0, "timeout": 0, "since": 0 } } } ``` On lbrycrd (0.17 based): ``` { "chain": "lbrycrd", "blocks": 1174511, "headers": 1174511, "bestblockhash": "bb9a8030f84f710b88a91521e80289facb4924eb24e08702757e1294997452c6", "difficulty": 1369713051994.985, "mediantime": 1654923545, "verificationprogress": 0.999194946520285, "initialblockdownload": false, "chainwork": "000000000000000000000000000000000000000000000970cda1e06046741a5e", "size_on_disk": 90879066566, "pruned": false, "softforks": [ { "id": "bip34", "version": 2, "reject": { "status": true } }, { "id": "bip66", "version": 3, "reject": { "status": true } }, { "id": "bip65", "version": 4, "reject": { "status": true } } ], "bip9_softforks": { "csv": { "status": "active", "startTime": 1462060800, "timeout": 1493596800, "since": 6048 }, "segwit": { "status": "active", "startTime": 1547942400, "timeout": 1548288000, "since": 508032 } }, "warnings": "" } ```
moodyjon commented 2022-07-29 23:37:43 +02:00 (Migrated from github.com)

I suspect at least part of the problem is lies here:
6b0e7592c6/rpcclient/chain.go (L488)

There was a catch-all "Lbcd" version added at some point, and it doesn't count as "Post19". So "Lbcd" falls into the default case (not displaying softforks).

I suspect at least part of the problem is lies here: https://github.com/lbryio/lbcd/blob/6b0e7592c6e136611caae04831a36db432cc1c39/rpcclient/chain.go#L488 There was a catch-all "Lbcd" version added at some point, and it doesn't count as "Post19". So "Lbcd" falls into the default case (not displaying softforks).
roylee17 commented 2022-07-29 23:53:22 +02:00 (Migrated from github.com)

Looks like it should unmarshal both fields instead for post19 instead of only one of them.

Looks like it should unmarshal both fields instead for post19 instead of only one of them.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbcd#54
No description provided.