Skip to content

feat: testnet w/ cardano-node 10.4.1 and dingo 0.12.0 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wolf31o2
Copy link
Contributor

@wolf31o2 wolf31o2 commented Jul 2, 2025

This introduces a dingo Go Cardano node to the network. It may exhibit interesting bugs and different behavior from a Haskell cardano-node, introducing a bit of chaos into the mix.

cgianelloni@devastator:~/Repos/blink/cf-antithesis/compose$ make up testnet=cardano_node_10.4.1_dingo_0.12.0
[+] Building 0.0s (0/0)
[+] Running 17/17
 ✔ Network cardano_node_1041_dingo_0120_default  Created                                                                                                                                                                            0.1s
 ✔ Volume "cardano_node_1041_dingo_0120_d1"      Created                                                                                                                                                                            0.0s
 ✔ Volume "cardano_node_1041_dingo_0120_p4"      Created                                                                                                                                                                            0.0s
 ✔ Volume "cardano_node_1041_dingo_0120_tracer"  Created                                                                                                                                                                            0.0s
 ✔ Volume "cardano_node_1041_dingo_0120_p1"      Created                                                                                                                                                                            0.0s
 ✔ Volume "cardano_node_1041_dingo_0120_p3"      Created                                                                                                                                                                            0.0s
 ✔ Volume "cardano_node_1041_dingo_0120_p2"      Created                                                                                                                                                                            0.0s
 ✔ Volume "cardano_node_1041_dingo_0120_p5"      Created                                                                                                                                                                            0.0s
 ✔ Container s1                                  Started                                                                                                                                                                            1.3s
 ✔ Container tracer                              Started                                                                                                                                                                            1.3s
 ✔ Container p3                                  Started                                                                                                                                                                            1.7s
 ✔ Container tracer-sidecar                      Started                                                                                                                                                                            0.9s
 ✔ Container p4                                  Started                                                                                                                                                                            1.5s
 ✔ Container p1                                  Started                                                                                                                                                                            1.1s
 ✔ Container p2                                  Started                                                                                                                                                                            1.6s
 ✔ Container p5                                  Started                                                                                                                                                                            1.1s
 ✔ Container d1                                  Started                                                                                                                                                                            0.9s
cgianelloni@devastator:~/Repos/blink/cf-antithesis/compose$ docker logs -f d1
{"time":"2025-07-02T14:13:13.369591382Z","level":"INFO","msg":"maxprocs: Leaving GOMAXPROCS=8: CPU quota undefined","component":"dingo"}
{"time":"2025-07-02T14:13:13.369652536Z","level":"INFO","msg":"version: devel (commit )","component":"dingo"}
{"time":"2025-07-02T14:13:13.381216948Z","level":"INFO","msg":"serving prometheus metrics on 0.0.0.0:12798","component":"node"}
{"time":"2025-07-02T14:13:14.123499947Z","level":"INFO","msg":"listening for ouroboros node-to-node connections on 0.0.0.0:3001","component":"connmanager"}
{"time":"2025-07-02T14:13:14.123545976Z","level":"INFO","msg":"listening for ouroboros node-to-client connections on 127.0.0.1:3002","component":"connmanager"}
{"time":"2025-07-02T14:13:14.123673487Z","level":"INFO","msg":"listening for ouroboros node-to-client connections on /opt/cardano-node/data/db/dingo.socket","component":"connmanager"}
{"time":"2025-07-02T14:13:14.124764346Z","level":"ERROR","msg":"outbound: failed to establish connection to p3.example:3001: dial tcp :3001->172.28.0.10:3001: connect: connection refused","component":"peergov"}
{"time":"2025-07-02T14:13:14.124800771Z","level":"INFO","msg":"outbound: delaying 1s (retry 1) before reconnecting to p3.example:3001","component":"peergov"}
{"time":"2025-07-02T14:13:14.126048919Z","level":"INFO","msg":"connected ouroboros to p4.example:3001","component":"connmanager","role":"client"}
{"time":"2025-07-02T14:13:14.126488341Z","level":"INFO","msg":"connected ouroboros to p2.example:3001","component":"connmanager","role":"client"}
{"time":"2025-07-02T14:13:14.126620502Z","level":"INFO","msg":"connected ouroboros to p5.example:3001","component":"connmanager","role":"client"}
{"time":"2025-07-02T14:13:14.126727886Z","level":"INFO","msg":"connected ouroboros to p1.example:3001","component":"connmanager","role":"client"}
{"time":"2025-07-02T14:13:14.126996627Z","level":"INFO","msg":"starting gRPC listener on 0.0.0.0:9090","component":"utxorpc"}
{"time":"2025-07-02T14:13:15.127061728Z","level":"INFO","msg":"connected ouroboros to p3.example:3001","component":"connmanager","role":"client"}
{"time":"2025-07-02T14:13:18.026512931Z","level":"INFO","msg":"chain extended, new tip: <genesis> at slot 0","component":"ledger"}
{"time":"2025-07-02T14:13:18.048981823Z","level":"INFO","msg":"chain extended, new tip: ba9f7fd131c9fa197222fe830c93bae0c03b12dfae098bd8d578e5a924ba2cef at slot 78","component":"ledger"}
{"time":"2025-07-02T14:13:45.021687834Z","level":"INFO","msg":"chain extended, new tip: 01c8e0eb347d3f42ce99df2cd0d0636655e76d2ab8bdeeb4a0b05729bfa9d555 at slot 105","component":"ledger"}

Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
@karknu
Copy link
Collaborator

karknu commented Jul 2, 2025

