feat(network): add Zakura P2P stack with legacy gossip adapter#106
Conversation
Introduce the Zakura native P2P stack (iroh-based transport) with a dual-stack legacy gossip adapter and native bootstrap, plus the foundations it builds on: the JSONL tracing crate, local testnet genesis generation, an Ubuntu package command, and a 1000-block reorg window.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
| @@ -29,40 +29,40 @@ url = "https://raw.githubusercontent.com/zcash/rust-ecosystem/main/supply-chain/ | |||
| url = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" | |||
There was a problem hiding this comment.
I am not really looking at this file rn, I assume it comes from us being a fork
| assert!(enabled_peer_seen_by_disabled | ||
| .remote | ||
| .services | ||
| .contains(PeerServices::NODE_P2P_V2)); |
There was a problem hiding this comment.
Its annoying how the zebra rust formatter makes everything take so many LOC lol
|
AI finding #1:
|
ValarDragon
left a comment
There was a problem hiding this comment.
We went through a bunch of review on Slack. Obviously didn't read all of this without a million comments. We did discuss the AI-found concerns, and the concerning ones are solved on a subsequent PR stacked on top
Motivation
First in a stack of 3 PRs that land the Zakura native P2P networking layer into Ironwood. This PR introduces the foundational Zakura iroh-based P2P stack and a dual-stack legacy gossip adapter, so a node speaks both the new Zakura transport and the existing Zcash gossip protocol during the transition.
Stacked PRs (merge in order): 1) P2P stack + legacy adapter (this) → 2) discovery + header sync + block sync (#111) → 3) block-sync hardening/refactor/stabilization (#112).
Solution
zebra-network/src/zakura/module: iroh transport, handshake/upgrade prelude, control-handshake wire types, and the legacy gossip adapter + native bootstrap.v2_p2p(Zakura endpoint) andlegacy_p2p(legacy Zcash networking), plus a reserved persistent iroh node secret-key surface.zebra-jsonl-tracecrate (non-blocking JSONL tracing), local testnet genesis generation, an Ubuntu package command, and a 1000-block reorg window.Tests
cargo clippy --workspace --all-targetsandcargo fmt --all -- --checkclean locally (with thedefault-release-binaries proptest-impl lightwalletd-grpc-tests zebra-checkpointsfeature set).ironwood-mainbase: threading the upstreamadvertised_servicesargument throughpeer_set::inittest call sites, and afield_reassign_with_defaultcleanup in an acceptance test.AI Disclosure
ironwood-main, resolving merge conflicts, organizing commits, and drafting this description. The contributor is the responsible author.PR Checklist