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): make more addresses in protocol immutable #18924

Merged
merged 15 commits into from
Feb 13, 2025

Conversation

davidtaikocha
Copy link
Member

@davidtaikocha davidtaikocha commented Feb 12, 2025

ref: #18913

  • Update TaikoInbox
  • Update ProverSet
  • Update BridgedERC1155 / BridgedERC721
  • Fix deployment scripts and tests
  • Update genesis generation scripts (Bridge / BridgedXXXX / TaikoAnchor )
  • Fix genesis generation tests

@davidtaikocha davidtaikocha changed the title feat: more immutable vars feat(protocol): make some addresses in TaikoInbox and ProverSet immutable Feb 12, 2025
Comment on lines -525 to -536

vm.startPrank(Alice);
params.proposer = operator;
vm.expectRevert(ITaikoInbox.NotInboxWrapper.selector);
inbox.proposeBatch(abi.encode(params), "txList");
vm.stopPrank();

vm.startPrank(operator);
params.proposer = address(0);
vm.expectRevert(ITaikoInbox.CustomProposerMissing.selector);
inbox.proposeBatch(abi.encode(params), "txList");
vm.stopPrank();
Copy link
Member Author

@davidtaikocha davidtaikocha Feb 12, 2025

Choose a reason for hiding this comment

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

Since rn the wrapper address is an immutable value, so I have to delete these two tests for now. @dantaik @xiaodino

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. I will take a look at how to add them back.

store = deployProxy({
name: "forced_inclusion_store",
impl: address(
new ForcedInclusionStore(
uint8(vm.envUint("INCLUSION_WINDOW")),
uint64(vm.envUint("INCLUSION_FEE_IN_GWEI")),
taikoInbox,
taikoWrapper
address(1)
Copy link
Member Author

@davidtaikocha davidtaikocha Feb 12, 2025

Choose a reason for hiding this comment

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

Since there is a cycle dependency issue for ForcedInclusionStore.constructor and TaikoWrapper.constructor, so have to create a store with fake taikoWrapper address at first here, and do another proxy upgrade below @dantaik @xiaodino @YoGhurt111

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually we can deploy two empty proxies to get their addresses, then call upgradeToAndCall on both proxies.

@davidtaikocha davidtaikocha marked this pull request as draft February 12, 2025 09:09
@davidtaikocha davidtaikocha marked this pull request as ready for review February 12, 2025 12:00
@davidtaikocha davidtaikocha changed the title feat(protocol): make some addresses in TaikoInbox and ProverSet immutable feat(protocol): make more addresses in protocol immutable Feb 12, 2025
@YoGhurt111
Copy link
Contributor

Why don't we continue using the resolver?

@dantaik dantaik merged commit 6a47c5b into immutable_vars Feb 13, 2025
5 checks passed
@dantaik dantaik deleted the immutable_vars_ branch February 13, 2025 01:21
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.

4 participants