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

Is it better to unlock jobs which after < BTC_JUMP_CONFIRMATION_BLOCKS #124

Open
Flouse opened this issue May 4, 2024 · 2 comments
Open
Labels

Comments

@Flouse
Copy link
Contributor

Flouse commented May 4, 2024

Context

https://github.com/ckb-cell/btc-assets-api/blob/1cf58ea3ac6e381d3f67c3b3be448d8c818a4c74/src/services/unlocker.ts#L76-L85

TL;DR

Q: Is it better to unlock jobs which after < BTC_JUMP_CONFIRMATION_BLOCKS
A: Yes.

Reason

In the BTCTimeLock contract, MIN_BTC_TIME_LOCK_AFTER=6.
See also:

@Flouse Flouse added the P-Low label May 4, 2024
@Flouse Flouse changed the title Is it better the unlock jobs which after < BTC_JUMP_CONFIRMATION_BLOCKS Is it better to unlock jobs which after < BTC_JUMP_CONFIRMATION_BLOCKS May 4, 2024
@ahonn
Copy link
Contributor

ahonn commented May 5, 2024

We do this now, and what we need to discuss here is whether to delay processing when the after field of the cell is small then BTC_JUMP_CONFIRMATION_BLOCKS

@Flouse
Copy link
Contributor Author

Flouse commented May 8, 2024

When the after field of the cell is smaller then BTC_JUMP_CONFIRMATION_BLOCKS and the related btc transaction confirmation is smaller then BTC_JUMP_CONFIRMATION_BLOCKS, the unlocking btc-time-lock transaction will fail.

So, I think it should be delayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants