# Differences from Ethereum

## Overview

The [Seismic EVM](https://github.com/SeismicSystems/seismic-revm/blob/c29f4ea0681f09fb1e9998fa16568d4979c47ee3/README.md) is approximately a superset of the EVM

### What's the same

* Transaction construction and serialization identical to Ethereum (with one new transaction type)
* Address generation, gas estimation, and signing work the same as Ethereum
* [Almost all](#rpc-compatibility) RPC methods are identical to reth
* Standard Solidity bytecode will behave identically on Seismic, with [minor exceptions](https://docs.seismic.systems/reference/opcodes#sstore-sload-standard) (e.g., `SSTORE` reverts on shielded slots)
* Seismic supports all of Ethereum's opcodes & precompiles
* EIP-1559 transactions follow standard EIP-1559 fee rules. Seismic transactions (type `0x4A`) use legacy fee pricing
* Seismic will produce empty blocks when there are no pending transactions

### Key differences

* **Shielded storage**: Solidity contracts can store private data on-chain
* **Runs in a TEE**: Seismic nodes must run in Trusted Execution Environments
* **Seismic transaction:** We added a new transaction type that allows you to encrypt your calldata

## EVM Compatibility

### Opcodes

* [`CLOAD`](https://docs.seismic.systems/reference/opcodes#cload) – load shielded data from storage
* [`CSTORE`](https://docs.seismic.systems/reference/opcodes#cstore) – write shielded data to storage
* [`TIMESTAMP_MS`](https://docs.seismic.systems/reference/opcodes#timestamp_ms) – get the block timestamp in milliseconds. Note that `block.timestamp` still returns seconds, matching standard Solidity. Use `block.timestamp_ms` for millisecond precision

### Seismic transaction

The transaction with type `0x4a` allows users to encrypt their calldata. These otherwise work just like legacy transactions. We also support the other standard Ethereum transaction types (Legacy, EIP-1559, EIP-2930, EIP-4844, EIP-7702)

### Precompiles

All standard Ethereum precompiles are still available. Seismic added 6 new [precompiles](https://docs.seismic.systems/reference/precompiles) to our EVM:

* [**RNG `0x64`**](https://docs.seismic.systems/reference/precompiles/rng) — securely generate a random number
* [**ECDH `0x65`**](https://docs.seismic.systems/reference/precompiles/ecdh) — Elliptic Curve Diffie-Hellman, for generating a shared secret given a public key and secret key
* [**AES-GCM Encrypt `0x66`**](https://docs.seismic.systems/reference/precompiles/aes-gcm-encrypt) — encrypt data with AES-GCM
* [**AES-GCM Decrypt `0x67`**](https://docs.seismic.systems/reference/precompiles/aes-gcm-decrypt) — decrypt data with AES-GCM
* [**HKDF `0x68`**](https://docs.seismic.systems/reference/precompiles/hkdf) — derive cryptographic keys from a parent key
* [**secp256k1 Sign `0x69`**](https://docs.seismic.systems/reference/precompiles/secp256k1-sign) — sign a message given a secret key

### Staking

Seismic uses the same staking contract as Ethereum, which is hardcoded into our Genesis block at address `0x00000000219ab540356cbb839cbe05303d7705fa`

### Block times

We will often produce multiple blocks in the same second, yet Ethereum's block timestamps are expressed in terms of unix seconds. Our solution to this:

* Block headers and the EVM use timestamps in milliseconds internally
* In Seismic Solidity, `block.timestamp` returns unix seconds, just like in standard Solidity. We added `block.timestamp_ms` which returns unix milliseconds. `block.timestamp_seconds` is an alias for `block.timestamp`

### RPC compatibility

We support almost every RPC endpoint in Reth, and have added a few more of our own. See the full [RPC Methods](https://docs.seismic.systems/reference/rpc-methods) reference for details.

**Seismic-specific methods:**

* [`seismic_getTeePublicKey`](https://docs.seismic.systems/reference/rpc-methods/seismic-get-tee-public-key) — returns the TEE's encryption public key for ECDH key exchange

**Modified Ethereum methods:**

* [`eth_call`](https://docs.seismic.systems/reference/rpc-methods/eth-call) — zeroes the `from` field on unsigned calls; supports ["signed reads"](https://docs.seismic.systems/reference/seismic-transaction/signed-reads) via type `0x4A`
* [`eth_sendRawTransaction`](https://docs.seismic.systems/reference/rpc-methods/eth-send-raw-transaction) — accepts Seismic transaction type `0x4A` with encrypted calldata
* [`eth_getStorageAt`](https://docs.seismic.systems/reference/rpc-methods/eth-get-storage-at) — returns zero for shielded slots, making them indistinguishable from uninitialized storage
* Tracing endpoints are currently disabled. We plan to re-enable them with private data redacted from traces
