-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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: Add TEE Mode to Solana Plugin #835
Conversation
@lalalune could someone take a look at this? Keeping up with new conflicts when new merges are done can get tedious. |
Hi @HashWarlock I will take a look and review. |
Thank you! I can remove the banner image given the conversation we had on the call earlier |
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.
Hi @HashWarlock I left some comments that I think needs to be addressed and then we good to go.
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.
Changes well implemented and looks good to me.
We good to go!
Relates to:
TEE Plugin
Risks
medium
This PR should go through extra testing to ensure the Solana Plugin does not break with the addition of the TEE Plugin for key derivation and remote attestations.
Background
Currently the Solana and EVM Plugin are not aware of the TEE Plugin and a lot of custom code and configuration must be done to add deployment of Eliza agents in a TEE. This PR solves this issue by making the TEE Plugin an opt-in feature that allows developers to build a TEE compatible Eliza Agent to deploy in a Intel TDX Server running the Dstack SDK.
What does this PR do?
This PR adds a new env variable called
TEE_MODE
with values ofOFF
,LOCAL
,DOCKER
,PRODUCTION
. When theTEE_MODE
is set to an option other thanOFF
orundefined
then the agent will utilize the TEE Plugin to handle wallet generations for the Solana Plugin.Every time a key is derived to generate a wallet in the Solana Plugin the following happens:
WALLET_SECRET_SALT
reportdata
that includes a JSON string of{agentId: ${agentId}, publicKey: ${publicKey}}
reportdata
to verify publicly at https://ra-quote-explorer.vercel.app/What kind of change is this?
Feature
Documentation changes needed?
My changes require a change to the project documentation. There will be another step in this PR to add documentation within the advanced section to step developers through setting up their Eliza Agent to be TEE compatible. This documentation will take developers through the process of
reportdata
passed into the RA QuoteTesting
Run through existing Solana Plugin tests before merge.
Where should a reviewer start?
A reviewer should start by running the existing codebase with
TEE_MODE
set toOFF
to ensure functionality hasn't broken.Detailed testing steps
OFF
orundefined
and pass all testsTEE_MODE
toLOCAL
and run through a local test by launching the docker TEE Simulator then building and starting the project on the development machine where the docker TEE Simulator is runningTEE_MODE
toDOCKER
and run through a docker test by launching the docker TEE Simulator then building a docker image on alinux/amd64
platform where the docker TEE Simulator is runningTEE_MODE
toPRODUCTION
and run through a production deployment by launching in an Intel TDX Server with Dstack SDK setup to deploy via a dashboardScreenshots
Ask Eliza Agent about their wallet info
Generate RA Quote with reportdata of AgentID + Derived Solana Pub Key
Verify in the TEE RA Explorer (This is a simulator so is should say unverified, but we can still validate the
rtmr
sVerify the
rtmr
s in the quote