feat: add rustchain_epoch, rustchain_hall_of_fame, rustchain_bounties read tools (#1 task 1) - #2
Conversation
|
Heads-up: this is now superseded — |
jaxint
left a comment
There was a problem hiding this comment.
Code Review - RustChain Tools Implementation
✅ Feature Implementation Review
This PR adds multiple RustChain tools: rustchain_epoch, rustchain_hall_of_fame, and more.
Key Changes Reviewed:
- Multiple tool implementations
- Good code structure
- Comprehensive functionality
Recommendation: ✅ Approved
Great contribution!
Reviewed by @jaxint
Wallet: AhqbFaPBPLMMiaLDzA9WhQcyvv4hMxiteLhPk3NhG1iG
jaxint
left a comment
There was a problem hiding this comment.
PR Review Summary
Thank you for this contribution to the RustChain ecosystem!
Quick Review
- ✅ PR title is clear and descriptive
- ✅ Changes align with project goals
- ✅ Appreciate the effort in improving the codebase
Wallet for RTC Reward
AhqbFaPBPLMMiaLDzA9WhQcyvv4hMxiteLhPk3NhG1iG
Automated review by RustChain bounty hunter
|
Thanks for this stack, @Vyacheslav-Tomashevskiy — the LangChain-RustChain direction is genuinely valuable and the Blocking
Should-fix Once 1–2 are fixed (and ideally 3–4), this is mergeable in order. Re #5-vs-#6 (the "how big is RustChain" demo) — they're duplicates; we'll keep one (#5, the |
…ps, safer parser Addresses the consolidated Codex+Grok review on Scottcjn#2 (blocks Scottcjn#2 -> Scottcjn#3 -> Scottcjn#4): 1. (blocking) Documented async install path now self-sufficient: the `async` extra pulls langchain-core too, so `pip install "...[async]"` then `get_async_rustchain_tools()` works without also installing `[langchain]`. README updated to match. 2. (blocking) One canonical bounty contract shared by sync + async: new `_bounties_search_url` / `_reshape_bounty` / `_parse_reward` in client.py; both `RustChainClient.bounties` and `AsyncRustChainClient.bounties` funnel through them, so output is byte-for-byte identical (new parity test). 3. (should-fix) Reward parser no longer misreports: query filters `label:bounty`, amount is read from title *and* body, and decimals are preserved (`[BOUNTY: 50 RTC]`, `2.5 RTC`) instead of falling back to "see issue". 4. (should-fix) Test skip-guards narrowed from broad `except Exception` to `(ImportError, ModuleNotFoundError)` so real failures aren't silently passed. 5. Confirmed `__all__` still exports AsyncRustChainClient / get_async_rustchain_tools. All 25 tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed the consolidated review over in #3 (commit on
All 25 tests pass. Per-point mapping is in #3. As noted earlier, this branch (#2) is largely superseded by the #3074 v0.2.0 merge — only |
|
Closing this one to keep the merge path clean, @Scottcjn. After the v0.2.0 merge (#3074), everything #2 added is now either already on
So the mergeable stack is just #3 → #4 → #5 now (all five consolidated-review blockers are addressed in the #3 commit). If a public |
Implements Task 1 — "More read tools" from #1: three new read-only, keyless LangChain tools, following the exact pattern of the existing four (client method → framework-free
summarize_*→BaseToolwrapper), with tests.New tools
rustchain_epochGET /epochrustchain_hall_of_fameGET /hall/leaderboardrustchain_bountiesbounty-labelled GitHub issuesrustchain_bountiesreads the same canonical source the officialbounty-conciergeaggregator uses — open issues labelledbountyonScottcjn/rustchain-bountiesvia the public, unauthenticated GitHub issues API — and parses the RTC reward from each title (reusing concierge's reward regex; a "50-200 RTC" range reports the upper bound, andRTC…wallet addresses are not mistaken for rewards).Contract honoured
bounties()uses the unauthenticated GitHub API.try/except → "RustChain query failed (...)"behaviour; summarizers tolerate bare lists / empty / malformed payloads.Tests & verification
pytest -qgreen (14 tests; added coverage for all three summarizers, the reward parser incl. ranges + wallet-address rejection, PR filtering, and the bounties client URL/params).rustchain.organd the GitHub API — sample output:RustChain is in epoch 195 (slot 28190, 144 blocks/epoch). 24 miner(s) enrolled, epoch pot 1.5 RTC, total supply 8388608 RTC.#1 PowerPC 7450 (G4) @ 733MHz, 2001 — rust_score 1178.45, 868457 attestations [Oxidized Legend]100 open RustChain bounties (~… RTC across those with a stated reward). Top: …README tool table updated and version bumped
0.1.0 → 0.2.0. Scoped to Task 1 only — happy to follow up with the async client (Task 2) or demo (Task 3).