-
Notifications
You must be signed in to change notification settings - Fork 228
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
New verification model #913
Merged
zhangsoledad
merged 13 commits into
nervosnetwork:develop
from
xxuejie:new-verification-model
Jun 1, 2019
Merged
New verification model #913
zhangsoledad
merged 13 commits into
nervosnetwork:develop
from
xxuejie:new-verification-model
Jun 1, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@jjyr is assigned as the chief reviewer |
janx
reviewed
May 29, 2019
janx
reviewed
May 29, 2019
doitian
added
b:consensus
Break consensus
b:database
Break database schema
b:p2p
Break P2P protocols
b:rpc
Break RPC interface
labels
May 29, 2019
janx
reviewed
May 29, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test case to cover the fix?
fix: use separate lock and type groups in case of duplicate script
fd67f74
jjyr
reviewed
May 29, 2019
jjyr
suggested changes
May 31, 2019
jjyr
approved these changes
May 31, 2019
janx
approved these changes
Jun 1, 2019
Based on feedbacks gathered earlier, we are revising our verification model with the following changes: * When validating a transaction, CKB will grab all lock scripts from all inputs, and group them based on lock script hash. The script in each group will only be run once. The lock script itself will have to do the validation task for all inputs in the same group * CKB will also grab all type scripts from inputs and outputs(notice different from previous version, the type scripts in inputs are included here as well), and group them based on type script hash as well. Each type script in each group will also be run once. The type script itself needs to handle the validation task within the group * Syscalls are also revised to allow fetching all the inputs/outputs/witnesses within a single group. The default secp256k1_blake160_sighash_all lock script is compiled from the following source: https://github.com/nervosnetwork/ckb-system-scripts/blob/e00ba451dccb7a516454ea9606de3a21c8f9a80c/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:20190529
The default secp256k1_blake160_sighash_all lock script is compiled from the following source: https://github.com/nervosnetwork/ckb-system-scripts/blob/680f4287ab3211025761aaf5cae3727fb4ea7241/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:20190529
zhangsoledad
approved these changes
Jun 1, 2019
This was referenced Jun 3, 2019
Closed
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
b:consensus
Break consensus
b:database
Break database schema
b:p2p
Break P2P protocols
b:rpc
Break RPC interface
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on feedbacks gathered earlier, we are revising our verification
model with the following changes:
all inputs, and group them based on lock script hash. The script in
each group will only be run once. The lock script itself will have
to do the validation task for all inputs in the same group
different from previous version, the type scripts in inputs are
included here as well), and group them based on type script hash as
well. Each type script in each group will also be run once. The type
script itself needs to handle the validation task within the group
inputs/outputs/witnesses within a single group.