mds1 / evm-diff

Diff EVM-compatible chains in a friendly format
https://evmdiff.com
MIT License
278 stars 27 forks source link

feat: show latest `evmVersion` supported by each chain in each section and overall #27

Open frangio opened 1 year ago

frangio commented 1 year ago

The opcodes section lists opcodes separately and mentions evmVersion where appropriate, but it would also be nice to summarize this at the top and simply say the latest evmVersion that each chain supports.

Concept:

image

mds1 commented 1 year ago

I like this idea, my only hesitation is around the fact that the mainnet hard forks don't map cleanly to L2s so I want to be careful about giving the wrong impression.

For example, Shanghai added support for PUSH0 (EIP-3855) but also limited initcode size (EIP-3860). In the future if L2s support PUSH0, but don't limit initcode, they do support shanghai from the opcode/compiler-settings perspective, but they do not support shanghai from other perspectives like initcode size limits. (Offhand I'm unsure if solc will warn about initcode size being exceed in all cases, or only if the selected evm version is shanghai)

Though I agree it's really useful to know the max safe evmVersion to use when compiling for a given chain, so I'll think on this one more. For a given chain, each section might have a different "latest supported evm verion", and perhaps just highlighting/explaining that with some text is sufficient

frangio commented 1 year ago

Yeah that's a good point. Looking at the Solidity docs it sounds like evmVersion controls mainly opcode availability and opcode costs, which may affect optimizations. I don't see a mention of code size limits.

Perhaps instead of "latest evmVersion supported" the concept should be "suggested evmVersion" to avoid implying too much.

mds1 commented 1 year ago

Ah "suggested evmVersion" is a nice compromise. Perhaps we have that at the top of each section, with an overall suggested version at the top which is simply the oldest of each section's versions

mds1 commented 1 year ago

Proposed final spec for this feature: