Skip to content

Attempt to remove circular dependencies#149

Merged
LeoPatOZ merged 14 commits into
mainfrom
remove-circular-dependencies
Aug 6, 2025
Merged

Attempt to remove circular dependencies#149
LeoPatOZ merged 14 commits into
mainfrom
remove-circular-dependencies

Conversation

@LeoPatOZ

@LeoPatOZ LeoPatOZ commented Jul 29, 2025

Copy link
Copy Markdown
Contributor

This is an example of how to fix #126.

Main issue is adding only modifier which adds overhead.

To make it even more 'trustless' could set owner to zero address after initialising prover manager.

Summary by CodeRabbit

  • New Features

    • Added explicit, owner-controlled initialization for key contract addresses in CheckpointTracker and TaikoInbox, enhancing security and flexibility.
    • Introduced new events to signal when critical addresses are initialized or updated.
    • Added new functions allowing owners to update these addresses post-deployment.
  • Tests

    • Expanded and updated tests to cover new initialization logic, access controls, and address updates.

@LeoPatOZ
LeoPatOZ requested a review from nikeshnazareth July 29, 2025 14:18
@coderabbitai

coderabbitai Bot commented Jul 29, 2025

Copy link
Copy Markdown

Walkthrough

Ownership and explicit initialization patterns were introduced to CheckpointTracker and TaikoInbox contracts to resolve constructor-time circular dependencies. Both contracts now allow their dependent addresses (proverManager and proposerFees, respectively) to be set post-deployment via owner-restricted update functions. Corresponding interface changes, event emissions, and updated tests accommodate these new patterns.

Changes

Cohort / File(s) Change Summary
CheckpointTracker Ownership & Update
src/protocol/CheckpointTracker.sol, test/CheckpointTracker.t.sol, test/mocks/MockCheckpointTracker.sol
Modified CheckpointTracker to inherit from Ownable. Removed immutable proverManager from constructor and made it mutable. Added updateProverManager function restricted to owner with event emission. Updated tests to reflect new initialization pattern and added tests for ownership and update functionality. Added a no-op updateProverManager in mock contract.
TaikoInbox Ownership & Update
src/protocol/taiko_alethia/TaikoInbox.sol, test/mocks/MockInbox.sol, test/Gas/Inbox.t.sol
Modified TaikoInbox to inherit from Ownable. Removed immutable proposerFees from constructor and made it mutable. Added updateProposerFees function restricted to owner with event emission. Guarded fee payment calls with zero-address check. Updated mock to add updateProposerFees function that reverts. Adjusted test setup to remove proposer fees from constructor parameters.
Interface Extensions
src/protocol/ICheckpointTracker.sol, src/protocol/IInbox.sol
Added ProverManagerUpdated event and updateProverManager function to ICheckpointTracker. Added ProposerFeesInitialized event and updateProposerFees function to IInbox.
Gas and Snapshot Updates
gas-reports/minimal_inbox_publish.json, snapshots/TaikoInboxTest.json
Updated gas usage report and test snapshot values reflecting minor changes in gas consumption due to contract modifications.

Sequence Diagram(s)

sequenceDiagram
    participant Owner
    participant CheckpointTracker
    participant ProverManager

    Owner->>CheckpointTracker: deploy (with deployer address)
    Owner->>CheckpointTracker: updateProverManager(proverManager)
    CheckpointTracker-->>Owner: ProverManagerUpdated event
    ProverManager->>CheckpointTracker: proveTransition(...)
    CheckpointTracker->>ProverManager: require proverManager set
Loading
sequenceDiagram
    participant Owner
    participant TaikoInbox
    participant ProposerFees
    participant User

    Owner->>TaikoInbox: deploy (with deployer address)
    Owner->>TaikoInbox: updateProposerFees(proposerFees)
    TaikoInbox-->>Owner: ProposerFeesInitialized event
    User->>TaikoInbox: publish(...)
    TaikoInbox->>User: require proposerFees set (if not zero)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Assessment against linked issues

