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(protocol): document skipping withdrawalsRoot check in circuits and client #13796

Merged
merged 81 commits into from
Jun 28, 2023

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented May 22, 2023

See #13795

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

The code changes in this Pull Request look good overall. The only potential issue is that the withdrawalsRoot is set to a constant 0x1 instead of the kecceck hash of the L1-to-L2 Ether deposits. It might be better to use the actual hash value here.

Additionally, there are a few typos in repeating variables such as processed_deposits_data and processed_deposits. It would be better to use consistent variable names throughout the code.

Overall, this looks like a good Pull Request and I recommend merging it.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Feedback:

  • The first patch changes the text from “The kecceck hash of the L1-to-L2 Ether deposits” to “0x1”. This should be clarified as it is not clear why this change is being made.
  • The second patch adds a constant variable for “1” and “0”. This should be clarified as it is not clear why these variables are being added.
  • There are typos in the repeating variables “h_withdrawals_root” and “processed_deposits_data” in the first patch and “zero” and “one” in the second patch. They should be corrected to ensure consistency.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Overall, this pull request looks good. Here are some points to consider:

  • Ensure that the withdrawalsRoot field is set to the kecceck hash of the L1-to-L2 Ether deposits instead of 0x1.
  • Check that all repeating variables have the same name (e.g. processed_deposits and processed_deposits_data).
  • Make sure that all constants are defined in the same place (e.g. zero, one, empty_string, empty_list).

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Overall, the code changes in this pull request appear to be well-structured and consistent. However, there are a few potential issues that need to be addressed.

  • There is a typo in the variable h_withdrawals_root on line 168, where it should be 0x1 instead of 1.
  • On line 210, the variable m_deposits_root is not defined anywhere in the patch.
  • On line 233, the variable tx_list is repeated twice.
  • On line 349, the constant one("1\n(one"):::constant should have an extra closing parentheses.
  • The constant processed_deposits("onchain deposits data"):::constant on line 355 is repeated twice.
  • The constant empty_string("' '\n(empty bytes)"):::constant on line 360 should have a single quote instead of double quotes.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Overall, this pull request looks like it makes some useful changes to the document. Here are some comments and suggestions:

  • The commit messages could be more descriptive.
  • It appears that the variable l2_treasury is used multiple times in the code, but is only declared once. Consider declaring it in each patch to ensure consistency.
  • In Patch 2, the constant one is declared twice - consider removing one of these declarations.
  • In Patch 5, consider adding a comment to explain why l2_treasury is being declared again.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Overall, this pull request looks good. Here are some of my comments:

  • The commit messages could be more descriptive and provide more context.
  • There are a few typos in the repeating variables such as 'kececk' instead of 'keccak'.
  • It is not clear why one is used as the withdrawalsRoot in the Global Variable section.
  • The empty_list and empty_string constants could be better named to provide more context.

Base automatically changed from prover_req_diagram to main May 22, 2023 15:18
dantaik and others added 23 commits May 22, 2023 23:34
Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>
Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>
Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>
Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>
Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>
Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>
Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>
@dantaik dantaik force-pushed the prover_req_diagram_depositsRoot branch from e4e0dd4 to 8bf62c7 Compare May 22, 2023 15:37
@dantaik dantaik changed the title Update how_taiko_proves_blocks.md feat(protocol): skip checking withdrawalsRoot in circuits and client May 22, 2023
h_difficulty(difficulty)
h_extra_data(extraData)
h_nonce(nonce)
h_logs_bloom("logsBloom = []")
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure the motivation of make header.logsBloom to equal to []?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it correct to say: "logsBloom must be a bytes32[8] with all zeros"?

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like the common representation is bytes[256] where I look, but yes, 256 0 bytes.

Co-authored-by: Brecht Devos <Brechtp.Devos@gmail.com>
@dantaik dantaik marked this pull request as ready for review June 27, 2023 02:09
@dantaik dantaik changed the title feat(protocol): skip checking withdrawalsRoot in circuits and client feat(protocol): document skipping withdrawalsRoot check in circuits and client Jun 27, 2023
@dantaik dantaik linked an issue Jun 27, 2023 that may be closed by this pull request
@dantaik dantaik changed the base branch from main to alpha-4-base June 28, 2023 07:29
@dantaik dantaik merged commit 42e9f75 into alpha-4-base Jun 28, 2023
12 checks passed
@dantaik dantaik deleted the prover_req_diagram_depositsRoot branch June 28, 2023 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

feat: skip checking withdrawalsRoot in circuits and client
4 participants