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

Suggestions of UX improvement #79

Open
jjyr opened this issue Feb 20, 2023 · 4 comments
Open

Suggestions of UX improvement #79

jjyr opened this issue Feb 20, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@jjyr
Copy link
Collaborator

jjyr commented Feb 20, 2023

ckb-capsule leverage ckb-cli and docker to manage pks and build environment, but sometimes those tools block users' experience.

In #77 , the new version of ckb-cli brokes the capsule's feature. In the end, we need to release a new version to be compatible with the new version ckb-cli. What if a user upgrades the capsule to the latest version but stays with an old version of ckb-cli? The capsule command is still broken!

Capsule requires docker to build binaries. It is for the reproducible build. But when the docker image is x86, you cannot build it on a non-x86 device. To improve the developer's UX, we should support build without docker.

Due to the above reasons, I suggest the following feature/refactoring.

  1. Build improvement
    1. Support non-docker mode. Remove the dependency of docker.
    2. Allow customized build commands.
    3. Support multi-language by separated binaries, such as ckb-capsule-rust, ckb-capsule-c, and ckb-capsule-lua.
      1. We can release a new version of language build support without releasing a new capsule.
  2. Deployment improvement
    1. capsule should output a hexed encoded transaction. Let ckb-cli handle the signing and sending.
    2. Remove the deploy command, since ckb-cli support deploy https://github.com/nervosnetwork/ckb-cli/wiki/Deploy-contracts
  3. Testing improvement
    1. Manipulate chain context needs to be simplified. The chain should act as a Gananche-like chain simulator.
    2. The transaction build should be simplified.
    3. Reference to system scripts should be simplified.
@jjyr jjyr added the enhancement New feature or request label Feb 20, 2023
@blckngm
Copy link
Collaborator

blckngm commented Feb 20, 2023

Now that ckb-cli supports deployment (https://github.com/nervosnetwork/ckb-cli/wiki/Deploy-contracts), is it still necessary for capsule to have a deployment functionality?

@jjyr jjyr self-assigned this Feb 20, 2023
@KaoImin
Copy link

KaoImin commented Mar 8, 2023

Capsule can add the ckb-std dependency to the Cargo.toml file in template.

@duanyytop
Copy link
Contributor

duanyytop commented Mar 9, 2023

Can Capsule ckb-testtool support the script whose hash_type is type?

@blckngm
Copy link
Collaborator

blckngm commented Apr 13, 2023

Can Capsule ckb-testtool support the script whose hash_type is type?

Does this work?

https://docs.rs/ckb-testtool/latest/ckb_testtool/context/struct.Context.html#method.create_cell

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

4 participants