🎉 Nice contribution.
How can one tell that the dingo node is on tip?
Could the d1 node be included in the https://github.com/cardano-foundation/antithesis/blob/0439737f79d75dc4a1c2c92f3b8e3591e99bbfa9/compose/sidecar/composer/convergence/eventually_converged.sh check ?
That is will it respond to a find intersect request over chainsync?

@wolf31o2
Copy link
Contributor Author

wolf31o2 commented Jul 2, 2025

It does.

$ timeout 10 cardano-cli ping -j --magic 764824073 --host 172.17.0.2 --port 6000 --tip --quiet -c1 | jq -r '.tip[0].hash + " " + (.tip[0].blockNo|tostring) + " " + (.tip[0].slotNo|tostring)'
ef96c7676191e7389ddfec284e91bdab4e538a662aa0d2154886801ae511185f 319815 319857

It also supports Prometheus metrics matching some of the Haskell node metrics on port 12798 at /metrics

$ curl -s localhost:12798/metrics | grep ^cardano
cardano_node_metrics_blockNum_int 319815
cardano_node_metrics_density_real 0
cardano_node_metrics_epoch_int 14
cardano_node_metrics_mempoolBytes_int 305137
cardano_node_metrics_slotInEpoch_int 17457
cardano_node_metrics_slotNum_int 319857
cardano_node_metrics_txsInMempool_int 122
cardano_node_metrics_txsProcessedNum_int 122

@Anviking
Copy link
Member

Anviking commented Jul 5, 2025

Thanks, this is cool to see!

I needed to patch the Makefile to get this running on antithesis:

patch
diff --git a/compose/Makefile b/compose/Makefile
index 98d8630..c1bb45f 100644
--- a/compose/Makefile
+++ b/compose/Makefile
@@ -48,7 +48,7 @@ help:
        @echo "    make anti password='password1234' session_id=<some session_id> input_hash=<some hash> vtime=<decimal seconds>"
        @echo

-build: TESTNET build-image build-config build-sidecar build-tracer build-tracer-sidecar ## Build cardano-node, config, sidecar, and tracer images
+build: TESTNET build-image build-config build-sidecar build-tracer build-tracer-sidecar build-dingo ## Build cardano-node, config, sidecar, and tracer images

 build-image: TESTNET ## Build cardano-node container image
        ln -snf testnets/${testnet}/testnet.yaml .testnet.yaml ; cd testnets/${testnet} ; docker compose build
@@ -65,7 +65,10 @@ build-tracer: TESTNET ## Build tracer container image
 build-tracer-sidecar: TESTNET ## Build tracer container image
        docker build -f tracer-sidecar/Dockerfile -t ${registry}${testnet}_tracer-sidecar:latest tracer-sidecar/

-push: TESTNET push-image push-config push-tracer push-sidecar push-tracer-sidecar ## Push cardano-node, config and sidecar container image
+build-dingo: TESTNET ## Build dingo container image
+       docker build -f Dockerfile.dingo -t ${registry}${testnet}_dingo:latest .
+
+push: TESTNET push-image push-config push-tracer push-sidecar push-tracer-sidecar push-dingo ## Push cardano-node, config and sidecar container image

 push-image: TESTNET ## Push cardano-node container image
        docker push ${registry}${testnet}:latest
@@ -82,6 +85,9 @@ push-tracer: TESTNET ## Push tracer container image
 push-tracer-sidecar: TESTNET ## Push tracer container image
        docker push ${registry}${testnet}_tracer-sidecar:latest

+push-dingo: TESTNET ## Push dingo container image
+       docker push ${registry}${testnet}_dingo:latest
+
 up: TESTNET ## Start Run local Docker Compose
        cd testnets/${testnet} ; docker compose up --detach

@@ -100,7 +106,7 @@ anti: TESTNET ## Run Antithesis job
        --arg description   '${description}' \
        --arg duration      '${duration}' \
        --arg config_image  '${testnet}_config:latest' \
-       --arg images        '${testnet}:latest;${testnet}_sidecar:latest;${testnet}_tracer:latest;${testnet}_tracer-sidecar:latest' \
+       --arg images        '${testnet}:latest;${testnet}_sidecar:latest;${testnet}_tracer:latest;${testnet}_tracer-sidecar:latest;${testnet}_dingo:latest' \
        --arg recipients    '${recipients}' \
        '{params: {"antithesis.description": $$description,"custom.duration": $$duration,"antithesis.config_image": $$config_image,"antithesis.images": $$images,"antithesis.report.recipients": $$recipients}}')"

but with this it did run! And pass. But can't share the report as it currently requires SSO.

Ultimately we probably don't want to require all testnets to use the same list of images like with the above patch, but I think this is fine for now. Could you include the changes in the patch?

wolf31o2 added 2 commits July 7, 2025 08:57
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
@wolf31o2
Copy link
Contributor Author

wolf31o2 commented Jul 7, 2025

Patch applied and I merged main so it's not far behind.

@Anviking
Copy link
Member

Anviking commented Jul 8, 2025

Thanks, will have a final look and merge next week when I get back, am off this week

@Anviking Anviking self-requested a review July 8, 2025 21:38
@karknu
Copy link
Collaborator

karknu commented Jul 10, 2025

There is a problem with the use of the testnet-generation-tool. The cardano-node instances and the dingo instance will end up using different keys and genesis files.
I suspect that the only reason it works is that dingo does no verification of the blocks at all, and blindly accepts what ever blocks it can download from the cardano-nodes.

@wolf31o2
Copy link
Contributor Author

Dingo doesn't even load everything from the files. Currently, it uses them for protocol parameters starting points. It definitely is taking blocks from the nodes and simply storing them and passing them along. We have no consensus, so it uses the first node is connects to and "trusts" it. It will give those blocks to any ChainSync clients and will also do transaction propagation (without most validation, and none being fully fatal yet) across node-to-node.

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.

3 participants