Skip to content

fix: address PR #13 review feedback - off-chain weight storage#19

Merged
abhicris merged 1 commit into
kcolbchain:mainfrom
ahmadfardan464-cmyk:fix/offchain-weight-storage
May 12, 2026
Merged

fix: address PR #13 review feedback - off-chain weight storage#19
abhicris merged 1 commit into
kcolbchain:mainfrom
ahmadfardan464-cmyk:fix/offchain-weight-storage

Conversation

@ahmadfardan464-cmyk
Copy link
Copy Markdown
Contributor

Changes addressing PR #13 review

This PR addresses all reviewer feedback from #13:

1. ✅ Stale base / rebase

  • Branch rebased on current main — clean diff with only the script changes

2. ✅ Remove committed bytecode

  • Removed __pycache__/ files
  • Added __pycache__/, *.pyc, *.pyo to .gitignore

3. ✅ Replace ipfshttpclient with requests

  • Removed dependency on unmaintained ipfshttpclient (last release 2022)
  • Now uses requests library to call IPFS HTTP API directly (/api/v0/add)
  • More maintainable and compatible with modern Kubo nodes

4. ✅ Fix Arweave import

  • Changed from from arweave import Wallet, Transaction (incorrect)
  • To from arweave.arweave_lib import Wallet, Transaction (correct for arweave-python-client)
  • Added fallback gateway upload for Arweave (works without wallet)
  • Made Arweave wallet signing optional

5. ✅ Added requirements-dev.txt

  • Properly pins dependencies:
    • requests>=2.28.0
    • web3>=6.0.0
    • eth_account>=0.8.0
    • Optional: arweave-python-client for wallet signing

6. ✅ Updated mint_token.py

  • Same dependency fixes applied
  • Better error handling and fallbacks

- Replace deprecated ipfshttpclient with requests (direct IPFS HTTP API)
- Fix Arweave import to use arweave_python_client correctly
- Add fallback gateway upload for Arweave (no wallet required)
- Remove committed bytecode (__pycache__/)
- Update .gitignore for Python artifacts
- Add requirements-dev.txt with correct dependencies
- Rebase-ready: clean diff against main
@ahmadfardan464-cmyk
Copy link
Copy Markdown
Contributor Author

Bumping for review! This PR addresses the feedback from PR #13 (removed .pyc, added .gitignore entries, fixed imports). Ready for review. 🙏

@abhicris
Copy link
Copy Markdown
Contributor

🤖 Audit verdict: safe

Refactoring replaces library dependencies with direct HTTP API calls to user-specified gateways (IPFS/Arweave); adds .env to .gitignore (security-positive); no hardcoded secrets, typo-squatted packages, or exfiltration endpoints detected.

Audited by the kcolbchain PR pipeline. See pipeline docs.

@abhicris abhicris merged commit a29b09e into kcolbchain:main May 12, 2026
@abhicris
Copy link
Copy Markdown
Contributor

Merged — thanks, @ahmadfardan464-cmyk. That's 9 merged PRs to kcolbchain now.

You're a Fellow — when paid research, partner-org work, or grant milestones come up, you're in the first invite pool.

Next-up issues across the org: https://kcolbchain.com/invitations/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants