Midnight Local Undeployed rejects Map key updates; use insert-only pattern
A developer debugging Midnight Network's Local Undeployed environment traced repeated RpcError 1010 and WASM panic failures to a single root cause: updating an existing Compact Map key instead of inserting a new one. On the Undeployed chain, ledger writes are server-append operations, meaning overwriting an existing key triggers a transaction merge path that causes runtime crashes. The fix requires treating the public ledger as an append-only journal and reconstructing any derived values, such as token balances, off-chain for display purposes. Additionally, private witness values only become public ledger state through an explicit disclose() call, and hashing a witness to check access does not constitute valid access control. The findings were verified against a live local stack running Compact 0.23 and Midnight Node 0.22.5.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in