-
Notifications
You must be signed in to change notification settings - Fork 794
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
Add bindings for SR2.0 #466
base: optimism
Are you sure you want to change the base?
Conversation
e556276
to
29b1045
Compare
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.
I like this approach to load the chain configs from locally embedded data. Having a script to sync a new SCR revision is a nice way to decouple this repo from the SCR.
I propose that we store the chain configs in a file tree with a zip file per chain, and then lazy-load only those chains whose config is actually used. You're already lazy loading the whole config with a sync.Cond
, so this pattern would just take this one step further and avoid loading 99% of data that's usually irrelevant.
ProxyAdmin *common.Address `toml:"ProxyAdmin,omitempty" json:"ProxyAdmin,omitempty"` | ||
SuperchainConfig *common.Address `toml:"SuperchainConfig,omitempty" json:"SuperchainConfig,omitempty"` | ||
AnchorStateRegistryProxy *common.Address `toml:"AnchorStateRegistryProxy,omitempty" json:"AnchorStateRegistryProxy,omitempty"` | ||
DelayedWETHProxy *common.Address `toml:"DelayedWETHProxy,omitempty" json:"DelayedWETHProxy,omitempty"` |
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.
maybe also already add a PermissionedDelayedWETHProxy
here, I think @Inphi wanted to add this to the SR.
Optimism *OptimismConfig `toml:"optimism,omitempty" json:"optimism,omitempty"` | ||
|
||
AltDA *AltDAConfig `toml:"alt_da,omitempty" json:"alt_da,omitempty"` | ||
|
||
Genesis GenesisConfig `toml:"genesis" json:"genesis"` |
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.
why do these 3 fields get a json spec, but not the others?
f40c47f
to
e393e03
Compare
Adds bindings to the Superchain Registry 2.0 to OP Geth. The SR's data files are copied into a ZIP file via the sync-superchain.sh script. They are then mounted as an in-memory virtual file system and are read on-demand.
The structs representing each chain config are defined in this package.