Skip to content

Update grpcio and make gRPC generation portable - #2509

Open
caydyan wants to merge 1 commit into
RoboSats:mainfrom
caydyan:fix-grpcio-latest
Open

Update grpcio and make gRPC generation portable#2509
caydyan wants to merge 1 commit into
RoboSats:mainfrom
caydyan:fix-grpcio-latest

Conversation

@caydyan

@caydyan caydyan commented Jun 9, 2026

Copy link
Copy Markdown

What does this PR do?

Fixes #2171.

This updates the Python gRPC runtime/tooling to the current PyPI release and makes the generated-code import patching deterministic across environments.

Changes:

  • update grpcio and grpcio-tools from 1.67.0 to 1.81.0
  • make scripts/generate_grpc.sh fail fast with set -eu
  • replace platform-specific sed -i import rewriting with a small Python rewrite step, so the generated *_pb2*.py files get package-relative imports consistently on Linux and BSD/macOS sed
  • use printf for portable progress output

This is intentionally narrower than #2378: it only touches the dependency upgrade and gRPC generation path, without the unrelated API/lockfile changes that now conflict with main.

Verification

Passed locally:

  • python3.12 -m venv .venv-grpc312
  • .venv-grpc312/bin/python -m pip install grpcio==1.81.0 grpcio-tools==1.81.0 googleapis-common-protos==1.70.0
  • PATH="$PWD/.venv-grpc312/bin:$PATH" sh scripts/generate_grpc.sh
  • imported generated LND/CLN modules: hold_pb2, hold_pb2_grpc, lightning_pb2_grpc, node_pb2, node_pb2_grpc
  • sh -n scripts/generate_grpc.sh
  • .venv-grpc312/bin/python -m pip check
  • git diff --check

I also attempted the full CLN docker-compose test with DOCKER_DEFAULT_PLATFORM=linux/amd64, but the local run could not complete because Docker Hub image pulls repeatedly failed with TLS handshake timeouts.

Bounty

This targets the ⚡Eligible for Sats ⚡ issue #2171. If this qualifies for the reward, payout address: bc1qev5ant33v5y89qqjvcf4mh9hlax5svqf5xd7gc.

@caydyan caydyan mentioned this pull request Jun 9, 2026
@caydyan

caydyan commented Jun 13, 2026

Copy link
Copy Markdown
Author

Quick review/routing check for this Eligible for Sats grpcio update.

Current contributor-side state:

  • PR is open and non-draft.
  • GitHub reports it as mergeable; REST reports mergeable_state=blocked, but I do not see any visible check-runs or status contexts on the head commit.
  • The PR body includes the local verification that passed: fresh Python 3.12 venv, grpcio==1.81.0, grpcio-tools==1.81.0, portable scripts/generate_grpc.sh, generated LND/CLN imports, sh -n, pip check, and git diff --check.

The only validation I could not complete locally was the full CLN docker-compose run because Docker Hub pulls were failing with TLS handshake timeouts. If you need a specific CLN/LND reproduction command or a different proof before review, point me at the expected path and I can run it.

BTC payout address if this is accepted for the sats reward: bc1qev5ant33v5y89qqjvcf4mh9hlax5svqf5xd7gc

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.

Update and fix grpcio

1 participant