-
Notifications
You must be signed in to change notification settings - Fork 625
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
feat: introducing EvmWiring, a chain-specific configuration #1672
Conversation
fa066f4
to
0f052b5
Compare
For multi-chain support, most of our codebase is generalised on the Introducing the Some other examples are: For an example of how we use the wiring, see this code. We construct a state using runtime parameters here (old code) and here (new code). This is using immutable references, which would be intertwined with the I still haven't gotten the compiler to accept the code, as we need to construct an trait EvmWiring {
type ChainSpec: ChainSpec;
type Database: Database;
type ExternalContext;
} but I am yet to try that. I'll circle when I've given it a try. |
Why would you want to restrict Block to all those generics:
It Looks brittle. I would try with associated types (for Tx) on Block, maybe this is a good path. |
Sure, in this case we that might simplify things. However, there are some places where we need all or large parts of the For the exact reason you mention, we don't want to pollute our codebase with the |
Experiment to see whether it would be possible to separate optimism and mainnet
SpecId
s and other types, such asHaltReason
.I'm curious to hear whether any of this is in line with #918
Supercedes #1378 (to allow editing by maintainers)