Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delaying reveal process in the "make and reveal a deposit" test. #692

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

dimpar
Copy link
Contributor

@dimpar dimpar commented Sep 5, 2023

It happens that a reveal process starts when a deposit is not captured by the Bitcoin chain because it's out of sync. A delay is added to wait a bit for a chain to sync. This should fix:

1) System Test - Minting and unminting
       when minting is initiated by making and revealing a deposit to the TBTCVault
         "before all" hook: make and reveal deposit for "should broadcast the deposit transaction on the Bitcoin network":
     Error: Electrum action failure: [daemon error: DaemonError({'code': -5, 'message': 'No such mempool or blockchain transaction. Use gettransaction for wallet transactions.'})]
      at Client.withElectrum (node_modules/@keep-network/tbtc-v2.ts/src/electrum.ts:190:13)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async Object.revealDeposit (node_modules/@keep-network/tbtc-v2.ts/src/deposit.ts:393:5)
      at async Context.<anonymous> (test/minting-unminting.test.ts:159:9)

which was observed here: https://github.com/keep-network/tbtc-v2/actions/runs/6061282789/job/16446311652

It happens that a reveal process starts when a deposit is not captured
by the Bitcoin chain because it's out of sync. A delay is added to wait
for a chain to sync.
@michalinacienciala
Copy link
Contributor

I'm running the system tests on the code from this PR here: https://github.com/keep-network/tbtc-v2/actions/runs/6084288848. Let see in 2 hours if they're green.

@michalinacienciala
Copy link
Contributor

@dimpar, take a look at https://github.com/keep-network/tbtc-v2/actions/runs/6084288848/job/16505924432 - the redemptions are still going on, but we have a failure in the minting flow, different than previously, but in the same test:

  1) System Test - Minting and unminting
       when minting is initiated by making and revealing a deposit to the TBTCVault
         "before all" hook: make and reveal deposit for "should broadcast the deposit transaction on the Bitcoin network":
     Error: Electrum action failure: [the transaction was rejected by network rules.

@michalinacienciala
Copy link
Contributor

Btw, there's a GH Actions outage right now and some things may behave abnormally. But the error we got in the system tests doesn't look to me like something caused by that.

@michalinacienciala
Copy link
Contributor

I've re-run the System Tests job now that the GH outage is fixed: https://github.com/keep-network/tbtc-v2/actions/runs/6084288848. Let's see how it behaves...

Copy link
Contributor

@michalinacienciala michalinacienciala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've run the System tests twice on the feature branch, after the GH outage and the tests were passing.

@michalinacienciala michalinacienciala merged commit 4eb90c9 into main Sep 11, 2023
40 checks passed
@michalinacienciala michalinacienciala deleted the minting-unminting-timeout-fix branch September 11, 2023 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants