get_block out put dose not match between cli and db_api #469

Closed
opened 2022-11-01 16:22:57 +00:00 by elynch1 · 17 comments
elynch1 commented 2022-11-01 16:22:57 +00:00 (Migrated from gitlab.com)

currently the cli wallet response and the db_api response do not match when calling get_block()

optional<signed_block> get_block(uint32_t block_num) const; // from db api

vs

optional<signed_block_with_info> wallet_api::get_block(uint32_t num) // from cli wallet

both should respond with <signed_block_with_info>

currently the cli wallet response and the db_api response do not match when calling get_block() ``` optional<signed_block> get_block(uint32_t block_num) const; // from db api vs optional<signed_block_with_info> wallet_api::get_block(uint32_t num) // from cli wallet ``` both should respond with `<signed_block_with_info>`
elynch1 commented 2022-11-01 16:24:23 +00:00 (Migrated from gitlab.com)

marked this issue as blocking NEX#445

marked this issue as blocking NEX#445
elynch1 commented 2022-11-01 16:26:51 +00:00 (Migrated from gitlab.com)

assigned to @bobinson and @serkixenos

assigned to @bobinson and @serkixenos
christophersanborn commented 2022-11-01 16:46:06 +00:00 (Migrated from gitlab.com)

This is interesting. It looks like it is cli_wallet which is returning "extra" info. Since the cli_wallet talks to the API of a remote node,... where is it getting this extra info? Is it calling a different API? More than one API? Computing the extra info itself?

I'm not sure changing the return value of the DB API is the right way, especially if it imposes a computation burden on the API node (e.g. computing all the transaction IDs). Cli_wallet is more porcelain than plumbing and may simply be putting it's own interpretive spin on the return value. I'd say more clarification is needed on where this extra info is coming from.

This is interesting. It looks like it is cli_wallet which is returning "extra" info. Since the cli_wallet talks to the API of a remote node,... where is it getting this extra info? Is it calling a different API? More than one API? Computing the extra info itself? I'm not sure changing the return value of the DB API is the right way, especially if it imposes a computation burden on the API node (e.g. computing all the transaction IDs). Cli_wallet is more porcelain than plumbing and may simply be putting it's own interpretive spin on the return value. I'd say more clarification is needed on where this extra info is coming from.
christophersanborn commented 2022-11-01 17:17:56 +00:00 (Migrated from gitlab.com)

FWIW, signed_bock_with_info is defined within the Wallet lib here:

And it has a constructor that looks like it on-the-fly computes the transaction IDs of all the transactions here:

Meaning:

    1. signed_block_with_info is a construct known to the wallet, but not to API nodes.
    1. There's a computational burden to generating the extra info.
FWIW, `signed_bock_with_info` is defined within the Wallet lib here: - https://gitlab.com/PBSA/peerplays/-/blob/master/libraries/wallet/include/graphene/wallet/wallet.hpp#L237 And it has a constructor that looks like it on-the-fly computes the transaction IDs of all the transactions here: - https://gitlab.com/PBSA/peerplays/-/blob/master/libraries/wallet/wallet.cpp#L7919 Meaning: - 1) `signed_block_with_info` is a construct known to the wallet, but not to API nodes. - 2) There's a computational burden to generating the extra info.
serkixenos commented 2022-11-01 17:38:28 +00:00 (Migrated from gitlab.com)

What is happening is that cli wallet is extracting values from block data structure that are not serialized by default.

What is happening is that cli wallet is extracting values from block data structure that are not serialized by default.
alimirpp commented 2022-11-21 09:37:40 +00:00 (Migrated from gitlab.com)

mentioned in issue NEX#444

mentioned in issue NEX#444
JeanMichelMoreau commented 2022-11-22 13:21:28 +00:00 (Migrated from gitlab.com)

@bobinson FYI this is on our escalation board since end of OCT. Is this being actively worked on? Can you give me a status update. I believe this will be important for the GBC project.

CC: @elynch1 @Hiltos1

@bobinson FYI this is on our escalation board since end of OCT. Is this being actively worked on? Can you give me a status update. I believe this will be important for the GBC project. CC: @elynch1 @Hiltos1
elynch1 commented 2022-12-20 13:18:30 +00:00 (Migrated from gitlab.com)

@bobinson @serkixenos do we have an idea of if this is doable and if so when what release will it be in

