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: expand nonce to 128-bit #1666

Merged
merged 2 commits into from
Sep 30, 2019

Conversation

zhangsoledad
Copy link
Member

@zhangsoledad zhangsoledad commented Sep 29, 2019

breaking change

  • expand nonce to 128-bit
  • change pow_message from [nonce + pow_hash] to [pow_hash + nonce ]

@zhangsoledad zhangsoledad requested a review from a team September 29, 2019 15:12
@zhangsoledad zhangsoledad changed the title feat: expand nonce to 128-bit [WIP] feat: expand nonce to 128-bit Sep 29, 2019
nervos-bot[bot]
nervos-bot bot previously requested changes Sep 29, 2019
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 @zhangsoledad.

@zhangsoledad zhangsoledad added b:rpc Break RPC interface breaking change The feature breaks consensus, database, message schema or RPC interface. s:waiting-on-reviewers Status: Waiting for Review labels Sep 29, 2019
@zhangsoledad
Copy link
Member Author

zhangsoledad commented Sep 29, 2019

@zhangsoledad zhangsoledad changed the title [WIP] feat: expand nonce to 128-bit feat: expand nonce to 128-bit Sep 29, 2019
@nervos-bot nervos-bot bot dismissed their stale review September 29, 2019 18:42

Unhold as requested by @zhangsoledad.

util/jsonrpc-types/src/uint128.rs Outdated Show resolved Hide resolved
util/jsonrpc-types/src/uint128.rs Outdated Show resolved Hide resolved
util/jsonrpc-types/src/uint128.rs Outdated Show resolved Hide resolved
spec/src/lib.rs Outdated Show resolved Hide resolved
@@ -675,11 +675,11 @@ mod tests {
let num = 200;
Copy link
Collaborator

Choose a reason for hiding this comment

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

let num = 200u128;

Copy link
Member Author

@zhangsoledad zhangsoledad Sep 30, 2019

Choose a reason for hiding this comment

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

this doesn't help,
these tests will also take the num as BlockNumber, cast can't be avoided.

fn insert_block(
        chain_controller: &ChainController,
        shared: &Shared,
        nonce: u128,
        number: BlockNumber,
) 

@doitian
Copy link
Member

doitian commented Sep 30, 2019

bors r+

@nervos-bot nervos-bot bot added the s:ready-to-merge Status: Waiting to be merged. label Sep 30, 2019
bors bot added a commit that referenced this pull request Sep 30, 2019
1666: feat: expand nonce to 128-bit r=doitian a=zhangsoledad

### breaking change
* expand nonce to 128-bit
* change pow_message from [nonce + pow_hash] to [pow_hash + nonce ]

Co-authored-by: zhangsoledad <787953403@qq.com>
@bors
Copy link
Contributor

bors bot commented Sep 30, 2019

Build succeeded

  • continuous-integration/travis-ci/push

@bors bors bot merged commit 62eaab7 into nervosnetwork:develop Sep 30, 2019
@backporting
Copy link

backporting bot commented Sep 30, 2019

The backport to rc/v0.22 failed:

Commits ["017afeacdbfddad8dfda2650cd543e74c7ab9d7c","62eaab7bed92987357a62c6c0e4f75534b57e20f"] could not be cherry-picked on top of rc/v0.22

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport rc/v0.22
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 017afeacdbfddad8dfda2650cd543e74c7ab9d7c 62eaab7bed92987357a62c6c0e4f75534b57e20f
# Create a new branch with these backported commits.
git checkout -b backport-1666-to-rc/v0.22
# Push it to GitHub.
git push --set-upstream origin backport-1666-to-rc/v0.22
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is rc/v0.22 and the compare/head branch is backport-1666-to-rc/v0.22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:rpc Break RPC interface breaking change The feature breaks consensus, database, message schema or RPC interface. s:ready-to-merge Status: Waiting to be merged. s:waiting-on-reviewers Status: Waiting for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants