---
eip: 2680
label: ERC-2680
title: Ethereum 2 wallet layout
status: Stagnant
type: Standards Track
category: ERC
created: 2020-05-29
official: https://eips.ethereum.org/EIPS/eip-2680
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-2680.md
canonical: https://eips.huatuo.xyz/eip-2680/
lang: en
tldr: Proposed a standard on-disk (and key/value store) layout for Ethereum 2 validator wallets and keystores, so different validator clients could share the same key files.
tags: [wallet, keystore, validator, consensus, storage]
---

# ERC-2680: Ethereum 2 wallet layout

> A standard layout and naming format for walletstore and keystore for both hierarchical (e.g. filesystem, Amazon S3) and non-hierarchical (key/value) storage systems.

**TL;DR:** Proposed a standard on-disk (and key/value store) layout for Ethereum 2 validator wallets and keystores, so different validator clients could share the same key files.

## What problem does it solve?

When a staker switches validator software, their keys have to come along. If every client stores wallets and keystores in its own folder structure, the user ends up copying key files around by hand, which risks either losing a key or, worse, running the same key in two places at once.

ERC-2680 proposed one standard layout so different software could find and use the same wallets in place. It covers both hierarchical stores (filesystems, Amazon S3) and flat key/value stores.

## How it works

A wallet is described by four elements:

1. **Base location.** On filesystems, a fixed per-OS path:
   - Windows: `%APPDATA%\ethereum2\wallets`
   - macOS: `${HOME}/Library/Application Support/ethereum2/wallets`
   - Linux: `${HOME}/.config/ethereum2/wallets`

   For other hierarchical stores, it is the lowercase hex SHA-256 of `"Ethereum 2 wallet:" + <store identifier>`. Flat stores have no base location.
2. **Wallet container**, named after the wallet's UUID (RFC 4122 format).
3. **Walletstore**, a file inside the container, also named after the wallet's UUID (the wallet metadata, as in [EIP-2386](/eip-2386/)).
4. **Keystores**, one per key, each named after the key's UUID (the encrypted key format of [EIP-2335](/eip-2335/)).

In flat stores, the container and item names are joined with `:` instead of nesting.

An optional `index` file, either at the base location (listing wallets) or inside a wallet container (listing accounts), is a JSON array of `{ "uuid", "name" }` objects. Public keys must not be stored in the index.

## Sample code

Filesystem layout on Linux for one wallet holding two keys:

```text
~/.config/ethereum2/wallets/
└── 1f031fff-c51d-44fc-8baf-d6b304cb70a7/          # wallet container
    ├── 1f031fff-c51d-44fc-8baf-d6b304cb70a7       # walletstore
    ├── 1302106c-8441-4e2e-b687-6c77f49fc624       # keystore
    ├── 4a320100-83fd-4db7-8126-6d6d205ba834       # keystore
    └── index                                      # optional
```

The same wallet in a key/value store:

```text
1f031fff-c51d-44fc-8baf-d6b304cb70a7:1f031fff-c51d-44fc-8baf-d6b304cb70a7
1f031fff-c51d-44fc-8baf-d6b304cb70a7:1302106c-8441-4e2e-b687-6c77f49fc624
1f031fff-c51d-44fc-8baf-d6b304cb70a7:4a320100-83fd-4db7-8126-6d6d205ba834
```

An `index` file:

```json
[
  { "uuid": "1302106c-8441-4e2e-b687-6c77f49fc624", "name": "validator-1" },
  { "uuid": "4a320100-83fd-4db7-8126-6d6d205ba834", "name": "validator-2" }
]
```

## Things to know

- **Status: Stagnant.** In practice, validator clients did not converge on this layout; the [EIP-2335](/eip-2335/) keystore JSON file is the format that is commonly shared between clients.
- The section on protecting against concurrent writes is left as "TBD" in the spec. Two clients using the same keys at once is exactly how validators get slashed, so a shared layout does not by itself make running multiple clients safe.
- Files and objects are named by UUID so that names leak nothing about the keys. Implementations should also make sure permissions keep the files readable only by the owning user.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-2680
