This repository contains Seismic's fork of Alloy
The upstream repository lives here. This fork is up-to-date with it through commit de01884
. You can see this by viewing the main branch on this repository
You can view all of our changes vs. upstream on this pull request. The sole purpose of this PR is display our diff; it will never be merged in to the main branch of this repo
This new EIP-2718 transaction type (0x4a
or 74
) introduces additional fields that Seismic uses to secure its blockchain.
-
encryption_pubkey
Represents the EOA's ephemerally generated public key. Note: This is not the public key associated with the Ethereum address. When a Seismic transaction is sent to the chain, its calldata is encrypted using a shared secret derived from the network's key and the ephemeral key. This shared secret is included in the transaction so the network can decrypt the EOA's calldata (located in theinput
field, as with other transactions). -
message_version
Determines the method used to send the transaction. Seismic currently supports two approaches:-
Standard Method:
The transaction is signed usingsignTransaction
and sent as raw transaction bytes (indicated by0
). -
EIP-712 Typed Data:
The transaction is sent as EIP-712 signed typed data (indicated by2
).
Note:
We added support for EIP-712 because browser extension wallets couldn’t sign Seismic transactions using the traditional method. This support might be removed in the future. The value1
is reserved for supporting transactions signed viapersonal_sign
(for example, by hardware wallets). -
Seismic extends Ethereum's RPC methods by introducing two new enums:
SeismicCallRequest
foreth_call
SeismicRawTxRequest
foreth_sendRawTransaction
On Seismic, you can perform an eth_call
in two ways:
-
Standard Call:
Submit a transaction request normally. However, if you set thefrom
field, it will be overridden to the zero address to prevent users from making calls from addresses they do not own. -
Signed Call:
Submit a transaction request accompanied by a signature. In this case, thefrom
field is populated with the signer's address and passed to smart contracts, ensuring thatmsg.sender
cannot be spoofed. A signed call can be made using either:- A raw transaction payload (e.g., bytes)
- EIP-712 signed typed data (to support browser wallets)
For sending a raw transaction on Seismic, you have two options:
- Standard Method:
Use raw transaction bytes. - EIP-712 Method:
Send the transaction using EIP-712 signed typed data, as discussed in themessage_version
section.
- When a TxSeismic transaction is created, we:
- Generate an ephemeral key pair
- Use the ephemeral private key and network's public key to generate a shared secret via ECDH
- Use the shared secret to encrypt the transaction's calldata
- Include the ephemeral public key in the transaction so the network can decrypt the calldata
- Support for decrypting
eth_call
output. When a signedeth_call
is made, the network encrypts the output using the ephemeral public key provided in the request. The client can then decrypt this output using the ephemeral private key it generated - Please see
create_seismic_provider
for detailed provider configuration for shielded transaction.
Seismic's forks of the reth stack all have the same branch structure:
main
ormaster
: this branch only consists of commits from the upstream repository. However it will rarely be up-to-date with upstream. The latest commit from this branch reflects how recently Seismic has merged in upstream commits to the seismic branchseismic
: the default and production branch for these repositories. This includes all Seismic-specific code essential to make our network run
This repository contains the following crates:
alloy
: Meta-crate for the entire project, includingalloy-core
alloy-consensus
- Ethereum consensus interfacealloy-consensus-any
- Catch-all consensus interface for multiple networks
alloy-contract
- Interact with on-chain contractsalloy-eips
- Ethereum Improvement Proposal (EIP) implementationsalloy-genesis
- Ethereum genesis file definitionsalloy-json-rpc
- Core data types for JSON-RPC 2.0 clientsalloy-network
- Network abstraction for RPC typesalloy-network-primitives
- Primitive types for the network abstraction
alloy-node-bindings
- Ethereum execution-layer client bindingsalloy-provider
- Interface with an Ethereum blockchainalloy-pubsub
- Ethereum JSON-RPC publish-subscribe tower service and type definitionsalloy-rpc-client
- Low-level Ethereum JSON-RPC client implementationalloy-rpc-types
- Meta-crate for all Ethereum JSON-RPC typesalloy-rpc-types-admin
- Types for theadmin
Ethereum JSON-RPC namespacealloy-rpc-types-anvil
- Types for the seismic-anvil development node's Ethereum JSON-RPC namespacealloy-rpc-types-any
- Types for JSON-RPC namespaces across multiple networksalloy-rpc-types-beacon
- Types for the Ethereum Beacon Node APIalloy-rpc-types-debug
- Types for thedebug
Ethereum JSON-RPC namespacealloy-rpc-types-engine
- Types for theengine
Ethereum JSON-RPC namespacealloy-rpc-types-eth
- Types for theeth
Ethereum JSON-RPC namespacealloy-rpc-types-mev
- Types for the MEV bundle JSON-RPC namespacealloy-rpc-types-trace
- Types for thetrace
Ethereum JSON-RPC namespacealloy-rpc-types-txpool
- Types for thetxpool
Ethereum JSON-RPC namespace
alloy-serde
- Serde-related utilitiesalloy-signer
- Ethereum signer abstractionalloy-signer-aws
- AWS KMS signer implementationalloy-signer-gcp
- GCP KMS signer implementationalloy-signer-ledger
- Ledger signer implementationalloy-signer-local
- Local (private key, keystore, mnemonic, YubiHSM) signer implementationsalloy-signer-trezor
- Trezor signer implementation
alloy-transport
- Low-level Ethereum JSON-RPC transport abstractionalloy-transport-http
- HTTP transport implementationalloy-transport-ipc
- IPC transport implementationalloy-transport-ws
- WS transport implementation
None of these crates would have been possible without the great work done in:
Licensed under either of Apache License, Version 2.0 or MIT license at your option.Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in these crates by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.