@bobinson @serkixenos do we have an idea of if this is doable and if so when what release will it be in
bobinson commented 2022-12-20 13:43:52 +00:00 (Migrated from gitlab.com)

Hi @elynch1 - We are planning to provide this in the next beta release of the blockchain for verification against JS/Python libraries and dApps.

Hi @elynch1 - We are planning to provide this in the next beta release of the blockchain for verification against JS/Python libraries and dApps.
serkixenos commented 2022-12-20 16:46:09 +00:00 (Migrated from gitlab.com)

This is doable, and it will be aligned with db api. cli wallet version will be discarded.

This is doable, and it will be aligned with db api. cli wallet version will be discarded.
bobinson commented 2022-12-22 07:18:26 +00:00 (Migrated from gitlab.com)

mentioned in issue #498

mentioned in issue #498
serkixenos commented 2022-12-28 07:32:34 +00:00 (Migrated from gitlab.com)

Fix provided here https://gitlab.com/PBSA/peerplays/-/merge_requests/197

Two APIs provided - get_block and get_block2

optional<signed_block> get_block(uint32_t block_num);
optional<signed_block_with_info> get_block2(uint32_t num);

get_block returns what was previously returned from database API.
get_block2 returns what was previously returned from cli wallet.

Fix provided here https://gitlab.com/PBSA/peerplays/-/merge_requests/197 Two APIs provided - get_block and get_block2 optional<signed_block> get_block(uint32_t block_num); optional<signed_block_with_info> get_block2(uint32_t num); get_block returns what was previously returned from database API. get_block2 returns what was previously returned from cli wallet.
serkixenos commented 2022-12-28 07:43:04 +00:00 (Migrated from gitlab.com)

Test:

In fully initialized QA environment, execute a transfer, and get the ref_block_num from the response

unlocked >>> transfer nathan account01 1 TEST null true
transfer nathan account01 1 TEST null true
{
  "ref_block_num": 20443,                   <===== THIS
  "ref_block_prefix": 724272403,
  "expiration": "2022-12-28T07:29:21",
  "operations": [[
      0,{
        "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "from": "1.2.18",
        "to": "1.2.52",
        "amount": {
          "amount": 100000,
          "asset_id": "1.3.0"
        },
        "extensions": []
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "205012ce32fcb6e990c879709149a90bb12d65de5cb54dd49bbe778bf0369315c255ad8899650a240e8ce2b80c0da5fb1b666b8e6bbdf44a5065b4bc5c309cc326"
  ]
}

In this example, ref_block_num is 20443, so the transaction is executed in the block 20444.

Execute get_block as a database API and cli wallet command, and compare the results. They should be exactly the same, beside standard REST API fields:

### From command line

curl --silent --data '{"jsonrpc": "2.0", "method": "get_block", "params": [20444], "id": 1}' http://localhost:8090/rpc | jq
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "previous": "00004fdb13852b2b53d260da803425b8c8e2e0a2",
    "timestamp": "2022-12-28T07:28:54",
    "witness": "1.6.9",
    "next_secret_hash": "63d28269269db4174ce181ee9c55a86975aa07fb",
    "previous_secret": "2b70b2e29440eabd7d45a356da368ba17a56eb63",
    "transaction_merkle_root": "bbd74305349802d12543c82500bd92a8c3992987",
    "extensions": [],
    "witness_signature": "207d7996cc138e9657a49b379ca2e7aec486937584b518646c167bb6bc7d58c7371d38a1229305f12b18710f4020b2596f1f0fc9d05a58ca0d6c6e8a9002436194",
    "transactions": [
      {
        "ref_block_num": 20443,
        "ref_block_prefix": 724272403,
        "expiration": "2022-12-28T07:29:21",
        "operations": [
          [
            0,
            {
              "fee": {
                "amount": 0,
                "asset_id": "1.3.0"
              },
              "from": "1.2.18",
              "to": "1.2.52",
              "amount": {
                "amount": 100000,
                "asset_id": "1.3.0"
              },
              "extensions": []
            }
          ]
        ],
        "extensions": [],
        "signatures": [
          "205012ce32fcb6e990c879709149a90bb12d65de5cb54dd49bbe778bf0369315c255ad8899650a240e8ce2b80c0da5fb1b666b8e6bbdf44a5065b4bc5c309cc326"
        ],
        "operation_results": [
          [
            0,
            {}
          ]
        ]
      }
    ]
  }
}



### From CLI wallet

