feat(ctb): Support `OptimismPortal2` in kontrol tests
Overview
Adds a second DeploymentSummary to kontrol for fault proofs, and
ports the existing OptimismPortal proofs with the OptimismPortal2.
Walkthrough
Walkthrough
The recent changes focus on enhancing deployment and testing frameworks in a blockchain project, emphasizing fault-proof deployment and withdrawal transaction proofs. New scripts, test cases, and configurations were introduced to support these features and improve performance, particularly targeting the functionalities of the Optimism Portal.
Changes
| File Path | Change Summary |
|---|---|
.circleci/config.yml |
Updated patterns list to include OptimismPortal2.sol. |
packages/contracts-bedrock/.gitignore |
Added entries for kontrol-fp.json and kontrol-fp.jsonReversed. |
packages/contracts-bedrock/test/kontrol/README.md |
Added note on fault-proof summary deployment. |
packages/contracts-bedrock/test/kontrol/deployment/... |
Introduced new test contracts and functions for deployment summaries and fault-proof testing. |
packages/contracts-bedrock/test/kontrol/proofs/OptimismPortal2.k.sol |
Added functions for proving withdrawal transactions in various scenarios. |
packages/contracts-bedrock/test/kontrol/scripts/... |
Updated scripts for different deployment configurations and added test cases for OptimismPortal2Kontrol. |
packages/contracts-bedrock/test/L1/OptimismPortal2.t.sol |
Changed visibility modifier in setUp function of OptimismPortal2_Test. |
Recent Review Details
Configuration used: .coderabbit.yml Review profile: CHILL
Commits
Files that changed from the base of the PR and between 75f4eab4ae3b8a3449d6f0fe248f9ea7bda08e12 and 584f3986f90c73f13c0b2b69cc96385334c86d86.Files ignored due to path filters (1)
packages/contracts-bedrock/package.jsonis excluded by!**/*.json
Files selected for processing (11)
- .circleci/config.yml (1 hunks)
- packages/contracts-bedrock/.gitignore (1 hunks)
- packages/contracts-bedrock/test/L1/OptimismPortal2.t.sol (1 hunks)
- packages/contracts-bedrock/test/kontrol/README.md (1 hunks)
- packages/contracts-bedrock/test/kontrol/deployment/DeploymentSummaryFaultProofs.t.sol (1 hunks)
- packages/contracts-bedrock/test/kontrol/deployment/KontrolDeployment.sol (1 hunks)
- packages/contracts-bedrock/test/kontrol/proofs/OptimismPortal2.k.sol (1 hunks)
- packages/contracts-bedrock/test/kontrol/proofs/utils/DeploymentSummaryFaultProofs.sol (1 hunks)
- packages/contracts-bedrock/test/kontrol/scripts/common.sh (1 hunks)
- packages/contracts-bedrock/test/kontrol/scripts/make-summary-deployment.sh (2 hunks)
- packages/contracts-bedrock/test/kontrol/scripts/run-kontrol.sh (1 hunks)
Files not summarized due to errors (1)
- packages/contracts-bedrock/test/kontrol/proofs/utils/DeploymentSummaryFaultProofs.sol: Error: Message exceeds token limit
Files skipped from review as they are similar to previous changes (8)
- .circleci/config.yml
- packages/contracts-bedrock/.gitignore
- packages/contracts-bedrock/test/L1/OptimismPortal2.t.sol
- packages/contracts-bedrock/test/kontrol/deployment/DeploymentSummaryFaultProofs.t.sol
- packages/contracts-bedrock/test/kontrol/deployment/KontrolDeployment.sol
- packages/contracts-bedrock/test/kontrol/scripts/common.sh
- packages/contracts-bedrock/test/kontrol/scripts/make-summary-deployment.sh
- packages/contracts-bedrock/test/kontrol/scripts/run-kontrol.sh
Additional Context Used
LanguageTool (20)
packages/contracts-bedrock/test/kontrol/README.md (20)
Near line 24: Unpaired symbol: ‘[’ seems to be missing Context: ... Getting Started ### Overview [Kontrol](https://github.com/runtimeverification/...
Near line 64: The word ‘deploy’ is a verb. Did you mean the noun “deployment” (= release, placement)? Context: ... a deployment summary contract from the deploy script in [
KontrolDeployment.sol](./d...
Near line 95: Loose punctuation mark. Context: ...modes of proof execution: -
container: Runs the proofs using the same Docker i...
Near line 96: Loose punctuation mark. Context: ...will be executed in this mode. -
local: Runs the proofs with your local Kontrol...
Near line 97: Loose punctuation mark. Context: ...on
](../../../../versions.json). -dev`: Run the proofs with your local Kontrol ...
Near line 101: Loose punctuation mark. Context: ...ying which tests to execute: -
script: Runs the tests specified in the `test_l...
Near line 118: Consider a shorter alternative to avoid wordiness. Context: ... JSON contains correct updates. Hence, in order to write a proof for a contract which is n...
Near line 129: It seems that a comma is missing. Context: ...oofs/interfaces/KontrolInterfaces.sol) So far we've got all the state updates ready t...
Near line 131: After an expression of time at the start of a sentence, a comma is usually used. Context: ...f compiled contracts by Kontrol. In the future there might interfaces for all contract...
Near line 131: The modal verb ‘might’ requires the verb’s base form. Context: ...s by Kontrol. In the future there might interfaces for all contracts under `contracts-bedr...
Near line 135: This expression is wordy and can make your writing hard to follow, try rephrasing to be more direct. Context: ...st
to avoidforge test` running them. The reason for this is that if Kontrol cheatcodes (see [Kontrol's o...
Near line 166: The word ‘deploy’ is a verb. Did you mean the noun “deployment” (= release, placement)? Context: ...s feasible without large changes to the deploy script. 2. Size of
bytes[]arguments...
Near line 179: A comma may be missing after the conjunctive/linking adverb ‘Therefore’. Context: ...l representation of the EVM in Kontrol. Therefore we want to minimize the amount of code ...
Near line 182: These punctuation marks differ from each other. Use only one if you are ending a sentence. Context: ...usage of this fast summarization feature.: -
kdeploy: Used by [`make-summary-de...
Near line 184: Loose punctuation mark. Context: ...ast summarization feature.: -
kdeploy: Used by [make-summary-deployment.sh](...
Near line 187: Loose punctuation mark. Context: ...ited by
DeploymentSummary. -kprove: Used by the [run-kontrol.sh](./scrpts...
Near line 193: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause. Context: ...nd
DeploymentSummaryCode.solcontracts, because forge fails to build if those contracts...
Near line 193: The word “workaround” is a noun. The verb is spelled with a white space. Context: ...ommit these autogenerated files than to workaround their absence in forge builds. During ...
Near line 196: The word ‘deploy’ is a verb. Did you mean the noun “deployment” (= release, placement)? Context: ...o address. This is required because the deploy script in
KontrolDeployment.solis do...
Near line 196: The verb form seems incorrect. Context: ...eploy script in
KontrolDeployment.solis does not fully reproduce all deployments in ...
Learnings (1)
packages/contracts-bedrock/test/kontrol/proofs/OptimismPortal2.k.sol (2)
User: JuanCoRo PR: ethereum-optimism/optimism#10292 File: packages/contracts-bedrock/test/kontrol/scripts/run-kontrol.sh:128-128 Timestamp: 2024-04-24T18:19:24.451Z Learning: User JuanCoRo confirmed that the extra parenthesis in the test name `OptimismPortalKontrol.prove_proveWithdrawalTransaction_paused1(` does not introduce syntax errors and functions as intended in the `run-kontrol.sh` script as part of PR #10292. This was verified through local testing.User: JuanCoRo PR: ethereum-optimism/optimism#10292 File: packages/contracts-bedrock/test/kontrol/scripts/run-kontrol.sh:128-128 Timestamp: 2024-04-24T18:15:27.717Z Learning: User JuanCoRo introduced an extra parenthesis in the test name `OptimismPortalKontrol.prove_proveWithdrawalTransaction_paused1(` to avoid matching with `OptimismPortalKontrol.prove_proveWithdrawalTransaction_paused10` in the `run-kontrol.sh` script as part of PR #10292. This is a workaround to handle test selection based on naming conventions.
Additional comments not posted (3)
packages/contracts-bedrock/test/kontrol/proofs/OptimismPortal2.k.sol (2)
29-29: Consider making the pause identifier configurable to enhance flexibility in testing.
53-53: Consider making the pause identifier configurable to enhance flexibility in testing.packages/contracts-bedrock/test/kontrol/README.md (1)
70-71: Clarify the documentation on fault proof summary deployment.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger a review. This is useful when automatic reviews are disabled for the repository.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @clabby and the rest of your teammates on
Graphite