Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2419 +/- ##
==========================================
- Coverage 48.54% 48.40% -0.15%
==========================================
Files 224 225 +1
Lines 16079 16130 +51
==========================================
+ Hits 7806 7807 +1
- Misses 8213 8263 +50
Partials 60 60 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for oasisprotocol-oasis-sdk canceled.
|
|
Nice, I think we should also provide a docker image that runs the mock rofl-appd, so that rofl app developers can easily use it for testing. Could include it in the existing rofl-dev or a separate image only with the mock rofl-appd. |
0232a11 to
71d4284
Compare
|
@ptrus Can you clarify how the runtime queries should work in the local mode? I saw that the actual method and args for the queries are underdocumented. In standalone mode rofl-appd would work with the sapphire localnet, so the transport channel logic would be completely different, simply using the RPC of the localnet. Please check the current query code and suggest how best to make it work. |
If we're connected to localnet, then we should be able to just propagate the queries to the localnet node. So in Go for example, you would just create a rpc client, and propagate the method name and the args to the oasis-sdk/client-sdk/go/modules/evm/evm.go Lines 100 to 102 in 394da33 oasis-sdk/client-sdk/go/client/client.go Line 92 in 394da33 Implemented here: oasis-sdk/client-sdk/go/client/client.go Lines 458 to 474 in 394da33 (using oasis-core Go RPC client, which is implemented in https://github.com/oasisprotocol/oasis-core/blob/a94dc79ff188f55fa63b463175cd606facd0e944/go/runtime/client/api/grpc.go#L419-L442) The only issue is that we likely don't have a Rust RPC client implemented yet anywhere. I think it's fine for the initial version to return an error with If we need this quickly, the most pragmatic approach might be to build a small Go binary that accepts a command name and arguments, and invoke it from within the standalone mock appd client. This avoids having to build the missing Rust clients for this specific use case |
71d4284 to
20c127d
Compare
| .unwrap_or_else(|| "unix:/run/rofl-appd.sock".to_string()); | ||
| let seed = env::args() | ||
| .nth(2) | ||
| .unwrap_or_else(|| "24b41929dc5bc3ec792f8792c7b7c32f".to_string()); |
There was a problem hiding this comment.
Did you extract this seed from the existing mock SGX version of sapphire-localnet running a ROFL app?
There was a problem hiding this comment.
It is just a random seed for now, but it could be replaced.
| Ok(()) | ||
| } | ||
|
|
||
| /// Start the REST API server in mock mode |
There was a problem hiding this comment.
Do you think we should add another /rofl-appd-mock package that wraps /rofl-appd so it's clear what code is used in production ROFLs and what is there for the Localnet testing?
We could ship this as part of Related: https://docs.oasis.io/build/rofl/workflow/test#sgx-rofl |
Resolves #2142