Skip to content

Conversation

@DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Dec 4, 2024

We're currently requesting all evm.bytecode (and evm.deployedBytecode) output by default. This includes evm.bytecode.generatedSources, introduced in solc 0.8.0, which is a list of potentially huge Yul AST objects that is completely unused in Foundry.

Only request the Compact* bytecode fields in the defaults.

This cuts down a clean forge build:

It may have a larger impact when compiling with >=0.8.28, because the cache storing this data was removed in that version (argotorg/solidity@3c5e46b), or when optimizations are disabled as more IR will be generated and output to JSON.

I verified that these inputs are accepted by solidity 0.4.14, 0.6.3, 0.8.28, and vyper 0.3.10, 0.4.0. All of these outputs are supported by all of them except for vyper which needs to be normalized.

Drive-by: buffer stdin when writing to the solc subprocess.

@DaniPopes DaniPopes merged commit 2199839 into main Dec 4, 2024
15 checks passed
@DaniPopes DaniPopes deleted the dani/perf-selection branch December 4, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants