steemit / steem

The blockchain for Smart Media Tokens (SMTs) and decentralized applications.
https://steem.com
Other
1.95k stars 793 forks source link

unexpected/invalid trx hashes reported for vops in get_account_history #853

Open roadscape opened 7 years ago

roadscape commented 7 years ago
>>> get_account_history blood -1 10
#     BLOCK #    TRX ID          OPERATION            DETAILS
-------------------------------------------------------------------------------
69    8092893    0000000000000000000000000000000000000000 fill_vesting_withdraw {"from_account":"blood","to_account":"blood","withdrawn":"2356.674631 VESTS","deposited":"0.000 STEEM"}
 70    8293553    0000000000000000000000000000000000000000 fill_vesting_withdraw {"from_account":"blood","to_account":"pfunk","withdrawn":"2356.674631 VESTS","deposited":"2356.674631 VESTS"}
 71    8293553    0000000000000000000000000000000000000000 fill_vesting_withdraw {"from_account":"blood","to_account":"blood","withdrawn":"2356.674631 VESTS","deposited":"0.000 STEEM"}
 72    8494853    0000000000000000000000000000000000000000 fill_vesting_withdraw {"from_account":"blood","to_account":"pfunk","withdrawn":"2356.674631 VESTS","deposited":"2356.674631 VESTS"}
 73    8494853    0000000000000000000000000000000000000000 fill_vesting_withdraw {"from_account":"blood","to_account":"blood","withdrawn":"2356.674631 VESTS","deposited":"0.000 STEEM"}
 74    8696244    0000000000000000000000000000000000000000 fill_vesting_withdraw {"from_account":"blood","to_account":"pfunk","withdrawn":"2356.674631 VESTS","deposited":"2356.674631 VESTS"}
 75    8696244    0000000000000000000000000000000000000000 fill_vesting_withdraw {"from_account":"blood","to_account":"blood","withdrawn":"2356.674631 VESTS","deposited":"0.000 STEEM"}
 76    8897557    0000000000000000000000000000000000000000 fill_vesting_withdraw {"from_account":"blood","to_account":"pfunk","withdrawn":"2356.674631 VESTS","deposited":"2356.674631 VESTS"}
 77    8897557    0000000000000000000000000000000000000000 fill_vesting_withdraw {"from_account":"blood","to_account":"blood","withdrawn":"2356.674631 VESTS","deposited":"0.000 STEEM"}
 78    9098903    a9c40f1739cff6b9c67d551357ddb94c5a40d352 fill_vesting_withdraw {"from_account":"blood","to_account":"pfunk","withdrawn":"2356.674631 VESTS","deposited":"2356.674631 VESTS"}
 79    9098903    a9c40f1739cff6b9c67d551357ddb94c5a40d352 fill_vesting_withdraw {"from_account":"blood","to_account":"blood","withdrawn":"2356.674631 VESTS","deposited":"0.000 STEEM"}

Different nodes report different hashes, and none of them reference valid tx's.

mvandeberg commented 6 years ago

I don't think this is an issue any more.

inertia186 commented 6 years ago

Observed on testnet. When there is no op in a block, the vop gets an invalid trx_id, which explains why it would be rarely observed on mainnet.

curl -s --data '{"jsonrpc":"2.0","id":"1","method":"condenser_api.get_ops_in_block","params":[417041,false]}' https://testnet.steemitdev.com
{
   "jsonrpc":"2.0",
   "result":[
      {
         "trx_id":"491201af771a086f3a520cb4c675d676fec62467",
         "block":417041,
         "trx_in_block":4294967295,
         "op_in_trx":0,
         "virtual_op":1,
         "timestamp":"2018-10-14T03:30:24",
         "op":[
            "producer_reward",
            {
               "producer":"init-2",
               "vesting_shares":"0.070454 VESTS"
            }
         ]
      }
   ],
   "id":"1"
}

Note the trx_id: 491201af771a086f3a520cb4c675d676fec62467

The next block:

curl -s --data '{"jsonrpc":"2.0","id":"1","method":"condenser_api.get_ops_in_block","params":[417041,false]}' https://testnet.steemitdev.com
{
  "jsonrpc": "2.0",
  "result": [
    {
      "trx_id": "9f3aecd81c280414eabf39ad1a3b1926b933f866",
      "block": 417042,
      "trx_in_block": 0,
      "op_in_trx": 0,
      "virtual_op": 0,
      "timestamp": "2018-10-14T03:30:24",
      "op": [
        "vote",
        {
          "voter": "bobtucks",
          "author": "haejin",
          "permlink": "4y4gyp-supervalu-inc-svu-analysis",
          "weight": 5000
        }
      ]
    },
    {
      "trx_id": "0000000000000000000000000000000000000000",
      "block": 417042,
      "trx_in_block": 4294967295,
      "op_in_trx": 0,
      "virtual_op": 1,
      "timestamp": "2018-10-14T03:30:27",
      "op": [
        "producer_reward",
        {
          "producer": "init-14",
          "vesting_shares": "0.070454 VESTS"
        }
      ]
    }
  ],
  "id": "1"
}

In account history for init-2, a vop has trx_id: 491201af771a086f3a520cb4c675d676fec62467

curl -s --data '{"jsonrpc":"2.0","id":1,"method":"condenser_api.get_account_history","params":["init-2",-1,1000]}' https://testnet.steemitdev.com
.
.
.
    [
      17480,
      {
        "trx_id": "0000000000000000000000000000000000000000",
        "block": 417026,
        "trx_in_block": 4294967295,
        "op_in_trx": 0,
        "virtual_op": 1,
        "timestamp": "2018-10-14T03:29:21",
        "op": [
          "producer_reward",
          {
            "producer": "init-2",
            "vesting_shares": "0.070454 VESTS"
          }
        ]
      }
    ],
    [
      17481,
      {
        "trx_id": "491201af771a086f3a520cb4c675d676fec62467",
        "block": 417041,
        "trx_in_block": 4294967295,
        "op_in_trx": 0,
        "virtual_op": 1,
        "timestamp": "2018-10-14T03:30:24",
        "op": [
          "producer_reward",
          {
            "producer": "init-2",
            "vesting_shares": "0.070454 VESTS"
          }
        ]
      }
    ],
    [
      17482,
      {
        "trx_id": "0000000000000000000000000000000000000000",
        "block": 417056,
        "trx_in_block": 4294967295,
        "op_in_trx": 0,
        "virtual_op": 1,
        "timestamp": "2018-10-14T03:31:27",
        "op": [
          "producer_reward",
          {
            "producer": "init-2",
            "vesting_shares": "0.070454 VESTS"
          }
        ]
      }
    ]
.
.
.