Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
2fa8a88
feat(bench): add solx-vs-solc compile benchmark scenario
nebasuke Jul 1, 2026
edec801
test(bench): move no-DWARF hatch out of prod plugin into benchmark pl…
nebasuke Jul 1, 2026
070cc3e
feat(bench): dump solx standard-JSON inputs as a workflow artifact
nebasuke Jul 2, 2026
b92e76d
feat(bench): add ens-verifiable-factory solx compile benchmark scenario
nebasuke Jul 7, 2026
eb7db93
feat(bench): add uniswap-v4-core solx compile benchmark scenario
nebasuke Jul 7, 2026
41ff250
feat(bench): add aave-v4 solx compile benchmark scenario
nebasuke Jul 7, 2026
494bf41
feat(bench): scope new solx scenarios to solx-only timed cells
nebasuke Jul 7, 2026
7a91849
feat(bench): generalize post-bench measurement scripts across solx sc…
nebasuke Jul 7, 2026
12a1ace
feat(bench): dump standard JSON for every solx scenario in CI
nebasuke Jul 7, 2026
06aaa22
fix(bench): keep upstream's per-file via-IR overrides in aave-v4 lega…
nebasuke Jul 7, 2026
7261fdc
fix(bench): compile aave-v4 src only and unblock solx's stack-too-dee…
nebasuke Jul 8, 2026
b7817d4
ci: mirror #8424's local-build validation into the solx benchmark wor…
nebasuke Jul 8, 2026
f41ec36
fix(bench): dump standard JSON with the scenario's env and --no-tests
nebasuke Jul 8, 2026
1cbb389
feat(bench): publish the standard-JSON corpus to the benchmark-result…
nebasuke Jul 8, 2026
bae69ff
feat(bench): raw solx replay cells to isolate Hardhat's overhead
nebasuke Jul 8, 2026
ccd1a2e
feat(bench): force-pushed corpus preview branch for PR runs
nebasuke Jul 8, 2026
f8b2129
refactor(bench): move the report-entry helpers into helpers/stats
nebasuke Jul 18, 2026
d8cc0a4
fix(bench): reuse the shared entry helpers and pin the replay solx ve…
nebasuke Jul 18, 2026
10deb64
feat(bench): benchmark solx 0.1.5 next to the shipped version on OZ
nebasuke Jul 18, 2026
6216e6a
feat(bench): add solx 0.1.5 cells to the solx-only scenarios
nebasuke Jul 18, 2026
b9ef5c0
feat(bench): time the solc profiles in ens/uniswap/aave scenarios
nebasuke Jul 18, 2026
8603832
feat(bench): make every scenario run the full 10-cell matrix
nebasuke Jul 18, 2026
9724bf5
fix(bench): adapt replay entries to the peak-RSS toEntries helper
nebasuke Jul 31, 2026
a8a112d
feat(bench): move the pinned solx comparison to 0.1.7, replay pin to …
nebasuke Jul 31, 2026
68b21e9
feat(bench): add solc optimizer-off legacy cells (the Foundry test-ru…
nebasuke Jul 31, 2026
f37359e
chore: add Ghiglia/uncompilable/unpair to the cspell dictionary
nebasuke Jul 31, 2026
2866eb2
bench(oz): drop the solc no-opt cell — OZ doesn't compile unoptimized
nebasuke Jul 31, 2026
a62580e
feat(bench): render the solx report as a sticky PR-comment table
nebasuke Aug 2, 2026
3520e89
fix(bench): content-hash the packed hardhat-solx tarball name
nebasuke Aug 3, 2026
5bd4578
fix(bench): guard the persistent runner against stale state
nebasuke Aug 3, 2026
dec2849
feat(bench): cross-tool parity cells with pinned forge 1.7.1
nebasuke Aug 3, 2026
1e8273d
fix(bench): declare the prime steps as dependsOn prerequisites
nebasuke Aug 3, 2026
ba5d00b
feat(bench): forge cells for the aave and ens scenarios
nebasuke Aug 3, 2026
c8fd358
feat(bench): solady scenario — the assembly-heavy corpus expansion
nebasuke Aug 3, 2026
bf7617a
bench: retire the DWARF-off twin cells
nebasuke Aug 5, 2026
e1dfee2
bench: disable the bytecode-size pass
nebasuke Aug 5, 2026
87a3d70
feat(bench): 1inch swap-vm and aqua scenarios
nebasuke Aug 5, 2026
22c34b9
bench: retire the shipped-solx cells — shipped is 0.1.7 now
nebasuke Aug 5, 2026
39c8664
feat(bench): monorepo workdir and per-variant failure tolerance for d…
Wodann Aug 13, 2026
765686c
feat(bench): lidofinance-core solx compile benchmark scenario
Wodann Aug 13, 2026
32e3e02
feat(bench): graph-horizon solx compile benchmark scenario
Wodann Aug 13, 2026
09f3fb1
bench: extend the workflow budget for the two new scenarios
Wodann Aug 13, 2026
be282c0
bench(lido): compile the whole source graph, not one tree
nebasuke Aug 19, 2026
a66d321
bench(lido): keep contracts/upgrade in every cell, on upstream's 0.8.25
nebasuke Aug 19, 2026
a7d70cd
bench(lido): split into whole-repo and like-for-like scenarios
nebasuke Aug 19, 2026
d57fae9
bench(lido): pin Bytes32String.sol to solc >=0.8.13 in the forge cells
nebasuke Aug 20, 2026
6d64823
feat(bench): pack and pragma-relaxation helpers for the solx preinstalls
Wodann Aug 20, 2026
16ab990
feat(bench): shared solx wrapper-config profile factory
Wodann Aug 20, 2026
c87a6a7
feat(bench): pinned solx/forge version manifest with drift guard
Wodann Aug 20, 2026
f9f711a
bench: move the ten solx scenarios onto the shared helpers
Wodann Aug 20, 2026
dbb45ed
fix(hardhat-solx): map Solidity 0.8.34 to solx 0.1.7, the shipped ver…
Wodann Aug 20, 2026
52516f0
feat(bench): assert the solx pin stays coherent across all four channels
Wodann Aug 20, 2026
c473cfa
feat(bench): add test-under-solx, the test-execution evaluation harness
Wodann Aug 21, 2026
e4494c3
bench(solx-scenarios): pin fuzz seeds; gate lido's test/ root for eva…
Wodann Aug 21, 2026
c7c394b
bench(solx-scenarios): report the test-execution evaluation results
Wodann Aug 21, 2026
599134b
bench(solx-scenarios): make evaluation comments self-contained
Wodann Aug 21, 2026
db1504c
feat(bench): flag a partial test-universe shortfall, not just a zero one
Wodann Aug 21, 2026
68fdb03
bench(solx-scenarios): correct the test-execution evaluation results
Wodann Aug 21, 2026
41d3e9f
bench(solx-scenarios): archive the test-execution evaluation evidence
Wodann Aug 21, 2026
6d7cfa9
bench(solx-scenarios): tighten the evaluation results against its own…
Wodann Aug 21, 2026
946b974
bench(solx-scenarios): name the evaluation report after its solx version
Wodann Aug 21, 2026
66c3d75
bench(solx-scenarios): let a run override the pinned fuzz seed
Wodann Aug 21, 2026
bc6c433
bench(solx-scenarios): scope the harness's claims to what it measured
Wodann Aug 21, 2026
803f94a
bench(solx-scenarios): unit-test the harness's verdict rules
Wodann Aug 21, 2026
ae958c3
bench(solx-scenarios): scan the renderer's fixture for stale pinned n…
Wodann Aug 21, 2026
b115f22
bench(solx-scenarios): pin the solx benchmark to 0.1.8
Wodann Aug 21, 2026
f506665
bench(solx-scenarios): resolve installed versions under pnpm's isolat…
Wodann Aug 21, 2026
50a7f92
bench(solx-scenarios): evaluate whether solx 0.1.8 output runs the te…
Wodann Aug 21, 2026
1e60eed
bench(solx-scenarios): keep the 0.1.8 evidence as archive only
Wodann Aug 21, 2026
2e2d637
bench(solx-scenarios): drop the evidence-tree ignore entries
Wodann Aug 21, 2026
945fe37
fix(e2e): stop scenario installs inheriting the runner's npm config
Wodann Aug 21, 2026
b73463b
bench(solx-scenarios): let a scenario disable one benchmark cell
Wodann Aug 21, 2026
6dee694
Revert "bench(solx-scenarios): let a scenario disable one benchmark c…
Wodann Aug 21, 2026
129f9cd
bench(swap-vm): drop the solx via-ir cell, which no longer compiles
Wodann Aug 21, 2026
55a3a7c
fix(bench): give the swap-vm footnote its own marker
Wodann Aug 22, 2026
021e823
bench(solx-scenarios): run every cell five times
Wodann Aug 22, 2026
2f9f0e5
fix(bench): keep the column for a compiler that compiled nothing
Wodann Aug 22, 2026
760a1bc
bench(lido-vaults): pin the fuzz seed like every other scenario
nebasuke Aug 23, 2026
cc0ee5c
fix(bench): parse the run's last summary block, not its first
nebasuke Aug 23, 2026
9ba007b
fix(bench): drift guard scans its own manifest and test
nebasuke Aug 23, 2026
9e4c93c
fix(bench): flag a control-side test-universe shortfall too
nebasuke Aug 23, 2026
98a1d3c
fix(bench): a failed spawn is a harness failure, not a compiler verdict
nebasuke Aug 23, 2026
6c9b976
fix(bench): fail when a pragma-relax skip matches nothing
nebasuke Aug 23, 2026
a68071c
feat(bench): compute the headline table from the records
nebasuke Aug 23, 2026
bde7471
feat(bench): solc-via-ir-no-opt profile for the optimizer-off legs
nebasuke Aug 23, 2026
4448be7
bench(solx-scenarios): correct the EIP-170 summary, reframe expected …
nebasuke Aug 23, 2026
8fd8855
feat(bench): control-cannot-compile — a control that fails to build i…
nebasuke Aug 23, 2026
305b19c
feat(bench): calibration pairs — solc-vs-solc optimizer-off different…
nebasuke Aug 23, 2026
39e9282
fix(bench): an unmatched --skip-dir is the fresh-clone shape, not an …
nebasuke Aug 23, 2026
ab34c0f
bench(solx-scenarios): measure the optimizer-off baseline
nebasuke Aug 23, 2026
06b56e6
feat(bench): ignoreFailure cell option; keep a failed scenario's fini…
nebasuke Sep 1, 2026
57f7065
bench(solx-scenarios): warm-test cells — the full test command over a…
nebasuke Sep 1, 2026
fd1fe8d
ci(solx-benchmark): dispatch filters, push-only publishing, timeout h…
nebasuke Sep 1, 2026
4b85337
bench(solx-scenarios): warm-compile cells — the no-op cache check is …
nebasuke Sep 1, 2026
ae1730c
bench(solx-scenarios): follow the plugin compiler-type rename to "sla…
nebasuke Sep 1, 2026
cc121b1
bench(solx-scenarios): unblock the OZ forge and solady warm-test cells
nebasuke Sep 1, 2026
447ee05
bench(solx-scenarios): align OZ forge fuzz runs with the fork's hardh…
nebasuke Sep 1, 2026
86cc304
bench(solx-scenarios): measure aave's first test run directly — cold-…
nebasuke Sep 2, 2026
54be1f6
bench(render): visible cannot-run-tests rows — swap-vm gets a row, no…
nebasuke Sep 2, 2026
511e7f1
bench(solx-scenarios): rename solady's EDR-input-reverting fuzz test …
nebasuke Sep 2, 2026
07d47e1
bench(solx-scenarios): OZ — skip the upstream-buggy Blockhash test, f…
nebasuke Sep 3, 2026
9fc193f
bench(render): footnotes state root causes; mark dedicated parity cells
nebasuke Sep 3, 2026
09e1f7d
bench(solx-scenarios): graph-horizon one-off thread-sweep diag cells
nebasuke Sep 3, 2026
c8bc985
bench(solx-scenarios): solady description carries the BlockHashLib ro…
nebasuke Sep 3, 2026
00d03d5
bench(solx-scenarios): time lido-core's Foundry suite — warm-test cel…
nebasuke Sep 3, 2026
228352f
ci(solx-bench): let workflow_dispatch pass the fork-safety guard
nebasuke Sep 3, 2026
6408221
bench(solx-scenarios): forge in both pipelines; OZ forge-scope warm c…
nebasuke Sep 3, 2026
6d73484
bench(solx-scenarios): skip Uniswap's MAX_TICK-1 fuzz test on all too…
nebasuke Sep 3, 2026
a156f4d
bench(solx-scenarios): no unexplained blanks — swap-vm and lido warm-…
nebasuke Sep 3, 2026
259e17d
bench(solx-scenarios): carry the merge-time adaptations into the replay
nebasuke Oct 9, 2026
7d9a98c
bench(slang-scenarios): pack hardhat-slang next to hardhat-slang-solx
nebasuke Oct 9, 2026
bb7f123
bench(slang-scenarios): install the slang binary under test in preins…
nebasuke Oct 9, 2026
33a5f7e
bench(slang-scenarios): add a slang build profile to every scenario
nebasuke Oct 9, 2026
b01fd62
bench(slang-scenarios): time a cold slang compile in every scenario
nebasuke Oct 9, 2026
fdfdc32
bench(slang-scenarios): keep hardhat-exposed on solc's AST under slang
nebasuke Oct 9, 2026
a8e7666
refactor(bench): share the verified release download
nebasuke Oct 9, 2026
c2f6536
bench(slang-scenarios): download the pinned slang release in preinstall
nebasuke Oct 9, 2026
b309531
bench(slang-scenarios): render the slang report as a PR comment
nebasuke Oct 9, 2026
553a58c
bench(slang-scenarios): render the report in the blog post's table shape
nebasuke Oct 9, 2026
e9e25bc
ci(bench): add a slang regression benchmark workflow
nebasuke Oct 9, 2026
49b4007
bench(slang-scenarios): pin the slang prerelease of solx #786
nebasuke Oct 9, 2026
79e2495
bench(solx-scenarios): drop aave's forge-config Hardhat rejects
nebasuke Oct 9, 2026
63ca210
bench(slang-scenarios): time the Solidity test suites under slang
nebasuke Oct 9, 2026
977be77
bench(slang-scenarios): leave viaIR out of slang's per-file overrides
nebasuke Oct 9, 2026
53977d3
bench(slang-scenarios): render the slang test cells
nebasuke Oct 9, 2026
4b35ceb
ci(bench): run the warm test cells in the slang benchmark
nebasuke Oct 9, 2026
c00e3eb
feat(bench): let --runs override every entry's configured runs
nebasuke Oct 9, 2026
616b966
bench(slang-scenarios): fill a quick run's tables from a baseline report
nebasuke Oct 9, 2026
fb7a155
ci(bench): split the slang benchmark into a PR tier and a full dispatch
nebasuke Oct 9, 2026
b57de93
bench(slang-scenarios): declare the plugins instead of packing them
nebasuke Oct 9, 2026
618e665
ci(bench): reclone scenario dirs a cancelled run left half-made
nebasuke Oct 9, 2026
49c0531
fix(bench): compare a scoped cell with slang's cell over the same sou…
nebasuke Oct 9, 2026
3472361
ci(bench): ask git whether a scenario dir is a working checkout
nebasuke Oct 9, 2026
395e536
bench(slang-scenarios): drop swap-vm's slang cell, which cannot compile
nebasuke Oct 9, 2026
3a0b50a
chore(bench): clear the spellcheck findings in the benchmark scripts
nebasuke Oct 9, 2026
758038e
chore(bench): leave #8415's solx test-evaluation evidence out of this PR
nebasuke Oct 9, 2026
d7b128b
ci(bench): commit the slang baseline report from full run 37952638910
nebasuke Oct 10, 2026
f91c7c5
feat(bench): shape the slang PR comment summary like the blog tables
nebasuke Oct 10, 2026
0effea3
chore(bench): benchmark the 5e6ec5e1 slang prerelease
nebasuke Oct 14, 2026
77fc7c0
feat(bench): pin a forge release that ships solar
nebasuke Oct 14, 2026
f7cd7f4
feat(bench): forge + solar cold-compile cells
nebasuke Oct 14, 2026
ac48cf2
feat(bench): show forge + solar in the slang PR comment
nebasuke Oct 14, 2026
e6479fa
feat(bench): refresh the slang baseline cell by cell
nebasuke Oct 14, 2026
bbad00d
fix(e2e): evict the monorepo's packages from Yarn Berry's cache
nebasuke Oct 14, 2026
423d9fe
fix(bench): give the solar cells their forge siblings' prerequisites
nebasuke Oct 22, 2026
80ae304
ci(bench): add the forge + solar cells from run 39613382377 to the sl…
nebasuke Oct 22, 2026
3b0468c
fix(e2e): remove the monorepo's installed packages before a Yarn Berr…
nebasuke Oct 22, 2026
95525d9
fix(bench): give the lido scenarios a valid local-devnet key
nebasuke Oct 22, 2026
7c9a59c
fix(e2e): evict the monorepo's cached registry metadata before a Yarn…
nebasuke Oct 22, 2026
fc81325
fix(e2e): match Yarn Berry's metadata file names when evicting them
nebasuke Oct 22, 2026
64ab805
fix(bench): let hardhat-exposed reuse the slang profile's cache on OZ
nebasuke Oct 22, 2026
78ff2b4
feat(bench): dump slang's standard-JSON inputs for replay
nebasuke Oct 26, 2026
2ea216b
fix(bench): run the dump's hardhat clean with the scenario env
nebasuke Oct 26, 2026
7366b37
fix(bench): name multi-job slang dumps by content hash
nebasuke Oct 26, 2026
1e633b3
fix(bench): compare forge cells with slang's forge-scope cell
nebasuke Oct 26, 2026
dbbc95f
fix(ci): validate monorepo scenarios in their workdir
nebasuke Oct 26, 2026
8d39c35
ci(bench): isolate package-manager caches per run
nebasuke Oct 26, 2026
b90f8da
ci(bench): publish slang numbers only from a complete, fresh run
nebasuke Oct 26, 2026
e3ddaf6
chore(bench): pin slang to the 2026-10-29 prerelease
nebasuke Oct 29, 2026
75e80c4
bench(slang-scenarios): restore swap-vm's slang cell
nebasuke Oct 29, 2026
d0df5fb
bench(slang-scenarios): run lido-core's Solidity tests under slang
nebasuke Oct 29, 2026
2b62bdf
fix(bench): redraw solady testExecute's caller when it is the owner
nebasuke Oct 29, 2026
22684d0
ci(bench): make the strict local-install check opt-in
nebasuke Oct 29, 2026
410b5cd
bench(slang): refresh the baseline from dispatch 40957738104
nebasuke Oct 30, 2026
456b05f
bench(slang-scenarios): measure swap-vm's Foundry suite
nebasuke Oct 30, 2026
9e7dd90
bench(solx-scenarios): forge + solar test cells where the suite passes
nebasuke Oct 30, 2026
a93b357
bench(render): forge + solar in the slang test tables
nebasuke Oct 30, 2026
7960771
bench(slang): merge dispatch 41038027064 into the baseline
nebasuke Oct 30, 2026
b8492ec
bench(slang): merge dispatch 41053131682 into the baseline
nebasuke Oct 30, 2026
d9d0a2b
fix(bench): correct the slang comment's solar note and run counts
nebasuke Oct 30, 2026
4699c68
feat(bench): link the slang comment's own values to their run
nebasuke Oct 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/scripts/validate-local-hardhat-install.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,22 @@ test("scenarioProjectDir follows the scenario's workingDirectory", (t: TestConte
assert.equal(scenarioProjectDir(clone, scenarioJson), clone);
});

test("scenarioProjectDir follows a monorepo scenario's workdir", (t: TestContext) => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "validate-local-"));
t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
const scenarioJson = path.join(dir, "scenario.json");
const clone = path.join(dir, "clone");

