# Miner guide How to get one Lean proof submitted, verified, and paid. A submission is only created once the transfer is confirmed on finalized chain state, so a failed request costs nothing but a refused one costs the transfer. **Check locally before you pay.** --- ## Start here: the CLI [`conjectures-miner`](https://github.com/conjectures-io/conjectures-miner) does everything on this page, and is the supported way to mine. ```bash git clone https://github.com/conjectures-io/conjectures-miner && cd conjectures-miner ./install.sh conjectures config set wallet_name my-wallet # names only -- no key material, ever ``` Then the whole flow: ```bash conjectures tasks sync # cache the task list conjectures tasks challenge erdos1094 # what you have to prove # ... write Main.lean ... conjectures build --proof Main.lean --task erdos1094 # seals submission.zip conjectures verify # is the proof correct? conjectures check # is the envelope acceptable? conjectures pay # 0.5 TAO, coldkey -> treasury conjectures logs upload chat-log-package.zip # the AI chat logs behind the proof conjectures submit conjectures submissions show --watch ``` **Every open problem requires the AI chat logs that produced the proof**, uploaded before the proof is submitted and accepted by a reviewer ([submission terms v13](policies/submission-terms-v13.md), [chat-log terms](trajectories/chat-log-terms-v6.md)). Logs belong to the account your coldkey is linked to: run `conjectures auth register` once and `conjectures auth login`, then `logs upload`. A coldkey-signed submission finds the logs through that link; without them it is refused before the payment is spent, so upload and submit again with the same payment. Package the logs as [the agent instructions](trajectories/agent-instructions.md) describe. If a reviewer finds the logs incomplete they may ask for more rather than reject them. Upload a new version with no deadline using `conjectures logs upload --submission ` (or on the submission's page at the website), up to three versions in all. Each version must still be the original chats and show the proof before it was submitted. `check` never reads the proof: it is the zip, the manifest and a static policy scan. Whether the **proof** is correct is a different question, and only the verifier answers it — `verify` builds this repository's verifier on your machine and runs it over the sealed `submission.zip`: ```bash conjectures verify --setup # once: ~20 GB, 30-60 minutes conjectures verify # exit 0 correct, 1 rejected ``` Linux only (WSL2 on Windows). It runs the development sandbox rather than the isolation a validator applies to a proof it did not write, so it answers whether the proof is correct — not whether the submission will be accepted. **The rest of this page is the same flow by hand**, for anyone not installing the CLI. It needs a checkout of this repository and a Bittensor wallet. --- ## 0. Before you start You need a Bittensor wallet whose **coldkey pays and signs**. There is no hotkey in this flow any more: the validator requires the coldkey that sent the payment to be the coldkey that signs the request, which it checks as a plain equality rather than by asking the chain who owns what. That means signing prompts for your coldkey passphrase, where a hotkey signature did not. It is a deliberate trade — the key that authorises a submission is the key that paid for it — and nothing in this flow ever puts the coldkey on a mining machine permanently: `conjectures auth login` asks for one signature and then holds only a scoped token. Install the client dependencies: ```bash pip install -e '.[service,subnet]' ``` Set the endpoint once: ```bash export CONJECTURES_API=https:// ``` --- ## 1. Pick a task ```bash curl -s "$CONJECTURES_API/v1/tasks" | python3 -m json.tool ``` ```json { "repository_commit": "379fc0298dc146df549e7061c3ede0353a5bb51f", "bundle_format": "conjectures-submission/v1", "max_bundle_bytes": 33554432, "submission_price_rao": 500000000, "payment_recipient": "5C4h…", "tasks": [ { "task_id": "fc-379fc029-erdos1094-erdos-1094-1ec3e802ca-formalized-v1", "task_bundle_sha256": "sha256:74937b…", "target_type_sha256s": ["sha256:304f28…"] } ] } ``` Keep the `task_id` and its `task_bundle_sha256`: both go into your submission, and the validator refuses anything that does not match the published commitment. The task itself is in the separately checked-out `conjectures-tasks` repository, at `../conjectures-tasks/versions//`. The directory name is the opaque `task_id` from its `manifest.json`; use that ID in the protocol. `Challenge.lean` is the statement you must prove; `SolutionHeader.lean.txt` and `SolutionFooter.lean.txt` are what your file gets wrapped in. ## 2. Write your proof One file, `Main.lean`, UTF-8, within the task's published `max_submission_bytes`, up to 30 MiB (31,457,280 bytes) and 5,000,000 lexical tokens. It is inserted between the trusted header and footer, so write only the declarations you need — no `import` lines. ```lean theorem target : type_of% Erdos1094.erdos_1094 := by ... ``` These are all rejected: `sorry`, `admit`, `axiom`, `import`, `set_option`, `native_decide`, `macro`/`syntax`/`notation`, `instance`, attributes, and any reference to the source theorem itself. The full list is in [README.md](../README.md#submission-policy-and-verification-stages). ## 3. Check it locally — do this before paying ```bash python3 scripts/build_submission_bundle.py \ --proof Main.lean \ --task-id \ --task-sha256 \ --coldkey \ --output submission.zip python3 -m verifier bundle scan --bundle submission.zip ``` `"admitted": true` means the archive and the static Lean policy both pass. Anything else prints a `reason_code` and costs you nothing to fix. The builder also prints the `proof_sha256` you will need next. This is deliberately only a fast guardrail check; it does not compile the proof. Now run the real verifier locally — the same check the validator runs. It unpacks the proof in memory and sends it through the same task reconstruction, Comparator, statement, axiom, and Lean kernel checks. This needs a built checkout — `scripts/bootstrap.sh --miner`, about an hour — which is what `conjectures verify --setup` does for you: ```bash python3 -m verifier bundle verify \ --task ../conjectures-tasks/versions/ \ --bundle submission.zip ``` Do not pay unless this reports `"accepted": true` and `"lean_kernel_passed": true`. On a local machine without the production Linux sandbox, add `--allow-insecure-development`; without it the verifier refuses to start on any host below Landlock ABI 4, which is most of them. The flag changes only local process isolation, not the verdict — the full Lean/Comparator proof checks still run, the report names which sandbox ran, and the validator always verifies again in its hardened environment. To check a loose `Main.lean` instead of a packaged bundle, `python3 -m verifier verify` takes `--submission` and `--expected-task-sha256` in place of `--bundle`. ## 4. Pay Transfer exactly **0.5 TAO** (`500000000` rao) from your coldkey to the `payment_recipient` from step 1. Wait for the block to finalize, then keep the **extrinsic reference** — you cannot submit without it, and it can fund only one submission ever. Payment buys one verification attempt. It does not change Lean's verdict and does not guarantee a reward. The catalog bounty is live before submission; acceptance fixes a fresh quote for your attempt (`locked: true`). That amount is conditional on verification, review, and winning the reward target—an earlier successful proof can still solve the target while yours is queued. Submissions accepted before the V012 activation remain under their original payout-time policy. ## 5. Submit ```bash python3 scripts/submit_proof.py \ --api "$CONJECTURES_API" \ --bundle submission.zip \ --task ../conjectures-tasks/versions/ \ --task-id \ --task-sha256 \ --payment-ref \ --credit-name "Your Name or Team" \ --credit-url "https://example.org/your-profile" \ --credit-orcid "0000-0002-1825-0097" \ --wallet ``` On success you get `201` and a `submission_id`. Save it. The three `--credit-*` flags are optional; URL and ORCID require a name. If supplied, the exact credit is covered by your signature and published beside the solver identity after Lean verification. It is a permanent snapshot for this submission, not your account display name. Omit all three and the result is credited to your account display name if you have set one, and to your coldkey otherwise. Before opening the network request, the script requires `--task` and repeats the full local verification against the bundle bytes it will send. A rejection is printed locally and nothing is submitted. `--skip-local-verification` is available for exceptional setups, but removes that protection. If your machine needs the development sandbox shim, pass `--allow-insecure-local-verification`. The script then signs the canonical request digest with your coldkey. If you'd rather build the request yourself, the headers and the exact digest construction are in [API.md](API.md#authentication). ## 6. Watch it ```bash python3 scripts/submit_proof.py --api "$CONJECTURES_API" \ --status --wallet ``` Three statuses move independently — none of them implies another: | Field | Values | Meaning | | --- | --- | --- | | `verification_status` | `UNVERIFIED` → `VERIFIED` / `REJECTED` | What Lean decided | | `manual_review_status` | `UNREVIEWED` → `APPROVED` / `REJECTED` | Reward-policy review, if enabled | | `reward_status` | `INELIGIBLE` → `ELIGIBLE` → `REWARDED` / `FAILED` | Payout | Once `verification_status` leaves `UNVERIFIED` the immutable verifier report is available: ```bash curl -s ... "$CONJECTURES_API/v1/submissions//report" ``` A rejection tells you which gate failed — `LEAN_KERNEL_REJECTED`, `STATEMENT_MISMATCH`, `UNPERMITTED_AXIOM`, `TIMEOUT`, and so on. `REJECTED` is terminal. Manual review can never turn a Lean-invalid proof into a valid one. --- ## Rules that will bite you - **One proof, once.** Proof bytes are globally unique. Resubmitting the same file, even under a new payment, is `409 DUPLICATE_PROOF`. - **One payment, one submission.** Reusing an extrinsic reference is `409 DUPLICATE_PAYMENT`. - **Retries are safe, but only with the same idempotency key.** Same key and same request returns your original submission with `200`. A different request under a used key is `409`. - **Your coldkey must appear in the bundle manifest**, as `miner_coldkey`, and must match the one that signs. The manifest is `schema_version: 2`; a bundle built by older tooling names `miner_hotkey` and is refused on the version rather than on the field. - **The archive shape is exact**: two entries, `submission.json` then `Main.lean`, nothing else. Use the builder and this is automatic. ## When something is refused | `reason_code` | What to do | | --- | --- | | `PAYMENT_NOT_FINALIZED` | Wait for finality, or check the recipient, the amount, and that the coldkey signing is the one that sent the transfer | | `SIGNATURE_INVALID` | Sign the request digest, not the bundle; check the coldkey matches | | `TASK_NOT_ALLOWED` | Re-read `/v1/tasks`; the pool changes between releases | | `DUPLICATE_PROOF` / `DUPLICATE_PAYMENT` | Already used; nothing to retry | | `IDEMPOTENCY_CONFLICT` | Use a fresh UUID for a genuinely new submission | | `BUNDLE_*` | Rebuild with the builder and re-run `bundle scan` | | `SUBMISSION_POLICY_VIOLATION` | Your Lean file uses something prohibited; the detail names it | Every refusal is recorded on the validator side with its reason code and your payment reference, so a paid-and-refused request can be looked up in support. ## More detail - [SUBMISSION_BUNDLE.md](SUBMISSION_BUNDLE.md) — the exact bundle format and every admission rule - [API.md](API.md) — endpoints, headers, the signature scheme, status codes - [../SECURITY.md](../SECURITY.md) — what acceptance does and does not mean - [SUBNET.md](SUBNET.md) — the whole validator contract