chore(protocol): add lookahead store in protocol deployment#21349
chore(protocol): add lookahead store in protocol deployment#21349AnshuJalan wants to merge 4 commits intopermissionless-preconfs/lookahead-slashing-pathfrom
Conversation
|
Claude finished @AnshuJalan's task in 2m 3s —— View job PR Review
Overall the restructuring is clean and the two-phase deployment pattern (deploy with zero inbox → upgrade with real inbox) is well-commented. A few issues worth addressing: Issues1. Redundant third return value in
The function returns (address proposerChecker, address whitelist,) = _deployProposerChecker(config);
lookaheadStoreProxy = proposerChecker != whitelist ? proposerChecker : address(0);The third return value is set to (address proposerChecker, address whitelist, lookaheadStoreProxy) = _deployProposerChecker(config);2. Missing input validation when
When if (config.useLookaheadStore) {
require(config.urc != address(0), "URC not set for LookaheadStore");
// deploy...
}3.
Both the initial and upgraded new LookaheadStore(address(0), address(0), whitelist_, config.urc) // initial
new LookaheadStore(shastaInbox, address(0), whitelist, config.urc) // upgrade
If this is intentional for the devnet phase (slasher not yet deployed), it should be documented prominently with a Nits
|
There was a problem hiding this comment.
💡 Codex Review
taiko-mono/packages/protocol/script/layer1/core/DeployProtocolOnL1.s.sol
Lines 287 to 289 in f63f4eb
In the new flow, _deployInbox can activate the inbox before _deployRollupContracts upgrades LookaheadStore from the placeholder implementation constructed with inbox = address(0) to one with the real inbox address. If ACTIVATE_INBOX=true, there is a deployment window where propose calls can start but checkProposer still enforces msg.sender == address(0), so proposals will revert until the later upgrade transaction lands.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| LookaheadStore.init, (config.contractOwner, config.lookaheadOverseer) | ||
| ) |
There was a problem hiding this comment.
Initialize LookaheadStore with deployer before upgrading
When USE_LOOKAHEAD_STORE is enabled, the proxy is initialized with config.contractOwner as owner, but the script then immediately calls LookaheadStore(lookaheadStoreProxy).upgradeTo(...) from the broadcaster account in _deployRollupContracts. Because upgrades are onlyOwner via EssentialContract, deployments where CONTRACT_OWNER differs from the broadcasting key (for example, a multisig owner) will revert on that upgrade step and cannot complete.
Useful? React with 👍 / 👎.
35a34a4 to
37723aa
Compare
…ermissionless-preconfs/scripts
No description provided.