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

[HOLD] feat: default lock script use recoverable signing #1012

Conversation

jjyr
Copy link
Contributor

@jjyr jjyr commented Jun 14, 2019

By using secp256k1 recoverable signing, we can significantly reduce tx size by removing the pubkey from tx witness. The total cycles for verification increased from 2660252 to 2739437 for a typical 2-in-2-out tx. discussion is on nervosnetwork/ckb-system-scripts#15

The default secp256k1_blake160_sighash_all lock script is compiled
from the following source:

https://github.com/nervosnetwork/ckb-system-scripts/blob/517e667a3ce496b58ba948e22b34d1e5c9e79710/c/secp256k1_blake160_sighash_all.c

The exact gcc version used in the compilation can be located in the
following docker image:

xxuejie/riscv-gnu-toolchain-rv64imac: 20190606

By using secp256k1 recoverable signing, we can significantly reduce tx size by removing the pubkey from tx witness. The total cycles for verification increased from 2660252 to 2739437 for a typical 2-in-2-out tx. discussion is on nervosnetwork/ckb-system-scripts#15

The default secp256k1_blake160_sighash_all lock script is compiled
from the following source:

https://github.com/nervosnetwork/ckb-system-scripts/blob/517e667a3ce496b58ba948e22b34d1e5c9e79710/c/secp256k1_blake160_sighash_all.c

The exact gcc version used in the compilation can be located in the
following docker image:

xxuejie/riscv-gnu-toolchain-rv64imac: 20190606
@jjyr jjyr requested a review from a team June 14, 2019 07:58
Copy link

@nervos-bot nervos-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hold as requested by @jjyr.

@nervos-bot
Copy link

nervos-bot bot commented Jun 14, 2019

@zhangsoledad is assigned as the chief reviewer

Copy link
Member

@doitian doitian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hold. We should stop committing binaries into the repo.

@doitian doitian closed this Jun 18, 2019
doitian added a commit that referenced this pull request Jun 18, 2019
1. Replace system cell to another repo
2. cherry pick #1012 to this pr

BREAKING CHANGE: It changes the default secp256k1 script, which now uses recoverable signature.

Co-authored-by: Jiang Jinyang <jjyruby@gmail.com>
Co-authored-by: driftluo <driftluo@foxmail.com>
This was referenced Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants