Skip to content

Conversation

@arepala-uml
Copy link
Contributor

  1. Added dev mode support via command line flags (--dev-mode), YAML config files (devMode: true) with proper precedence handling.
  2. Modified peer governor to skip outbound connections when dev mode is enabled.
  3. Updated test files to handle new dev mode parameter, added comprehensive test coverage, and updated dingo.yaml.example configuration files with proper documentation.

Closes #808

Signed-off-by: Akhil Repala <arepala@blinklabs.io>
…d line as well as from cofnig file

Signed-off-by: Akhil Repala <arepala@blinklabs.io>
@arepala-uml
Copy link
Contributor Author

Tested all the cases like

  1. Checked running dingo with dev-mode as True from command line and we can see the skipping of outbound
akhil-mac@Akhils-MacBook-Air dingo % go run ./cmd/dingo/ --dev-mode=true
{"time":"2025-07-27T20:51:39.302991-05:00","level":"INFO","msg":"maxprocs: Leaving GOMAXPROCS=8: CPU quota undefined","component":"dingo"}
{"time":"2025-07-27T20:51:39.303101-05:00","level":"INFO","msg":"version: devel (commit )","component":"dingo"}
{"time":"2025-07-27T20:51:39.305366-05:00","level":"INFO","msg":"serving prometheus metrics on 0.0.0.0:12798","component":"node"}
{"time":"2025-07-27T20:51:39.660035-05:00","level":"INFO","msg":"listening for ouroboros node-to-node connections on 0.0.0.0:3001","component":"connmanager"}
{"time":"2025-07-27T20:51:39.660066-05:00","level":"INFO","msg":"listening for ouroboros node-to-client connections on 127.0.0.1:3002","component":"connmanager"}
{"time":"2025-07-27T20:51:39.660152-05:00","level":"INFO","msg":"listening for ouroboros node-to-client connections on dingo.socket","component":"connmanager"}
{"time":"2025-07-27T20:51:39.660174-05:00","level":"INFO","msg":"dev mode enabled, skipping outbound connections","component":"peergov","role":"client"}
{"time":"2025-07-27T20:51:39.660614-05:00","level":"INFO","msg":"starting gRPC listener on 0.0.0.0:9090","component":"utxorpc"}
  1. Passed devMode value through a config file like devMode as true then it skips the outbound connections
akhil-mac@Akhils-MacBook-Air dingo % go run ./cmd/dingo/ --config test-dingo.yaml
{"time":"2025-07-27T20:52:09.976368-05:00","level":"INFO","msg":"maxprocs: Leaving GOMAXPROCS=8: CPU quota undefined","component":"dingo"}
{"time":"2025-07-27T20:52:09.976431-05:00","level":"INFO","msg":"version: devel (commit )","component":"dingo"}
{"time":"2025-07-27T20:52:09.982251-05:00","level":"INFO","msg":"serving prometheus metrics on 0.0.0.0:12798","component":"node"}
{"time":"2025-07-27T20:52:10.419287-05:00","level":"INFO","msg":"listening for ouroboros node-to-node connections on 0.0.0.0:3001","component":"connmanager"}
{"time":"2025-07-27T20:52:10.419318-05:00","level":"INFO","msg":"listening for ouroboros node-to-client connections on 127.0.0.1:3002","component":"connmanager"}
{"time":"2025-07-27T20:52:10.419526-05:00","level":"INFO","msg":"listening for ouroboros node-to-client connections on dingo.socket","component":"connmanager"}
{"time":"2025-07-27T20:52:10.419675-05:00","level":"INFO","msg":"dev mode enabled, skipping outbound connections","component":"peergov","role":"client"}
{"time":"2025-07-27T20:52:10.423003-05:00","level":"INFO","msg":"starting gRPC listener on 0.0.0.0:9091","component":"utxorpc"}

@arepala-uml arepala-uml marked this pull request as ready for review July 28, 2025 02:04
@arepala-uml arepala-uml requested a review from a team as a code owner July 28, 2025 02:04
@arepala-uml arepala-uml requested review from agaffney and wolf31o2 July 28, 2025 02:04
…sableOutbound.

Signed-off-by: Akhil Repala <arepala@blinklabs.io>
@arepala-uml arepala-uml requested a review from agaffney July 28, 2025 06:24
network: "preview"
`
tmpFile := "test-dev-mode.yaml"
err := os.WriteFile(tmpFile, []byte(yamlContent), 0644)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use a temp directory for this test file. This avoids the possibility of accidentally overwriting/removing a file that already exists.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the changes and please review it.

… t.TempDir

Signed-off-by: Akhil Repala <arepala@blinklabs.io>
@arepala-uml arepala-uml requested a review from agaffney July 28, 2025 15:12
@agaffney agaffney merged commit 3d30e2f into main Jul 28, 2025
11 checks passed
@agaffney agaffney deleted the dingo_dev branch July 28, 2025 18:11
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.

Add "dev mode"

3 participants