-
Notifications
You must be signed in to change notification settings - Fork 159
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
RFC30: Ensure that index is less than length in input since field using epoch. #223
Merged
doitian
merged 4 commits into
nervosnetwork:master
from
doitian:since-absolute-epoch-as-rational-number
Apr 1, 2022
Merged
RFC30: Ensure that index is less than length in input since field using epoch. #223
doitian
merged 4 commits into
nervosnetwork:master
from
doitian:since-absolute-epoch-as-rational-number
Apr 1, 2022
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
doitian
changed the title
Since absolute epoch using rational number
Ensure that index < length in input since field using epoch.
May 17, 2021
bors bot
added a commit
to nervosnetwork/ckb
that referenced
this pull request
Jun 15, 2021
2715: feat(hardfork): ckb2021 hardfork features r=yangby-cryptape a=yangby-cryptape ### Suggestions for Review **The best way to review this PR is reviewing each commit independently.** ### Brief introduction for Commits #### New hardfork Features **All following features can be found in RFC PRs.** - feat(hardfork): in the "since epoch", the index should be less than length Ref: [CKB-RFCs PR 223: Ensure that index < length in input since field using epoch](nervosnetwork/rfcs#223) - feat(hardfork): use block timestamp of input cells as relative since start timestamp Ref: [CKB-RFCs PR 221: Use Block Timestamp as Start Timestamp in Since](nervosnetwork/rfcs#221) - **[Reverted]** ~~feat(hardfork): allow unknown block versions and transactions versions~~ ~~Ref: [CKB-RFCs PR 230: Allow unknown tx & block version](nervosnetwork/rfcs#230 - feat(hardfork): allow script multiple matches on identical data for type hash-type scripts Ref: [CKB-RFCs PR 222: Allow script multiple matches on identical code](nervosnetwork/rfcs#222) - feat(hardfork): reuse the uncles hash in the header as the extra hash Ref: [CKB-RFCs PR 224: Add a variable length field in the block header](nervosnetwork/rfcs#224) - **[Reverted]** ~~feat(hardfork): allow loading uncommitted cell data hashes from tx pool~~ ~~Ref: [CKB-RFCs PR 228: ckb2021: fix load_cell_data_hash syscall](nervosnetwork/rfcs#228 #### Other Important Commits - feat(hardfork): setup the components for hard fork features - refactor: let verifiers know the real environment that the transaction is in Almost all features require this refactor commit. - refactor: remove useless parameter "with_data" because it always be true (tricky) So I can change less APIs and less code to apply the feature: allow loading uncommitted cell data hashes from tx pool. ### About Tests Almost all features have detailed integration tests (or unit tests): - Many blocks before hardfork; - Only one block before hardfork; - The block at hardfork; - Many blocks after hardfork. All commits can passed all integration tests and unit tests. Co-authored-by: zhangsoledad <787953403@qq.com> Co-authored-by: Boyu Yang <yangby@cryptape.com>
bors bot
added a commit
to nervosnetwork/ckb
that referenced
this pull request
Jun 15, 2021
2715: feat(hardfork): ckb2021 hardfork features r=quake,doitian,zhangsoledad a=yangby-cryptape ### Suggestions for Review **The best way to review this PR is reviewing each commit independently.** ### Brief introduction for Commits #### New hardfork Features **All following features can be found in RFC PRs.** - feat(hardfork): in the "since epoch", the index should be less than length Ref: [CKB-RFCs PR 223: Ensure that index < length in input since field using epoch](nervosnetwork/rfcs#223) - feat(hardfork): use block timestamp of input cells as relative since start timestamp Ref: [CKB-RFCs PR 221: Use Block Timestamp as Start Timestamp in Since](nervosnetwork/rfcs#221) - **[Reverted]** ~~feat(hardfork): allow unknown block versions and transactions versions~~ ~~Ref: [CKB-RFCs PR 230: Allow unknown tx & block version](nervosnetwork/rfcs#230 - feat(hardfork): allow script multiple matches on identical data for type hash-type scripts Ref: [CKB-RFCs PR 222: Allow script multiple matches on identical code](nervosnetwork/rfcs#222) - feat(hardfork): reuse the uncles hash in the header as the extra hash Ref: [CKB-RFCs PR 224: Add a variable length field in the block header](nervosnetwork/rfcs#224) - **[Reverted]** ~~feat(hardfork): allow loading uncommitted cell data hashes from tx pool~~ ~~Ref: [CKB-RFCs PR 228: ckb2021: fix load_cell_data_hash syscall](nervosnetwork/rfcs#228 #### Other Important Commits - feat(hardfork): setup the components for hard fork features - refactor: let verifiers know the real environment that the transaction is in Almost all features require this refactor commit. - refactor: remove useless parameter "with_data" because it always be true (tricky) So I can change less APIs and less code to apply the feature: allow loading uncommitted cell data hashes from tx pool. ### About Tests Almost all features have detailed integration tests (or unit tests): - Many blocks before hardfork; - Only one block before hardfork; - The block at hardfork; - Many blocks after hardfork. All commits can passed all integration tests and unit tests. Co-authored-by: zhangsoledad <787953403@qq.com> Co-authored-by: Boyu Yang <yangby@cryptape.com>
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.
It seems that >
doesn't require any escape character.
...0000-since-absolute-epoch-as-rational-number/0000-since-absolute-epoch-as-rational-number.md
Outdated
Show resolved
Hide resolved
...0000-since-absolute-epoch-as-rational-number/0000-since-absolute-epoch-as-rational-number.md
Outdated
Show resolved
Hide resolved
...0000-since-absolute-epoch-as-rational-number/0000-since-absolute-epoch-as-rational-number.md
Outdated
Show resolved
Hide resolved
doitian
changed the title
Ensure that index < length in input since field using epoch.
RFC223: Ensure that index < length in input since field using epoch.
Jul 22, 2021
doitian
force-pushed
the
since-absolute-epoch-as-rational-number
branch
from
July 22, 2021 14:51
8578404
to
552c2a1
Compare
doitian
changed the title
RFC223: Ensure that index < length in input since field using epoch.
RFC30: Ensure that index < length in input since field using epoch.
Jul 23, 2021
doitian
force-pushed
the
since-absolute-epoch-as-rational-number
branch
from
July 23, 2021 07:29
552c2a1
to
77fa9d3
Compare
doitian
force-pushed
the
since-absolute-epoch-as-rational-number
branch
from
July 23, 2021 07:34
77fa9d3
to
c8fac5f
Compare
doitian
changed the title
RFC30: Ensure that index < length in input since field using epoch.
RFC30: Ensure that index is less than length in input since field using epoch.
Jul 24, 2021
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
janx
reviewed
Mar 1, 2022
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
doitian
commented
Mar 2, 2022
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
xxuejie
reviewed
Mar 3, 2022
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
janx
reviewed
Mar 15, 2022
rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md
Outdated
Show resolved
Hide resolved
…ndex-less-than-length-in-since.md Co-authored-by: busyforking <5958+janx@users.noreply.github.com>
xxuejie
approved these changes
Mar 17, 2022
janx
approved these changes
Mar 17, 2022
doitian
added
the
s:fcp
Final Comment Period. PR is merged when there's no comments in 14 days.
label
Mar 18, 2022
FCP will end on 2022-04-01 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
b:consensus
Break consensus
ckb2021
Hard fork scheduled in 2021
s:fcp
Final Comment Period. PR is merged when there's no comments in 14 days.
soft-fork
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.
This document proposes to prevent a bug in the CKB reference implementation and avoid ambiguity. When a transaction input uses the absolute epoch in the
since
field, thevalue
is an encoded numbere + i / l
. This RFC proposes to add a rule to verify thati <= l
ori
andl
are both zero.