Author Topic: Duplicate transaction on different Block  (Read 2215 times)

0 Members and 1 Guest are viewing this topic.

Offline vikram

Did you base your code off of master branch? You should base your code off of toolkit branch as stated in the README in order to avoid all of the hardfork logic that is specific to only the BTS network.

Offline xiaorui.dong

  • Newbie
  • *
  • Posts: 13
    • View Profile
  • BitShares: dongxr
What is the output of the following commands?:

Code: [Select]
blockchain_get_block 601
blockchain_get_block 613
blockchain_get_block 756

(wallet closed) >>> blockchain_get_block 601
{
  "previous": "5afb6fd74d3bfd8268537e2dac0aea58ea44b387",
  "block_num": 601,
  "timestamp": "2015-05-18T06:14:30",
  "transaction_digest": "c8cf12fe3180ed901a58a0697a522f1217de72d04529bd255627a4a
d6164f0f0",
  "next_secret_hash": "e8fb9325d5ac58a65cc5ee0abe92236117ce08e0",
  "previous_secret": "bf5ce1cb5366e47b61ccab6cc4e28cad2d5a3b65",
  "delegate_signature": "1f1c291cca114fa8296368975a39efd627bc593fd26a97bc2ab5076
642789bcc010ed5eb68688a5c0b55e734879ef23bbab9d9e0d160026303c5d43b682545b6df",
  "user_transaction_ids": [
    "fbc3e30c1ed74cbda1956c6ea2647645e8d18c61"
  ],
  "id": "614faad84074a19c5105efcc271e7203a6ff5560",
  "block_size": 311,
  "latency": 0,
  "signee_shares_issued": 0,
  "signee_fees_collected": 0,
  "signee_fees_destroyed": 0,
  "random_seed": "0000000000000000000000000000000000000000",
  "processing_time": 0
}

(wallet closed) >>> blockchain_get_block 613
{
  "previous": "9c53938dea4ed219efd36df20423f16bcdb976e5",
  "block_num": 613,
  "timestamp": "2015-05-18T06:16:40",
  "transaction_digest": "c8cf12fe3180ed901a58a0697a522f1217de72d04529bd255627a4a
d6164f0f0",
  "next_secret_hash": "8fe2b5620c6081690bc1d1e04cf378184ca30db2",
  "previous_secret": "bde6608e3204a905f4ee2dec76711caa009483d7",
  "delegate_signature": "1f6eef98d60a1e710105637f035a6199b2306f7076c1ad319ca2638
379f5653757329bdf5a27c1320346a5719c403025f0499760989be072a8d28e625cfc61dbe3",
  "user_transaction_ids": [
    "fbc3e30c1ed74cbda1956c6ea2647645e8d18c61"
  ],
  "id": "0a4a953235e3e49d4255f040f43ed9c698a5f9bc",
  "block_size": 311,
  "latency": 0,
  "signee_shares_issued": 0,
  "signee_fees_collected": 0,
  "signee_fees_destroyed": 0,
  "random_seed": "0000000000000000000000000000000000000000",
  "processing_time": 0
}

(wallet closed) >>> blockchain_get_block 756
{
  "previous": "b20fdd3a3b4e95f4e515d0d152d8832614b2d330",
  "block_num": 756,
  "timestamp": "2015-05-18T06:43:10",
  "transaction_digest": "c8cf12fe3180ed901a58a0697a522f1217de72d04529bd255627a4a
d6164f0f0",
  "next_secret_hash": "5b756145e536d6c17a5e4e47974c8dc6544c03ff",
  "previous_secret": "6a654bbb1e11c18b96870e5738d019076937ca77",
  "delegate_signature": "2007e6541e3ba1b494c0935f19238be9fb6416ebdc4781de498dcad
529cfaa83d7222221613a7313a2664f7d4ad6bd07e340db46d586895290d09c06e2efe09515",
  "user_transaction_ids": [
    "fbc3e30c1ed74cbda1956c6ea2647645e8d18c61"
  ],
  "id": "85068bb246d03b3df3eb5f7a6c52c6ac5fd7228a",
  "block_size": 311,
  "latency": 0,
  "signee_shares_issued": 0,
  "signee_fees_collected": 0,
  "signee_fees_destroyed": 0,
  "random_seed": "0000000000000000000000000000000000000000",
  "processing_time": 0
}

Offline vikram

What is the output of the following commands?:

Code: [Select]
blockchain_get_block 601
blockchain_get_block 613
blockchain_get_block 756

Offline xiaorui.dong

  • Newbie
  • *
  • Posts: 13
    • View Profile
  • BitShares: dongxr
transactions with the same ID are identical and should not be able to make it into two different blocks.
I am fairly certain this cannot happen in the BitShares Network .. I usually get a "duplicated transactions" warning ..
What have be done to get them included twice?

@vikram: do you know what is happending here?

I think so too.But you see, I get the block transaction. 601 block and 613 block have the same transaction.
Actually, there are 14 same transaction until the block 756.
All these transaction's block_num is756

