Skip to content

fix: replace placeholder genesis addresses with real wallet addresses#4

Merged
satyakwok merged 1 commit intomainfrom
fix/genesis-addresses
Apr 9, 2026
Merged

fix: replace placeholder genesis addresses with real wallet addresses#4
satyakwok merged 1 commit intomainfrom
fix/genesis-addresses

Conversation

@satyakwok
Copy link
Copy Markdown
Member

Summary

  • Replace 4 hardcoded placeholder genesis addresses in blockchain.rs with real addresses from genesis_wallets.json
  • Old addresses had no matching private keys — SRX was locked and inaccessible
  • Update test sample address in explorer.rs for consistency

Addresses updated

Role Old New
Founder 0x8963...08b79 0x4f33...142be
Ecosystem 0x840a...56287 0xeb70...9f14
Early Validator 0xc556...a05e 0xa7fc...f112
Reserve 0x5d12...ba40 0x2578...ba97

Test plan

  • cargo build --release — clean
  • cargo test — 86/86 passed
  • After merge: reset chain data on VPS, verify genesis allocations go to correct addresses

@satyakwok satyakwok merged commit 28c5b3e into main Apr 9, 2026
3 checks passed
@satyakwok satyakwok deleted the fix/genesis-addresses branch April 15, 2026 20:04
satyakwok added a commit that referenced this pull request Apr 16, 2026
fix: replace placeholder genesis addresses with real wallet addresses
satyakwok added a commit that referenced this pull request Apr 20, 2026
Today the NodeEvent::SyncNeeded handler only logged — it didn't
actually do anything. BFT RoundStatus gossip tells us a peer is at
a higher height, but we'd wait up to 30s for the periodic sync_interval
tick before actually asking for blocks. That's exactly the gap we hit
on testnet all day today when a validator fell behind post-restart —
the others kept BFT-stalling at the lagged peer's height while sync
trickled in too slowly.

Changes:
- `SwarmCommand::TriggerSync` — new command, fires an immediate
  `GetBlocks { from_height: our_height + 1 }` to the first verified
  peer. Same payload as the 30s periodic tick, just on demand.
- `LibP2pNode::trigger_sync()` — public handle exposing the command.
- main.rs `NodeEvent::SyncNeeded` handler — calls it. Took an extra
  `lp2p.clone()` so the handle survives into the tokio::spawn closure.

Doesn't fix the deeper state-divergence case (rogue blocks, trie
mismatches) — that still needs the rsync workaround documented in
the session handoff. But for the common 'a peer restarted and is a
few blocks behind' case, closing the 30s-to-notice window keeps the
chain advancing instead of nil-skipping for half a minute.

Next follow-up: if trigger_sync fires and the peer responds with
blocks that fail add_block_from_peer validation (rogue chain), log
CRITICAL and fall back to a backoff-reconnect path. That's the true
auto-resync; this PR is the first step.

Co-authored-by: satyakwok <satyakwok@users.noreply.github.com>
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