Filter
Exclude
Time range
-
Near
【CAW Protocol コードベース深掘り day2】 昨日のstore/・hooks/に続いて、今日はapi/routes/・utils/・tools/を全制覇。読めば読むほど設計の緻密さに驚かされる🧵 🔐 セキュリティ監査の痕跡 2026年5月の大規模監査(Round 5〜7)の修正が随所に見える。 印象的だったのがtxQueueFailure.ts。TxQueue失敗時に楽観的に書いたDBレコード(Like/Follow/Vote/Pin等)を全てロールバックする処理がここに集中管理されている。以前はロールバックが分散していてバグが多発していたらしく、「直接status: 'failed'を書くのは禁止、必ずここを通せ」とコメントに明記されてた。 もう一個面白かったのがOTHERアクション(actionType=7)のロールバック。以前はdata.text.startsWith('tip:')で判定していたが、textはsmltxt圧縮済みのhexなので永遠にマッチしない→pendingなTipやVoteが幽霊として残り続けるバグがあった。decompressしてから判定に修正済み。 ⚡ RPC管理が職人芸 rpcProvider.tsが特に面白かった。全RPCコールの唯一の入口として、スロットリング・レート制限バックオフ・サーキットブレーカーを一元管理してる。 スロットルの実装が特に巧み。以前は並列コーラーが全員lastCallAtを同時に読んで一斉送信→429祭りだった。今はnextSlotAtを原子的に進めることで「各コーラーがスロットを予約してキューに並ぶ」設計に。 サーキットブレーカーのコメントが面白くて「Infuraはリトライストームを検知するとkey単位の執行に昇格する。大人しくしてた方が早く回復する」と書いてあったw 🗳️ ポールマーカーが凝ってる 投票機能の::poll:opt1:opt2::pd:7d::pm::形式のインラインマーカーが思ったより複雑だった。 オプション本体 → 画像サイドカー(::pi:) → 投票期限(::pd:) → 複数選択フラグ(::pm::) が全部inline textに埋め込まれていて、フロントエンド・バックエンド・インデクサーが同一パーサーを共有。on-chainテキストからオフチェーンで再現できる設計。 日本語キーボード対策で全角シジル#$@も対応してたのは細かい🙏 🔏 DM暗号化の全体像が見えた DmCryptoServiceとセッションキー暗号化を合わせると、暗号化レイヤーが4段あることが分かった。 DM本文/添付/送信者署名/QuickSign鍵保護 それぞれ違うアルゴリズムと鍵導出を使ってる。secp256k1 AES-256-GCM keccak256 PBKDF2の組み合わせ。テストネットとは思えない本気度。 明日はコードベース全体のまとめを投稿予定。 #CAW #Web3 #Validator #コードリーディング @caw_dev #THE_CROW_WILL_FLY #CAW #Gilgamesh #testnet #CawProtocol #TehFuturelsHere #IAmRyoshi #DecentralizedFreedom #Web3 #Validator #SourceCode 📷 📷👀
3
11
63
3,102
今日のコードリーディング内容をまとめたポストですね。長めでいきます👇 【CAW Protocol バリデーターノード運営記 #深掘り編】 今日はCAWコードベースの続きを読み込んだ。store/とhooks/を中心に約30ファイル以上を解析。気づいたことをまとめてみる🧵 📦 Zustandストア層 フロントエンドのstate管理は全部Zustandで統一されてる。localStorageに永続化されるストアが12種類あって、V2アップグレード後は caw-token-data を筆頭にいくつか手動削除が必要になる見込み。 特に面白かったのが balanceChangeStore。複数の残高変化を個別トーストで積み上げるんじゃなく、期限内ウィンドウの合計を1数値で表示する設計。スパムLIKEが来ても画面が荒れない。 instanceStore は3段階のフォールバック構成: localStorage(即時表示用) /api/instances(通常パス) L1チェーンスキャン(全ノード落ちてても動く) 分散設計へのこだわりが随所に見える。 🪝 Hooks層 useTxQueueMonitor が一番複雑だった。2秒ごとにTxQueueをポーリングして、失敗時の自動リトライまで実装されてる。 特筆すべきは「Cawonce already used」エラーへの対処。リトライ前に /api/txqueue/check-landed で「実は既にオンチェーンに乗ってたか」を確認してから新しいcawonoceで再署名・再送信。二重投稿防止まで考慮した設計になってる。 useHostVerification も面白い。フィードの投稿を約5%サンプリングしてEIP-712署名をオンチェーン検証、不正ノードを自動ブラックリスト化して別インスタンスに切り替える仕組み。分散SNSとしての信頼性担保をクライアント側で実現してる。 🔐 DMシステム E2E暗号化はECDHベース。ウォレット署名から決定論的に秘密鍵を導出して、相手の公開鍵とのECDH共有シークレットでAES暗号化。グループDMは送信者ごとに別々のECDH鍵を使って全メンバー分を個別暗号化するfan-out方式。 送信者署名(senderSig)もメッセージに含めることで、クロスインスタンス偽装を防止する仕組みも入ってた(2026-05 Audit fix)。 コードを全部読むと「なぜそうなってるか」がわかって面白い。V2が来たら今日の知識がそのまま活きるはず。 #CAW #Web3 #Validator #コードリーディング 🐦‍⬛📷 @caw_dev #THE_CROW_WILL_FLY #CAW #Gilgamesh #testnet #CawProtocol #TehFuturelsHere #IAmRyoshi #DecentralizedFreedom #Web3 #Validator #SourceCode 📷 👀
2
16
67
2,222
Replying to @nyaromesam90271
this is useful work, but it still skips the main question. reading ValidatorService and running a node tells us how the current pipeline works. it does not prove the protocol is decentralized or manifesto aligned. if actions are fetched from TxQueue, underpriced actions are separated, validators choose what gets packed, failed actions are marked, replication runs on a loop, and archive misconduct is handled through the same validator and monitoring assumptions, then the real questions are obvious. who controls the queue rules. who sets the fee floor. who decides what counts as underpriced. who can run a validator without permission. what happens if validators refuse certain actions. can the full record be rebuilt from public chain data without trusting the app database, api, or one indexer. you have been deep in the code and very supportive of the build, so why not go just as deep into those questions. that is where the decentralization claim lives. not in whether the code is impressive. in whether the system can stand without trusting the people operating it.
1
1
5
486
CAW V2待ちの間、ソースコード深掘りシリーズ最終章です🔥 今回はValidatorService(4,613行)を読み切りました。 バリデーターノードを運営している立場から、内部動作が全部わかって鳥肌でした。 【自分のノードが実際にやっていること】 ① TxQueueから pending なアクションを取得 ② チップが足りないものを underpriced に振り分け ③ safeProcessActions でシミュレーション(eth_call) ④ 成功したアクションだけパックして on-chain 提出 ⑤ ActionsProcessed イベントを確認して done/failed に更新 これが60秒ごとに回っています。 【特に感動した設計】 🔷 二分探索リカバリー バッチがリバートした時、原因アクションを O(log N) で特定。 犯人だけ failed、残りは成功させる。 🔷 インデクサー遅延対応 「Cawonce already used」でも即 failed にしない。 インデクサーの実測スループットで待機時間を動的計算。 オンチェーンのcalldataまで直接スキャンして照合する。 🔷 ノンス競合の直列化 複数サブバッチが同時に nonce を読んで衝突するのを Promiseチェーンで防ぐ。確認待ちは直列化しない絶妙なバランス。 🔷 ZKプルーフの透過的切り替え ZK_PROVER_ENABLED=1 にするだけで Groth16プルーフ経由の提出に自動切替。 SP1ネットワーク対応で本番は5〜10秒に短縮予定。 【3つのループが並走している】 ・pollLoop(60秒)← メインの処理 ・optimisticReplicationLoop(120秒)← Arbitrumへのアーカイブ ・monitorLoop(600秒)← 他バリデーターの不正監視 不正なアーカイブ提出を検知したらスラッシュ(罰則)まで自動でやります。 5日間ノード稼働しながら4,613行読み切った達成感がすごい😂 V2来たら缶詰で対応できる自信があります。 ギルガメッシュ、まだですか👀 #CAW #Web3 #Validator #SourceCode #ZKProof 🐦‍⬛📷 @caw_dev #THE_CROW_WILL_FLY #CAW #Gilgamesh #testnet #CawProtocol #TehFuturelsHere #IAmRyoshi #DecentralizedFreedom
2
15
74
2,221
たまにはノード実践を貼ってみるw あなたのノード実績(5/13〜5/20) 稼働開始: 2026-05-13 12:09〜(約7日間) TxQueue処理実績 status件数done(自分でfinalize)26,436件validated_by_peer(他ノードが先)15,077件failed4,768件retried38件underpriced24件合計46,343件 自分でfinalizeした割合: 約57% 👏 アクションタイプ別 タイプ件数内容120,951件LIKE416,378件FOLLOW37,074件RECAW01,890件CAW(投稿)746件おそらくTIPその他4件 7日間で46,343件処理、うち57%を自力でfinalize。 @caw_dev #THE_CROW_WILL_FLY #CAW #Gilgamesh #testnet #CawProtocol #TehFuturelsHere #IAmRyoshi #DecentralizedFreedom
1
8
33
856
もちろん、管理者権限なし / 複数署名なし は簡単な選択ではありません。 後から直せないなら、mainnet前にかなり慎重に作る必要があります。 だから今Gilgamesh氏が、監査、セキュリティ修正、行動処理、検証者、ノード、TxQueueなどを細かく修正しているのは自然だと思います。 直せるうちに直すという段階です。 #CAW
1
4
115
全体的にポーリング機能の強化(マルチセレクト・通知・キャンセル)、UI/UX改善、安定性・パフォーマンス修正、依存関係・ドキュメント更新が中心です。 V2に向けた着実な進捗が見られます! 主な修正・機能追加 • fix(migration): poll_multi_select のマイグレーションを簡素化(DROP INDEX中心に) • fix(suggestions): ownedToセレクターを安定化 → ホームフィードクラッシュを修正 • feat(polls): 投票変更時に以前のTxQueueをキャンセル • feat(notifications): 投票があったらポール作成者に通知 • ui(dm-inbox): 未読メッセージの名前を太字+下線に強調(タイムスタンプは黄色のまま) • feat(polls): ::pm:: マーカーでマルチセレクト投票をサポート(複数選択可能に) その他の更新 • chore(deps): protobufjs を ^7.5.5 にピン留め • docs: Whitepaper追加 • fix(validator): サブバッチ最終処理時もセッション消費をインクリメント • fix(indexer): HTTP RPCフォールバック対応 • db: ホットフィードクエリ用の複合インデックス追加 • audit(solidity): H-2 ZK mixed-senderガード M-1 アーカイブチャレンジ境界の修正 🐦‍⬛🌹🐦‍⬛🌹🐦‍⬛🌹 @caw_dev #THE_CROW_WILL_FLY #CAW #Gilgamesh #testnet #CawProtocol #TehFuturelsHere #IAmRyoshi #DecentralizedFreedom
1
5
32
721
11. GilgameshCaw/Caw As A Public Software Build The review should not minimize the visible work in GilgameshCaw/Caw. The public GitHub repository exists. It is public. At the time of the review snapshot, it was visible as a fork of MasterSprouts/CawUsernames. It showed a substantial commit history. It contained a README presenting the project as a CAW Protocol and describing it as a trustless and decentralized social clearing house. It provided a one line node installer. It claimed support for EIP-712 signed actions, permissionless validators, Ethereum L1, Base L2, Arbitrum archive chain, and LayerZero based archive replication. It contained documentation links for architecture, data flow, node operation, validator setup, migrations, smart contracts, client replication, backend services, direct messaging, marketplace features, session keys, and a ZK signature only path. It described a service architecture including a frontend, REST API, database, validator service, blockchain event processors, raw event gatherers, raw event providers, direct messaging services, marketplace indexing, chain synchronization, instance registry, scheduled post processing, and view tracking. It described a node installation path that installs or configures Node 22, pm2, nginx, Postgres, Redis, Elasticsearch, certbot, API services, indexers, validator configuration, RPC URLs, optional replication, and TLS. Those facts support one neutral conclusion. GilgameshCaw/Caw is not merely a static webpage or an empty social screen. It appears to be a serious public software build with contracts, backend services, frontend services, indexing infrastructure, validator related components, database dependencies, node installation tooling, multi network assumptions, and user facing social features. That is material. It should be credited accurately. This review does not claim that nothing was built. It does not claim that the repository is empty. It does not claim that the testsite has no usage. It does not claim that node, validator, TxQueue, notification, polling, mobile, multi network, or action processing work is irrelevant. Those are real review subjects. They may represent meaningful engineering progress. The question is whether that engineering progress satisfies the CAW manifesto standard. On the present record, it does not yet close that standard. A serious build is not the same as official authority. A public repository is not the same as cawmmunity acceptance. A node installer is not the same as independent recoverability. A validator service is not the same as censorship resistance. A LayerZero replication design is not the same as finalized cross-chain trust closure. A functioning frontend is not the same as protocol decentralization. A technical launch is not the same as manifesto-aligned acceptance. Therefore, the proper status is balanced. GilgameshCaw/Caw appears to be a serious public build. The final proofs required by the CAW manifesto remain incomplete.
1
2
621
つまりCAWの裏側では、 ユーザー ↓ フロントエンド ↓ 署名済み行動 ↓ TxQueue ↓ バリデータ ↓ チェーン ↓ インデクサ ↓ フロントエンド表示 という流れがあると理解しています。 表ではSNSに見えても、裏側ではかなり複雑なプロトコルとして動こうとしている。 ここがCAWの面白さです。 #CAW
1
1
5
178
最近のGitHub更新では、TxQueueや通知、行動処理の安定化も進んでいます。 たとえば、失敗扱いになった行動がチェーン上で確認された場合に復旧するような処理や、通知をまとめて扱う仕組みなどです。 これは地味ですが、かなり重要です。 SNSとして自然に見える裏側には、こうした整合性の処理があります。 #CAW
1
7
147
TxQueueは、ユーザーの署名済み行動を一時的に並べて処理するための仕組みです。 投稿、いいね、フォローなどの行動が、すぐに全部チェーンへ送られるのではなく、順番に整理され、検証され、まとめて処理される。 この裏側の仕組みがあるから、CAWは普通のSNSに近い操作感を目指せるのだと思います。 #CAW
1
7
141
第19章:インデクサとTxQueueとは何か CAWでは、チェーン上に記録されたデータを、そのまま見ても普通のSNSのようには読めません。 そこで必要になるのが、インデクサです。 インデクサは、チェーン上の記録を読み取り、 投稿一覧 プロフィール 通知 フォロー関係 いいね数 などに整理する仕組みです。 #CAW
1
6
168
最近のGitHub更新でも、バリデータ、TxQueue、通知、polls、モバイルUX、複数Network、action処理の安定化などが進んでいます。 つまりCAWは、単にSNS画面を作っているだけではなく、複数の参加者が関わるネットワークとして動かすための裏側をかなり詰めているように見えます。 #CAW
1
2
13
631
全体的にpre-mainnet安定化とクロスプラットフォーム表示品質向上がメイン。前のセッション/validator関連のchoreも入っているので、以前報告した問題が間接的に改善されている可能性大です。 直近24時間(2026/5/15)のGilgameshCaw/Caw リポジトリ要約(masterブランチ) 活発に更新中 — 多くのコミットが GilgameshCaw claude 共同作成。主にOG画像/共有周りの表示修正とValidator/アクション処理の安定化に注力。 主な変更カテゴリ 1. OG画像 / Prerender / 共有関連(最も多い) • カード幅の調整(CARD_W 970→870など、テキスト溢れ対策) • CJK(日本語・中国語・韓国語)対応の折り返し改善 • Facebook/Messenger対応のcanvas wrap追加(TG/Discordは自然表示のまま) • Prerenderのog:image width/height必須出力、UA別画像サイズ取得、canonical/redirect修正 • Share modalのポータル化などUIスタック問題解消 2. Validator / アクション処理 • chore(validator): 未使用Wallet import削除 • fix(validator): dynamic chainId スキャンウィンドウ制限 selector pin • feat(txqueue): validated_by_peer ステータス追加(peer確認済み区別) • feat(signer): pluggable ValidatorSigner • action-processor関連: FAILED→SUCCESS回復時のカウント修正、deadlock対策、chain confirmation処理 3. その他のfix • 翻訳(poll option) • Profile chooserのpending counterスコープ修正 • iOS reply textareaのズーム防止 • Prisma deps hoist、ドキュメント更新(client→Network用語変更など) 🐦‍⬛🌹🐦‍⬛🌹🐦‍⬛🌹 @caw_dev #THE_CROW_WILL_FLY #CAW #Gilgamesh #testnet #CawProtocol #TehFuturelsHere #IAmRyoshi #DecentralizedFreedom
3
12
48
1,397
ここまでが第4スレッドです。 次は、 ・ノードとは何か ・バリデータ / インデクサ / TxQueue の役割 ・複数フロントエンドと複数クライアント ・CAW上にAIサービスなどが乗る可能性 あたりを整理してみます。 ここからCAWは、さらに「1つのSNS」ではなく「広がる基盤」として見えてきます。 #CAW
1
5
180
本日のガッツリ更新されてます! フィードバックはわたしも相当送りました fix地道にされてますね!🔥 今日(2026/4/29)の主な更新(直近8時間以内、非常に活発) 大量のコミットが一気に投入されています。特にcawonce(nonce管理システム)の大幅リファクタリングと安定化が中心。 • docs(backlog): ProfileChooserに”switch wallet”ボタン追加 • fix(indexer): mintイベントでonboardingStep=0のUser行を作成 • fix(cli): CAW_NETWORK環境変数を正しく扱う • fix(cawonce): サーバーからクライアントへ次の空きスロットを409レスポンスで通知 / 衝突時に最大3回リトライ • refactor(cawonce): CawonceReservationシステムを削除 → Chain-only allocation TxQueue に移行 • feat(cawonce): TxQueueにpartial unique index追加、409衝突時のリトライ対応 • RPC関連の大規模リファクタ(APIからRPCを分離する3-tier計画) • フロントエンドのretry処理強化(202 “still indexing”対応など) • DM・auth・indexer周りのパフォーマンス/安定性改善 • CLI改善(SigNoz自動インストール、env処理、インストールフローなど) 全体の傾向 • 今日だけで20コミット以上と爆速開発中。 • 重点領域:cawonce安定化、RPC/API分離、インストール/CLI体験向上、indexer・mintフロー修正。 • ドキュメント(BACKLOG.md)も並行更新中。 🐦‍⬛🌹🐦‍⬛🌹🐦‍⬛🌹 @caw_dev #THE_CROW_WILL_FLY #CAW #Gilgamesh #testnet #CawProtocol #TehFuturelsHere #IAmRyoshi #DecentralizedFreedom
1
11
47
1,972
GitHub がテストネット後もコミットが爆速です!🔥 内容は盛り沢山!🚀 最も新しい更新(6時間前) • fix(cli): caw update が root(sudo)で実行された時の挙動を修正 • fix(cli): caw update のブートストラップ処理を修正(以前にインストールした人の対応) 7〜9時間前 • feat(minter): mintFor / mintAndAuth 系の新機能追加 • feat(profile): mint-and-auth パスの改善(no deposit対応など) • feat(cli): caw update / migrate / buy 関連の機能強化 • fix(validator): Resilience関連の構造的修正 • security(actions): defense-in-depth強化 • ui(admin): 管理画面のtxQueueテキスト列の調整 • fix(processor): RPCがTransactionに干渉しないよう修正 • docs(backlog): スレッドブレイク関連のドキュメント更新 • ui: QuickSign ProfileChooserの小改善 その他直近(9〜22時間前) • Hashtagの正規化保持 • Infura RPC URLプロンプト改善 • Basic-Authサポート追加 • Sessionキャッシュのセキュリティ強化 • ボタン削除などのUI整理 • 依存関係(yarn.lock)の更新 全体の傾向: 直近はCLIのcaw updateコマンドの安定化とmint関連機能の強化に集中しています。特にcaw updateのroot実行対応やブートストラップ修正が目新しい修正点です。 🐦‍⬛🌹🐦‍⬛🌹🐦‍⬛🌹 @caw_dev #THE_CROW_WILL_FLY #CAW #Gilgamesh #testnet #CawProtocol #TehFuturelsHere #IAmRyoshi #DecentralizedFreedom
20
63
2,577
1 Jul 2025
🛠️ DevLog – Miner & Oracle V3 TX Queue Released TX queue support is now live for: 🔹 Miner Nodes (User Task Mode) - Prevents nonce conflicts under high-throughput inference - Enabled via .env: ENABLE_TX_QUEUE_MODE=1 🔹 Oracle V3 – Session Timer - Fixes reliability issues during high load - Adds queueing for on-chain session timing txs Both updates are released in the latest installer. github.com/cortensor/install… These improvements boost concurrency handling across the stack as we continue stress testing during the hackathon. #Cortensor #DevLog #TXQueue #UserTask #OracleV3 #MinerNode #DePIN #AIInfra
1 Jul 2025
🛠️ DevLog – Miner TX Queue Oracle V3 Fix Incoming We've added TX queue support for Miner Nodes in user task mode to handle high-throughput inference without nonce conflicts. - Enabled via .env: ENABLE_TX_QUEUE_MODE=1 - Now under test to ensure miner-side stability during session task loads 🔍 During stress tests (thanks @Will429910), we found Oracle V3 session timer was failing under heavy load due to similar concurrency issues. Next: Add TX queue logic to Oracle V3 session timer - bringing parity with Router and Miner nodes under pressure. #Cortensor #DevLog #TXQueue #UserTask #MinerNode #OracleV3 #AIInfra #DePIN
5
6
13
376
1 Jul 2025
🛠️ DevLog – Miner TX Queue Oracle V3 Fix Incoming We've added TX queue support for Miner Nodes in user task mode to handle high-throughput inference without nonce conflicts. - Enabled via .env: ENABLE_TX_QUEUE_MODE=1 - Now under test to ensure miner-side stability during session task loads 🔍 During stress tests (thanks @Will429910), we found Oracle V3 session timer was failing under heavy load due to similar concurrency issues. Next: Add TX queue logic to Oracle V3 session timer - bringing parity with Router and Miner nodes under pressure. #Cortensor #DevLog #TXQueue #UserTask #MinerNode #OracleV3 #AIInfra #DePIN
1 Jul 2025
🛠️ DevLog – Upcoming: TX Queue for Miner Nodes Following our recent concurrency fixes, we’re preparing to add a TX queue mode to Miner Nodes as well. 🔹 Why While inference requests are now processed through an internal queue, blockchain transactions (e.g., commits, proofs) can still conflict - especially when triggered in parallel across threads. 🔹 What’s Next We'll introduce a transaction queue similar to the Router Node's implementation to serialize on-chain calls made by miners. This will ensure smoother coordination between: - Inference execution (queued, multi-threaded) - Blockchain events (commit, precommit, etc.) This should reduce TX collisions and edge-case failures under heavy user task load. #Cortensor #DevLog #Concurrency #MinerNode #TXQueue #DePIN #AIInfra
5
8
20
1,153
1 Jul 2025
🛠️ DevLog – Upcoming: TX Queue for Miner Nodes Following our recent concurrency fixes, we’re preparing to add a TX queue mode to Miner Nodes as well. 🔹 Why While inference requests are now processed through an internal queue, blockchain transactions (e.g., commits, proofs) can still conflict - especially when triggered in parallel across threads. 🔹 What’s Next We'll introduce a transaction queue similar to the Router Node's implementation to serialize on-chain calls made by miners. This will ensure smoother coordination between: - Inference execution (queued, multi-threaded) - Blockchain events (commit, precommit, etc.) This should reduce TX collisions and edge-case failures under heavy user task load. #Cortensor #DevLog #Concurrency #MinerNode #TXQueue #DePIN #AIInfra
30 Jun 2025
🛠️ DevLog – Kicking Off Stress Tests for Concurrency Fixes We're now running focused stress tests on three critical updates to validate system behavior under load: 🔹 Router Node – TX Queue Mode - Testing how well the new transaction queue handles rapid-fire client requests without nonce collisions. 🔹 Miner Node – Inference Queue - Validating the internal queue that processes user task requests sequentially to avoid overload. 🔹 Miner Node – Acknowledgment Fix - Ensuring all user tasks are reliably acknowledged when multiple requests arrive in quick succession. These tests will help confirm that recent fixes improve network stability and fairness under real usage conditions. #Cortensor #DevLog #StressTest #Concurrency #RouterNode #MinerNode #DePIN #AIInfra
4
6
16
1,167