-
Notifications
You must be signed in to change notification settings - Fork 75
Dash synchronisation stuck in an infinite loop #605
Comments
I think the problem is because the datahash is not being calculated correctly for coinbase transactions and after the transactionis not found in the block. The datahash is calculated in struct FullTransaction
but for coinbase transaction there are more fields. I fix the problem moving the calculation of datahash to method deserialize in the class TransactionSerializer
|
The problem is not completely solved, now only takes into account the last coinbase transaction, other coinbase transactions are ignored. |
This type of input always have the same txid 0000000000000000000000000000000000000000000000000000000000 and only the last is stored in database |
I'm wrong is not txid, is previousOutputTxHash . For coinbase input previousOutputTxHash always have the value 0x0000000000000000000000000000000000000000000000000000000000, if you have multiple coinbase transactions only the last transaction input is stored, and other transactions are invalidated. |
With this changes only stores last coinbase transaction |
I have a Dash wallet that stops the synchronisation when it arrives to this transaction
https://blockchair.com/es/dash/transaction/3cc6e81dbb258a6fb88fb46e35b0a8e6e6c77fd4699d4a8100b9c700a5a7b3de
This transaction comes from Dash masternode, and it has a coinbase input, I believe that DashKit doesn't support this type of inputs and it gets stuck in an infinite loop.
https://dashcore.readme.io/docs/core-ref-transactions-raw-transaction-format#coinbase-input-the-input-of-the-first-transaction-in-a-block
The text was updated successfully, but these errors were encountered: