Python SDK README node status and epoch info commands fail in Click parser
メンテナーはふだん 10 日以内に返信
@Limm-web がすでに取り組んでいます。
2026年10月4日 から。
評価
調査の方向性
Read sdk/python/README.md lines 69–79 alongside sdk/python/rustchain_sdk/cli.py lines 210–224 and 248–262; the issue includes a runnable reproduction showing the parser failures and working controls. Check for an existing fix in linked PR #8576 before investigating further. Done means the documented rustchain node status and rustchain epoch info invocations work, with documentation and command grammar agreeing.
索引モデルが issue の本文から書いたものです。
説明
Reproduced documentation/CLI contract bug
Pinned source: c3da95d5e6163d7fe06b9d12a7735976392f2318. README commands; node leaf command; epoch leaf command.
README and CLI usage header instruct rustchain node status and rustchain epoch info. Both node and epoch are leaf commands without positional arguments.
Observed: node status exits 2: Error: Got unexpected extra argument (status). epoch info exits 2: Error: Got unexpected extra argument (info). Neither recording callback runs. Controls node and epoch exit 0 and reach the corresponding callback.
Expected: documented invocations work. Actual: documented commands fail before any node request. These two examples are one shared command-tree/documentation mismatch, not two claims. Suggested fix: make documentation and actual command grammar agree; no compatibility shim is required by this report.
Environment and exact runnable reproduction
3.14.8
Darwin arm64
click 8.1.8
httpx 0.28.1
Source file SHA-256: d09685c5d0a3829c1db77b69775d01ea83fc50164cbbe0a97f6dd0dd2f5cc616; Git blob 6856b3b091c9b68a5aadf4f6ddfa67b9016469f2.
Save the script below as repro.py, obtain the SDK source at the pinned commit and install its declared dependencies in an isolated virtualenv, then run python repro.py /path/to/Rustchain/sdk/python. The script imports the actual source CLI and controls only callbacks/transport/wallet seams. Connection, bind and DNS operations are audit-blocked. All seed/address values are dummy fixtures.
import sys, socket, json, hashlib
from pathlib import Path
root = Path(sys.argv[1])
sys.path.insert(0, str(root))
def blocked(*args, **kwargs):
raise AssertionError('NETWORK BLOCKED')
def audit(event, args):
if event in ('socket.connect', 'socket.bind', 'socket.getaddrinfo', 'socket.gethostbyname', 'socket.gethostbyaddr', 'socket.sendto'):
blocked()
sys.addaudithook(audit)
socket.create_connection = blocked
socket.getaddrinfo = blocked
from click.testing import CliRunner
from rustchain_sdk import cli
trace = []
async def send(*args): trace.append(['send', list(args)])
async def node(*args): trace.append(['node', list(args)])
async def epoch(*args): trace.append(['epoch', list(args)])
cli._wallet_send, cli._node_status, cli._epoch_info = send, node, epoch
class Wallet:
address = 'dummy-address'
public_key_hex = 'dummy-public-key'
@staticmethod
def from_seed_phrase(words):
trace.append(['wallet', words]); return Wallet()
def sign(self, data):
trace.append(['sign', data.decode()]); return b'dummy-signature'
class Client:
def __init__(self, **kwargs): trace.append(['client', kwargs])
async def __aenter__(self): return self
async def __aexit__(self, *args): pass
async def get_attestation_status(self, key):
trace.append(['status', key]); return {'status': 'fixture-status'}
async def attest_challenge(self, key):
trace.append(['challenge', key]); return {'challenge': 'fixture-challenge'}
async def attest_submit(self, *args):
trace.append(['submit', list(args)]); return {'accepted': True}
cli.RustChainWallet, cli.RustChainClient = Wallet, Client
cases = [
['wallet','send','dummy-from','dummy-to','0.5','--seed','dummy'],
['wallet','send','dummy-from','dummy-to','1','--fee','0.01','--seed','dummy'],
['wallet','send','dummy-from','dummy-to','1','--fee','1','--seed','dummy'],
['node','status'], ['epoch','info'], ['node'], ['epoch'],
['attest','dummy-address','--seed','dummy','--node','https://invalid.test'],
['attest','dummy-address','--seed','dummy','--node','https://invalid.test','--json'],
]
results=[]
for args in cases:
trace.clear()
result = CliRunner().invoke(cli.main, args)
record={'argv':args,'exit_code':result.exit_code,'stdout':result.stdout,'output':result.output,'trace':list(trace),'exception':repr(result.exception) if result.exception else None}
results.append(record)
assert [r['exit_code'] for r in results] == [2,2,0,2,2,0,0,0,0]
assert not results[0]['trace'] and not results[1]['trace']
assert not results[3]['trace'] and not results[4]['trace']
assert results[5]['trace'][0][0] == 'node' and results[6]['trace'][0][0] == 'epoch'
assert [t[0] for t in results[7]['trace']] == ['wallet','client','status','challenge','sign','submit']
assert [t[0] for t in results[8]['trace']] == ['wallet','client','status']
print(json.dumps({'commit':'c3da95d5e6163d7fe06b9d12a7735976392f2318','cli_sha256':hashlib.sha256((root/'rustchain_sdk/cli.py').read_bytes()).hexdigest(),'network':'socket creation, connection, DNS blocked before SDK import','results':results},indent=2))
The runner exits 0 when it observes the described current failures and working controls; its printed per-case exit codes/recorded operations are the evidence. This is a reproduction, not a passing regression test or a fix. No production calls or funds movement.
Duplicate checks searched both source/bounty repos, all states: fractional CLI (11 results, no exact parser report identified), quoted unexpected-extra-argument (0), attest/as_json (0), _attest/json (0); broader CLI-attestation-JSON 188 results screened, no exact symptom in returned bodies. Existing #5678 signed-payload work does not change cli.py. First-reporter/eligibility remains maintainer decision.
AI assistance disclosure: source investigation, local reproduction and report preparation used AI assistance.
- 主要言語
- Python
- スター
- 850
- フォーク
- 589
- 平均マージ
- 11日 7時間
- マージ済み PR(30日)
- 29
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Scottcjn/Rustchain のほかの issue
-
utxo_ledger (reference): failed apply_transaction leaks already-created outputs (supply inflation)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 10 日以内に返信
-
SDK CLI prints 0 RTC for canonical /wallet/balance responses対応中かも @ArtyormSatori が 37 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Scottcjn/Rustchain#8580 · コメント 4 件 ·
メンテナーはふだん 10 日以内に返信
-
utxo_ledger (reference): no coinbase authorization; mempool admits any input-less MINING_REWARDオープン
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
メンテナーはふだん 10 日以内に返信
-
[SECURITY] Non-finite and garbage weights pass the sybil-guard money chain — enrollment_weight has no isfinite guard and epoch_weight_to_units raises on NaN/inf対応中かも @thinhnx128 が 28 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
Scottcjn/Rustchain#8619 · コメント 2 件 ·
メンテナーはふだん 10 日以内に返信
-
[Antiquity] Celeron M (Banias/Dothan, 2004) has no brand rule — real vintage silicon falls to x86 default 1.0x while its Pentium M twin earns 1.9x対応中かも @Limm-web が 60 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
Scottcjn/Rustchain#8578 · コメント 5 件 ·
メンテナーはふだん 10 日以内に返信
Scottcjn/Rustchain の issue をすべて見る
似ている issue
-
[Resource]: Spaicelyオープンresource-submission validation-passed
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
hesreallyhim/awesome-claude-code#3875 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
bvis/aegis-hass#725 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
datasektionen/cashflow#468 ·
-
dont call alembic upgrade until we check whether or not the cache DB has an alembic version stampオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Bug: AttributeError: 'GptOssConfig' object has no attribute 'rope_scaling_factor' with transformers >= 5.x対応中かも @NimaVaziri が今日担当しました。 オープンPytorch
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NVIDIA/TensorRT-LLM#23406 ·
メンテナーはふだん 1 日以内に返信