cardano-foundation / cardano-foundation/cardano-rosetta-java
Dynamic peers not available until ~1 hour after startup
- Dominant language
- Java
- Stars
- 26
- Forks
- 15
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
### Context & versions
- **Network**: preprod
- **Config**: `PEER_DISCOVERY=true` enabled
### Steps to reproduce
1. Start docker-compose with `PEER_DISCOVERY=true`
2. Call `/network/status` endpoint immediately after startup
3. Wait 1 minute (initial PeerDiscoveryJob delay)
4. Call `/network/status` again
5. Observe peers response over time
### Actual behavior
- Initially (first hour): only bootstrap peer returned (`preprod-node.play.dev.cardano.org:3001`)
- yaci-indexer endpoint `/api/v1/rosetta/peers` returns empty array `[]`
- After extended wait (~1 hour): dynamic peers eventually populate
- Test `test_peer_list_contains_dynamic_entries` currently fails in CI due to excessive wait time
### Expected behavior
- Dynamic peers should populate within reasonable time (1-2 minutes) after initial delay
- Test should pass without requiring multi-hour wait
- `/network/status` should return discovered peers shortly after peer discovery job runs
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with test_peer_list_contains_dynamic_entries and reproduce the startup sequence using docker-compose with PEER_DISCOVERY=true. Inspect the PeerDiscoveryJob timing and the /network/status and /api/v1/rosetta/peers responses. Done means dynamic peers populate within about 1–2 minutes after the initial delay and the test passes without an extended wait.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, java
- Domain
- api, backend, blockchain, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100