Offline xiaorui.dong

  • Newbie
  • *
  • Posts: 13
    • View Profile
  • BitShares: dongxr
Which version did you use to build that test network? The develop branch, or master or something completely different?

I use the source code Apr.3,2015

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Which version did you use to build that test network? The develop branch, or master or something completely different?
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
transactions with the same ID are identical and should not be able to make it into two different blocks.
I am fairly certain this cannot happen in the BitShares Network .. I usually get a "duplicated transactions" warning ..
What have be done to get them included twice?

@vikram: do you know what is happending here?

Offline xiaorui.dong

  • Newbie
  • *
  • Posts: 13
    • View Profile
  • BitShares: dongxr
closed Malleability bug:
https://github.com/BitShares/bitshares/issues/1129

I am afraid it is not the reason.I used the source code of Apr.3, 2015.And the transaction in this issue has a different ID.But These in my blockchain is complete same.

I am sorry my english is poor.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc

Offline xiaorui.dong

  • Newbie
  • *
  • Posts: 13
    • View Profile
  • BitShares: dongxr
     I build 10 node to test the bitshares sourcecode.But I met a problem yestarday.
     I found the block chain have some Duplicate transaction .
     I Confused that why the NO.601 block have the TRX with "block_num": 756,
 
Did anyone met before?Or who knows the reason?

For example:
blockchain_get_block_transactions 601
[[
    "fbc3e30c1ed74cbda1956c6ea2647645e8d18c61",{
      "trx": {
        "expiration": "2015-05-18T07:14:20",
        "operations": [{
            "type": "withdraw_op_type",
            "data": {
              "balance_id": "TTSPznLYup2rKYNRDQiTuRd58auWn9WojRth",
              "amount": 10050000,
              "claim_input_data": ""
            }
          },{
            "type": "deposit_op_type",
            "data": {
              "amount": 10000000,
              "condition": {
                "asset_id": 0,
                "slate_id": 0,
                "type": "withdraw_signature_type",
                "data": {
                  "owner": "TTSDyxeokoeGhKg39HEMpsBn6r2Hw7iURZ9k"
                }
              }
            }
          }
        ],
        "signatures": [
          "2017ba81858acf26d315b7fe0b2be0e2837fa0991db429961a3e46fa789d3c6a903fbb3f8d13452fc89855f1aeb379cce8e043df825a51a819db7a32c6756ad122"
        ]
      },
      "signed_keys": [],
      "deposits": [[
          0,
          10000000
        ]
      ],
      "withdraws": [[
          0,
          10050000
        ]
      ],
      "yield": [],
      "deltas": [[
          0,[[
              0,
              -10050000
            ]
          ]
        ],[
          1,[[
              0,
              10000000
            ]
          ]
        ]
      ],
      "required_fees": {
        "amount": 0,
        "asset_id": 0
      },
      "alt_fees_paid": {
        "amount": 0,
        "asset_id": 0
      },
      "balance": [[
          0,
          50000
        ]
      ],
      "delegate_vote_deltas": [],
      "chain_location": {
        "block_num": 756,
        "trx_num": 0
      }
    }
  ]
]

blockchain_get_block_transactions 613
[[
    "fbc3e30c1ed74cbda1956c6ea2647645e8d18c61",{
      "trx": {
        "expiration": "2015-05-18T07:14:20",
        "operations": [{
            "type": "withdraw_op_type",
            "data": {
              "balance_id": "TTSPznLYup2rKYNRDQiTuRd58auWn9WojRth",
              "amount": 10050000,
              "claim_input_data": ""
            }
          },{
            "type": "deposit_op_type",
            "data": {
              "amount": 10000000,
              "condition": {
                "asset_id": 0,
                "slate_id": 0,
                "type": "withdraw_signature_type",
                "data": {
                  "owner": "TTSDyxeokoeGhKg39HEMpsBn6r2Hw7iURZ9k"
                }
              }
            }
          }
        ],
        "signatures": [
          "2017ba81858acf26d315b7fe0b2be0e2837fa0991db429961a3e46fa789d3c6a903fbb3f8d13452fc89855f1aeb379cce8e043df825a51a819db7a32c6756ad122"
        ]
      },
      "signed_keys": [],
      "deposits": [[
          0,
          10000000
        ]
      ],
      "withdraws": [[
          0,
          10050000
        ]
      ],
      "yield": [],
      "deltas": [[
          0,[[
              0,
              -10050000
            ]
          ]
        ],[
          1,[[
              0,
              10000000
            ]
          ]
        ]
      ],
      "required_fees": {
        "amount": 0,
        "asset_id": 0
      },
      "alt_fees_paid": {
        "amount": 0,
        "asset_id": 0
      },
      "balance": [[
          0,
          50000
        ]
      ],
      "delegate_vote_deltas": [],
      "chain_location": {
        "block_num": 756,
        "trx_num": 0
      }
    }
  ]
]