# Proposal: Implementing EIP-712 for Confidential Compute Requests

**URL:** https://collective.flashbots.net/t/proposal-implementing-eip-712-for-confidential-compute-requests/3451
**Category:** SUAVE
**Created:** [May 27, 2024, 10:59am UTC](https://collective.flashbots.net/t/proposal-implementing-eip-712-for-confidential-compute-requests/3451 "2024-05-27T10:59:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ferranbt](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/f/cc9497/32.png) [@ferranbt](https://collective.flashbots.net/u/ferranbt)
#### Post date: [May 27, 2024, 10:59am UTC](https://collective.flashbots.net/t/proposal-implementing-eip-712-for-confidential-compute-requests/3451/1 "2024-05-27T10:59:44Z")

</div>

I propose an improvement to how Confidential Compute Records (CCRs) are signed in **`suave-geth`** by adopting the EIP-712 signature standard. This change would help front-end developers support CCRs more easily, as they will no longer need to use the deprecated **`eth_sign`** method, which gives scary warning signs when used and will soon be removed entirely by popular wallets like MetaMask.

_As this modifies our core transaction type, it is a breaking change and will not be rolled out until a new testnet to preserve the functionality of current SUAPPs._

### **Key Changes:**

1. **EIP-712 Signature Support** :
  - We’ve added an **`Envelope`** boolean field to the **`ConfidentialComputeRecord`** structure. This field indicates whether a CCR is signed using the EIP-712 standard.
  - Implemented a method **`EIP712Hash()`** to generate the EIP-712 compliant hash for **`ConfidentialComputeRecord`**.

2. **New EIP-712 Envelope Structure** :
  - Defined the EIP-712 envelope structure in **`core/types/suave_eip712.go`**. This structure is essential for creating the EIP-712 hash and ensuring compatibility with the standard.

3. **Enhanced Transaction Handling** :
  - Updated the transaction marshalling and unmarshalling processes to include the new **`Envelope`** field.
  - Modified the transaction signing logic to compute the EIP-712 hash when the **`Envelope`** field is set to true.

4. **Testing and Validation** :
  - Added comprehensive unit tests to ensure the correct implementation of EIP-712 hash generation and signature validation.

5. **SDK and CStore Engine Adjustments** :
  - Introduced a **`useEIP712`** boolean field in the SDK **`Client`** struct to enable or disable EIP-712 signature usage.
  - Updated the Confidential Store Engine to handle EIP-712 signed transactions appropriately, ensuring backward compatibility and smooth transition.

**Usage:**

Here’s how you can get started using EIP-712 signatures for CCRs. First, check out the branch [feature/eip712-ccrs](https://github.com/flashbots/suave-geth/pull/247) locally and start the client as normal, then:

1. **SDK Client Configuration** :

2. **Creating and Signing a CCR** :

### **Feedback Request**

We encourage feedback from various stakeholders in our community, including SUAPP developers, wallet providers, and front-end developers. Your input is crucial for refining and enhancing this proposal.

**For Suapp Developers:**

- How do you see this change affecting your current workflow with CCRs?
- Are there any specific features or improvements you would like to see in the EIP-712 integration?

**For Wallet Providers:**

- Will this change simplify the integration process for signing and sending CCRs?
- Are there any compatibility concerns or additional support needed for EIP-712?

**For Front-End Developers:**

- Does the move to EIP-712 make building and maintaining interfaces for CCRs easier?
- Are there any challenges or areas where you need more documentation or examples?

Your feedback is invaluable in ensuring this feature meets the needs of our community. ⚡🤖

---

<div class="post-metadata">

### Author: ![dmarz](https://collective.flashbots.net/user_avatar/collective.flashbots.net/dmarz/32/494_2.png) [@dmarz](https://collective.flashbots.net/u/dmarz)
#### Post date: [May 27, 2024, 11:04am UTC](https://collective.flashbots.net/t/proposal-implementing-eip-712-for-confidential-compute-requests/3451/2 "2024-05-27T11:04:40Z")

</div>

SUAVE will have “intents” 👉👈🥺

---

<div class="post-metadata">

### Author: ![orest](https://collective.flashbots.net/user_avatar/collective.flashbots.net/orest/32/2090_2.png) [@orest](https://collective.flashbots.net/u/orest)
#### Post date: [May 27, 2024, 11:54am UTC](https://collective.flashbots.net/t/proposal-implementing-eip-712-for-confidential-compute-requests/3451/3 "2024-05-27T11:54:53Z")

</div>

high time 😉

---

<div class="post-metadata">

### Author: ![ch4r10t33r](https://collective.flashbots.net/user_avatar/collective.flashbots.net/ch4r10t33r/32/2228_2.png) [@ch4r10t33r](https://collective.flashbots.net/u/ch4r10t33r)
#### Post date: [May 27, 2024, 6:50pm UTC](https://collective.flashbots.net/t/proposal-implementing-eip-712-for-confidential-compute-requests/3451/4 "2024-05-27T18:50:01Z")

</div>

Excellent. Let’s go!

---

<div class="post-metadata">

### Author: ![brock](https://collective.flashbots.net/user_avatar/collective.flashbots.net/brock/32/5_2.png) [@brock](https://collective.flashbots.net/u/brock)
#### Post date: [May 31, 2024, 8:09pm UTC](https://collective.flashbots.net/t/proposal-implementing-eip-712-for-confidential-compute-requests/3451/5 "2024-05-31T20:09:09Z")

</div>

made a post about this from the SUAPP POV: [Practical POV: Using EIP712 to sign for CCRs](https://collective.flashbots.net/t/practical-pov-using-eip712-to-sign-for-ccrs/3496)

tl;dr: it works, but I have a couple questions.
