You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
confirmOpReturnAsync only parses the response got from the insight service to check the presence of the Merkle root. This behavior leads the function to validate the receipt even when the corresponding BitCoin transaction is pending (ie. not mined yet).
This is misleading: isValidReceipt acknowledges the receipt whereas there is no guarantee that it will eventually be stored on the blockchain.
In addition, the block depth would be a valuable piece of information.
Both points can be addressed by checking blockheight in the insight service response.
In order to not break the existing clients, isValidReceipt could still return true as soon as the transaction is spotted by the insight service. The presence on a blockheight field passed to the callback could help new clients decide for themselves.
Note: I didn't check the other services, only BitCoin/OP_RETURN. Thus, this issue may or may not apply to the other techniques.
The text was updated successfully, but these errors were encountered:
confirmOpReturnAsync
only parses the response got from the insight service to check the presence of the Merkle root. This behavior leads the function to validate the receipt even when the corresponding BitCoin transaction is pending (ie. not mined yet).This is misleading:
isValidReceipt
acknowledges the receipt whereas there is no guarantee that it will eventually be stored on the blockchain.In addition, the block depth would be a valuable piece of information.
Both points can be addressed by checking
blockheight
in the insight service response.In order to not break the existing clients,
isValidReceipt
could still returntrue
as soon as the transaction is spotted by the insight service. The presence on ablockheight
field passed to the callback could help new clients decide for themselves.Note: I didn't check the other services, only BitCoin/OP_RETURN. Thus, this issue may or may not apply to the other techniques.
The text was updated successfully, but these errors were encountered: