# Error in response: Proving(public parameters for k=16 not found in cache)

**URL:** <https://forum.midnight.network/t/error-in-response-proving-public-parameters-for-k-16-not-found-in-cache/53>\
**Category:** Technical Questions\
**Tags:** compact, learning, best-practices, ecosytem\
**Created:** [July 22, 2025, 11:00am UTC](https://forum.midnight.network/t/error-in-response-proving-public-parameters-for-k-16-not-found-in-cache/53 "2025-07-22T11:00:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislucena](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.midnight.network/luislucena/32/20_2.png) [@luislucena](https://forum.midnight.network/u/luislucena)\
**Post date:** [July 22, 2025, 11:00am UTC](https://forum.midnight.network/t/error-in-response-proving-public-parameters-for-k-16-not-found-in-cache/53/1 "2025-07-22T11:00:03Z")

</div>

This is a common error I have faced and the current way to solve it was through this:

#### Download the fetch-zk-params.sh script

```shell
curl -O https://raw.githubusercontent.com/bricktowers/midnight-proof-server/main/fetch-zk-params.sh

```

_ **or** _

```shell
wget https://raw.githubusercontent.com/bricktowers/midnight-proof-server/main/fetch-zk-params.sh

```

#### Give execution permissions

```shell
chmod +x fetch-zk-params.sh

```

#### Run the script to download ZK parameters

```shell
./fetch-zk-params.sh

```

- This script will generate a folder at `/.cache/midnight/zk-params` with all the required parameters for zero-knowledge proofs.

PS: It’s something the community did as a workaround. Is the Midnight team following up on this?

---

<div class="post-metadata">

**Author:** ![sergeykisel](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@sergeykisel](https://forum.midnight.network/u/sergeykisel)\
**Post date:** [July 22, 2025, 11:23am UTC](https://forum.midnight.network/t/error-in-response-proving-public-parameters-for-k-16-not-found-in-cache/53/2 "2025-07-22T11:23:24Z")

</div>

Hi @luislucena,  
Thanks for sharing!

Just to add some context—as I’ve also run into this issue and am curious whether the Midnight team plans a more integrated solution.

Starting with version **4.0.0** of the `proof-server`, ZK parameters are fetched on-demand when proving circuits. Unfortunately, this mechanism fails in Docker environments.

The script you linked is actually part of the workaround we at Brick Towers published earlier, bundled with a custom Docker image that includes pre-baked ZK parameters. The script can also be used standalone to prefetch parameters locally. You can find the full setup here:  
👉 [GitHub - bricktowers/midnight-proof-server: Midnight Proof Server for Zero-Knowledge Proofs](https://github.com/bricktowers/midnight-proof-server)

This has helped us avoid runtime failures in containerized setups. Definitely interested to hear if an official fix or alternative is being considered.

---

<div class="post-metadata">

**Author:** ![luislucena](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.midnight.network/luislucena/32/20_2.png) [@luislucena](https://forum.midnight.network/u/luislucena)\
**Post date:** [July 22, 2025, 1:22pm UTC](https://forum.midnight.network/t/error-in-response-proving-public-parameters-for-k-16-not-found-in-cache/53/3 "2025-07-22T13:22:12Z")

</div>

Hey @sergeykisel,

Thanks for adding more context and digging deeper!

Yes, I’ve seen the Brick Towers repository, and that’s where I got the script. But since they have it for building the local image, in my case I preferred to work with the Midnight official image.

Recapitulating what’s currently possible:

- i) Build your own image with the parameters
- ii) Download the parameters manually and continue using the official Midnight image

A solution that might work with the script in the Midnight image would be:

- i) Create a temporary container from the official Midnight image
- ii) Copy the script from the container to your current folder (project)
- iii) Delete the temporary container

With that:

- The script lives inside the image.
- You can easily extract it to your project.
- You don’t need to rebuild the image.
- It’s reproducible and automatable.

It’s an alternative; perhaps there are others, but this one occurs to me! I’d love to hear what you think!

---

<div class="post-metadata">

**Author:** ![sergeykisel](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@sergeykisel](https://forum.midnight.network/u/sergeykisel)\
**Post date:** [July 22, 2025, 1:28pm UTC](https://forum.midnight.network/t/error-in-response-proving-public-parameters-for-k-16-not-found-in-cache/53/4 "2025-07-22T13:28:11Z")

</div>

> [@luislucena](#):
>
> I’d love to hear what you think!

These are all just workarounds for a bug in `midnight/proof-server` 4.0.0. It might have been fixed already, but hard to tell since the repo isn’t open source yet. Probably best to report or track it via GitHub issues once it’s public.

---

<div class="post-metadata">

**Author:** ![luislucena](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.midnight.network/luislucena/32/20_2.png) [@luislucena](https://forum.midnight.network/u/luislucena)\
**Post date:** [July 22, 2025, 1:38pm UTC](https://forum.midnight.network/t/error-in-response-proving-public-parameters-for-k-16-not-found-in-cache/53/5 "2025-07-22T13:38:30Z")

</div>

> [@sergeykisel](#):
>
> These are all just workarounds for a bug in `midnight/proof-server` 4.0.0. It might have been fixed already, but hard to tell since the repo isn’t open source yet. Probably best to report or track it via GitHub issues once it’s public.

Yes, I hope someone from the Midnight team arrives! I’m interested in knowing how and in which version they fixed it! Thanks for the hands up!

---

<div class="post-metadata">

**Author:** ![lolocoding](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.midnight.network/lolocoding/32/505_2.png) [@lolocoding](https://forum.midnight.network/u/lolocoding)\
**Post date:** [July 22, 2025, 4:36pm UTC](https://forum.midnight.network/t/error-in-response-proving-public-parameters-for-k-16-not-found-in-cache/53/6 "2025-07-22T16:36:40Z")

</div>

@sergeykisel !! Thank you for being the FIRST community dev to respond to a question in the forum! You are an absolute LEGEND!!

And thank you, @luislucena, for being the first to post a technical question!! (DMing you both to send some swag 👀)
