Skip to content

feat!: nargo::ops::test::run_test generic in ForeignCallExecutor#6858

Merged
aakoshh merged 2 commits into6742-jsonrpseefrom
6742-run-test-generic-foreign
Dec 19, 2024
Merged

feat!: nargo::ops::test::run_test generic in ForeignCallExecutor#6858
aakoshh merged 2 commits into6742-jsonrpseefrom
6742-run-test-generic-foreign

Conversation

@aakoshh
Copy link
Contributor

@aakoshh aakoshh commented Dec 18, 2024

Description

Problem*

Follow up for #6857
Fixes the Wasm compilation in #6849

Summary*

Changes nargo::ops::test::run_test to take a generic function to create a ForeignCallExecutor, rather than a URL which it used for now to create a HTTP client, which would not compile to wasm, clashing with the goals of #6835

Refactored nargo to make it possible to import the test features without the rpc stuff. Changed the feature flags to only disable the DefaultForeignCallExecutor for Wasm.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@aakoshh aakoshh changed the base branch from master to 6742-refactor-foreign-calls December 18, 2024 16:08
@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2024

Peak Memory Sample

Program Peak Memory
keccak256 78.15M
workspace 122.79M
regression_4709 423.26M
ram_blowup_regression 1.58G
private-kernel-tail 206.71M
private-kernel-reset 720.29M
private-kernel-inner 291.91M
parity-root 171.71M

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2024

Compilation Sample

Program Compilation Time %
sha256_regression 0m1.386s -18%
regression_4709 0m0.789s -5%
ram_blowup_regression 0m14.592s -4%
rollup-base-public 3m24.786s 0%
rollup-base-private 2m59.793s -1%
private-kernel-tail 0m1.250s 0%
private-kernel-reset 0m7.872s -1%
private-kernel-inner 0m2.412s -12%
parity-root 0m0.831s -34%
noir-contracts 2m43.357s 2%

@aakoshh aakoshh marked this pull request as ready for review December 18, 2024 16:32
Copy link
Collaborator

@asterite asterite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been wanting to separate the executor creation from the test runner more so this is great.

Base automatically changed from 6742-refactor-foreign-calls to 6742-jsonrpsee December 19, 2024 09:17
@aakoshh aakoshh force-pushed the 6742-run-test-generic-foreign branch from 65283d7 to f8936ca Compare December 19, 2024 09:20
@aakoshh aakoshh merged commit 54fc751 into 6742-jsonrpsee Dec 19, 2024
@aakoshh aakoshh deleted the 6742-run-test-generic-foreign branch December 19, 2024 09:20
@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2024

Changes to Brillig bytecode sizes

Generated at commit: a5485126b32dd6b7b57d8e9b43a1bb7e1190ab2a, compared to commit: e2549dfdd8ea93a8d63a4404c2aaada62455018e

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
poseidonsponge_x5_254 +3 ❌ +0.07%

Full diff report 👇
Program Brillig opcodes (+/-) %
poseidonsponge_x5_254 4,254 (+3) +0.07%

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2024

Changes to number of Brillig opcodes executed

Generated at commit: a5485126b32dd6b7b57d8e9b43a1bb7e1190ab2a, compared to commit: e2549dfdd8ea93a8d63a4404c2aaada62455018e

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
poseidonsponge_x5_254 +3 ❌ +0.00%

Full diff report 👇
Program Brillig opcodes (+/-) %
poseidonsponge_x5_254 183,753 (+3) +0.00%

@github-actions
Copy link
Contributor

Execution Sample

Program Execution Time %
sha256_regression 0m0.614s -1%
regression_4709 0m0.394s -1%
ram_blowup_regression 0m4.357s -1%
rollup-base-public 0m27.689s -1%
rollup-base-private 0m25.817s 0%
private-kernel-tail 0m0.692s -2%
private-kernel-reset 0m1.459s 0%
private-kernel-inner 0m0.966s 2%
parity-root 0m0.511s -3%

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