-
Notifications
You must be signed in to change notification settings - Fork 77
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
validation: add global chainId check #153
Conversation
My preferred solution would be:
What do you think of that? |
@mds1 I updated the logic to match your suggestion. I also went through the existing chains to add a short name and correct the existing names where discrepancies exist. Further, the contributing guide has been updated. Note that this will fail all in flight PRs, but they won't be hard to fix. |
If the chain is not in the upstream repo: we do the chain ID + name uniqueness checks ourselves If the chain is in the upstream repo: make sure everything added here matches TODO for short names (we don't have any of these committed at present)
This reverts commit ba506c5.
if in the global list, it matches the short name from there
9190562
to
730d61f
Compare
@@ -1,4 +1,5 @@ | |||
name: OP-Mainnet | |||
name: OP Mainnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should verify if these changes will break something in the downstream dependencies (or even somewhere in this repo that I have missed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
circular dependencies, sigh
renaming on a mac, git doesn't detect the change otherwise
@mds1 I'm not sure why |
So it's reverting because |
Thanks, need to get better at parsing those traces :-) Is there anything we can do to make that easier?
I did run this check on I think we actually just need to update |
Ah yes, foundry runs tests in parallel so the console.logs get a little confusing. But given the address you are correct |
scripts/CheckSecurityConfigs.s.sol
Outdated
sliceString(addressesJsonPath, bytes(addressesJsonPath).length - 18, bytes(addressesJsonPath).length) | ||
) | ||
) == keccak256(abi.encodePacked("sepolia/op.json")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really keen to replace this code (see #144).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pushed 3e61dba to clean this up, feel free to revert the commit if you prefer
In favour of #320 |
Closes #299
Test currently failing due to name mismatches.
It is likely and acceptable for a chain to already exist at chainId.network, so we need a way of checking whether it is the "same chain" or not. Using the name seems reasonable, since that it is required to be unique also .
Open to suggestions on how to resolve this. i think it seems reasonable to require the same name in both repos?