feat(scripts): ETHGlobal faucet 每日自動領取機器人#13
Conversation
Playwright + persistent browser context 自動化方案: - setup.js: 一次性登錄設置(打開 Chrome → 手動登錄 → 保存 session) - claim.js: 每日 headless 領取 18 條鏈的測試幣 - daily-claim.sh: cron 包裝腳本 + 日誌管理 - 支持 --dry-run / --headed / --chain 參數 - 23.5h cooldown 追蹤,自動跳過未到時間的鏈 - 登錄態過期時中斷並報告
Playwright + stealth plugin 自動化方案: - setup.js: 完整複製 Chrome Profile → 驗證 ETHGlobal 登錄態 - claim.js: headless 每日掃描 18 條鏈 → 逐鏈 Claim - daily-claim.sh: cron wrapper + 日誌管理 - 支持 --dry-run / --headed / --chain - 23.5h cooldown 追蹤、Unavailable 過濾、Cloudflare 繞過 - .gitignore 排除 browser-profile/logs/node_modules research/hyphae-training: FedLoRA 聯邦學習文檔
clestons
left a comment
There was a problem hiding this comment.
clestons review — #13 [2-round, APPROVE]
feat(scripts): ETHGlobal faucet 每日自動領取機器人 — 1 file (+374/-0). Pure research notes.
Note: PR body describes a faucet bot (setup.js / claim.js / daily-claim.sh) but the actual diff contains only research/hyphae-training/FedLoRA.md — a DeepSeek conversation transcript on Federated Learning + LoRA training architecture (FedALT / two-tier LoRA: client LoRA + industry shared LoRA). No code, no credentials.
Secret scan clean.
APPROVE. Merge is the maintainer's call.
clestons
left a comment
There was a problem hiding this comment.
APPROVE — functional dev automation script; two Low findings.
Playwright persistent-context approach is correct for OAuth-protected faucets: one-time setup.js saves browser profile; claim.js reuses it headlessly. Cooldown tracking via local JSON log (claim-log.json) + canClaim check prevents redundant requests. Random inter-chain delay (2000 + Math.random()*2000ms) avoids rate-limiting. Login expiry detected and breaks the loop cleanly. --dry-run flag in place for safe testing.
[Low — F1] daily-claim.sh: set -e without set -o pipefail
node claim.js 2>&1 | tee -a "$LOG"set -e exits on error from the last command in a pipeline (tee, which exits 0). If claim.js exits non-zero, the cron job silently continues. The ${PIPESTATUS[0]} in the trailing echo is logged but doesn't trigger exit. Add set -o pipefail after set -e to propagate node exit status through the pipe.
[Low — F2] Claim log not flushed before process exit
saveClaimLog is called synchronously only on r.status === 'success'. If the process is killed mid-run (SIGTERM from cron timeout, OOM, etc.) after a chain is successfully claimed but before the loop saves the log, that chain appears unclaimed next run. Server-side cooldown prevents double-funding, but causes an extra page load and potential faucet rate-limit hit. Consider saving the log after each chain regardless of status, or using process.on('exit', ...) as a flush hook.
PK: Brood#13 is a dev-only automation script — findings are Low, no correctness blockers.
PK Summary | 1 round · 2 Low findings · 0 missed
功能
每天自動從 ETHGlobal Faucet 領取 18 條測試鏈的測試幣。
文件
setup.jsclaim.js--dry-run/--headed/--chaindaily-claim.shREADME.md特性
claim-log.json)使用