capsule
capsule copied to clipboard
Suggestions of UX improvement
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.
- Build improvement
- Support non-docker mode. Remove the dependency of
docker
. - Allow customized build commands.
- Support multi-language by separated binaries, such as
ckb-capsule-rust
,ckb-capsule-c
, andckb-capsule-lua
.- We can release a new version of language build support without releasing a new capsule.
- Support non-docker mode. Remove the dependency of
- ~~Deployment improvement~~
- ~~capsule should output a hexed encoded transaction. Let
ckb-cli
handle the signing and sending.~~ - Remove the deploy command, since ckb-cli support deploy https://github.com/nervosnetwork/ckb-cli/wiki/Deploy-contracts
- ~~capsule should output a hexed encoded transaction. Let
- Testing improvement
- Manipulate chain context needs to be simplified. The chain should act as a Gananche-like chain simulator.
- The transaction build should be simplified.
- Reference to system scripts should be simplified.
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?
Capsule can add the ckb-std
dependency to the Cargo.toml
file in template.
Can Capsule ckb-testtool
support the script whose hash_type
is type?
Can Capsule
ckb-testtool
support the script whosehash_type
is type?
Does this work?
https://docs.rs/ckb-testtool/latest/ckb_testtool/context/struct.Context.html#method.create_cell