Re-add ASmap support (followup to #146 / #217)

Đang mở
#807 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
28/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
docker
Lĩnh vực
devops, infrastructure

Hướng nghiên cứu

Bắt đầu với resources/images/bitcoin/addrman.patch và hai Dockerfiles để hiểu patch vô điều kiện, sau đó kiểm tra bitcoincore chart để tìm phần plumbing và các mount còn thiếu cho -asmap. So sánh cách tiếp cận plugin được đề xuất với pattern loadSnapshot.enabled trong pod.yaml và các annotation trong network.yaml. Hoàn thành nghĩa là đã thống nhất về kiến trúc và xác định liệu patch có điều kiện có nên được tách riêng trước khi triển khai hay không.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Quick motivation: I'd like to experiment a bit with -asmap effectiveness and netgroup-bucketing on a realistic topology and warnet seems like the natural substrate, but -asmap= isn't currently reachable through the chart.

Picking back up the ASmap question that willcl-ark parked in #217 with "we can revisit if needed." With ASmap now embedded in Bitcoin Core v31.0 it's worth another look at warnet, and I'd appreciate input on the right architectural shape before any PR.

What's actually disabled today

resources/images/bitcoin/addrman.patch is applied unconditionally in both Dockerfiles. It extends the netgroup vector with the lower two IPv4 bytes, turning bucketing from /16 into /32. Because both the default /16 path and any ASmap path share GetGroup(), the patch silently disables both. So even leaving ASmap aside, scenarios that reason about peer diversity at the netgroup level aren't exercising the production codepath.

On top of that, the bitcoincore chart has no -asmap= plumbing and no mount slot for an asmap file.

Two plausible shapes

I'd rather decide direction before writing code:

A) postNetwork plugin that reads per-tank ASN annotations from network.yaml, builds a synthetic asmap from scheduled pod IPs, and exposes it as a ConfigMap. Tanks gate on it via an init-container. The same pattern already used for loadSnapshot.enabled in pod.yaml. Closest to m3dwards' #217 sketch, adapted to the current architecture.

B) Minimal -asmap= plumbing only in the chart, with users supplying their own asmap. Pod IPs stay unmapped (fall back to /16 bucketing for them), but it's a small, single-PR change that covers use cases where pod-IP-to-ASN mapping isn't the point.

Both share a prerequisite: making addrman.patch conditional via build-arg, since nothing downstream of GetGroup() matters until that's lifted.

What I'm asking

  1. Does A or B (or some other shape) match how warnet should evolve?
  2. Is the conditional addrman.patch worth a separate small PR first? It independently unblocks any netgroup-aware testing, ASmap or not.

Happy to drop this if there's no appetite right now. Wanted to surface the design question before investing implementation time.

Ngôn ngữ chính
Python
Star
153
Fork
87
Merge trung bình
5 ngày 7 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bitcoin-dev-project/warnet

Tất cả issue của bitcoin-dev-project/warnet

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.