-
Notifications
You must be signed in to change notification settings - Fork 219
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!: Switch to using jsonrpsee
for foreign calls; refactor run_test
; foreign call layering
#6849
base: master
Are you sure you want to change the base?
Conversation
466fde9
to
8b742ff
Compare
Peak Memory Sample
|
Compilation Sample
|
6495305
to
84dba55
Compare
@TomAFrench it looks like it doesn't compile to Wasm because the |
Yeah we don't need an RPC server in wasm as we expect that to use callbacks directly. We can put it behind a feature flag then. |
@TomAFrench the problem is not with the RPC server, which was only used as a I created a We can refactor the whole module so that a
Perhaps this is related, can you elaborate on what you wanted to do? |
jsonrpsee
for foreign callsjsonrpsee
for foreign calls; refactor run_test
; foreign call layering
Execution Sample
|
Description
Problem*
Resolves #6742
Summary*
Instead of
jsonrpc
we usejsonrpsee
to make calls to the Oracle function resolver.Also includes #6857 and #6858 which effectively make
nargo::ops::test
receive a genericForeignCallExecutor
(a breaking change in the API) so that we can use it with Wasm, which otherwise could not compile theRpcForeignCallExecutor
.Additional Context
Our codebase is mostly synchronous, but
jsonrpsee
is async. I created atokio::runtime::Runtime
in the executor where I can block on the calls, however this doesn't work well with the#[tokio::test]
, runtimes don't nest. Because of this the tests require a bit more supporting machinery than before.Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.