unlocked >>> get_block 20444
get_block 20444
{
  "previous": "00004fdb13852b2b53d260da803425b8c8e2e0a2",
  "timestamp": "2022-12-28T07:28:54",
  "witness": "1.6.9",
  "next_secret_hash": "63d28269269db4174ce181ee9c55a86975aa07fb",
  "previous_secret": "2b70b2e29440eabd7d45a356da368ba17a56eb63",
  "transaction_merkle_root": "bbd74305349802d12543c82500bd92a8c3992987",
  "extensions": [],
  "witness_signature": "207d7996cc138e9657a49b379ca2e7aec486937584b518646c167bb6bc7d58c7371d38a1229305f12b18710f4020b2596f1f0fc9d05a58ca0d6c6e8a9002436194",
  "transactions": [{
      "ref_block_num": 20443,
      "ref_block_prefix": 724272403,
      "expiration": "2022-12-28T07:29:21",
      "operations": [[
          0,{
            "fee": {
              "amount": 0,
              "asset_id": "1.3.0"
            },
            "from": "1.2.18",
            "to": "1.2.52",
            "amount": {
              "amount": 100000,
              "asset_id": "1.3.0"
            },
            "extensions": []
          }
        ]
      ],
      "extensions": [],
      "signatures": [
        "205012ce32fcb6e990c879709149a90bb12d65de5cb54dd49bbe778bf0369315c255ad8899650a240e8ce2b80c0da5fb1b666b8e6bbdf44a5065b4bc5c309cc326"
      ],
      "operation_results": [[
          0,{}
        ]
      ]
    }
  ]
}

Execute get_block2 as a database API and cli wallet command, and compare the results. They should be exactly the same, beside standard REST API fields:

### From command line

curl --silent --data '{"jsonrpc": "2.0", "method": "get_block2", "params": [20444], "id": 1}' http://localhost:8090/rpc | jq
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "previous": "00004fdb13852b2b53d260da803425b8c8e2e0a2",
    "timestamp": "2022-12-28T07:28:54",
    "witness": "1.6.9",
    "next_secret_hash": "63d28269269db4174ce181ee9c55a86975aa07fb",
    "previous_secret": "2b70b2e29440eabd7d45a356da368ba17a56eb63",
    "transaction_merkle_root": "bbd74305349802d12543c82500bd92a8c3992987",
    "extensions": [],
    "witness_signature": "207d7996cc138e9657a49b379ca2e7aec486937584b518646c167bb6bc7d58c7371d38a1229305f12b18710f4020b2596f1f0fc9d05a58ca0d6c6e8a9002436194",
    "transactions": [
      {
        "ref_block_num": 20443,
        "ref_block_prefix": 724272403,
        "expiration": "2022-12-28T07:29:21",
        "operations": [
          [
            0,
            {
              "fee": {
                "amount": 0,
                "asset_id": "1.3.0"
              },
              "from": "1.2.18",
              "to": "1.2.52",
              "amount": {
                "amount": 100000,
                "asset_id": "1.3.0"
              },
              "extensions": []
            }
          ]
        ],
        "extensions": [],
        "signatures": [
          "205012ce32fcb6e990c879709149a90bb12d65de5cb54dd49bbe778bf0369315c255ad8899650a240e8ce2b80c0da5fb1b666b8e6bbdf44a5065b4bc5c309cc326"
        ],
        "operation_results": [
          [
            0,
            {}
          ]
        ]
      }
    ],
    "block_id": "00004fdcef3803e4e45e95869ab760a6a059f4f4",
    "signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
    "transaction_ids": [
      "6d0538fdd66107f1112886998c777915a122c57f"
    ]
  }
}



### From CLI wallet

