Skip to content

feat: fetch prebuilt zerokit rln, fall back to source build#3915

Merged
darshankabariya merged 4 commits into
masterfrom
chore/cachix-nix-cache
May 29, 2026
Merged

feat: fetch prebuilt zerokit rln, fall back to source build#3915
darshankabariya merged 4 commits into
masterfrom
chore/cachix-nix-cache

Conversation

@darshankabariya

@darshankabariya darshankabariya commented May 28, 2026

Copy link
Copy Markdown
Contributor

What

The nix build now downloads the prebuilt librln from the zerokit v2.0.2 release instead of compiling zerokit from source.

Why

Building zerokit from source made nix fetch ~100 Rust crates from crates.io at once. crates.io rate-limits that and returns 403, so the liblogosdelivery nix jobs failed randomly on both Linux and macOS.

Using the prebuilt binary means nix never touches crates.io, so the flake build is reliable (and faster).

@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:3915

Built from bb23ee6

@darshankabariya darshankabariya force-pushed the chore/cachix-nix-cache branch from 6f33eb1 to 943877c Compare May 29, 2026 12:29
@darshankabariya darshankabariya marked this pull request as draft May 29, 2026 12:31
@darshankabariya darshankabariya force-pushed the chore/cachix-nix-cache branch from 943877c to 5bae14c Compare May 29, 2026 13:09
@darshankabariya darshankabariya changed the title ci: add Cachix binary cache to nix workflow feat(nix): build librln from prebuilt zerokit release assets May 29, 2026
@darshankabariya darshankabariya changed the title feat(nix): build librln from prebuilt zerokit release assets feat: build librln from prebuilt zerokit release assets May 29, 2026
@darshankabariya darshankabariya marked this pull request as ready for review May 29, 2026 13:18
@darshankabariya darshankabariya requested review from NagyZoltanPeter, fcecin and stubbsta and removed request for Ivansete-status May 29, 2026 13:18
@darshankabariya darshankabariya changed the title feat: build librln from prebuilt zerokit release assets feat: fetch prebuilt zerokit rln, fall back to source build May 29, 2026

@fcecin fcecin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Ivansete-status Ivansete-status left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
LGTM but I'd like to get feedback from @jakubgs re the nix changes.
Cheers

Comment thread scripts/build_rln.sh Outdated
Comment thread scripts/build_rln.sh Outdated
@darshankabariya darshankabariya merged commit bb23ee6 into master May 29, 2026
1 check passed
@darshankabariya darshankabariya deleted the chore/cachix-nix-cache branch May 29, 2026 18:23
@igor-sirotin

Copy link
Copy Markdown
Contributor

Comment thread flake.nix
Comment on lines +65 to +66
# its many crate dependencies from crates.io in one parallel burst, which
# crates.io intermittently rejects with HTTP 403 (rate limiting from the

@jakubgs jakubgs Jun 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you adding 70 lines to flake.nix to simply do what an override of nixpkgs could have done?

Are you not aware this has been already fixed in upstream nixpkgs?

Also, even if this fix was the correct one WHY would you pollute flake.nix with this garbage instead of putting the derivation in a separate file? Or fixing it in a branch in sourc repo and updating input to use a fixed branch?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This honestly looks like LLM slop.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware of the upstream fix. I thought it was issue in crates.io's side, which is why I had the idea to use the prebuilt asset from zerokit. thinking was that it saves time by downloading instead of building locally and CI . Yes, I used Claude to implement it, but the idea was my own.

Thanks for pointing out the nixpkgs fix, I've switched to that in the follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants