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

Support BTC signet #170

Open
13 of 15 tasks
ShookLyngs opened this issue May 14, 2024 · 3 comments · Fixed by #227 or ckb-cell/typeid-contract-cell-deps#4
Open
13 of 15 tasks

Support BTC signet #170

ShookLyngs opened this issue May 14, 2024 · 3 comments · Fixed by #227 or ckb-cell/typeid-contract-cell-deps#4
Assignees
Labels
enhancement New feature or request P-High

Comments

@ShookLyngs
Copy link
Collaborator

ShookLyngs commented May 14, 2024

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:

  • Test basic transfer with P2WPKH/P2TR accounts

If adding NetworkType.SIGNET:

  • Update the decodeAddress function and remove the networkType from the return type, as it's no longer accurate
  • Check and update where the decodeAddress function was referenced

Note

need discussion because signet and testnet are almost exactly the same at the application level
ref: bitcoinjs/bitcoinjs-lib#1820 (comment)

rgbpp-sdk/ckb @duanyytop

  • Add Signet RGB++ lock script and BTC time lock script
  • Support all RGB++ operations for BTC Signet network
  • Update all RGB++ examples to support BTC Signet network
  • Tests: adjust tests to use the new network @duanyytop @Dawn-githup

References

@Flouse Flouse changed the title [Discussion] Supporting testnet_4 or signet? Supporting testnet_4 or signet? May 14, 2024
@Flouse Flouse changed the title Supporting testnet_4 or signet? Supporting testnet_4 or signet May 14, 2024
@Dawn-githup
Copy link
Collaborator

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)

@Flouse Flouse changed the title Supporting testnet_4 or signet Support BTC signet May 14, 2024
@Flouse Flouse changed the title Support BTC signet Support BTC signet or testnet4 May 14, 2024
@Flouse Flouse added P-Low and removed P-Medium labels May 16, 2024
@duanyytop
Copy link
Collaborator

duanyytop commented May 16, 2024

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
Copy link
Contributor

Flouse commented May 16, 2024

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 Flouse removed the P-Low label May 30, 2024
@Flouse Flouse changed the title Support BTC signet or testnet4 Support BTC signet Jun 11, 2024
@Flouse Flouse added enhancement New feature or request P-High labels Jun 13, 2024
@Flouse Flouse linked a pull request Jun 13, 2024 that will close this issue
@Flouse Flouse reopened this Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P-High
Projects
None yet
4 participants