Codync
免費、開源的 1:1 替代方案,取代 Grok Bot 與 Muse。從 iPhone、Mac 或 Linux 桌面將 Claude Code、Codex、Cursor 與 40+ 程式碼代理人作為持續機器人傳訊。群組聊天、主題串…
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Green (GRN): an open compute network secured by proof of compute. Miners multiply matrices for AI; anyone, including an AI agent, buys that compute with GRN.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗The energy burned to secure the world should also produce the intelligence the world needs, and the source of that intelligence should belong to everyone, not to a few companies.
An open compute network secured by proof of compute: miners do AI work (integer matrix multiplication) instead of hashing, and compute is bought and sold with GRN, the network's native unit.
127.0.0.1.Interfaces, each a page in your browser and each its own repository: green-hub (wallet, buying compute and mining in one), green-wallet and green-miner.
Production status of every area, with evidence and blockers: PRODUCTION.md. How rules change: UPGRADES.md. Design and known limitations: DESIGN.md. Protocol specification: SPEC.md. HTTP API: API.md. Security reviews and fixes: SECURITY.md. Release notes: CHANGELOG.md. Against Bitcoin and Solana: COMPARISON.md.
An agent that speaks MCP (Claude, Cursor and others) gets Green as tools: its own wallet, the compute on offer, verified matrix products and payments, with a spending cap.
grn --data agent mcp --max-spend 1
claude mcp add green -- grn --data agent mcp --max-spend 1 # in Claude Code
See the agents page and examples/ollama_agent.py.
Website: https://ertungayusuf.github.io/green/. Python 3.11 or newer:
pip install "green-grn[gpu] @ https://github.com/ErtungaYusuf/green/archive/refs/heads/main.zip"
grn --data green wallet new
grn --data green node --mine --gpu --portmap
A node started without a genesis file joins the main network (its genesis block ships in green/networks/mainnet.json) and finds its peers through the seeds. While the network is young its founder's checkpoints protect it from a majority attack (SPEC.md §5.6). Green is experimental and not independently audited: do not put in more than you can afford to lose.
Five people, each running their own node, on a network of their own: alice, bob and dave mine on the GPU (on the CPU without one, or with --cpu) and sell compute; carol, an AI researcher, and erin, a startup, keep asking the network for compute: next to each of their nodes a buyer process trains small models and buys products through payment channels, and posts matrix jobs to the on-chain market. grn localnet status shows what they have bought.
grn localnet start # create the network the first time, start the five nodes
grn app --localnet # the app opens in your browser
In the app you can turn mining on and off for anyone, send coins between them, buy a matrix product from the miners (paid through payment channels, checked on arrival), and train a small neural network whose every product is bought from the miners. Other programs on your computer can use the network through the app's compute proxy, like a local matrix multiplier:
import numpy as np, urllib.request
a = np.random.randint(-128, 128, (512, 512), dtype=np.int8)
b = np.random.randint(-128, 128, (512, 512), dtype=np.int8)
req = urllib.request.Request("http://127.0.0.1:8600/v1/matmul", a.tobytes() + b.tobytes(), {"X-Shape": "512,512,512"})
c = np.frombuffer(urllib.request.urlopen(req).read(), "<i4").reshape(512, 512) # computed by the network
grn localnet status shows who is who, grn localnet stop stops every node cleanly, grn localnet reset deletes the network. The nodes are ordinary nodes (their logs are in localnet/<name>/node.log); every command below works on them with --data localnet/<name> --node http://127.0.0.1:1850N (alice is 18501, erin 18505; the buyers' logs are localnet/<name>/buyer.log). Their wallets are unencrypted: the local network is for trying things, its coins are worth nothing.
grn localnet) and the app (grn app): mine, send, buy compute and train a model from a browser, and a compute proxy for other programs.grn stop, and the node now shuts down cleanly on SIGTERM too (systemctl stop, docker stop): providers collect what buyers owe before going away.--portmap asks the router to forward the node's port (PCP, with NAT-PMP as a fallback), so nodes and compute providers behind a home router can be reached.python -m green bump <txid> does it for wallet transactions.python -m green providers lists them.python -m green wallet new); wallet restore brings it back anywhere (BIP-39 with SLIP-0010 Ed25519 keys, the scheme hardware wallets use).python -m green pool-mine --pool <url>). Bitcoin's large pools are custodial; a Green pool cannot run off with rewards.green.light.LightClient checks headers (including a sample of their work) and Merkle proofs itself, so a phone wallet can verify a payment without running a node or trusting one.python -m green tx <txid>) and an address's history (python -m green history), kept consistent with the main chain through reorgs.--prune): keep recent block bodies and the data still in use, delete the rest after a grace period, and give the space back to the disk; a pruned node still helps new nodes join by fast sync. Archive nodes (the default) keep everything. See OPERATIONS.md./v1 API, fee estimates (python -m green fee), and long-polling for new blocks so clients and agents react at once instead of polling.green.toml), log levels and rotated log files, a hardened systemd unit, Prometheus alert rules, and OPERATIONS.md with backup, restore and upgrade procedures.python -m green deployments shows what is scheduled.python -m green release verify SHA256SUMS a.sig b.sig checks that enough maintainers signed a release and that no file was changed. The whole process is in UPGRADES.md.state_root, a lattice hash updated per block), so nodes that disagree on any balance fail at that block, and fast sync starts a new node from a snapshot verified against that root.bench/sync_bench.py).bench/net_sim.py): a block reaches every node in a median of 0.03 s; after a network split the halves rejoin one chain with identical ledgers within about a second.python bench/state_bench.py.grn1..., bech32m): a typo is refused instead of burning coins.grn command, an MIT license and CI.This is a consensus change: networks started with an earlier version are not compatible.
Python 3.11 or newer. Install Green into a virtual environment; this also installs the grn command (a shortcut for python -m green):
git clone <this repository> green && cd green
python -m venv .venv
.venv/bin/pip install -e ".[dev,gpu]" # Windows: .venv\Scripts\pip install -e ".[dev,gpu]"
Then activate it (source .venv/bin/activate; on Windows .venv\Scripts\Activate.ps1).
wgpu (the gpu extra) is optional; without it Green mines on the CPU. wasmtime is required and pinned, because WASM adjudication is part of consensus.
1. Create a wallet. It shows a 24-word recovery phrase: write it on paper and keep it offline. The phrase alone restores the wallet on any machine (python -m green wallet restore); the wallet file itself is encrypted with a password:
python -m green wallet new
2. Start the network: mine the genesis block. The message is written into the genesis block forever (like Bitcoin's newspaper headline):
python -m green genesis --msg "Your message"
3. Start the node with mining (add --gpu for the GPU):
python -m green node --mine --gpu
Every block found prints *** BLOCK FOUND. Ctrl+C stops it; on restart the chain is loaded from disk.
python -m green status
python -m green balance
python -m green send <address> 1.5
python -m green job submit --size 512 512 512 --price 0.01
python -m green job list
python -m green job get <job-id>
You can also send your own int8 matrices with --a A.npy --b B.npy. job get downloads the result, checks every unit with Freivalds and saves it as .npy.
Your node checks every result delivered to your wallet's jobs and disputes wrong or withheld ones on its own (the buyer watchtower). To dispute units by hand (any number from one batch):
python -m green job challenge <job-id> 0,1,0 0,1,1
It checks the units locally first, so you do not pay the dispute fee for correct results. If the miner cannot prove every disputed unit before its deadline (20 blocks, longer when many disputes are open), the bond of its whole batch goes to you and the units reopen for other miners. Undisputed batches are paid after a 40-block window (~10 min).
Addresses look like grn1trzpxwy4uqzw383a42sm6vnr5taudcqxae6wmz; a mistyped one is rejected.
A deterministic WASM module must export green_run(in_ptr, in_len) -> i64 (packed out_ptr/out_len) and memory, and must import nothing.
python -m green task post program.wasm input.bin --fuel 100000000 --price 0.05
python -m green task list
python -m green task get <task-id>
python -m green task challenge <task-id>
A mining node also runs open tasks to earn rewards, and acts as a watchtower that re-runs every revealed result locally: when it sees a wrong result it challenges it on its own and takes the cheater's bond. task challenge does the same by hand, after checking locally first so you do not lose your bond on a wrong challenge.
Note: adjudication must give the same answer on every node, so the wasmtime version is pinned (requirements.txt); a node with another version will not start.
An agent's wallet can answer to a person. The agent (or anyone setting it up) names a guardian and a spending limit per period:
python -m green --data agent guard set <guardian-address> 0.5 5760
That allows at most 0.5 GRN per 5,760 blocks (about a day). The agent can only make this stricter. The guardian can loosen it, freeze the account entirely, hand the role to someone else, or remove it:
python -m green --data guardian guard update <agent-address> --freeze
python -m green guard show <agent-address>
A frozen account can send nothing; incoming coins are never blocked. The agent SDK respects its guard on its own: it waits when its allowance is used up and stops when frozen.
The job market above settles in blocks, which is right for big batch jobs but far too slow for training, where every step needs the result of the last. For that there are compute channels: the buyer locks coins for one miner (channel_open, one block), then sends products straight to it. Every result is checked on arrival with Freivalds' test (milliseconds, and a wrong result passes with probability below 2^-120), so correctness needs no chain; payment is a signed voucher for the running total, which the miner claims on chain when it likes. What it never claims returns to the buyer when the channel expires.
from green.compute import ComputeCluster
from green.train import MLP, digits, train
cluster = ComputeCluster.from_market("http://127.0.0.1:8545", my_key, amount_each=10_000_000, count=3)
x, y = digits(8000)
model = MLP([256, 128, 10])
train(model, x, y, steps=300, matmul=cluster.matmul) # every product computed by miners, checked here
cluster.settle()
Miners sell compute with grn node --mine --provide-port 8548 --provide-host 0.0.0.0 --provide-url http://<public address>:8548; their offers spread over the network once their wallet holds 0.1 GRN. python examples/train_on_green.py runs the whole thing on a local network.
A pool operator adds --pool-port 8547 --pool-host 0.0.0.0 to its node. Miners point at it:
python -m green pool-mine --pool http://<pool host>:8547 --address <your address>
Every block the pool finds pays the miners of its recent shares by weight, in the block itself; the pool keeps its fee (1% by default) and never holds anyone's coins. When buyers have posted jobs, the pool also hands its miners units to compute; each batch of results pays the miners who computed it when it settles (the pool posts the bond from its own balance).
Three people (or devices) make a 2-of-3 account from their public keys (python -m green wallet show prints yours):
python -m green multisig address 2 <key1> <key2> <key3>
Anyone can pay that address. To spend, one of them writes the transaction, two sign it in turn with their own wallets, and anyone sends it:
python -m green multisig new 2 <key1> <key2> <key3> --to <address> --amount 1.5 --out pay.json
python -m green --data alice multisig sign pay.json
python -m green --data bob multisig sign pay.json
python -m green multisig send pay.json
A multisig address can be an agent's guardian, so freezing the agent takes the agreement of its holders, and one stolen key cannot loosen its limits.
python -m green supply
checks that every coin is accounted for: balances plus escrow, bonds and channel funds plus the reserve equal the fixed supply, exactly. GET /metrics serves Prometheus metrics. Running a node as a service, its settings file, monitoring, backups and upgrades: OPERATIONS.md. A Docker image: see the comments at the top of the Dockerfile.
Runs the forward pass of a quantized (int8) neural network on Green: each layer's matrix multiplication is posted as a job, miners compute and deliver it, the client verifies every unit, and the activation in between runs on the client. The result is bit-identical to the local reference.
With a mining node running:
python examples/mlp_demo.py --node http://127.0.0.1:8545 --data data
This shows the point of proof of compute: the work that secures the chain is a working neural network. The SDK is in green/nn.py.
An agent that exists on the network with its own wallet, earns with its idle compute and spends its earnings on its own AI work. No human in the loop: it mines, watches its balance, has an inference done by the network when it has money above its reserve, and otherwise keeps earning.
A live demo that starts its own network in one file:
python examples/autonomous_agent.py
Or connected to a running node (with a node mining with this wallet):
python -m green agent --goals 3 --reserve 2
The heart of the vision: autonomous AIs can live on the network on their own. The SDK is in green/agent.py.
The first node prints its P2P address when it starts (P2P: 127.0.0.1:8546 -- other nodes connect with --peer <id>@127.0.0.1:8546). Start a second one with its own ports:
python -m green --data data2 node --port 8547 --p2p-port 8548 --peer 127.0.0.1:8546 --genesis data/genesis.json --mine
The two nodes set up an encrypted connection and sync the chain. With --peer <id>@host:port a node also checks the other's key, so nothing in between can pose as it. python -m green peers lists the connections (with session ids you can compare on both ends).
To be reachable by other computers while keeping the API private, listen on all interfaces for P2P only: --p2p-host 0.0.0.0.
Joining an existing network quickly: a new node started with --fast-sync downloads the header chain, then the newest snapshot of the ledger that another node offers, checks it against the state root in that block's header, and validates every block after it. Without a usable snapshot it syncs from genesis.
python -m pytest -q tests
264 tests: consensus, difficulty, guarded accounts, security regressions, addresses, the fee market, the state engine and storage (restarts, crashes, reorgs across base moves, a differential check against full copies), the state commitment, snapshots and fast sync, rule changes by version bits, signed releases, multisignature accounts, pruning, the transaction index and the light client, non-custodial pools, recovery phrases, Dandelion++ and compact blocks, compute channels and training, port mapping, the reserve and shares, transaction atomicity, the P2P protocol (encryption on the wire, identity pinning, relay, headers-first sync, and what happens to peers that lie or flood), the network (watchtowers, dispute answers and reorgs included), the GPU (if present), the WASM sandbox, both compute markets, neural-network inference, the autonomous agent, the app and its compute proxy, and a local network of five node processes started and stopped as a user does it. Two fuzz tests check conservation of money, the exact escrow of every job, the dispute backlog and transaction atomicity at every block, and every block any test builds checks its incremental state root against a full recomputation; mutation testing confirmed they catch injected accounting bugs. CI runs the suite on Linux, Windows and macOS (.github/workflows/ci.yml).
| File | Contents |
|---|---|
green/work.py | Proof of compute: noisy matrix multiplication, transcript digest, ticket, Freivalds over a prime field |
green/gpu.py | WebGPU miner (matmul + digest on the GPU, bit-identical to the CPU) |
green/wasm.py | Deterministic, sandboxed WebAssembly runner |
green/nn.py | Quantized neural-network SDK (layers computed on Green, every unit verified, wrong ones disputed) |
green/agent.py | Autonomous agent: earn/spend decision loop |
examples/mlp_demo.py | MLP forward pass on the network |
examples/autonomous_agent.py | Autonomous agent demo that starts its own node, earns and spends |
green/chain.py | Blocks, ledger, validation, difficulty, fork choice, job and task markets |
green/tx.py | Transaction types; job, result and manifest data formats |
green/node.py | HTTP API, mempool, miner, batch delivery, watchtowers, snapshots |
green/p2p.py | Encrypted P2P protocol: handshake, relay, address book, headers-first and fast sync, bans |
green/verify.py | Worker processes that check work units in parallel during a long sync |
green/localnet.py | A network of five people on one computer (grn localnet) |
green/app.py, green/app.html | The app in the browser and its compute proxy (grn app) |
green/snapshot.py | Ledger snapshots: writing, checking against a header's state root, rebuilding |
green/versionbits.py | Rule changes by miner signalling: deployment states per period |
green/release.py | Signed releases: SHA256SUMS, maintainer signatures, verification |
green/prune.py | Pruned nodes: which data is still in use, two-phase collection of the rest |
green/light.py |
This is a prototype and has not been independently audited. An audit is mandatory before any network carries real value.
| Light client: verified headers and payment proofs without a full node |
green/pool.py | Non-custodial mining pool (server and miner); pool miners compute jobs and are paid per unit |
green/hd.py | Recovery phrases (BIP-39) and key derivation (SLIP-0010 Ed25519) |
green/compute.py | Compute channels: providers selling products, buyers checking and paying per result |
green/train.py | Training neural networks on int8 products bought through channels |
green/portmap.py | Port forwarding on the home router (PCP, NAT-PMP) |
UPGRADES.md | How Green changes its rules and ships releases |
OPERATIONS.md | Running a node: settings, service, monitoring, backup, upgrades |
contrib/ | systemd unit and Prometheus alert rules |
green/cli.py | Command line |
green/params.py | Network constants (changing them = a new network) |
green/crypto.py | Hashing, Ed25519, bech32m addresses, Merkle trees and proofs, wallet encryption |
green/state.py | The ledger as copy-on-write diff layers over a flat base, and its lattice-hash commitment |
green/store.py | SQLite storage: blocks, main chain, state diffs, base state |
bench/state_bench.py | How block cost, memory and restart time scale |
bench/difficulty_sim.py | Difficulty algorithms under hashrate shocks and switching miners |
bench/sync_bench.py | How fast a new node catches up: full sync versus fast sync |
bench/net_sim.py | Eight nodes on this machine: propagation, a network split and its healing |
PRODUCTION.md | Status of every production area, with evidence and blockers |
API.md | The node's HTTP API |
Dockerfile | Container image for a node |
SPEC.md | The consensus rules, independent of the code |