unlocked >>> get_block2 20444
get_block2 20444
{
  "previous": "00004fdb13852b2b53d260da803425b8c8e2e0a2",
  "timestamp": "2022-12-28T07:28:54",
  "witness": "1.6.9",
  "next_secret_hash": "63d28269269db4174ce181ee9c55a86975aa07fb",
  "previous_secret": "2b70b2e29440eabd7d45a356da368ba17a56eb63",
  "transaction_merkle_root": "bbd74305349802d12543c82500bd92a8c3992987",
  "extensions": [],
  "witness_signature": "207d7996cc138e9657a49b379ca2e7aec486937584b518646c167bb6bc7d58c7371d38a1229305f12b18710f4020b2596f1f0fc9d05a58ca0d6c6e8a9002436194",
  "transactions": [{
      "ref_block_num": 20443,
      "ref_block_prefix": 724272403,
      "expiration": "2022-12-28T07:29:21",
      "operations": [[
          0,{
            "fee": {
              "amount": 0,
              "asset_id": "1.3.0"
            },
            "from": "1.2.18",
            "to": "1.2.52",
            "amount": {
              "amount": 100000,
              "asset_id": "1.3.0"
            },
            "extensions": []
          }
        ]
      ],
      "extensions": [],
      "signatures": [
        "205012ce32fcb6e990c879709149a90bb12d65de5cb54dd49bbe778bf0369315c255ad8899650a240e8ce2b80c0da5fb1b666b8e6bbdf44a5065b4bc5c309cc326"
      ],
      "operation_results": [[
          0,{}
        ]
      ]
    }
  ],
  "block_id": "00004fdcef3803e4e45e95869ab760a6a059f4f4",
  "signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
  "transaction_ids": [
    "6d0538fdd66107f1112886998c777915a122c57f"
  ]
}

Notice the difference in get_block and get_block2 outputs. get_block2 output contains three extra fields at the end - block_id, signing_key and transaction_ids.

Eventually, you can try to get other blocks using these commands, try blocks containing more than one transaction. In this case, transaction_ids will contain multiple entries.

