ckb-cell / rgbpp-sdk

Utilities for Bitcoin and RGB++ asset integration
ISC License
52 stars 16 forks source link

Support BTC signet #170

Closed ShookLyngs closed 1 month ago

ShookLyngs commented 3 months ago

Background

The BTC testnet3 is currently slow and the peak fee rate is sky high. Therefore, we may have to support switching to other testnets in the rgbpp-sdk/btc.

Questions

Some questions to be answered, some decisions to be made:

  1. Which network should we support: testnet4 or signet?
    1. What's the difference between these two networks?
    2. Will testnet4 become the default testnet in the future?
  2. Should the new testnet replace the NetworkType.TESTNET, or should we add a new NetworkType option?
    1. If adding an option, how should we handle them when testnet4 becomes the default testnet?

Discussion -> Conclusions

  1. BTC testnet4 is not finalized yet, so BTC signet will be supported first. BTC testnet4 may be supported later.

  2. The BTC testnet3 should continue to be maintained as most of the RGB++ testnet dApps are running on this environment. A new BTC NetworkType may be required to accommodate this need.

TODO

Bitcoin/RGB++ Assets API @ahonn @mfuuzy

BTC signet SPV on CKB testnet @EthanYuan

CKB testnet rgbpp contracts with BTC signet SPV config @EthanYuan @jjyr

rgbpp-sdk/btc @ShookLyngs

Without modification:

If adding NetworkType.SIGNET:

[!NOTE] need discussion because signet and testnet are almost exactly the same at the application level ref: https://github.com/bitcoinjs/bitcoinjs-lib/issues/1820#issuecomment-1166672693

rgbpp-sdk/ckb @duanyytop

References

Dawn-githup commented 3 months ago

You can currently claim sBTC test coins through 2 faucets

Faucet 1: https://signetfaucet.com/ (0.00001 at a time)

Faucet 2: https://botanix.5thweb.io/ (0.001 at a time, 1 time in 24 hours)

duanyytop commented 3 months ago

If we switch to BTC testnet4, do we redeploy RGB++ lock script and BTC time lock script for testnet4? If yes, we still need to update rgbpp-sdk/ckb.

Flouse commented 3 months ago

Since BTC testnet3 is coming back somehow. So the priority of supporting BTC signet or testnet4 is now lower.

If we switch to BTC testnet4, do we redeploy RGB++ lock script and BTC time lock script for testnet4? If yes, we still need to update rgbpp-sdk/ckb.

However, if testnet3 remains unstable or problematic, then rgbpp-sdk and assets-api have to investigate to support a new test environment.

So the answer to your question is Yes, in a long term.

Flouse commented 1 month ago

tracking