diff --git a/Developer/CODE_STANDARDS.md b/Developer/CODE_STANDARDS.md index e69de29b..001d231b 100644 --- a/Developer/CODE_STANDARDS.md +++ b/Developer/CODE_STANDARDS.md @@ -0,0 +1,47 @@ +# Code Standards + +Code style and quality expectations for contributions to DevNet. This is the +detail behind the one-line summary in [CONTRIBUTING.md](CONTRIBUTING.md#code-standards); +see that file first for the general contribution flow. + +## Python (`dincli/`, `tests/`, service files) + +- Plain **PEP 8**. There is no `[tool.ruff]` config committed in + `pyproject.toml` — `.ruff_cache` is a local artifact, not enforced CI + config — so use judgment and keep style consistent with the surrounding + file rather than relying on a linter to catch it. +- Python **>= 3.12** (see [DEVELOPMENT_SETUP.md](DEVELOPMENT_SETUP.md)). +- Tests mock chain/IPFS state via `monkeypatch` and `typer.testing.CliRunner` + rather than hitting a live network — follow the existing patterns in + `tests/test_dintoken.py` and `tests/test_ipfs_config.py` for new tests. +- New CLI behavior should have a test that invokes the actual registered + Typer command (via `CliRunner`), not just the underlying function — + otherwise a wiring bug (wrong command path, wrong option name) can pass + review undetected. + +## Solidity (`foundry/src/`) + +- `solc 0.8.28`, `via_ir = true` (see `foundry/foundry.toml`). Build and test + with `forge build` / `forge test` before opening a PR. +- NatSpec (`///`, `@notice`, `@dev`, `@param`, `@return`) throughout — + existing contracts are heavily annotated; match that density for new + public/external functions. +- Prefer **custom errors** over `require(condition, "string")`. Revert + strings are the larger contributor to contract size, and several + contracts (`DINTaskCoordinator`, `DINTaskAuditor`) are close enough to + the EIP-170 runtime-size limit that this isn't a style preference — see + the **Contract size budget** section in + [CONTRIBUTING.md](CONTRIBUTING.md#submitting-prs) for the enforced + margins and the gate script that checks them. +- Every deployable contract's bundled ABI under `dincli/abis/` must be + regenerated in the same PR that changes its interface — see + **Submitting PRs** in [CONTRIBUTING.md](CONTRIBUTING.md#submitting-prs) + for the exact command. + +## General + +- Keep commits focused and PRs scoped to one change; unrelated cleanup + belongs in its own PR. +- Don't add abstractions, fallbacks, or validation for cases the current + code can't hit — see what's actually enforced by the type/contract + boundary before adding a guard for it. diff --git a/Developer/CONTRIBUTING.md b/Developer/CONTRIBUTING.md index e76e20e6..4d999b41 100644 --- a/Developer/CONTRIBUTING.md +++ b/Developer/CONTRIBUTING.md @@ -10,11 +10,10 @@ git checkout develop # Install dependencies and set up dincli in editable mode pip install -e . - -# See full setup guide -/Developer/DEVELOPMENT_SETUP.md ``` +See [DEVELOPMENT_SETUP.md](DEVELOPMENT_SETUP.md) for the full setup guide (Python version, Foundry, running tests). + Create a feature branch, commit your changes, and open a pull request to `develop`. Every PR is reviewed and merged by someone other than its author. [MAINTAINING.md](MAINTAINING.md) describes how review, merging, and issue/task closure work. diff --git a/Developer/DEVELOPMENT_SETUP.md b/Developer/DEVELOPMENT_SETUP.md index 5c29d364..913c95ce 100644 --- a/Developer/DEVELOPMENT_SETUP.md +++ b/Developer/DEVELOPMENT_SETUP.md @@ -4,14 +4,62 @@ This file is the minimal setup entrypoint for contributors working on DevNet. **Prerequisite:** [Wallet Setup](../Documentation/public/guides/wallet-setup.md) — for development, use demo mode or `ETH_PRIVATE_KEY_` in `.env`. Never commit real keys. +## Requirements + +- Python **>= 3.12** +- [Foundry](https://book.getfoundry.sh/getting-started/installation) (`forge`, `anvil`) — the primary Solidity toolchain +- Node.js + npm — only needed inside `foundry/` (for `npm ci`, see below) and if you're also touching the secondary `hardhat/` toolchain + ## Local Python Setup ```bash git checkout develop -pip install -e . +pip install -e ".[test]" +``` + +The `[test]` extra installs `pytest` and `torch`, which the unit test suite +needs even outside the ML/DP service code. + +Run the unit test suite the same way CI's Python job does — `-m "not +integration"` excludes `tests/dincli/`'s integration harness, which needs a +live Hardhat node, IPFS daemon, and Docker, and which otherwise autouse-starts +and restarts local chain/IPFS processes as a side effect of being collected: + +```bash +pytest -m "not integration" -q # run all unit tests +pytest tests/test_dintoken.py -k test_name -m "not integration" # run a single test ``` -If you are working on the ML or DP service code, make sure your environment also contains the training dependencies used by the current model services, including PyTorch and the test runner you intend to use. +To run the full integration suite instead (with its prerequisites and a +disposable environment), see the +[dincli testing guide](../Documentation/technical/testing/dincli-testing-guide.md). + +## Foundry (Solidity) Setup + +Install Foundry if you don't have it yet: + +```bash +curl -L https://foundry.paradigm.xyz | bash +foundryup +``` + +Then build and test the contracts: + +```bash +cd foundry && npm ci && forge build && forge test +``` + +`npm ci` must run before `forge test` — `Upgrades.validateImplementation` shells +out over FFI to `npx @openzeppelin/upgrades-core`, and without +`foundry/node_modules` already populated from the committed lockfile, the +parallel test run can race fetching that package. See [CLAUDE.md](../CLAUDE.md) +for the full explanation and the Hardhat (secondary toolchain) commands. + +## Testing Reference + +Deeper, feature-specific testing guides live under +[Documentation/technical/testing/](../Documentation/technical/testing/), including +the general [dincli testing guide](../Documentation/technical/testing/dincli-testing-guide.md). ## Where To Start diff --git a/Developer/GOOD_FIRST_ISSUES.md b/Developer/GOOD_FIRST_ISSUES.md index ce445bec..68013988 100644 --- a/Developer/GOOD_FIRST_ISSUES.md +++ b/Developer/GOOD_FIRST_ISSUES.md @@ -40,14 +40,12 @@ Core components: ## Open Issues -### 0. Starter Task: Differential Privacy & Responsible AI Review +### 0. Starter Task: Differential Privacy & Responsible AI Review — ✅ Completed -**Difficulty:** Beginner (review/analysis, not implementation) -**Area:** Privacy-Preserving Federated Learning / AI Governance **Detailed issue:** [issues/dp-governance-review-starter-task.md](issues/dp-governance-review-starter-task.md) **Status:** ✅ Done. Completed by @walkonwayvs in [PR #89](https://github.com/InfiniteZeroFoundation/DevNet/pull/89). The review is at [Documentation/technical/audits/dp-mechanism-review.md](../Documentation/technical/audits/dp-mechanism-review.md), and its open findings are tracked in [#279](https://github.com/InfiniteZeroFoundation/DevNet/issues/279). It stays listed here as an example of the work. -A self-contained, no-coding-required entry point for contributors coming from an AI governance / responsible-AI / policy background rather than deep systems engineering. Review the three DP mechanisms already implemented for client model updates and assess them from a "what privacy claims can we honestly make" angle. Good first step before taking on implementation work in issue #1 below. +This starter task (reviewing the three DP mechanisms implemented for client model updates from a "what privacy claims can we honestly make" angle) was completed in [PR #89](https://github.com/InfiniteZeroFoundation/DevNet/pull/89); the findings live at [Documentation/technical/audits/dp-mechanism-review.md](../Documentation/technical/audits/dp-mechanism-review.md). For a similar beginner-friendly review/analysis entry point, check issues tagged [`good first issue`](https://github.com/InfiniteZeroFoundation/DevNet/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). ### 1. Differential Privacy Improvements diff --git a/Developer/design/whitepaper-summary.md b/Developer/design/whitepaper-summary.md index 94c440cc..aebb3a20 100644 --- a/Developer/design/whitepaper-summary.md +++ b/Developer/design/whitepaper-summary.md @@ -1,6 +1,6 @@ # DIN White Paper — Summary & Implementation Mapping -> **Source:** [Decentralized Intelligence Network (DIN)](https://github.com/InfiniteZeroFoundation/White-Paper/blob/main/Decentralized%20Intelligence%20Network%20(DIN).pdf.zip), Abraham Nash (23 pp., zip published Jun 2026). +> **Source:** [Decentralized Intelligence Network (DIN)](https://github.com/InfiniteZeroFoundation/White-Paper/blob/main/Decentralized%20Intelligence%20Network%20%28DIN%29.pdf), Abraham Nash (23 pp., published as a PDF Jun 2026). > **Purpose of this document:** working summary of the white paper for aligning ROADMAP.md, `Documentation/`, and `issues/` with the canonical protocol design. Section references (§) are to the white paper. --- diff --git a/Documentation/public/cli-reference.md b/Documentation/public/cli-reference.md index 38124189..d501403f 100644 --- a/Documentation/public/cli-reference.md +++ b/Documentation/public/cli-reference.md @@ -1,6 +1,6 @@ # DIN CLI — Common Reference -The DIN CLI (`dincli`) is the primary command-line interface for interacting with the Decentralized Intelligence Network. It supports all participant roles: Clients, Auditors, Model Owners, Aggregators, and DAO administrators. +The DIN CLI (`dincli`) is the primary command-line interface for interacting with the Decentralized Intelligence Network. It supports all participant roles: Clients, Auditors, Model Owners, Aggregators, and the DIN-Representative. --- @@ -10,7 +10,7 @@ These flags can be prepended to any command: | Option | Description | |---|---| -| `--network ` | Override the default network (`local`, `sepolia_devnet`, `sepolia_op_devnet`, `mainnet`) | +| `--network ` | Override the default network (`local`, `sepolia_op_devnet`) | | `--help` | Display help for any command | **Check CLI version:** @@ -35,14 +35,15 @@ The `system` command group manages configuration, wallet connections, and genera dincli system init ``` -**Set the default network:** (`local`, `sepolia_devnet`, `sepolia_op_devnet`, `mainnet`) +**Set the default network:** (`local`, `sepolia_op_devnet`) ```bash dincli system configure-network --network ``` > [!NOTE] -> Use `sepolia_op_devnet` for devnet. Testnet and Mainnet support will be rolled out in a future release. +> `sepolia_op_devnet` is the live DevNet. `local` is for a self-hosted +> `anvil` chain. `mainnet` is not available yet. **Set the log level** (`debug`, `info`, `warning`, `error`, `critical`): diff --git a/Documentation/public/getting-started.md b/Documentation/public/getting-started.md index f84b099a..b48cdf76 100644 --- a/Documentation/public/getting-started.md +++ b/Documentation/public/getting-started.md @@ -1,18 +1,18 @@ -# Model_0 — Infinite Zero Network Protocol +# Model_0 — InfiniteZero Network Protocol > [!TIP] > Hit an error or get stuck anywhere in this guide? Post it in the > [DevNet 2.0 pre-launch discussion](https://github.com/InfiniteZeroFoundation/DevNet/discussions/102). -Welcome to the onboarding guide for **Model_0** on the Infinite Zero Network. +Welcome to the onboarding guide for **Model_0** on the InfiniteZero Network. Planning a different model or dataset? Read [What can I train on DIN?](what-can-be-trained.md) to understand the tested reference, custom-service path, and practical limits. -Infinite Zero Network devnet has been launched as `sepolia-op-devnet`. +InfiniteZero Network devnet has been launched as `sepolia_op_devnet`. -Model_0 is the first active model registered on the Infinite Zero Network and serves as the pioneer deployment of Infinite Zero's model-specific smart contracts. +Model_0 is the first active model registered on the InfiniteZero Network and serves as the pioneer deployment of InfiniteZero's model-specific smart contracts. -The Infinite Zero Network coordinates decentralized AI training, auditing, aggregation, and validation through Ethereum smart contracts, off-chain distributed compute, and decentralized storage. +The InfiniteZero Network coordinates decentralized AI training, auditing, aggregation, and validation through Ethereum smart contracts, off-chain distributed compute, and decentralized storage. --- @@ -36,11 +36,11 @@ This process enables decentralized, verifiable, and scalable collaborative AI tr --- -# 🌐 What is `sepolia-op-devnet`? +# 🌐 What is `sepolia_op_devnet`? To simplify onboarding, we refer to our devnet as: -> **`sepolia-op-devnet` = Optimism Sepolia testnet + DIN deployed contracts** +> **`sepolia_op_devnet` = Optimism Sepolia testnet + DIN deployed contracts** So when you see: @@ -58,14 +58,23 @@ It means: # Current Status -* ✅ Global Iteration 1 completed -* 🔄 Global Iteration 2 in progress +> [!NOTE] +> This guide documents Model_0's protocol flow as implemented on the +> `develop` branch, which can be ahead of what is actually deployed on the +> live `sepolia_op_devnet` network — including which Global Iteration is +> open and whether aggregator/auditor steps use the commit-then-reveal flow +> described below (added after the initial devnet deployment). Always +> confirm the live state yourself before acting: +> +> ```bash +> dincli task gi show-state 0 +> ``` --- # 🔐 Security Model -The Infinite Zero Network is secured by Ethereum smart contracts deployed on Sepolia OP Devnet. +The InfiniteZero Network is secured by Ethereum smart contracts deployed on Sepolia OP Devnet. Ethereum acts as the source of truth for: @@ -89,13 +98,13 @@ Ethereum acts as the source of truth for: ### Core guarantee -The system is **fully verifiable end-to-end**: +The system is **verifiable end-to-end**: - Ethereum enforces correctness, coordination, and finality - IPFS ensures reproducible and distributed data availability - Off-chain compute enables scalable ML execution -> 💡 Trust is shifted from participants to cryptographic and economic enforcement. +> 💡 Trust is shifted from participants to cryptographic enforcement on-chain. Staking exists to add economic enforcement on top of that, but the reward/slashing economics are still under active development — see "Current Devnet Scope" further down this guide — so treat "economic enforcement" as a protocol goal, not yet a fully live guarantee. # 📦 Data Availability Layer (IPFS via Filebase) @@ -131,7 +140,7 @@ Participants may operate as one or more of the following roles simultaneously: This system does not use mining or Proof-of-Work. -Instead, it uses a role-based validation model coordinated through Ethereum smart contracts on `sepolia-op-devnet`. +Instead, it uses a role-based validation model coordinated through Ethereum smart contracts on `sepolia_op_devnet`. * Clients train and submit local model updates * Auditors independently evaluate the submitted local models and approve (or reject) them. @@ -145,7 +154,7 @@ Instead, it uses a role-based validation model coordinated through Ethereum smar # 💻 System Requirements -Participating in Model_0 on the Infinite Zero Network is lightweight and does not require specialized hardware. +Participating in Model_0 on the InfiniteZero Network is lightweight and does not require specialized hardware. ### Minimum Requirements @@ -187,7 +196,7 @@ Economic and reward distribution mechanisms are still under active development a * Coordination * Community support -https://t.me/+I4Tl7foCVwwwM2Vk +https://t.me/+h46VS3AnO384ZGI8 ### Signal @@ -203,7 +212,7 @@ https://signal.group/#CjQKICVqJ0Ri3KGCZOsf8A3dhmg8GC_vc1MBmBrq0JV7lIr6EhBCOwElVH ## Faucet Access (Sepolia Optimism) -To participate in the Infinite Zero Network devnet, you will need Sepolia Optimism ETH for transaction fees. +To participate in the InfiniteZero Network devnet, you will need Sepolia Optimism ETH for transaction fees. You can request testnet tokens from the following official faucets: @@ -213,7 +222,7 @@ You can request testnet tokens from the following official faucets: * [ETHGlobal OP Sepolia Faucet](https://ethglobal.com/faucet/op-sepolia-11155420) * [Alchemy Optimism Sepolia Faucet](https://www.alchemy.com/faucets/optimism-sepolia) -If you are unable to obtain funds through the faucets above, you may also request Sepolia Optimism ETH through the Infinite Zero Foundation Telegram and Signal community groups. +If you are unable to obtain funds through the faucets above, you may also request Sepolia Optimism ETH through the InfiniteZero Foundation Telegram and Signal community groups. --- @@ -604,4 +613,4 @@ dincli client lms show-models 0 --- -> 🚀 You are now ready to participate in **Model_0** and contribute to decentralized AI on the Infinite Zero Network. +> 🚀 You are now ready to participate in **Model_0** and contribute to decentralized AI on the InfiniteZero Network. diff --git a/Documentation/public/manifest.md b/Documentation/public/manifest.md index ac31fbb6..5fc92587 100644 --- a/Documentation/public/manifest.md +++ b/Documentation/public/manifest.md @@ -19,7 +19,13 @@ For example: ``` > [!NOTE] -> If the manifest file is absent when the genesis setup (`dincli task model-owner create-genesis`) runs, it is automatically created with default values from the default manifest CID (`bafybeibbhrefnamky7vmgcrhfx4ptxb3bdemh5dtnvwfkpualoganvnuve`). +> The manifest file must already exist at this path before running +> `dincli model-owner model create-genesis-model` — it exits with an error if +> the file is missing, it is not created automatically. To create it from a +> default template, run `dincli model-owner task cache-default-artifacts` +> first; that only works where the configured network has a `default_manifest` +> CID set (currently just `local` — `sepolia_op_devnet` and `mainnet` have no +> default to cache from, so you must supply your own manifest file there). --- @@ -39,7 +45,7 @@ For example: | Field | Required | Description | |---|---|---| -| `Genesis_Model_CID` | Yes | IPFS CID of the genesis model. Set after running `dincli model-owner model create-genesis` | +| `Genesis_Model_CID` | Yes | IPFS CID of the genesis model. Set after running `dincli model-owner model create-genesis-model` | | `DINTaskCoordinator_Contract` | Yes | Address of the deployed TaskCoordinator contract | | `DINTaskAuditor_Contract` | Yes | Address of the deployed TaskAuditor contract | | `dp` | No | Nested Differential Privacy configuration block used by services at runtime. See [Differential Privacy Parameters](#differential-privacy-parameters) below. | @@ -155,5 +161,5 @@ Please find the example/template manifest file at [cache_model_0/manifest.json]( Once the model is registered and assigned a model ID, the manifest file should be updated with the `Model ID` field and re-uploaded to IPFS. The following dincli command can be used to update the model CID in the DINModelRegistry contract: ```bash -dincli task model-owner update-manifest [--modelCID ] [--manifestpath ] +dincli task model-owner update-manifest-request [--manifestCID ] [--manifestpath ] ``` diff --git a/Documentation/public/roles/clients.md b/Documentation/public/roles/clients.md index 181f04aa..f2805fbf 100644 --- a/Documentation/public/roles/clients.md +++ b/Documentation/public/roles/clients.md @@ -16,7 +16,7 @@ Clients contribute to the DIN network by training local models on their own data > | Placeholder | Description | Example | > |---|---|---| > | `` | The DIN CLI cache directory | `~/.cache/dincli` | -> | `` | The active network name | `local`, `sepolia_devnet`, `sepolia_op_devnet`, `mainnet` | +> | `` | The active network name | `local`, `sepolia_op_devnet` | > | `` | The ID of the model you are participating in | `0` | > | `` | Your Ethereum wallet address | `0xAbC...123` | > diff --git a/Documentation/public/roles/model-owner.md b/Documentation/public/roles/model-owner.md index 1110d593..5038ea6f 100644 --- a/Documentation/public/roles/model-owner.md +++ b/Documentation/public/roles/model-owner.md @@ -45,7 +45,7 @@ dincli model-owner add-slasher --taskAuditor [--contract \ - --task-coordinator \ - --task-auditor \ - [--open-source] +dincli task model-owner register-request \ + --taskCoordinator \ + --taskAuditor \ + [--manifestpath | --manifestCID ] \ + [--isOpenSource] ``` +`--manifestCID` skips the IPFS upload and registers an already-pinned manifest directly. + On success you receive a **`requestId`**. Track it to monitor approval status. -### Step 2 — Wait for DAO Approval +### Step 2 — Wait for DIN-Representative Approval The DIN-Representative reviews your request and calls `approveModel(requestId)`. You will receive a **`modelId`** once approved. Check the status of your request: ```bash -# TODO -dincli model-owner registry show-request +dincli task model-owner show-registration-request ``` > [!IMPORTANT] -> The coordinator and auditor contracts must remain registered slashers and still be owned by your address at the time the DAO approves. If either condition changes, the approval will revert and you must submit a new request. +> The coordinator and auditor contracts must remain registered slashers and still be owned by your address at the time the DIN-Representative approves. If either condition changes, the approval will revert and you must submit a new request. ### Updating a Manifest Manifest updates also follow a request/approval flow. The model must not be disabled. ```bash -# TODO -dincli model-owner registry request-manifest-update --manifest +dincli task model-owner update-manifest-request [--manifestpath | --manifestCID ] ``` -The DAO reviews the request and calls `approveManifestUpdate(requestId)` to apply it. +The DIN-Representative reviews the request and calls `approveManifestUpdate(requestId)` to apply it. --- @@ -131,7 +130,7 @@ Uploads the genesis model to IPFS. > **Prerequisite** — `_DINTaskCoordinator_Contract_Address` must be set in your `.env` file. ```bash -dincli model-owner model create-genesis +dincli model-owner model create-genesis-model ``` ### Submit Genesis Model @@ -143,7 +142,7 @@ Registers the genesis model on-chain. > `/tasks//task_/dataset/test/test_dataset.pt` ```bash -dincli model-owner model submit-genesis [--taskCoordinator
] [--ipfs-hash ] [--score ] +dincli model-owner model submit-genesis-model [--taskCoordinator
] [--ipfs-hash ] [--score ] ``` | Option | Required | Description | diff --git a/Documentation/public/setup.md b/Documentation/public/setup.md index 0faaa54a..d075a768 100644 --- a/Documentation/public/setup.md +++ b/Documentation/public/setup.md @@ -27,20 +27,31 @@ source venv/bin/activate ## 2. Install `dincli` -### Option A — Install from a Downloaded Wheel +### Install from Source (recommended for now) ```bash -# Download the wheel file -wget https://github.com/InfiniteZeroFoundation/DevNet/raw/refs/heads/main/dist/dincli-0.1.0-py3-none-any.whl -# Install it -pip install dincli-0.1.0-py3-none-any.whl +git clone https://github.com/InfiniteZeroFoundation/DevNet.git +cd DevNet +git checkout develop +pip install -e . ``` -### Option B — Install Directly from GitHub +Cloning alone checks out `main`, not `develop` — the explicit `git checkout +develop` matters. `-e` (editable) installs `dincli` from whatever commit is +checked out *at install time*; it does not automatically track upstream +updates afterwards. If `develop` moves on, re-run `git pull` in that same +clone to pick up the changes (no reinstall needed). -```bash -pip install git+https://github.com/InfiniteZeroFoundation/devnet.git@main#subdirectory=dist -``` +> [!NOTE] +> This is unreleased code from `develop`, not a packaged release — it can be +> ahead of what's actually deployed on the live `sepolia_op_devnet` network +> (see [issue #282](https://github.com/InfiniteZeroFoundation/DevNet/issues/282) +> for the plan to bring main's packaged release up to date with develop and +> fix this install path to point at a real release asset instead). Installing +> a packaged wheel (`pip install dincli-*.whl`) or directly from GitHub's +> `dist/` subdirectory is broken today — the previous instructions here +> pointed at a wheel file and a `dist/` layout that no longer match what's +> published — so use the source install above until #282 lands. > for any missing dependency please install it using pip. Please see a complete dependency list in [requirements.txt](../../cache_model_0/requirements.txt) @@ -70,12 +81,15 @@ Creates the required `config` and `cache` directories and generates an empty con # Disable demo mode to use your own wallet and private keys dincli system configure-demo --mode no -# Set the default network [local | sepolia_devnet | sepolia_op_devnet | mainnet] +# Set the default network [local | sepolia_op_devnet] dincli system configure-network --network sepolia_op_devnet +``` > [!NOTE] -> Use `sepolia_op_devnet` for devnet. Testnet and Mainnet support will be rolled out in a future release. +> `sepolia_op_devnet` is the live DevNet. `local` is for a self-hosted +> `anvil` chain. `sepolia_devnet` and `mainnet` are not available yet. +```bash # Set the log level [debug | info | warning | error | critical] dincli system configure-logging --level info ``` diff --git a/Documentation/public/workflows/din-workflow.md b/Documentation/public/workflows/din-workflow.md index 375ee6ed..e0128237 100644 --- a/Documentation/public/workflows/din-workflow.md +++ b/Documentation/public/workflows/din-workflow.md @@ -2,7 +2,7 @@ In this guide we will describe the workflow of the DIN Protocol. -DIN-Representative (later DIN-DAO) is an entity that is authorized to perform certain actions on behalf of the DIN Protocol. +DIN-Representative is an entity that is authorized to perform certain actions on behalf of the DIN Protocol. DIN-Representative has deployed the following DIN Protocol contracts on Sepolia-Optimism testnet as part of DIN-devnet: diff --git a/Documentation/public/workflows/model-workflow.md b/Documentation/public/workflows/model-workflow.md index affdd3c0..7c8e1272 100644 --- a/Documentation/public/workflows/model-workflow.md +++ b/Documentation/public/workflows/model-workflow.md @@ -5,7 +5,7 @@ In this guide we will describe the workflow of the DIN Protocol for a model. In Model Workflow there are 5 main entities: 1. Model-Owner -2. DIN-Representative (later DIN-DAO) +2. DIN-Representative 3. Auditors 4. Aggregators 5. Clients (Model-Trainees) @@ -71,11 +71,11 @@ Reach out to the DIN-Representative through any of the following channels: | Telegram Group| https://t.me/+h46VS3AnO384ZGI8 | | Email | umermajeed.cto@gmail.com abrahamnash@protonmail.com | -> DIN Protocol is developed and maintained by Infinite Zero Foundation +> DIN Protocol is developed and maintained by InfiniteZero Foundation -> Dr. Umer Majeed is the Founding Member of Infinite Zero Foundation. He is the Technical Architecture & Implementation Lead for the DIN Protocol. Please mention "DIN Protocol Model Registration Request" in the subject of the email +> Dr. Umer Majeed is the Founding Member of InfiniteZero Foundation. He is the Technical Architecture & Implementation Lead for the DIN Protocol. Please mention "DIN Protocol Model Registration Request" in the subject of the email -> Dr. Abraham Nash is the Founding Member of Infinite Zero Foundation. He is Vision, Strategy & Ecosystem Development Lead for the DIN Protocol. Please mention "DIN Protocol Model Registration Request" in the subject of the email +> Dr. Abraham Nash is the Founding Member of InfiniteZero Foundation. He is Vision, Strategy & Ecosystem Development Lead for the DIN Protocol. Please mention "DIN Protocol Model Registration Request" in the subject of the email ### Required Information for Your Request @@ -175,7 +175,7 @@ Model Owner creates and submits the genesis model to the TaskCoordinator contrac The following dincli command is used to create the genesis model: ```bash -dincli model-owner model create-genesis +dincli model-owner model create-genesis-model ``` > make sure that the manifest.json file is present at `/tasks/sepolia_op_devnet//manifest.json` before running the above command. The above dincli command will use `getGenesisModelIpfs` in `modelowner.py` service to create the genesis model and upload it to IPFS and store the IPFS CID in the .env file as `SEPOLIA_OP_DEVNET__GENESIS_MODEL_IPFS_HASH`. Please note that dincli can automatically fetch the service from IPFS using the coressponding entry for `getGenesisModelIpfs` in the manifest.json file. @@ -183,7 +183,7 @@ dincli model-owner model create-genesis The model owner can submit the genesis model to the TaskCoordinator contract using the following dincli command: ```bash -dincli model-owner model submit-genesis +dincli model-owner model submit-genesis-model ``` > make sure that the appropriate test dataset for the model is available at `/tasks/sepolia_op_devnet//dataset/test/test_dataset.pt` before running the above command. The test dataset will be used to evaluate the genesis model and calculate the score. This score will set the threshold range for the final eligibility of local models. @@ -192,18 +192,18 @@ dincli model-owner model submit-genesis ## 8. Register Model - Model Owner -Model Owner updates the manisfest file at`/tasks/sepolia_op_devnet//manifest.json`, specially the `Genesis_Model_CID`, `DINTaskCoordinator_Contract`, and `DINTaskAuditor_Contract` fields with the IPFS CID of the genesis model, DINTaskCoordinator contract address and DINTaskAuditor contract address respectively. +Model Owner updates the manifest file at `/tasks/sepolia_op_devnet//manifest.json`, specially the `Genesis_Model_CID`, `DINTaskCoordinator_Contract`, and `DINTaskAuditor_Contract` fields with the IPFS CID of the genesis model, DINTaskCoordinator contract address and DINTaskAuditor contract address respectively. -Model Owner then register the model with the DIN Protocolat DINModelRegistry contract using the following dincli command: +Model Owner then registers the model with the DIN Protocol at the DINModelRegistry contract using the following dincli command: ```bash -dincli task model-owner register --isOpenSource [true/false] +dincli task model-owner register-request [--isOpenSource] ``` Once the model is registered, the model is assigned a model ID. The manifest file may be updated with the model id field `Model ID` and uploaded to IPFS again. Other fields in manifest file can also be updated as per requirement. The following dincli command can be used to update the model CID in DINModelRegistry contract: ```bash -dincli task model-owner update-manifest [--modelCID ] [--manifestpath ] +dincli task model-owner update-manifest-request [--manifestCID ] [--manifestpath ] ``` ## 9. Start Global Iteration (GI) - Model Owner