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

Testnet semver validation needs better error messages. #805

Open
geoknee opened this issue Dec 18, 2024 · 0 comments
Open

Testnet semver validation needs better error messages. #805

geoknee opened this issue Dec 18, 2024 · 0 comments
Labels
A-validation Area: validation

Comments

@geoknee
Copy link
Collaborator

geoknee commented Dec 18, 2024

A recent PR triggered a semver validation on OP Sepolia (because of the semver on one contract going backwards) which was misleading.

The backwards semver causes the check to fail and on failure we print a diff against the standard release:

=== FAIL: github.com/ethereum-optimism/superchain-registry/validation TestValidation/OP_Sepolia_Testnet_(11155420)/Standard_Contract_Versions (0.27s)
    superchain-version.go:266: 
                Error Trace:    /home/circleci/project/validation/superchain-version.go:266
                                                        /home/circleci/project/validation/superchain-version.go:41
                                                        /home/circleci/project/validation/validation_test.go:44
                Error:          Should be true
                Test:           TestValidation/OP_Sepolia_Testnet_(11155420)/Standard_Contract_Versions
                Messages:       contract versions do not match the standard versions for the op-contracts/v1.6.0 release 
                                 (-removed from standard / +added to actual):
                                   superchain.ContractVersions{
                                        ... // 5 identical fields
                                        OptimismPortal:  {Version: "3.10.0"},
                                        OptimismPortal2: {},
                                        SystemConfig: superchain.VersionedContract{
                                -               Version: "2.2.0",
                                +               Version: "2.3.0",
                                                ... // 2 ignored fields
                                        },
                                        ProtocolVersions: {},
                                        SuperchainConfig: {},
                                        ... // 2 identical fields
                                        PermissionedDelayedWETH: {},
                                        DisputeGameFactory:      {Version: "1.0.0"},
                                        FaultDisputeGame: superchain.VersionedContract{
                                -               Version: "1.3.0",
                                +               Version: "1.3.1",
                                                ... // 2 ignored fields
                                        },
                                        MIPS: superchain.VersionedContract{
                                -               Version: "1.1.0",
                                +               Version: "1.0.0-beta.7",
                                                ... // 2 ignored fields
                                        },
                                        PermissionedDisputeGame: superchain.VersionedContract{
                                -               Version: "1.3.0",
                                +               Version: "1.3.1",
                                                ... // 2 ignored fields
                                        },
                                        PreimageOracle:         {Version: "1.1.2"},
                                        CannonFaultDisputeGame: {},
                                  }

The error message is not helpful, it claims we are checking strictly against the standard release which we are not. We are checking that each contract semver is equal or greater than standard, and printing the diff if that isn't true. It's also possible that the -beta suffix isn't getting parsed properly, we should add some unit tests for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-validation Area: validation
Projects
None yet
Development

No branches or pull requests

1 participant