Skip to content

[CLAIM] Code review bounty - RustChain PR #6659 #12687

Description

@keon0711

Claiming Code Review Bounty #73 for a formal GitHub PR review submitted on Scottcjn/Rustchain PR #6659.

Review URL:
Scottcjn/Rustchain#6659 (review)

Reviewed head:
6fe87e57fb635ecf23ad501b5b6a79ac3589e19a

Review outcome:
CHANGES_REQUESTED

Scope reviewed:

  • rustchain_export.py
  • tests/test_rustchain_export.py
  • docs/rustchain-export.md

Finding summary:

  • SQLite balance export reads micro-unit columns such as amount_i64 and balance_urtc.
  • normalize_rtc() only divides by MICRO_RTC when the numeric value is at least 1,000,000.
  • Reproduced that amount_i64 = 500000 exports as 500000.0 RTC instead of 0.5 RTC, and 999999 exports as 999999.0 RTC instead of 0.999999 RTC.
  • The existing test covers 1_250_000 -> 1.25 but misses sub-1-RTC balances.
  • Recommended normalizing based on the source column/unit rather than numeric magnitude.

Validation run:

  • python3 -m py_compile rustchain_export.py tests/test_rustchain_export.py -> passed
  • python3 -m unittest tests.test_rustchain_export -v -> 3 tests passed
  • local reproduction confirms sub-1-RTC micro balances are misreported

Disclosure: I received RTC compensation for this review.

Payout target / miner_id:
keon0711

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions