# Proof server failing to generate proof correctly

**URL:** <https://forum.midnight.network/t/proof-server-failing-to-generate-proof-correctly/455>\
**Category:** Technical Questions\
**Tags:** compact\
**Created:** [October 1, 2025, 11:52am UTC](https://forum.midnight.network/t/proof-server-failing-to-generate-proof-correctly/455 "2025-10-01T11:52:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![codeBigInt](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@codeBigInt](https://forum.midnight.network/u/codeBigInt)\
**Post date:** [October 1, 2025, 11:52am UTC](https://forum.midnight.network/t/proof-server-failing-to-generate-proof-correctly/455/1 "2025-10-01T11:52:18Z")

</div>

I Keep getting this error for one of my circuits in my smart contract on the proof server, when it tries to generate proof for it

`2025-10-01T11:27:27.871146Z ERROR prove: midnight_transient_crypto::proofs::ir_vm: Public transcript input mismatch idx=13 expected=Some(1fc8d10090c4b6f7d25fc999af50b18c97a1a9dba63f7ad1a87708ef08a5bb2f) computed=Some(495a3d8aadc468b0b5f9ab32502383cd130113f4b842446dddb90d27de79ad33) memory=[-, -, -, 3b, 7efcd9aaa221d7b31d583aa841c9f794aabcb36aa3eb96735b7df6443669b4, 6a, 3d64fd4efc01116a087748a649fd0503a9a3ce866f0d06c653a3e5fc3c52b7, 3d64fd4efc01116a087748a649fd0503a9a3ce866f0d06c653a3e5fc3c52b7, -, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 01, -, 6ff6ede4aef8433c138c908e7f7d972b391ed01b956d7b925c2dd5beac6817,`

Within the circuit when i comment out this line, the proof server generates proof correctly

`sendAndManageChange(pool.principalCoinType, ownPublicKey(), disclosedPrincipalAmount);`

circuit sendAndManageChange(coinType: Bytes\<32\>, receiverAddress: ZswapCoinPublicKey, amountToSend: Uint\<32\>): {

```
/ Find the protocol balance to send token to the user from

```

const protocolBalanceToSendFrom = protocolTVL.lookup(coinType);

_// Send collateral back to the borrower_

const sendResult = send(protocolBalanceToSendFrom, left\<ZswapCoinPublicKey, ContractAddress\>(receiverAddress), amountToSend);

_//Update TVL_

if(sendResult.change.is\_some){

Here is what the circuit does

```
    protocolTVL.insertCoin(coinType, sendResult.change.value, right<ZswapCoinPublicKey, ContractAddress>(kernel.self())); }else{ protocolTVL.remove(coinType); } }

```

---

<div class="post-metadata">

**Author:** ![emnul](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.midnight.network/emnul/32/81_2.png) [@emnul](https://forum.midnight.network/u/emnul)\
**Post date:** [October 10, 2025, 6:13pm UTC](https://forum.midnight.network/t/proof-server-failing-to-generate-proof-correctly/455/3 "2025-10-10T18:13:58Z")

</div>

> [@codeBigInt](#):
>
> 1fc8d10090c4b6f7d25fc999af50b18c97a1a9dba63f7ad1a87708ef08a5bb2f

Could you provide a minimal reproducible example or link to the code repository?