Test: In fully initialized QA environment, execute a transfer, and get the ref_block_num from the response ``` unlocked >>> transfer nathan account01 1 TEST null true transfer nathan account01 1 TEST null true { "ref_block_num": 20443, <===== THIS "ref_block_prefix": 724272403, "expiration": "2022-12-28T07:29:21", "operations": [[ 0,{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "from": "1.2.18", "to": "1.2.52", "amount": { "amount": 100000, "asset_id": "1.3.0" }, "extensions": [] } ] ], "extensions": [], "signatures": [ "205012ce32fcb6e990c879709149a90bb12d65de5cb54dd49bbe778bf0369315c255ad8899650a240e8ce2b80c0da5fb1b666b8e6bbdf44a5065b4bc5c309cc326" ] } ``` In this example, ref_block_num is 20443, so the transaction is executed in the block 20444. Execute get_block as a database API and cli wallet command, and compare the results. They should be exactly the same, beside standard REST API fields: ``` ### From command line curl --silent --data '{"jsonrpc": "2.0", "method": "get_block", "params": [20444], "id": 1}' http://localhost:8090/rpc | jq { "id": 1, "jsonrpc": "2.0", "result": { "previous": "00004fdb13852b2b53d260da803425b8c8e2e0a2", "timestamp": "2022-12-28T07:28:54", "witness": "1.6.9", "next_secret_hash": "63d28269269db4174ce181ee9c55a86975aa07fb", "previous_secret": "2b70b2e29440eabd7d45a356da368ba17a56eb63", "transaction_merkle_root": "bbd74305349802d12543c82500bd92a8c3992987", "extensions": [], "witness_signature": "207d7996cc138e9657a49b379ca2e7aec486937584b518646c167bb6bc7d58c7371d38a1229305f12b18710f4020b2596f1f0fc9d05a58ca0d6c6e8a9002436194", "transactions": [ { "ref_block_num": 20443, "ref_block_prefix": 724272403, "expiration": "2022-12-28T07:29:21", "operations": [ [ 0, { "fee": { "amount": 0, "asset_id": "1.3.0" }, "from": "1.2.18", "to": "1.2.52", "amount": { "amount": 100000, "asset_id": "1.3.0" }, "extensions": [] } ] ], "extensions": [], "signatures": [ "205012ce32fcb6e990c879709149a90bb12d65de5cb54dd49bbe778bf0369315c255ad8899650a240e8ce2b80c0da5fb1b666b8e6bbdf44a5065b4bc5c309cc326" ], "operation_results": [ [ 0, {} ] ] } ] } } ### From CLI wallet unlocked >>> get_block 20444 get_block 20444 { "previous": "00004fdb13852b2b53d260da803425b8c8e2e0a2", "timestamp": "2022-12-28T07:28:54", "witness": "1.6.9", "next_secret_hash": "63d28269269db4174ce181ee9c55a86975aa07fb", "previous_secret": "2b70b2e29440eabd7d45a356da368ba17a56eb63", "transaction_merkle_root": "bbd74305349802d12543c82500bd92a8c3992987", "extensions": [], "witness_signature": "207d7996cc138e9657a49b379ca2e7aec486937584b518646c167bb6bc7d58c7371d38a1229305f12b18710f4020b2596f1f0fc9d05a58ca0d6c6e8a9002436194", "transactions": [{ "ref_block_num": 20443, "ref_block_prefix": 724272403, "expiration": "2022-12-28T07:29:21", "operations": [[ 0,{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "from": "1.2.18", "to": "1.2.52", "amount": { "amount": 100000, "asset_id": "1.3.0" }, "extensions": [] } ] ], "extensions": [], "signatures": [ "205012ce32fcb6e990c879709149a90bb12d65de5cb54dd49bbe778bf0369315c255ad8899650a240e8ce2b80c0da5fb1b666b8e6bbdf44a5065b4bc5c309cc326" ], "operation_results": [[ 0,{} ] ] } ] } ``` Execute get_block2 as a database API and cli wallet command, and compare the results. They should be exactly the same, beside standard REST API fields: ``` ### From command line curl --silent --data '{"jsonrpc": "2.0", "method": "get_block2", "params": [20444], "id": 1}' http://localhost:8090/rpc | jq { "id": 1, "jsonrpc": "2.0", "result": { "previous": "00004fdb13852b2b53d260da803425b8c8e2e0a2", "timestamp": "2022-12-28T07:28:54", "witness": "1.6.9", "next_secret_hash": "63d28269269db4174ce181ee9c55a86975aa07fb", "previous_secret": "2b70b2e29440eabd7d45a356da368ba17a56eb63", "transaction_merkle_root": "bbd74305349802d12543c82500bd92a8c3992987", "extensions": [], "witness_signature": "207d7996cc138e9657a49b379ca2e7aec486937584b518646c167bb6bc7d58c7371d38a1229305f12b18710f4020b2596f1f0fc9d05a58ca0d6c6e8a9002436194", "transactions": [ { "ref_block_num": 20443, "ref_block_prefix": 724272403, "expiration": "2022-12-28T07:29:21", "operations": [ [ 0, { "fee": { "amount": 0, "asset_id": "1.3.0" }, "from": "1.2.18", "to": "1.2.52", "amount": { "amount": 100000, "asset_id": "1.3.0" }, "extensions": [] } ] ], "extensions": [], "signatures": [ "205012ce32fcb6e990c879709149a90bb12d65de5cb54dd49bbe778bf0369315c255ad8899650a240e8ce2b80c0da5fb1b666b8e6bbdf44a5065b4bc5c309cc326" ], "operation_results": [ [ 0, {} ] ] } ], "block_id": "00004fdcef3803e4e45e95869ab760a6a059f4f4", "signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", "transaction_ids": [ "6d0538fdd66107f1112886998c777915a122c57f" ] } } ### From CLI wallet unlocked >>> get_block2 20444 get_block2 20444 { "previous": "00004fdb13852b2b53d260da803425b8c8e2e0a2", "timestamp": "2022-12-28T07:28:54", "witness": "1.6.9", "next_secret_hash": "63d28269269db4174ce181ee9c55a86975aa07fb", "previous_secret": "2b70b2e29440eabd7d45a356da368ba17a56eb63", "transaction_merkle_root": "bbd74305349802d12543c82500bd92a8c3992987", "extensions": [], "witness_signature": "207d7996cc138e9657a49b379ca2e7aec486937584b518646c167bb6bc7d58c7371d38a1229305f12b18710f4020b2596f1f0fc9d05a58ca0d6c6e8a9002436194", "transactions": [{ "ref_block_num": 20443, "ref_block_prefix": 724272403, "expiration": "2022-12-28T07:29:21", "operations": [[ 0,{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "from": "1.2.18", "to": "1.2.52", "amount": { "amount": 100000, "asset_id": "1.3.0" }, "extensions": [] } ] ], "extensions": [], "signatures": [ "205012ce32fcb6e990c879709149a90bb12d65de5cb54dd49bbe778bf0369315c255ad8899650a240e8ce2b80c0da5fb1b666b8e6bbdf44a5065b4bc5c309cc326" ], "operation_results": [[ 0,{} ] ] } ], "block_id": "00004fdcef3803e4e45e95869ab760a6a059f4f4", "signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", "transaction_ids": [ "6d0538fdd66107f1112886998c777915a122c57f" ] } ``` Notice the difference in get_block and get_block2 outputs. get_block2 output contains three extra fields at the end - block_id, signing_key and transaction_ids. Eventually, you can try to get other blocks using these commands, try blocks containing more than one transaction. In this case, transaction_ids will contain multiple entries.
serkixenos commented 2022-12-28 07:43:11 +00:00 (Migrated from gitlab.com)

