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

feat(hardfork): ckb2021 hardfork features #2715

Merged
merged 23 commits into from
Jun 15, 2021
Merged

feat(hardfork): ckb2021 hardfork features #2715

merged 23 commits into from
Jun 15, 2021

Conversation

yangby-cryptape
Copy link
Collaborator

@yangby-cryptape yangby-cryptape commented May 24, 2021

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.

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.

@yangby-cryptape yangby-cryptape changed the base branch from ckb2021-staging to develop May 25, 2021 17:46
@yangby-cryptape yangby-cryptape added the s:hold Status: Put this issue on hold. label May 25, 2021
@yangby-cryptape

This comment has been minimized.

@quake

This comment has been minimized.

@quake

This comment has been minimized.

@nervos-bot-user

This comment has been minimized.

@yangby-cryptape

This comment has been minimized.

@nervos-bot-user

This comment has been minimized.

@nervos-bot-user

This comment has been minimized.

@yangby-cryptape

This comment has been minimized.

@yangby-cryptape
Copy link
Collaborator Author

I will apply all request changes at last in one commit.

@yangby-cryptape yangby-cryptape removed the s:waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Jun 8, 2021
quake
quake previously approved these changes Jun 11, 2021
verification/src/transaction_verifier.rs Outdated Show resolved Hide resolved
quake
quake previously approved these changes Jun 11, 2021
quake
quake previously approved these changes Jun 11, 2021
@yangby-cryptape
Copy link
Collaborator Author

bors r+

bors bot added a commit 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>
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.

Let bors work

@quake
Copy link
Member

quake commented Jun 15, 2021

bors r=quake,doitian,zhangsoledad

@bors
Copy link
Contributor

bors bot commented Jun 15, 2021

Build succeeded:

@bors bors bot merged commit 85d04c3 into develop Jun 15, 2021
@bors bors bot deleted the ckb2021-develop branch June 15, 2021 06:38
@yangby-cryptape yangby-cryptape added u:ckb2021 Upgrade: Fork ckb2021 and removed s:waiting-on-reviewers Status: Waiting for Review labels Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
u:ckb2021 Upgrade: Fork ckb2021
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants