-
Notifications
You must be signed in to change notification settings - Fork 32
Standalone rofl-appd #2419
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
Standalone rofl-appd #2419
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| use rofl_appd::{ | ||
| services::{kms::MockKmsService, metadata::InMemoryMetadataService}, | ||
| Config, | ||
| }; | ||
| use std::{env, sync::Arc}; | ||
|
|
||
| #[tokio::main] | ||
| async fn main() -> Result<(), rocket::Error> { | ||
| let socket = env::args() | ||
| .nth(1) | ||
| .unwrap_or_else(|| "unix:/run/rofl-appd.sock".to_string()); | ||
| let seed = env::args() | ||
| .nth(2) | ||
| .unwrap_or_else(|| "24b41929dc5bc3ec792f8792c7b7c32f".to_string()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you extract this seed from the existing mock SGX version of sapphire-localnet running a ROFL app?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is just a random seed for now, but it could be replaced. |
||
|
|
||
| let config = Config { | ||
| address: &socket, | ||
| kms: Arc::new(MockKmsService), | ||
| metadata: Arc::new(InMemoryMetadataService::default()), | ||
| }; | ||
|
|
||
| println!("Starting minimal rofl-appd () at {}", socket); | ||
|
|
||
| rofl_appd::start_local(config, None, seed.as_bytes()).await | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should add another
/rofl-appd-mockpackage that wraps/rofl-appdso it's clear what code is used in production ROFLs and what is there for the Localnet testing?