keep-network / tbtc-dapp

Deposit BTC and redeem TBTC
http://dapp.test.tbtc.network/
MIT License
33 stars 31 forks source link

tBTC dApp - error step 4/5: failed to get merkle proof #253

Closed saltypalo closed 4 years ago

saltypalo commented 4 years ago

Description:

Testnet BTC just had 1 confirmation and then this error occurred: failed to get merkle proof: [Error: failed to get transaction merkle: [tx a0adfc07afe8f4cbbc8f932d53f94d58549d09a6732ed19f9869781d312f65bc not in block at height 1,780,599]]

last contract interaction before encountering error: https://ropsten.etherscan.io/tx/0x45b6e2115185bed650cf70f31dc93d4c5ea5d2185069447508d2500c0557cbee

Steps to reproduce the behavior:

  1. Go to 'https://dapp.test.tbtc.network/deposit'
  2. Pass to step 4/5 successfully
  3. After you made btc transaction
  4. See error

Expected behavior:

Receiving tBTC and TDT at step 5

Environment details:

OS: Windows 10 Home, version 10.0.18362, 64 bit OS Web Browser: Google Chrome, Version 83.0.4103.116 (Official Build) (64-bit) Wallet: Metamask (Chrome extension), 7.7.9

Screenshots

If applicable, add screenshots to help explain your problem and any console log files. (127)

Shadowfiend commented 4 years ago

If you can share the URL here, that would be useful. I think this may happen in cases where Bitcoin testnet is forked or otherwise having consistency issues, which unfortunately is not unheard of on Bitcoin testnet.

saltypalo commented 4 years ago

@Shadowfiend sorry, i made this issue before I realised that I have to report URLs with every bug I encounter and now no one can move past step 2, since 100 tBTC are minted and we got stuck into limit. So I don't have many chances to reproduce this, I believe. But if I will be lucky to encounter this one more time, I will surely report back

Shadowfiend commented 4 years ago

Cool cool. Going to leave this open a few more days and then close until we see it resurface, in that case!

saltypalo commented 4 years ago

@Shadowfiend good (and bad simultaneously) news. I managed to get this bug one more time. https://dapp.test.tbtc.network/deposit/0x003D93b8A45D399AA164e764eCa365A0f0C8d590/prove Here's URL of my minting process. Step 4, happens after I send 0.5 testnet btc to specified address and after 1 confirmation. Here's testBTC transaction itself: https://sochain.com/tx/BTCTEST/a952648653c299ba0bfa901a373d9734d5af6b8e0dadce794fe97f679930ddea

What dapp says: failed to get merkle proof: [Error: failed to get transaction merkle: [tx a952648653c299ba0bfa901a373d9734d5af6b8e0dadce794fe97f679930ddea not in block at height 1,802,411]]

while clearly my test BTC transaction went into this block: Block No. | 1,802,412

saltypalo commented 4 years ago

dapp.test.tbtc.network-merkle proof issue console log.log Uploading console log for you

saltypalo commented 4 years ago

For what it's worth. After I submitted URL and logs, I tried to reload page. Now it passes this error and getting stuck at "Reverted by EVM" error, which is ok, since we have clogged 100 tBTC limit.

Shadowfiend commented 4 years ago

My guess here is that we need to introduce a retry… Let me dig in and see if I can find anything in the Electrum logs that would indicate how we ended up in this situation.