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(contracts): add chain id in public input hash #517

Merged
merged 3 commits into from May 28, 2023

Conversation

zimpha
Copy link
Member

@zimpha zimpha commented May 26, 2023

1. Purpose or design rationale of this PR

This PR add layer2ChainId (assume it is an uint32) to compute public input hash. The hash is computed as

keccak(chainId || chunk[0].prevStateRoot || chunk[k-1].postStateRoot || chunk[k-1].withdrawRoot || batchDataHash)

3. Deployment tag versioning

Has tag in common/version.go been updated?

  • This PR doesn't involve a new deployment, git tag, docker image tag
  • Yes

4. Breaking change label

Does this PR have the breaking-change label?

  • This PR is not a breaking change
  • Yes

@github-actions
Copy link

github-actions bot commented May 26, 2023

LCOV of commit 0f05b09 during Contracts #730

Summary coverage rate:
  lines......: 46.7% (736 of 1576 lines)
  functions..: 57.7% (153 of 265 functions)
  branches...: no data found

Files changed coverage rate: n/a

@zimpha zimpha requested a review from icemelon May 26, 2023 16:25
@scroll-dev
Copy link
Contributor

67% (+0.65%) vs master 67%

@scroll-dev
Copy link
Contributor

67% (+0.4%) vs master 67%

@HAOYUatHZ HAOYUatHZ merged commit aa24cdd into develop May 28, 2023
3 checks passed
@HAOYUatHZ HAOYUatHZ deleted the feat/add_chainid_in_public_input_hash branch May 28, 2023 01:41
georgehao pushed a commit that referenced this pull request May 30, 2023
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants