-
Notifications
You must be signed in to change notification settings - Fork 57
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
How to interact with enclave from a node within enclave? #1474
Comments
(API like API Ctlr) from the docs image So I see that it shall be always in enclave, yet wonder where one can see examples of using it. |
hey! The Starlark APIs are purely to manipulate inside of an enclave, they can't do meta things like create/shut-down same enclave / more enclaves I remember from my chat with Piotr/Kamil the other day that your team wants to shut down enclave after X epochs or something. There are a few paths here that we can take depending on what you care about - Keep using StalarkStarlark has a few things that you can use to achieve what you are doing - you can use So your workflow could be like $ kurtosis run github.com/kurtosis-tech/etheruem-package --args-file args.json --enclave my-named-enclave
$ kurtosis run my-stop-script.star --enclave my-named-enclave Pseudo code for def run(plan, args):
plan.wait(...)
plan.stop_service(SERVICE_A)
plan.stop_service(SERVICE_B)
plan.stop_service(SERVICE_C) Note this will stop the service but the enclave will still exist Use the Kurtosis SDK - the recommended way!The CLI is essentially using the Kurtosis SDK to create, stop, delete enclaves. The code for this is available We have SDKs in Go, TS & Rust - https://github.com/kurtosis-tech/kurtosis/tree/main/api Here's an example in Golang - https://github.com/kurtosis-tech/protocolberg I am updating the package to work with the latest SDK - kurtosis-tech/protocolberg#14 In this example, we spin up an etheruem package; wait for certain epochs/ finalizations to happen & then check if MEV reached desired state |
That would work! Thank you! |
adding to my comment - this block https://github.com/kurtosis-tech/protocolberg/blob/main/finalization_test.go#L92-L98 Destroys the enclave if the test ends succesfully! @OlegJakushkin That wouldn't work! Inside the container you can't call |
Ok, thank you for help. |
Background & motivation
So what I want is simple - if a service detects some condition it needs to post a message to stop current enclave. How can such thing be achieved from a service running inside enclave?
Desired behaviour
API to call from withing an enclave (REST endpoint or something like that) that could stop enclave on request.
How important is this to you?
Painful; the lack of this feature makes using Kurtosis frictionful.
The text was updated successfully, but these errors were encountered: