[Historical testnet] P2P redesign for the v2.0.0 public testnet #6
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
pool
post-quantum
question
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ignotusnemo/parano1d!6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR replaces the previous P2P synchronization architecture and prepares Parano1d v2.0.0 for a new public testnet.
The first public launch exposed networking and synchronization failures that were not reproduced under controlled testing. The incident evidence pointed to the P2P orchestration layer rather than consensus, state-transition verification or recursive proof verification.
The previous design treated large block bodies, recursive terminals, snapshot metadata and live tip propagation as parts of the same synchronization flow. Under load, slow proof and State transfers could delay headers, bind progress to one peer and repeatedly restart synchronization when that peer disconnected or the selected tip moved.
What changed
Header-first propagation
Headers and tip announcements now use a separate control path.
Headers are validated for parent linkage, proof of work, ASERT, timestamps and cumulative work before entering a bounded HeaderDAG. Block bodies, recursive terminals and State data are then requested as exact content-addressed objects.
Large transfers cannot block header propagation or the main P2P reactor.
Immutable multi-source synchronization
Synchronization plans are now bound to an exact validated branch, not to one peer.
Different peers may provide different bodies, terminal proofs, manifest pages or State segments for the same plan. Disconnects, timeouts and local queue pressure no longer discard already verified progress.
Transport failures rotate the source for the affected object. Invalid content removes the responsible provider without blaming unrelated peers. If every source for a plan genuinely disappears, only the transport plan is retired; the validated HeaderDAG and committed chain remain intact.
Atomic branch replacement with one recursive terminal
A competing branch is selected from validated headers by cumulative work.
The node downloads its exact bodies and one recursive HistoryStep terminal at the selected tip. Bodies still pass native header, transaction and State-transition checks. The replacement is applied in memory and committed through one atomic MDBX transaction after finality and fork-choice conditions are rechecked.
An invalid or interrupted replacement leaves the existing chain unchanged.
Snapshot redesign
Snapshot synchronization retains its two-proof security boundary:
Snapshot manifests are now split into small authenticated pages instead of moving one potentially multi-megabyte descriptor list through the control plane.
Manifest pages and State segments have bounded queues, byte budgets and dedicated scheduling capacity. Verified pages and segments survive source changes and reconnects.
Network topology and resource control
All ordinary GUI and daemon nodes participate in the same network without introducing user-facing node roles.
The network now includes:
Mining now requires one compatible peer rather than two exact-tip confirmations. Proof construction is cancelled when a genuinely newer parent is accepted, so slower machines do not continue proving obsolete work.
Clean v2 testnet boundary
v2.0.0 uses a new network magic, libp2p namespace, network profile, storage epoch and default ports:
95009501The network profile includes the authenticated embedded HistoryStep proof-bank identity, but it is not tied to a Git commit or build machine. Independent builds remain compatible when they use the same protocol and verified proof pack.
Older clients cannot join this testnet.
On first start, v2.0.0 automatically removes old chain data, peer state, caches and GUI network settings while preserving only
wallet.key. No manual data-directory cleanup is required.