Repository navigation
Trying DevNet locally: test results, findings and next steps #260
Replies: 2 comments
|
Thanks @Santiagocetran, this is a great report. It's the first time anyone has run DevNet across several machines on a LAN, and the way you wrote it up (original failures kept next to the retries, a clear line between "I ran this" and "I read this in the code", and setup problems kept apart from DevNet bugs) is what we'd like every test report to look like. Why this helps
Decisions and fixes, finding by finding
Setup observations: the CPU/ARM PyTorch install path, the separate per-participant Next steps
|
|
Thanks for the feedback, Umer! I’ve opened the two issues and included the relevant sections from my report:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone! Following up on the home testnet idea, I wanted to share my progress testing DevNet locally. These tests were run on October 9–10, 2026, using
developat commit6e361cb0b4b631f73d3c5ef86fa03469f9f14ae2. Repository findings below refer to that revision.My goal was to follow the documentation, understand the setup, and gradually try it across three notebooks and a Raspberry Pi. I tested the individual pieces, investigated the failures and kept the original results alongside successful retries. I haven't completed a full training round through the CLI or across the devices yet.
How I tested
I started on Notebook 1, using a separate checkout and temporary local blockchain with test accounts and no real funds. I followed
Documentation/technical/testing/dincli-testing-guide.md, using its isolated testing mode. Where the existing tests did not cover what I needed, I added small experiment checks and recorded those separately.The connectivity setup looked like this:
flowchart TB N1["Notebook 1 — main host<br/>Local test blockchain · port 8545<br/>IPFS file service · port 5001<br/>Local deployment, staking and CPU tests"] F["Notebook 1 firewall<br/>Temporary access to ports 8545 and 5001<br/>Only from the three test devices"] N2["Notebook 2"] N3["Notebook 3"] P["Raspberry Pi · ARM<br/>Training test incomplete"] N2 --> F N3 --> F P --> F F --> N1All four devices shared the same Wi-Fi network. The firewall initially blocked access to the two services. I temporarily allowed each of the other three devices to connect to those ports, checked blockchain access and file uploads/downloads, and removed the rules afterward. This confirmed access to central services, not a distributed training round.
What worked
foundry/test/UpgradeValidation.t.sol,foundry/test/DeployPlatform.t.solandfoundry/test/DeployPlatformScript.t.sol; this was not the full Solidity suite.I also tested the unchanged reference client and auditor services in
cache_model_0/services/client.pyandcache_model_0/services/auditor.py, using MNIST, the handwritten-digit dataset. The dataset preparation came fromcid_services/distribute_mnist.py.One client trained on 20,000 handwritten-digit images. On a separate set of 10,000 images, accuracy improved from 11.04% before training, using an experiment-generated model with randomly initialized weights, to 96.82% after training. The unchanged auditor scoring rules accepted the trained model.
This was a CPU worker check using prepared local files. It did not test CLI registration, encrypted data delivery, model upload/submission or approval on the blockchain. I prepared three data partitions but trained only one model.
Repository findings
1. Two platform tests expect an older deployment format
Files:
tests/dincli/test_01_platform.pyandfoundry/script/DeployPlatform.s.sol.The two original platform tests failed because they expect a single
proxyAdminentry. The current deployment produces separate administrator entries for the contracts.The errors were
AssertionError: missing proxyAdminandKeyError: 'proxyAdmin'. Deployment itself succeeded, and my additional checks verified selected live state. That does not make the original tests pass: their failures need to remain visible.This matches the problem already described in #228.
2. Local transactions display public testnet explorer links
Files:
dincli/config/din_info.json, under thelocalnetwork, anddincli/cli/utils.py, inprint_tx_info.During the buy/stake checks, the CLI showed
Active Network: local, but printed transaction links for Optimism Sepolia. I verified chain ID 1337 and successful local receipts, so this was misleading output rather than a public-chain transaction.The local configuration supplies the public explorer address, and the output function uses it. For a local network, printing the transaction hash without that link would be clearer unless a suitable explorer is explicitly configured.
3. The client-service guide describes an older interface
Files:
Documentation/technical/services/clients.md,cache_model_0/manifest.json,cache_model_0/services/client.pyanddincli/cli/client.py.The guide names
train_client_model_and_upload_to_ipfs, while the current manifest and service usetrain_client_model. The guide also makes it sound as though the training service handles the upload.In the current workflow,
train-lmsprepares inputs and runs the worker, which returns a local model file. The separatesubmit-lmcommand uploads and submits it. The service's own description still mentions uploading, so that wording also needs alignment.4. Model-owner deployment calls don't match the current contracts
Files:
dincli/cli/modelownerd/deploy.py,foundry/src/DINTaskCoordinator.solandfoundry/src/DINTaskAuditor.sol.Reading these files showed that the CLI deployment calls omit the model ID required by the current contract constructors. This is already tracked in #223.
I did not execute this model-deployment path and observe it fail. This is a code comparison against the current Foundry contracts, not a failed deployment result from my experiment. The repository already proposes how to handle the model ID in
Developer/tasks/task_061026_21.md.5. Some steps needed for a complete round are missing from the CLI
Files:
dincli/cli/modelownerd/deploy.py,dincli/cli/modelownerd/gi.py,dincli/cli/auditor.pyand the command registrations underdincli/cli/.Comparing the CLI with
foundry/src/DINTaskCoordinator.sol,foundry/src/DINTaskAuditor.solandfoundry/src/DinEmission.solshowed missing CLI support for reward/token setup, funding, auditor encryption-key registration, reward claims and releasing registration slots after a round.One particularly confusing example is
dincli/cli/auditor.py: its missing-key message tells the user to rundincli auditor register-encryption-key, but that command is not implemented in the tested version.The contracts already provide the relevant functions. These are CLI gaps, and not all prevent a round from starting: claims and slot release belong to finishing and repeating the process. Slot release does not independently block the first round with the default unlimited registration setting.
This work is already described in
Developer/tasks/task_061026_21.md, with progress in Discussion #231. My findings can support that work rather than create duplicate issues.Setup observations and corrections
These are useful for reproducing the experiment, but should be kept separate from CLI bugs:
dincli/cli/utils.pyreads.envin the current working directory. My earlier idea of using.env.localautomatically was incorrect. Separate participant directories need to use the supported file/state layout.tests/dincli/test_01_platform.pylaunches Forge using the outer process environment. I used a clean outer environment as well as the isolated harness. The harness's filtering should not be assumed to apply to every subprocess.tests/dincli/conftest.pycan stop existing processes using the test port. I used the documented isolated mode, which tracks its own processes throughtests/dincli/services.py, to avoid affecting unrelated workloads.cache_model_0/requirements.txtincludes GPU packages. For CPU training I used the role requirements undercache_model_0/requirements/and selected CPU PyTorch packages explicitly. ARM needed CPU PyTorch from its CPU index and the pinned torchvision package from PyPI. The package versions were recorded, but this was not a completely locked environment.DINTaskCoordinatorhad 1,079 bytes of headroom below the size limit. That is worth retaining as a constraint, not reporting as a failed deployment.I also corrected my initial workload plan after reviewing
foundry/src/DINTaskCoordinator.sol: at least three approved models are required before aggregation starts. The smaller trailing-batch allowance does not mean that two models are enough to start. My one successful off-chain scoring result does not meet the three-model requirement.Problems in my experiment scripts
Two problems came from the custom scripts I used to run the experiments.
Dataset preparation permissions: my first preparation container created root-owned directories, preventing the local script from continuing. Running the containers with my local user's permissions resolved this, and the subsequent training and scoring run passed.
Connectivity checks: my initial probe stopped when a hostname lookup failed and later encountered a temporary port-reuse problem. I updated it to record hostname-resolution errors separately and handle port reuse. The subsequent connectivity checks passed.
These were problems in my test setup, not demonstrated DevNet defects.
Raspberry Pi progress
On the Pi, I confirmed remote access, Docker access, local blockchain/IPFS connectivity, an ARM worker build, installation of PyTorch/torchvision/NumPy, and a successful torchvision NMS operation check.
The training attempt did not produce a completed result. Subsequent checks on October 10 found intermittent undervoltage and disabled memory control; further training was deferred. I haven't confirmed completed training on ARM yet.
The saved worker log also warned that Docker discarded the requested memory limit. The restart cause remains unknown, and I am not treating these host problems as CLI bugs.
Evidence retained
I kept the test output, transaction receipts, connectivity results, training and scoring results, package versions, and Pi diagnostics locally, including the original failures and successful retries. These supporting files have not been published. I can share the scripts if anyone would like to reproduce the tests themselves.
The custom deployment, staking and connectivity checks supplemented the repository tests. The CPU training check used a custom driver to prepare local data and run the unchanged reference client and auditor services. These results describe the experiment; the custom checks are not part of the upstream test suite.
A public evidence bundle would need the relevant scripts, exact commands, package versions and sanitized result excerpts so others could inspect and reproduce the custom checks. Raw wallet/configuration files, IPFS state and logs containing test keys would be excluded.
What I still need to test
My next milestone is one complete round through the CLI on a notebook: model and participant setup, reward funding, three approved model submissions, encrypted audits, both aggregation stages, a final model, reward claims and the applicable registration-slot release.
Once that works, I'd like to repeat it across devices, measure resource use and test repeated rounds and participant disconnections. The CPU result is encouraging, but it is not a minimum-hardware specification or proof that all four devices are ready.
Could you confirm which implementation revision and supported command sequence I should use when the relevant parts of
task_061026_21are ready? I'd like this report to support that work and help make the next person's local setup easier.cc @robertocarlous @umeradl @abrahamnash
All reactions