fs.writeFileSync(
scenarioJson,
JSON.stringify({ workdir: "packages/horizon" }),
);
assert.equal(
scenarioProjectDir(clone, scenarioJson),
path.join(clone, "packages/horizon"),
);
});

test("scenarioProjectDir falls back to the clone without a readable scenario.json", (t: TestContext) => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "validate-local-"));
t.after(() => fs.rmSync(dir, { recursive: true, force: true }));
Expand Down
23 changes: 15 additions & 8 deletions .github/scripts/validate-local-hardhat-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
// distinguish this run's tarball from a stale one served out of a
// package-manager cache on the self-hosted runner; the stamp can.
//
// Diagnostic only: emits GitHub warning annotations and always exits 0, so it
// can never regress the benchmark runner.
// Emits GitHub warning annotations and exits 0, so it can never regress the
// benchmark runner. With --strict, any warning exits 1, so a run that may have
// measured a stale hardhat is not published.
//
// Inputs (environment):
// BENCH_RUN_STAMP the stamp embedded before the benchmark
Expand Down Expand Up @@ -224,26 +225,32 @@ export function classifyScenario(
}

// The directory a scenario's clone installs hardhat in: the clone itself, or
// the scenario's `workingDirectory` inside it. A clone whose scenario.json is
// missing or unreadable (e.g. a scenario since removed) falls back to the
// clone itself.
// the scenario's `workingDirectory` (or a monorepo scenario's `workdir`)
// inside it. A clone whose scenario.json is missing or unreadable (e.g. a
// scenario since removed) falls back to the clone itself.
export function scenarioProjectDir(
cloneDir: string,
scenarioJsonPath: string,
): string {
try {
const { workingDirectory } = JSON.parse(
const { workingDirectory, workdir } = JSON.parse(
fs.readFileSync(scenarioJsonPath, "utf8"),
);
return typeof workingDirectory === "string"
? path.join(cloneDir, workingDirectory)
const projectDir = workingDirectory ?? workdir;
return typeof projectDir === "string"
? path.join(cloneDir, projectDir)
: cloneDir;
} catch {
return cloneDir;
}
}

const strict = process.argv.includes("--strict");

function warn(message: string): void {
if (strict) {
process.exitCode = 1;
}
// GitHub annotations render only the first line; collapse for readability.
console.log(`::warning::${message.replace(/\r?\n/g, " ")}`);
}
Expand Down
358 changes: 358 additions & 0 deletions .github/workflows/slang-regression-benchmark.yml

Large diffs are not rendered by default.

422 changes: 422 additions & 0 deletions .github/workflows/solx-regression-benchmark.yml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
docs/.next
# A CI run's report artifact, kept byte-identical to what the run uploaded
scripts/benchmark/slang-baseline-report.json
9 changes: 9 additions & 0 deletions cspell.dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ anonymization
APDU
arrayified
authorizationify
avgs
behaviour
besu
Besu
Expand Down Expand Up @@ -51,6 +52,7 @@ FQNs
gcda
gcmsiv
gnueabihf
Ghiglia
hdkey
hdpath
heco
Expand Down Expand Up @@ -79,14 +81,17 @@ Linea
linearization
linenums
Listify
miscompilation
moreutils
mprv
msvc
myfun
mykey
mylib
mylock
misparses
napi
nebasuke
niño
NFKC
Nomic
Expand Down Expand Up @@ -115,6 +120,8 @@ riscv
sarasa
schaable
sokol
solady
Solady
solcjs
SOLCJS
soljson
Expand All @@ -123,6 +130,7 @@ Solx
sourcify
Sourcify
SOURCIFY
stackification
ssfi
Ssfi
stringifying
Expand All @@ -145,6 +153,7 @@ unidici
unmined
unpad
unpadded
unpair
unparseable
Unpayable
unpublishing
Expand Down
44 changes: 44 additions & 0 deletions end-to-end/1inch-aqua-solx/hardhat.config.solx.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Wrapper config dropped over the pinned 1inch Aqua fork's hardhat.config.ts
// by preinstall.sh (which renames the original to hardhat.config.base.ts and
// copies the shared profile factory in as ./solx-profiles.ts).
//
// The fork's single compiler entry mirrors upstream foundry.toml: via-IR with
// optimizer runs 10_000_000 — upstream ships via-IR only (and its own
// [profile.solx], running solx through forge). We re-express it as the
// benchmark's matrix of profiles — {solc, solx} x {legacy, via-IR} — all
// seeded from that entry's settings; because the base ships viaIR: true, the
// factory's legacy cells explicitly flip it to false (see solx-profiles.ts).
// Neither upstream config nor the base sets evmVersion, so every cell
// inherits Hardhat's default for solc 0.8.34 (osaka) — which also matches
// forge 1.7.1's default for the cross-tool cell. Everything else (paths,
// test) is preserved from the base.
import hardhatSlang from "@nomicfoundation/hardhat-slang";
import hardhatSlangSolx from "@nomicfoundation/hardhat-slang-solx";

import baseConfig from "./hardhat.config.base.ts";
import { buildSolxProfiles, withPinnedFuzzSeed } from "./solx-profiles.ts";

const base = baseConfig as unknown as {
plugins?: unknown[];
solidity: { compilers: Array<{ settings: Record<string, unknown> }> };
[key: string]: unknown;
};

export default {
...base,
plugins: [...(base.plugins ?? []), hardhatSlangSolx, hardhatSlang],
// The plugin only allows type: "slang-solx" in the profile named
// "slang-solx"; this benchmark's solx cells live in profiles named after the
// compiler version they measure, so opt out of that guard. Throwaway
// benchmark scenario, not production.
"slang-solx": { dangerouslyAllowSlangSolxInProduction: true },
// The test-execution evaluation (test-under-solx.ts) pins the
// solidity-test fuzz seed. The solx and solc control runs then see
// identical fuzz inputs, and failures reproduce.
test: withPinnedFuzzSeed(base.test),
solidity: {
profiles: buildSolxProfiles({
baseSettings: base.solidity.compilers[0].settings,
}),
},
};
57 changes: 57 additions & 0 deletions end-to-end/1inch-aqua-solx/preinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env bash
set -euo pipefail

WORKDIR="$PWD"
MONOREPO_ROOT="$(cd "$E2E_TEST_DIR/../.." && pwd)"

# Pinned solx/forge versions shared by every solx scenario.
source "$MONOREPO_ROOT/scripts/benchmark/pinned-tool-versions.sh"

# The benchmark profiles pin solc 0.8.34 (the only version solx embeds), but
# a handful of the project's sources pin `pragma solidity 0.8.30;`. Relax
# those exact pragmas to caret ranges so the same sources compile under
# 0.8.34. The @1inch dependencies here already use caret ranges (unlike the
# 1inch-swap-vm-solx scenario), so node_modules needs no treatment. The
# repo's patch-package postinstall (fixing @1inch/solidity-utils' exports
# field for Hardhat) runs as part of the normal install.
node "$MONOREPO_ROOT/scripts/benchmark/relax-pragmas.ts" --scenario 1inch-aqua-solx --from 0.8.30 --skip-dir lib

# Declare the monorepo's hardhat-slang-solx and hardhat-slang as
# devDependencies at their workspace versions, which --use-local publishes to
# and resolves from Verdaccio, plus the freshness oracles in .solx — see
# scripts/benchmark/wire-hardhat-plugins.ts.
# The package.json edit is safe under yarn too; the subsequent `yarn install`
# resolves the new entries.
node "$MONOREPO_ROOT/scripts/benchmark/wire-hardhat-plugins.ts" --target-dir "$WORKDIR"

# Pinned solx for the version-comparison cells: the wrapper config's
# "solx-0.1.8" profiles point at this binary via the plugin's `path` option
# (the plain "solx" profiles keep measuring the version the plugin ships).
node "$MONOREPO_ROOT/scripts/benchmark/download-solx.ts" --version "$SOLX_PINNED_VERSION" --out "$WORKDIR/.solx/solx-v$SOLX_PINNED_VERSION"

# The slang compiler under test, for the wrapper config's "slang" profile
# (hardhat-slang's `path` option): the pinned release, or the local build
# named by HARDHAT_SLANG_BENCH_BINARY.
node "$MONOREPO_ROOT/scripts/benchmark/provision-slang.ts" --tag "$SLANG_PINNED_TAG" --asset-suffix "$SLANG_PINNED_ASSET_SUFFIX" --out "$WORKDIR/.solx/slang"

# Pinned forge (latest stable at pin time) for the cross-tool parity cells.
# At 1.7.1 forge's codegen is solc (solar is lint-only), so with
# FOUNDRY_SOLC=0.8.34 the compiler matches the hardhat cells. (FOUNDRY_SOLC,
# not FOUNDRY_SOLC_VERSION, which forge misparses when an [etherscan] table
# is present — see the aave-v4-solx scenario.) Neither side pins evmVersion:
# forge 1.7.1 and Hardhat both default solc 0.8.34 to osaka.
rm -rf "$WORKDIR/.foundry"
node "$MONOREPO_ROOT/scripts/benchmark/download-forge.ts" --version "$FORGE_PINNED_VERSION" --out "$WORKDIR/.foundry/forge"

# forge with the solar its release ships, for the forge-solar cell
# (FOUNDRY_SOLC pointed at that solar).
rm -rf "$WORKDIR/.foundry-solar"
node "$MONOREPO_ROOT/scripts/benchmark/download-forge.ts" --version "$FORGE_SOLAR_PINNED_VERSION" --with-solar --out "$WORKDIR/.foundry-solar/forge"

# Swap in the wrapper config that adds the solx build profiles. The original
# is kept as hardhat.config.base.ts, which the wrapper composes with — see
# hardhat.config.solx.ts. The shared profile factory is copied in beside it
# (the monorepo isn't importable from the checkout at hardhat runtime).
mv hardhat.config.ts hardhat.config.base.ts
cp "$E2E_TEST_DIR/hardhat.config.solx.ts" hardhat.config.ts
cp "$MONOREPO_ROOT/scripts/benchmark/solx-profiles.ts" solx-profiles.ts
Loading
Loading