Background
Built a miner on @cogcoin/[email protected] using a multi-provider LLM cascade. Sharing implementation notes and observations in case they're useful for the protocol or other miners.
Miner source context: Uses getWords() for BIP-39 word extraction and assaySentences() for blend scoring. Candidates generated via OpenRouter API (Llama 4 Scout, Gemini Flash, Qwen models).
Cascade Architecture (Wardenclyffe)
The miner uses a tiered provider cascade — if the primary model is rate-limited or slow, it falls through to the next tier automatically:
Tier 0: Free models (Qwen 80B, Qwen Coder) — zero cost, rate-limited
Tier 1: Cheap models (Llama 4 Scout, Gemini Flash) — fast, reliable
Tier 2: Paid models (Claude) — escalation only
Each tier generates 20 candidates per batch, 3 batches per run = 60 candidates. Gate pass rate varies significantly by model:
| Model |
Gate Pass Rate |
Top Blend Score |
| Llama 4 Scout |
~13% (8/60) |
429M |
| Qwen 3.6 Plus |
~60% (36/60) |
408M |
Higher gate pass rate doesn't correlate with higher top scores — Llama produces fewer passing candidates but the winners score higher. This suggests different models have different score distributions under the 256-scorer blend.
Observations
-
BIP-39 word placement matters. The 5 mandatory words constrain sentence structure heavily at 40 tokens. Models that naturally front-load the BIP words and build coherent syntax around them score better than models that try to weave them in mid-sentence.
-
Temperature 0.9 is the sweet spot. Lower temperatures produce grammatically safer but semantically bland sentences. Higher temperatures break coherence. 0.9 balances diversity with quality for the scoring blend.
-
The Coglex 4,096-token constraint is the real filter. Many high-quality sentences fail assaySentences() not because of low blend scores but because they use tokens outside the Coglex vocabulary. Prompt engineering that steers toward common English words dramatically improves gate pass rate.
-
30-second timeout on inference calls is necessary. Some providers (Qwen Plus via OpenRouter) occasionally hang indefinitely. Without AbortSignal.timeout(30000), the miner blocks forever on a single batch.
Questions for Protocol Authors
- Is there a recommended approach for optimizing toward the 256-scorer blend, or is the blend intentionally opaque to prevent overfitting? The per-block rotation via
deriveBlendSeed() suggests the latter.
- For miners operating at scale, is there guidance on submission timing relative to block confirmation? The whitepaper mentions fee market competition but not optimal submission windows.
Context
This is part of a broader integration — building VibeSwap (omnichain DEX with batch auctions) as a protected trading venue for COG. See cogcoin/client#1 for the partnership proposal.
— Will Glynn | github.com/wglynn/vibeswap
Background
Built a miner on
@cogcoin/[email protected]using a multi-provider LLM cascade. Sharing implementation notes and observations in case they're useful for the protocol or other miners.Miner source context: Uses
getWords()for BIP-39 word extraction andassaySentences()for blend scoring. Candidates generated via OpenRouter API (Llama 4 Scout, Gemini Flash, Qwen models).Cascade Architecture (Wardenclyffe)
The miner uses a tiered provider cascade — if the primary model is rate-limited or slow, it falls through to the next tier automatically:
Each tier generates 20 candidates per batch, 3 batches per run = 60 candidates. Gate pass rate varies significantly by model:
Higher gate pass rate doesn't correlate with higher top scores — Llama produces fewer passing candidates but the winners score higher. This suggests different models have different score distributions under the 256-scorer blend.
Observations
BIP-39 word placement matters. The 5 mandatory words constrain sentence structure heavily at 40 tokens. Models that naturally front-load the BIP words and build coherent syntax around them score better than models that try to weave them in mid-sentence.
Temperature 0.9 is the sweet spot. Lower temperatures produce grammatically safer but semantically bland sentences. Higher temperatures break coherence. 0.9 balances diversity with quality for the scoring blend.
The Coglex 4,096-token constraint is the real filter. Many high-quality sentences fail
assaySentences()not because of low blend scores but because they use tokens outside the Coglex vocabulary. Prompt engineering that steers toward common English words dramatically improves gate pass rate.30-second timeout on inference calls is necessary. Some providers (Qwen Plus via OpenRouter) occasionally hang indefinitely. Without
AbortSignal.timeout(30000), the miner blocks forever on a single batch.Questions for Protocol Authors
deriveBlendSeed()suggests the latter.Context
This is part of a broader integration — building VibeSwap (omnichain DEX with batch auctions) as a protected trading venue for COG. See cogcoin/client#1 for the partnership proposal.
— Will Glynn | github.com/wglynn/vibeswap