Objective Addressed Explanation
Break circular dependencies by using initializer/update functions for ProverManager and Inbox (TaikoInbox) (#126)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes detected.

Suggested reviewers

  • nikeshnazareth
  • pepebndc

Poem

A rabbit hopped through code anew,
With ownership and checks in view.
No circles left for us to chase,
Update functions now in place!
Contracts deploy without a fight,
Dependencies set just right.
🐇✨ Hooray for code that runs so bright!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 573ff53 and 892c287.

📒 Files selected for processing (1)
  • gas-reports/minimal_inbox_publish.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • gas-reports/minimal_inbox_publish.json
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-circular-dependencies

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file 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.

@LeoPatOZ
LeoPatOZ requested a review from pepebndc July 29, 2025 14:18
@github-actions

github-actions Bot commented Jul 29, 2025

Copy link
Copy Markdown

Changes to gas cost

Generated at commit: 9bd5cd52811a6f82360ab592e61f3405abc6dea4, compared to commit: ed5db973700597b3043f612fc570ac4bfd7dc93c

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
CheckpointTracker proveTransition
proverManager
verifier
+5,279 ❌
+2,158 ❌
+23 ❌
+7.34%
+614.81%
+4.20%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
CheckpointTracker 1,016,103 (+225,132) commitmentStore
proveTransition
provenPublicationId
proverManager
verifier
591 (-22)
25,596 (+2,226)
2,470 (+23)
2,509 (+2,158)
570 (+23)
-3.59%
+9.53%
+0.94%
+614.81%
+4.20%
591 (-22)
77,242 (+5,279)
2,470 (+23)
2,509 (+2,158)
570 (+23)
-3.59%
+7.34%
+0.94%
+614.81%
+4.20%
591 (-22)
86,320 (+18,730)
2,470 (+23)
2,509 (+2,158)
570 (+23)
-3.59%
+27.71%
+0.94%
+614.81%
+4.20%
591 (-22)
120,520 (+2,184)
2,470 (+23)
2,509 (+2,158)
570 (+23)
-3.59%
+1.85%
+0.94%
+614.81%
+4.20%
1 (0)
15 (+1)
23 (+1)
3 (+2)
1 (0)
ETHProverManager 2,832,115 (0) evictProver
finalizePastPeriod
prove
36,782 (-22)
32,438 (-22)
35,028 (-22)
-0.06%
-0.07%
-0.06%
58,759 (-22)
40,907 (-22)
50,934 (-44)
-0.04%
-0.05%
-0.09%
47,132 (-22)
41,490 (-22)
47,301 (-44)
-0.05%
-0.05%
-0.09%
80,748 (-22)
47,939 (-22)
94,149 (-66)
-0.03%
-0.05%
-0.07%
23 (0)
20 (0)
82 (0)
ERC20ProverManager 0 (0) evictProver
finalizePastPeriod
prove
36,782 (-22)
32,438 (-22)
35,051 (-22)
-0.06%
-0.07%
-0.06%
58,759 (-22)
40,907 (-22)
50,957 (-44)
-0.04%
-0.05%
-0.09%
47,132 (-22)
41,490 (-22)
47,324 (-44)
-0.05%
-0.05%
-0.09%
80,748 (-22)
47,939 (-22)
94,172 (-66)
-0.03%
-0.05%
-0.07%
23 (0)
20 (0)
82 (0)
TaikoInbox 1,972,863 (+233,681) publish 28,175 (-22) -0.08% 28,175 (-22) -0.08% 28,175 (-22) -0.08% 28,175 (-22) -0.08% 1 (0)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/protocol/taiko_alethia/TaikoInbox.sol (1)

35-39: Consider consistent spelling throughout the codebase.

The error message uses British spelling "initialised" while the modifier name uses American spelling "Initialized". Consider standardizing on one spelling convention.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4357762 and 27194f3.

📒 Files selected for processing (9)
  • src/libs/LibProvingPeriod.sol (2 hunks)
  • src/protocol/BaseProverManager.sol (1 hunks)
  • src/protocol/CheckpointTracker.sol (2 hunks)
  • src/protocol/ICheckpointTracker.sol (1 hunks)
  • src/protocol/IInbox.sol (2 hunks)
  • src/protocol/taiko_alethia/TaikoInbox.sol (3 hunks)
  • test/CheckpointTracker.t.sol (3 hunks)
  • test/mocks/MockCheckpointTracker.sol (1 hunks)
  • test/mocks/MockInbox.sol (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
test/mocks/MockCheckpointTracker.sol (1)

Learnt from: nikeshnazareth
PR: #134
File: test/ProverManager/InvariantTest.t.sol:10-20
Timestamp: 2025-06-24T01:29:22.272Z
Learning: In ProverManager invariant tests, it's acceptable to rely on Solidity mapping behavior that returns zero values for non-existent keys when testing that periods are unused. The zero values serve as a proxy to confirm that a period is not initialized, which is the intended behavior for the invariant tests.

src/protocol/BaseProverManager.sol (1)

Learnt from: nikeshnazareth
PR: #134
File: test/ProverManager/InvariantTest.t.sol:10-20
Timestamp: 2025-06-24T01:29:22.272Z
Learning: In ProverManager invariant tests, it's acceptable to rely on Solidity mapping behavior that returns zero values for non-existent keys when testing that periods are unused. The zero values serve as a proxy to confirm that a period is not initialized, which is the intended behavior for the invariant tests.

src/libs/LibProvingPeriod.sol (1)

Learnt from: nikeshnazareth
PR: #134
File: test/ProverManager/InvariantTest.t.sol:10-20
Timestamp: 2025-06-24T01:29:22.272Z
Learning: In ProverManager invariant tests, it's acceptable to rely on Solidity mapping behavior that returns zero values for non-existent keys when testing that periods are unused. The zero values serve as a proxy to confirm that a period is not initialized, which is the intended behavior for the invariant tests.

src/protocol/CheckpointTracker.sol (1)

Learnt from: nikeshnazareth
PR: #134
File: test/ProverManager/InvariantTest.t.sol:10-20
Timestamp: 2025-06-24T01:29:22.272Z
Learning: In ProverManager invariant tests, it's acceptable to rely on Solidity mapping behavior that returns zero values for non-existent keys when testing that periods are unused. The zero values serve as a proxy to confirm that a period is not initialized, which is the intended behavior for the invariant tests.

test/CheckpointTracker.t.sol (1)

Learnt from: nikeshnazareth
PR: #134
File: test/ProverManager/InvariantTest.t.sol:10-20
Timestamp: 2025-06-24T01:29:22.272Z
Learning: In ProverManager invariant tests, it's acceptable to rely on Solidity mapping behavior that returns zero values for non-existent keys when testing that periods are unused. The zero values serve as a proxy to confirm that a period is not initialized, which is the intended behavior for the invariant tests.

🔇 Additional comments (24)
src/libs/LibProvingPeriod.sol (1)

55-55: LGTM! Spelling corrections improve consistency.

The spelling corrections from "initialized" to "initialised" align with the British English spelling convention used throughout the codebase and maintain consistency with similar changes in other files.

Also applies to: 90-90

src/protocol/IInbox.sol (2)

20-21: Well-designed event for initialization transparency.

The ProposerFeesInitialised event provides clear visibility into when the proposer fees contract address is set, which is important for the new initialization pattern.


42-44: Good interface design for breaking circular dependencies.

The initializeProposerFees function effectively addresses the circular dependency issue by allowing post-deployment initialization of the proposer fees contract address. This enables contracts to be deployed independently and then linked together.

Ensure that implementations of this interface include proper access controls (owner-only) and prevent re-initialization to maintain security.

src/protocol/ICheckpointTracker.sol (2)

21-23: Excellent use of indexed event parameter.

The ProverManagerInitialised event with indexed proverManager parameter enables efficient filtering and searching, which is particularly useful for tracking initialization across multiple deployments.


28-30: Consistent initialization pattern for breaking circular dependencies.

The initializeProverManager function follows the same pattern as the IInbox interface, providing a consistent approach to resolving circular dependencies between CheckpointTracker and ProverManager contracts.

Verify that the implementation includes proper access controls and one-time initialization enforcement similar to the IInbox implementation.

src/protocol/BaseProverManager.sol (1)

74-74: LGTM! Spelling correction maintains consistency.

The spelling correction from "initialized" to "initialised" aligns with the consistent British English spelling convention used throughout the codebase.

test/mocks/MockInbox.sol (1)

19-21: Consistent mock implementation pattern.

The initializeProposerFees function follows the established mock pattern by immediately reverting with NotImplemented(), which is consistent with the existing publish function and appropriate for test scenarios where initialization logic is not needed.

test/mocks/MockCheckpointTracker.sol (1)

27-28: LGTM!

The empty implementation of initializeProverManager is appropriate for a mock contract and correctly implements the updated ICheckpointTracker interface.

src/protocol/taiko_alethia/TaikoInbox.sol (5)

13-15: LGTM!

The addition of Ownable inheritance provides the necessary access control for the initialization pattern.


30-33: LGTM!

The change from immutable to mutable proposerFees with the proposerFeesInitialised flag correctly implements the delayed initialization pattern.


48-60: LGTM!

The constructor changes correctly remove the circular dependency by eliminating the _proposerFees parameter and adding ownership control.


62-69: LGTM!

The initializeProposerFees function correctly implements one-time initialization with proper access control, validation, and event emission.


72-72: LGTM!

Adding the checkProposerFeesInitialized modifier ensures that proposerFees is properly initialized before any publication operations.

src/protocol/CheckpointTracker.sol (6)

9-11: LGTM!

The addition of Ownable inheritance provides the necessary access control for the initialization pattern.


22-24: LGTM!

The change from immutable to mutable proverManager with the initialization flag correctly implements the delayed initialization pattern.


26-30: LGTM!

The modifier correctly enforces that the prover manager is initialized before use.


36-49: LGTM!

The constructor changes correctly remove the circular dependency by eliminating the _proverManager parameter and adding ownership control.


51-58: Verify the intentional design of allowing zero address.

The function explicitly allows setting proverManager to zero address, which would make proveTransition callable by anyone (due to the check on line 70). Please confirm this is the intended behavior.


64-71: LGTM!

The initialization check and permission logic correctly implement the design where a zero proverManager allows anyone to prove transitions.

test/CheckpointTracker.t.sol (5)

18-33: LGTM!

The test setup correctly reflects the new constructor signature and initialization pattern.


56-62: LGTM!

The test correctly verifies that the prover manager can be initialized by the owner.


64-70: LGTM!

The test correctly verifies that proveTransition reverts when the prover manager is not initialized.


72-78: LGTM!

The test correctly verifies that only the owner can initialize the prover manager.


80-84: LGTM!

The test correctly verifies that the prover manager cannot be initialized more than once.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 27194f3 and 798ee0b.

📒 Files selected for processing (2)
  • src/protocol/CheckpointTracker.sol (2 hunks)
  • src/protocol/taiko_alethia/TaikoInbox.sol (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
src/protocol/CheckpointTracker.sol (1)

Learnt from: nikeshnazareth
PR: #134
File: test/ProverManager/InvariantTest.t.sol:10-20
Timestamp: 2025-06-24T01:29:22.272Z
Learning: In ProverManager invariant tests, it's acceptable to rely on Solidity mapping behavior that returns zero values for non-existent keys when testing that periods are unused. The zero values serve as a proxy to confirm that a period is not initialized, which is the intended behavior for the invariant tests.

🔇 Additional comments (13)
src/protocol/taiko_alethia/TaikoInbox.sol (6)

13-14: LGTM!

The import of OpenZeppelin's Ownable contract is appropriate for implementing ownership control.


15-15: LGTM!

Inheriting from Ownable enables proper ownership control for the initialization pattern.


30-30: LGTM!

Converting proposerFees from immutable to mutable enables post-deployment initialization, which is necessary for breaking the circular dependency.


33-37: LGTM!

The modifier properly enforces that proposerFees must be initialized before use, providing a safety guard against calling functions with uninitialized dependencies.


46-58: LGTM!

The constructor changes align with the circular dependency resolution approach by removing the direct proposerFees dependency and introducing owner-based initialization.


69-69: LGTM!

The checkProposerFeesInitialized modifier ensures that proposerFees is initialized before the publish function can be called, maintaining contract safety.

src/protocol/CheckpointTracker.sol (7)

9-10: LGTM!

The import of OpenZeppelin's Ownable contract is appropriate for implementing ownership control.


11-11: LGTM!

Inheriting from Ownable enables proper ownership control for the initialization pattern.


22-25: LGTM!

The design using a separate boolean to track initialization status is well-thought-out, especially since the prover manager can legitimately be set to the zero address, making address-based initialization checks insufficient.


27-31: LGTM!

The modifier properly enforces that the prover manager must be initialized before use, providing essential safety for the contract's operation.


38-40: LGTM!

The constructor changes align with the circular dependency resolution approach by removing the direct proverManager dependency and introducing owner-based initialization.


54-59: LGTM!

The initialization function properly prevents double initialization and allows setting the prover manager to the zero address as intended. The explicit comment clarifying this behavior is helpful.


67-67: LGTM!

The checkProverInitialized modifier ensures that the prover manager is initialized before proveTransition can be called, maintaining contract safety.

Comment thread src/protocol/taiko_alethia/TaikoInbox.sol Outdated
Comment thread src/libs/LibProvingPeriod.sol Outdated
Comment thread src/protocol/taiko_alethia/TaikoInbox.sol Outdated
@nikeshnazareth

Copy link
Copy Markdown
Contributor

Sorry, for being slow on this - I just caught up. It seems a bit opinionated to me, so I have some suggestions:

Firstly, what was the rationale for removing Ownable (ef30453)? If we're going to set a privileged deployer address and create an onlyDeployer modifier, I would have thought Ownable would be the simplest/cleanest solution.

But more importantly, I don't think we need to insist on any prover or proposer fees initializer requirements. As I understand it:

  • the Checkpoint Tracker is self-contained and functional whether or not there is a prover manager. The access control line even allows there to be no prover manager.
  • similarly the inbox is self-contained and functional, whether or not there is a prover manager. We could follow the same pattern of only calling payPublicationFee if the prover manager exists.
  • the dependency is created when we add the prover manager, which ties those two contracts together economically (but not functionally). The prover manager is not self-contained, and is only functional if it references an inbox and a checkpoint tracker.

So my suggested pattern is:

  • the CheckpointTracker and TaikoInbox should both be Ownable, where the owner has the ability to set the prover manager in both cases
  • we do not insist that either contract must set the prover manager. We also do not insist that the prover manager cannot be changed once it's set. The owner can update the prover manager at will, and can renounce their role whenever they want to remove that power.

If anyone wants to deploy all contracts together atomically, they should create a single transaction that:

  • deploys the tracker and inbox
  • deploys the ProverManager, passing in the tracker and inbox addresses
  • sets the prover manager in both tracker and inbox contracts
  • renounces ownership of both contracts

What do you think? I'm happy to make the change if you agree.

@LeoPatOZ

LeoPatOZ commented Aug 6, 2025

Copy link
Copy Markdown
Contributor Author

Firstly, what was the rationale for removing Ownable (ef30453)? If we're going to set a privileged deployer address and create an onlyDeployer modifier, I would have thought Ownable would be the simplest/cleanest solution.

I initially inherited the ownable contract but i didnt want to add to much bloat to the contract (adds renounce and change owner ..). Happy to put it back if you think its cleaner.

But more importantly, I don't think we need to insist on any prover or proposer fees initializer requirements. As I understand it:

  • the Checkpoint Tracker is self-contained and functional whether or not there is a prover manager. The access control line even allows there to be no prover manager.

Yes technically the initialiser also allows a zero prover manager. I just added the "must be initialised" check to prevent mistakingly forgetting to set one. In this case. you would be forced to set it to zero if thats what you intended.

  • similarly the inbox is self-contained and functional, whether or not there is a prover manager. We could follow the same pattern of only calling payPublicationFee if the prover manager exists.

Yeah makes sense, i just wanted to keep the existing logic the same. Currently it would fail if you didnt set the prover manager so i kept that.

@LeoPatOZ

LeoPatOZ commented Aug 6, 2025

Copy link
Copy Markdown
Contributor Author

@nikeshnazareth i made the changes you proposed please have a look!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4c01b06 and 573ff53.

📒 Files selected for processing (10)
  • gas-reports/minimal_inbox_publish.json (1 hunks)
  • snapshots/TaikoInboxTest.json (1 hunks)
  • src/protocol/CheckpointTracker.sol (2 hunks)
  • src/protocol/ICheckpointTracker.sol (1 hunks)
  • src/protocol/IInbox.sol (2 hunks)
  • src/protocol/taiko_alethia/TaikoInbox.sol (4 hunks)
  • test/CheckpointTracker.t.sol (4 hunks)
  • test/Gas/Inbox.t.sol (1 hunks)
  • test/mocks/MockCheckpointTracker.sol (1 hunks)
  • test/mocks/MockInbox.sol (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • snapshots/TaikoInboxTest.json
🚧 Files skipped from review as they are similar to previous changes (8)
  • test/mocks/MockInbox.sol
  • test/mocks/MockCheckpointTracker.sol
  • src/protocol/ICheckpointTracker.sol
  • test/Gas/Inbox.t.sol
  • src/protocol/IInbox.sol
  • src/protocol/CheckpointTracker.sol
  • src/protocol/taiko_alethia/TaikoInbox.sol
  • test/CheckpointTracker.t.sol
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: nikeshnazareth
PR: OpenZeppelin/minimal-rollup#146
File: src/protocol/ERC20Bridge.sol:129-135
Timestamp: 2025-08-01T09:46:40.439Z
Learning: In ERC20Bridge and similar bridge contracts, when deploying bridged tokens, it's important to check both _processed[id] for the specific initialization and _deployedTokens[key] for the original token address. The _processed check alone is insufficient because token upgrades that change metadata (name, symbol, decimals) would generate different initialization IDs, potentially allowing multiple bridged tokens for the same original token address.
🪛 Biome (2.1.2)
gas-reports/minimal_inbox_publish.json

[error] 1-1: Property key must be double quoted

(parse)


[error] 1-2: Property key must be double quoted

(parse)

Comment thread gas-reports/minimal_inbox_publish.json Outdated
@LeoPatOZ
LeoPatOZ merged commit 4fa3363 into main Aug 6, 2025
6 checks passed
@LeoPatOZ
LeoPatOZ deleted the remove-circular-dependencies branch August 6, 2025 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve circular dependencies when deploying

3 participants