Skip to content

feat(p2p-03): add p2p config surface (#671) - #17

Open
jlon wants to merge 1 commit into
p2p-02-master-policy-protocolfrom
p2p-03-p2p-config-surface
Open

feat(p2p-03): add p2p config surface (#671)#17
jlon wants to merge 1 commit into
p2p-02-master-policy-protocolfrom
p2p-03-p2p-config-surface

Conversation

@jlon

@jlon jlon commented Mar 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add client and master config schema for P2P settings and runtime policy inputs.
  • Keep P2P disabled by default so this PR does not change runtime behavior.

Design

  • Group client knobs under client.p2p and keep master policy state in config, not code paths.
  • Parse byte and duration strings during init and reject invalid combinations early.

Implementation

  • Add ClientP2pConf, default cache-dir resolution, validation, and client init wiring.
  • Add master-side policy version, signing key, and whitelist fields with defaults.

Verification

  • cargo test -p curvine-common p2p_default_cache_dir_prefers_xdg_cache_home
  • cargo test -p curvine-common p2p_init_rewrites_legacy_testing_cache_dir
  • cargo test -p curvine-common cluster_conf_allows_minimal_p2p_block

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@jlon
jlon force-pushed the p2p-02-master-policy-protocol branch from f8eb686 to 519b1ca Compare March 26, 2026 10:24
@jlon
jlon force-pushed the p2p-03-p2p-config-surface branch from b493d15 to ab77386 Compare March 26, 2026 10:25
@jlon
jlon force-pushed the p2p-02-master-policy-protocol branch from 519b1ca to 5cff052 Compare March 27, 2026 09:32
@jlon
jlon force-pushed the p2p-03-p2p-config-surface branch from ab77386 to 9e4f0ba Compare March 27, 2026 09:32
@jlon
jlon force-pushed the p2p-02-master-policy-protocol branch from 5cff052 to 10fe96e Compare March 30, 2026 00:54
@jlon
jlon force-pushed the p2p-03-p2p-config-surface branch from 9e4f0ba to 8fa482c Compare March 30, 2026 00:54
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.

1 participant