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

ckb-testtool enhanchment #94

Open
6 tasks
jjyr opened this issue Apr 18, 2023 · 2 comments
Open
6 tasks

ckb-testtool enhanchment #94

jjyr opened this issue Apr 18, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@jjyr
Copy link
Collaborator

jjyr commented Apr 18, 2023

Chain simulator

  • Provide a function to set up a devnet chain, including built-in contracts and the genesis block.
  • Provide a high-level interface of the dev-chain to replace the Context.

Helper functions

  • Prepare the address with CKB for testing.
  • Signer abstraction(single lock, multi-sig lock, rc lock).
  • Automatically complete the transaction inputs with a sender address.

Debugger

  • Support easily build & export a ckb-debugger format transaction
@jjyr jjyr added the enhancement New feature or request label Apr 18, 2023
@blckngm
Copy link
Collaborator

blckngm commented Apr 20, 2023

Copying/editing from #88:

I think we should try to make it easier to debug/profile transactions from ckb-testtool, e.g. we can add a function to dump a transaction in the format expected by ckb-debugger.

@jjyr
Copy link
Collaborator Author

jjyr commented Apr 24, 2023

After second thoughts, I think we should focus on implementing a CKB RPC-compatible simulator chain instead of providing more testing helper functions.

Compared to the CKB dev chain, we should have the advantage in the following aspects:

  1. Easily mock cells and blocks to simulate different scenarios.
  2. Record failed transactions and provide a way to replay them.
  3. Output diagnosis for failed transactions.
  4. Support different submit modes.

Other Dapp developers can connect to the simulator chain to debug their Apps without any modification.

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

No branches or pull requests

2 participants