ethereum-optimism / superchain-registry

An index of chains which serves as the source of truth for who’s in the Superchain Ecosystem
MIT License
84 stars 99 forks source link

Error running validation checks on all chains #668

Open vdamle opened 2 weeks ago

vdamle commented 2 weeks ago

Bug Description

Occasionally, the test to run validation checks on all chains - just validate "*" fails many checks. Upon looking at the error logs in CI, there appears to be a concurrent map read and map write occurring which causes this error. See CI Job output

Steps to Reproduce

run just validate "*"

Expected behavior

Validation should pass without errors/crashes.

Environment Information: N/A Configurations:

just validate "*"

Logs:

--- PASS: TestValidation/Shape_(360)/Uniqueness (0.00s)
--- PASS: TestValidation/Shape_Sepolia_Testnet_(11011)/Uniqueness (0.00s)
--- PASS: TestValidation/World_Chain_(480)/ChainID_RPC (0.10s)
concurrent map read and map write
--- PASS: TestValidation/Unichain_Sepolia_Testnet_(1301)/Uniqueness (0.00s)
--- PASS: TestValidation/Base_(8453)/Uniqueness (0.00s)

goroutine 217103 [running]:
github.com/ethereum-optimism/superchain-registry/validation.chainIDSet.AddIfUnique(...)
        /home/circleci/project/validation/uniqueness_test.go:26
github.com/ethereum-optimism/superchain-registry/validation.testIsGloballyUnique(0xc04e8864e0, 0xc00027c808)
        /home/circleci/project/validation/uniqueness_test.go:126 +0x1a5
github.com/ethereum-optimism/superchain-registry/validation.testUniversal.applyExclusions.func3(0xc04e8864e0)
        /home/circleci/project/validation/validation_test.go:43 +0x42

Additional context N/A