State Access — Storage Visibility

Blocked by default. Available only when the server is running with --unrestricted.

Subscribe

{"subscribe": ["AccountAccess", "StorageAccess"]}

Available types: AccountAccess, StorageAccess, AccountAccessListHeader.

Description

State Access events provide execution-level storage visibility: which accounts and storage slots the EVM touches during execution. This information is not available through standard JSON-RPC.

These events are blocked by default because:

  • They generate a high event volume (thousands of events per block)
  • They are intended for specialized consumers (analytics, indexers)

Check blocked_events in the Hello frame to confirm.

Event Types

AccountAccess

EVM access to account state.

Payload FieldTypeDescription
txn_indexnumber | nullTransaction index
addressstringAccount address
balancestringBalance (hex U256)
noncenumberAccount nonce
code_hashstringContract code hash

StorageAccess

Read or write to a storage slot.

Payload FieldTypeDescription
txn_indexnumber | nullTransaction index
account_indexnumberAccount index (reference)
keystringStorage slot key (bytes32)
valuestringStorage slot value (bytes32)

AccountAccessListHeader

Header for a batch of account accesses.

Payload FieldTypeDescription
txn_indexnumber | nullTransaction index
entry_countnumberNumber of AccountAccess entries following

Filtering

To track a specific account, use the advanced subscription:

{
  "subscribe": {
    "events": ["AccountAccess"],
    "filters": [{
      "event_name": "AccountAccess",
      "field_filters": [
        {"field": "address", "filter": {"values": ["0xTARGET_ADDRESS"]}}
      ]
    }]
  }
}

Note: the address filter in the AccountAccess context applies to the payload address field (not the TxnLog address field).

Usage Example

Monitor Account Accesses

ws.onmessage = (event) => {
  const msg = JSON.parse(event.data);
  if (msg.Events) {
    for (const e of msg.Events) {
      if (e.event_name === "AccountAccess") {
        console.log(`Account ${e.payload.address}: balance=${e.payload.balance}, nonce=${e.payload.nonce}`);
      }
      if (e.event_name === "StorageAccess") {
        console.log(`Storage [${e.payload.key}] = ${e.payload.value}`);
      }
    }
  }
};

Frequency

Very high, thousands of events per block. Use filters and fast processing, otherwise backpressure is inevitable.