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

feat: RP for plugin-tee-verifiable-log #1369

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

gene-zhan
Copy link

Relates to:

  1. Run verifiable Eliza in the TEE.
  2. Verifiable log for Eliza in the TEE

Add a verifiable log plugin to enable Eliza to sign verifiable logs and provide an interactive query interface. So external parties can query the verifiable logs and verify Eliza's execution process through signature validation.

Risks

Low

Background

What does this PR do?

Eliza running in a TEE (Trusted Execution Environment) is verifiable, ensuring that the AI agent operates strictly according to the code.

However, further development is needed for external parties to verify what Eliza specifically did: external parties should be able to access Eliza's operation logs, and Eliza must use a key pair derived from the TEE to sign these logs. This enables the logs to be verified as authentically originating from Eliza within the TEE.

img

For example, in the case of an Eliza AI agent running a Twitter client, it could be verified which tweets were posted by Eliza and which were directly posted by a human manually operating the Twitter account.

Future: Based on this plugin, other clients and plugins can generate verifiable logs that need to be authenticated externally. We can further develop a verifiable terminal for TEE Eliza to display signed, verifiable logs in real-time.

What kind of change is this?

  • Feature
  • TEE plugin
  • Verifiable feature

Documentation changes needed?

Yes, we will add documentation for using this plugin, including the guide on how other plugins can import it and generate verifiable logs.

Testing

Where should a reviewer start?

  1. Understand the existing plugin-tee

    1. We rely on Eliza's existing plugin-tee and use its key derivation interface.
  2. Understand what plugin-tee-verifiable-log does

    1. Derive a key pair for verifiable logs: It uses the TEE to derive a key pair specifically for signing verifiable logs.
    2. Remote attestation: The public key of verifiable logs is embedded in the remote attestation report, making it accessible for external verification.
    3. Sign logs: This plugin accepts logs passed in from external modules (e.g., tweets sent and received by a Twitter client, or executed actions), signs them with the TEE-derived key pair, and stores them in the database.
    4. Verification: External entities can use the remotely attested public key to verify these logs, ensuring that certain actions were indeed performed by TEE Eliza.
  3. What is not included in this PR

    1. Adding RPC interfaces for the direct client: For example, support for remote attestation and querying the public key for verifiable logs. This feature will be submitted in a separate PR that depends on plugin-tee-verifiable-log and modifies the direct client.
    2. Support for plugin-tee-verifiable-log in existing clients: Enhancements for existing clients to generate verifiable logs that need external validation. For instance, modifying the Twitter client to depend on plugin-tee-verifiable-log and produce logs that are worthy of external verification.

Detailed testing steps

It have completed the integration tests and can run the pnpm test file in the test directory.

@shakkernerd shakkernerd changed the title RP for plugin-tee-verifiable-log feat: RP for plugin-tee-verifiable-log Dec 23, 2024
odilitime
odilitime previously approved these changes Dec 23, 2024
@odilitime odilitime added the Plugin_new Mark PRs that are a new plugin label Dec 23, 2024
@gene-zhan
Copy link
Author

@odilitime @shakkernerd Could you please help resolve the code conflicts? I’ve already submitted the code several times, but I noticed that the conflicts and the file changes display different content, and I’m not sure how to handle it.

@shakkernerd
Copy link
Member

Hi @gene-zhan alright, I will look into it.

@gene-zhan
Copy link
Author

@shakkernerd Thank you. By the way, is there anything else I need to update or adjust in this pull request to get it merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Plugin_new Mark PRs that are a new plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants