Skip to content

op-program: Only allow requests for rollup config and l2 chain config for custom chains#12420

Merged
ajsutton merged 1 commit intodevelopfrom
aj/restrict-custom-config
Oct 11, 2024
Merged

op-program: Only allow requests for rollup config and l2 chain config for custom chains#12420
ajsutton merged 1 commit intodevelopfrom
aj/restrict-custom-config

Conversation

@ajsutton
Copy link
Copy Markdown
Contributor

Description

Modifies op-program host to refuse to return the rollup config and L2 chain config unless the chain ID is the custom chain ID marker value. Those keys aren't available on chain since the contracts can't populate them. The client won't request them unless the right chain ID is used, but worth being safe and making op-program host as compatible with on-chain as possible too.

Tests

Updated unit tests.

@ajsutton ajsutton requested a review from Inphi October 10, 2024 23:48
@ajsutton ajsutton requested review from a team as code owners October 10, 2024 23:48
@semgrep-app
Copy link
Copy Markdown
Contributor

semgrep-app bot commented Oct 10, 2024

Semgrep found 1 err-todo finding:

  • op-program/client/l2/engineapi/l2_engine_api.go

TODO in error handling code

Ignore this finding from err-todo.

@ajsutton ajsutton added this pull request to the merge queue Oct 11, 2024
Merged via the queue into develop with commit 18732db Oct 11, 2024
@ajsutton ajsutton deleted the aj/restrict-custom-config branch October 11, 2024 00:41
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
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.

2 participants