Skip to content
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

Reduce boilerplate in quartz app enclave #135

Open
2 tasks
dangush opened this issue Jul 30, 2024 · 0 comments
Open
2 tasks

Reduce boilerplate in quartz app enclave #135

dangush opened this issue Jul 30, 2024 · 0 comments
Labels
devx Issues related to improving dev experience / tooling

Comments

@dangush
Copy link
Contributor

dangush commented Jul 30, 2024

Summary

We want to minimize the amount of code a quartz app dev needs to write / understand while limiting their ability to customize their application. Currently, the main.rs file of quartz enclave/ has a lot of boilerplate.

Copying comments from @hu55a1n1 :
This is somewhat intentional, as we don't want the user/dev to forget to add the quartz CoreService. But I think there are other ways to achieve that. e.g. ->

trait QuartzServerExt {
    fn quartz_builder(
        config: Config,
        sk: Arc<Mutex<Option<SigningKey>>>,
        attestor: DefaultAttestor,
    ) -> Router;
}

impl QuartzServerExt for Server {
    fn quartz_builder(
        config: Config,
        sk: Arc<Mutex<Option<SigningKey>>>,
        attestor: DefaultAttestor,
    ) -> Router {
        Server::builder().add_service(CoreServer::new(CoreService::new(
            config,
            sk.clone(),
            attestor.clone(),
        )))
    }
}

Users might want the flexibility to specify their own config e.g. light client opts, etc.
Users may also want to add more services.

To do

  • Discuss what improvements we'd like to implement

Acceptance Criteria

  • todo
@dangush dangush added the devx Issues related to improving dev experience / tooling label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devx Issues related to improving dev experience / tooling
Projects
None yet
Development

No branches or pull requests

1 participant