assigned to @wsalloum

assigned to @wsalloum
wsalloum commented 2022-12-28 11:18:45 +00:00 (Migrated from gitlab.com)

It looks ok, compared the output for calling the API and get_block/get_bloack2

unlocked >>> transfer nathan account01 1 TEST null true
transfer nathan account01 1 TEST null true
{
  "ref_block_num": 446,
  "ref_block_prefix": 3411632092,
  "expiration": "2022-12-28T11:04:00",
  "operations": [[
      0,{
        "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "from": "1.2.18",
        "to": "1.2.52",
        "amount": {
          "amount": 100000,
          "asset_id": "1.3.0"
        },
        "extensions": []
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "200c9687068aada400b24e6bf7f304fca1ebd01f70b97e13a5a13b2571ba00f4507bc95e425c5c842f6b05c9869be2bffc129f7d4b4e56adfd280d787716eed0a9"
  ]
}


unlocked >>> get_block 447
get_block 447
{
  "previous": "000001bedc5f59cbdc3bb028338998f7a5c64008",
  "timestamp": "2022-12-28T11:03:33",
  "witness": "1.6.3",
  "next_secret_hash": "e2a200ce549572f8b4edb4ad4e34867718794779",
  "previous_secret": "7bc4c19d0a1480eb2e4891c56831c33f917305f0",
  "transaction_merkle_root": "4d07118e01bf60cc462d985d164cd9150d79fd95",
  "extensions": [],
  "witness_signature": "1f1059674b4373c6c2d6e30cdcb14219617d45bb2320608a6a87dda78a1e1c696c145057dc0a09aa370814da5cb4d0532f29ea669ad06322bc53e8f3c65688cdfd",
  "transactions": [{
      "ref_block_num": 446,
      "ref_block_prefix": 3411632092,
      "expiration": "2022-12-28T11:04:00",
      "operations": [[
          0,{
            "fee": {
              "amount": 0,
              "asset_id": "1.3.0"
            },
            "from": "1.2.18",
            "to": "1.2.52",
            "amount": {
              "amount": 100000,
              "asset_id": "1.3.0"
            },
            "extensions": []
          }
        ]
      ],
      "extensions": [],
      "signatures": [
        "200c9687068aada400b24e6bf7f304fca1ebd01f70b97e13a5a13b2571ba00f4507bc95e425c5c842f6b05c9869be2bffc129f7d4b4e56adfd280d787716eed0a9"
      ],
      "operation_results": [[
          0,{}
        ]
      ]
    }
  ]
}

unlocked >>> get_block2 447
get_block2 447
{
  "previous": "000001bedc5f59cbdc3bb028338998f7a5c64008",
  "timestamp": "2022-12-28T11:03:33",
  "witness": "1.6.3",
  "next_secret_hash": "e2a200ce549572f8b4edb4ad4e34867718794779",
  "previous_secret": "7bc4c19d0a1480eb2e4891c56831c33f917305f0",
  "transaction_merkle_root": "4d07118e01bf60cc462d985d164cd9150d79fd95",
  "extensions": [],
  "witness_signature": "1f1059674b4373c6c2d6e30cdcb14219617d45bb2320608a6a87dda78a1e1c696c145057dc0a09aa370814da5cb4d0532f29ea669ad06322bc53e8f3c65688cdfd",
  "transactions": [{
      "ref_block_num": 446,
      "ref_block_prefix": 3411632092,
      "expiration": "2022-12-28T11:04:00",
      "operations": [[
          0,{
            "fee": {
              "amount": 0,
              "asset_id": "1.3.0"
            },
            "from": "1.2.18",
            "to": "1.2.52",
            "amount": {
              "amount": 100000,
              "asset_id": "1.3.0"
            },
            "extensions": []
          }
        ]
      ],
      "extensions": [],
      "signatures": [
        "200c9687068aada400b24e6bf7f304fca1ebd01f70b97e13a5a13b2571ba00f4507bc95e425c5c842f6b05c9869be2bffc129f7d4b4e56adfd280d787716eed0a9"
      ],
      "operation_results": [[
          0,{}
        ]
      ]
    }
  ],
  "block_id": "000001bfad40071f8bc201bcee5e56f83576f057",
  "signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
  "transaction_ids": [
    "845b4bf20b12572f3b3fcb1d966ba8dc51823972"
  ]
}

bunker@backend-qa:~/peerplays-utils/peerplays-qa-environment$ curl --silent --data '{"jsonrpc": "2.0", "method": "get_block2", "params": [447], "id": 1}' http://localhost:8090/rpc | jq
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "previous": "000001bedc5f59cbdc3bb028338998f7a5c64008",
    "timestamp": "2022-12-28T11:03:33",
    "witness": "1.6.3",
    "next_secret_hash": "e2a200ce549572f8b4edb4ad4e34867718794779",
    "previous_secret": "7bc4c19d0a1480eb2e4891c56831c33f917305f0",
    "transaction_merkle_root": "4d07118e01bf60cc462d985d164cd9150d79fd95",
    "extensions": [],
    "witness_signature": "1f1059674b4373c6c2d6e30cdcb14219617d45bb2320608a6a87dda78a1e1c696c145057dc0a09aa370814da5cb4d0532f29ea669ad06322bc53e8f3c65688cdfd",
    "transactions": [
      {
        "ref_block_num": 446,
        "ref_block_prefix": 3411632092,
        "expiration": "2022-12-28T11:04:00",
        "operations": [
          [
            0,
            {
              "fee": {
                "amount": 0,
                "asset_id": "1.3.0"
              },
              "from": "1.2.18",
              "to": "1.2.52",
              "amount": {
                "amount": 100000,
                "asset_id": "1.3.0"
              },
              "extensions": []
            }
          ]
        ],
        "extensions": [],
        "signatures": [
          "200c9687068aada400b24e6bf7f304fca1ebd01f70b97e13a5a13b2571ba00f4507bc95e425c5c842f6b05c9869be2bffc129f7d4b4e56adfd280d787716eed0a9"
        ],
        "operation_results": [
          [
            0,
            {}
          ]
        ]
      }
    ],
    "block_id": "000001bfad40071f8bc201bcee5e56f83576f057",
    "signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
    "transaction_ids": [
      "845b4bf20b12572f3b3fcb1d966ba8dc51823972"
    ]
  }
}
bunker@backend-qa:~/peerplays-utils/peerplays-qa-environment$ 
It looks ok, compared the output for calling the API and get_block/get_bloack2 ``` unlocked >>> transfer nathan account01 1 TEST null true transfer nathan account01 1 TEST null true { "ref_block_num": 446, "ref_block_prefix": 3411632092, "expiration": "2022-12-28T11:04:00", "operations": [[ 0,{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "from": "1.2.18", "to": "1.2.52", "amount": { "amount": 100000, "asset_id": "1.3.0" }, "extensions": [] } ] ], "extensions": [], "signatures": [ "200c9687068aada400b24e6bf7f304fca1ebd01f70b97e13a5a13b2571ba00f4507bc95e425c5c842f6b05c9869be2bffc129f7d4b4e56adfd280d787716eed0a9" ] } ``` ``` unlocked >>> get_block 447 get_block 447 { "previous": "000001bedc5f59cbdc3bb028338998f7a5c64008", "timestamp": "2022-12-28T11:03:33", "witness": "1.6.3", "next_secret_hash": "e2a200ce549572f8b4edb4ad4e34867718794779", "previous_secret": "7bc4c19d0a1480eb2e4891c56831c33f917305f0", "transaction_merkle_root": "4d07118e01bf60cc462d985d164cd9150d79fd95", "extensions": [], "witness_signature": "1f1059674b4373c6c2d6e30cdcb14219617d45bb2320608a6a87dda78a1e1c696c145057dc0a09aa370814da5cb4d0532f29ea669ad06322bc53e8f3c65688cdfd", "transactions": [{ "ref_block_num": 446, "ref_block_prefix": 3411632092, "expiration": "2022-12-28T11:04:00", "operations": [[ 0,{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "from": "1.2.18", "to": "1.2.52", "amount": { "amount": 100000, "asset_id": "1.3.0" }, "extensions": [] } ] ], "extensions": [], "signatures": [ "200c9687068aada400b24e6bf7f304fca1ebd01f70b97e13a5a13b2571ba00f4507bc95e425c5c842f6b05c9869be2bffc129f7d4b4e56adfd280d787716eed0a9" ], "operation_results": [[ 0,{} ] ] } ] } ``` ``` unlocked >>> get_block2 447 get_block2 447 { "previous": "000001bedc5f59cbdc3bb028338998f7a5c64008", "timestamp": "2022-12-28T11:03:33", "witness": "1.6.3", "next_secret_hash": "e2a200ce549572f8b4edb4ad4e34867718794779", "previous_secret": "7bc4c19d0a1480eb2e4891c56831c33f917305f0", "transaction_merkle_root": "4d07118e01bf60cc462d985d164cd9150d79fd95", "extensions": [], "witness_signature": "1f1059674b4373c6c2d6e30cdcb14219617d45bb2320608a6a87dda78a1e1c696c145057dc0a09aa370814da5cb4d0532f29ea669ad06322bc53e8f3c65688cdfd", "transactions": [{ "ref_block_num": 446, "ref_block_prefix": 3411632092, "expiration": "2022-12-28T11:04:00", "operations": [[ 0,{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "from": "1.2.18", "to": "1.2.52", "amount": { "amount": 100000, "asset_id": "1.3.0" }, "extensions": [] } ] ], "extensions": [], "signatures": [ "200c9687068aada400b24e6bf7f304fca1ebd01f70b97e13a5a13b2571ba00f4507bc95e425c5c842f6b05c9869be2bffc129f7d4b4e56adfd280d787716eed0a9" ], "operation_results": [[ 0,{} ] ] } ], "block_id": "000001bfad40071f8bc201bcee5e56f83576f057", "signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", "transaction_ids": [ "845b4bf20b12572f3b3fcb1d966ba8dc51823972" ] } ``` ``` bunker@backend-qa:~/peerplays-utils/peerplays-qa-environment$ curl --silent --data '{"jsonrpc": "2.0", "method": "get_block2", "params": [447], "id": 1}' http://localhost:8090/rpc | jq { "id": 1, "jsonrpc": "2.0", "result": { "previous": "000001bedc5f59cbdc3bb028338998f7a5c64008", "timestamp": "2022-12-28T11:03:33", "witness": "1.6.3", "next_secret_hash": "e2a200ce549572f8b4edb4ad4e34867718794779", "previous_secret": "7bc4c19d0a1480eb2e4891c56831c33f917305f0", "transaction_merkle_root": "4d07118e01bf60cc462d985d164cd9150d79fd95", "extensions": [], "witness_signature": "1f1059674b4373c6c2d6e30cdcb14219617d45bb2320608a6a87dda78a1e1c696c145057dc0a09aa370814da5cb4d0532f29ea669ad06322bc53e8f3c65688cdfd", "transactions": [ { "ref_block_num": 446, "ref_block_prefix": 3411632092, "expiration": "2022-12-28T11:04:00", "operations": [ [ 0, { "fee": { "amount": 0, "asset_id": "1.3.0" }, "from": "1.2.18", "to": "1.2.52", "amount": { "amount": 100000, "asset_id": "1.3.0" }, "extensions": [] } ] ], "extensions": [], "signatures": [ "200c9687068aada400b24e6bf7f304fca1ebd01f70b97e13a5a13b2571ba00f4507bc95e425c5c842f6b05c9869be2bffc129f7d4b4e56adfd280d787716eed0a9" ], "operation_results": [ [ 0, {} ] ] } ], "block_id": "000001bfad40071f8bc201bcee5e56f83576f057", "signing_key": "TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", "transaction_ids": [ "845b4bf20b12572f3b3fcb1d966ba8dc51823972" ] } } bunker@backend-qa:~/peerplays-utils/peerplays-qa-environment$ ```
wsalloum commented 2022-12-28 11:21:26 +00:00 (Migrated from gitlab.com)

changed the incident status to Resolved by closing the incident

changed the incident status to **Resolved** by closing the incident
wsalloum (Migrated from gitlab.com) closed this issue 2022-12-28 11:21:26 +00:00
serkixenos commented 2023-02-09 15:01:33 +00:00 (Migrated from gitlab.com)

mentioned in issue PBSA/tools-libs/peerplaysjs-lib#133

mentioned in issue PBSA/tools-libs/peerplaysjs-lib#133
Sign in to join this conversation.
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: Peerplays_Blockchain/peerplays_migrated#469
No description provided.