{
  "id": 1572472,
  "title": "Don't update Compact maps on Midnight Undeployed",
  "url": "https://urgent.news/2026/08/17/dont-update-compact-maps-on-midnight-undeployed",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-17T21:58:51.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/socialprescribing/dont-update-compact-maps-on-midnight-undeployed-35dl"
  },
  "original_language": "en",
  "account": "A wallet developer discovered an issue when updating an existing key in a Compact map on Midnight USDC. The error occurred on the Midnight USDC Undeployed network, specifically when using the test environment \"Midnight Local Undeployed\". The root cause was attempting to insert a value into an already existing key, which led to a panic. The developer learned that inserting a new key or disclosing a value is the proper method to make changes to the public ledger, never updating an existing key. When updating a map key, the safest approach is to insert a new key with the new value or disclose the value if it needs to be made public. The developer also noted that the public ledger should be treated as an append-only journal, and any off-chain UI numbers should be reconstructed from the ledger data.",
  "summary": "I spent an afternoon chasing SubmissionError / FiberFailure wrapping: RpcError 1010: Invalid Transaction: Custom error: 117 and a WASM panic that looks like feesWithMargin / transaction_merge Unreachable . The circuit compiled. The proof server was up. The genesis wallet had tDUST. The bug was in how I used Compact Map . This post is the lesson: on Midnight Local Undeployed, do not update an…",
  "key_points": [
    "Wallet developer found issue updating key in Compact map on Midnight USDC Undeployed.",
    "Attempting to insert value into existing key caused panic, leading to improper update method.",
    "Safest approach is to insert new key with new value or disclose value publicly."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}