#2689·node

GetAccount intermittently returns "data corrupted ... root not found" for the testnet faucet

Author: haileymarshallCreated Sep 24, 2026Updated Sep 24, 2026

Packages versions

Public testnet node (v0.16), 17 September 2026. Client: miden-client 0.16.1 CLI.

Bug description

I was building on the v0.16 testnet and consuming a faucet note with miden client consume-notes. It failed once with an internal error from the node:

|-> RPC error
|-> grpc request failed for get_account: Miden node returned an internal error;
    this is likely a node-side issue
`-> code: 'Internal error', message: "data corrupted: failed to reconstruct vault for
    account 0x18101fa522c174b165efd4f70a0385 at block 228306: root not found"

0x18101fa522c174b165efd4f70a0385 is the public testnet faucet. The same command worked when I retried about four minutes later, at a later block, so the data wasn't actually corrupted.

Reading next, the message comes from fetch_public_account_details in crates/store/src/state/view/account/mod.rs. The header for the block is read from the database first, then the vault is fetched from the account state forest, and any error there is mapped to DatabaseError::DataCorrupted. "root not found" is WitnessError::RootNotFound, returned by get_vault_details when get_tree_id has no tree for that lineage at the requested block. That happens when the requested version is older than anything left in the lineage's history and the lineage has a newer version. So the database had the account at 228306 but the forest no longer did. The faucet is updated almost every block, so it runs through its per-lineage history (HISTORICAL_BLOCK_RETENTION versions) faster than most accounts.

I couldn't reproduce it on demand, so I don't know which path leaves the two out of step. It could be a request against a pinned snapshot while the forest has already truncated, or something else. Either way, a forest miss is reported to the client as corruption, which is alarming and doesn't suggest retrying.

One option would be to treat RootNotFound the way a key-cache miss is already treated just below (Ok(None)), so the vault is rebuilt from the database, which has the data for that block. If you know why the forest was behind here and would rather fix that directly, I'm happy to look into it instead.

How can this be reproduced?

Not reliably. It happened once against the public testnet while consuming a note from the faucet above. The block number is in the message in case it helps to check the node logs around 228306.

Relevant log output

bash
data corrupted: failed to reconstruct vault for account 0x18101fa522c174b165efd4f70a0385 at block 228306: root not found