Node icon indicating copy to clipboard operation
Node copied to clipboard

GH-598: second QA fix - first review

Open bertllll opened this issue 4 months ago • 0 comments

[!NOTE] Overhauls scan scheduling/error recovery and retry logic (incl. gas price computation), renames and clarifies pending-failure flows, fixes inclusive block-range math, enhances logging/tests, and updates CI to macOS latest.

  • Accountant/Scanners:
    • Refactor scheduling/error handling: replace PayableSequenceScanner with UnableToStartScanner; unify handle_start_scan_error; add ScanReschedulingAfterEarlyStop paths incl. Receivables; reset_scan_timer(&logger).
    • Receivables: auto-reschedule only when appropriate; added unreachable checks; improved UI messaging and logging.
    • Pending Payables: rename caches/logs from “unfinalized” to “suspected”; harvest now accepts response skeleton; richer logs; NothingToProcess mapped to automatic/common error.
    • Interval API rename: time_until_next_scan -> compute_time_to_next_scan; tests adjusted.
    • Retry-payable scheduling via notify_later with retry_payable_scan_interval (defaults to half of payable interval).
  • Gas Pricing/Retry logic:
    • Replace DEFAULT_GAS_PRICE_MARGIN with DEFAULT_GAS_PRICE_RETRY_PERCENTAGE and add DEFAULT_GAS_PRICE_RETRY_CONSTANT.
    • Rename increase_gas_price_by_margin -> increase_by_percentage.
    • Retry gas price: if latest ≥ previous use percentage; otherwise increment previous by constant; retry amount uses latest payable balance; added detailed logs and tests.
  • Blockchain:
    • Fix inclusive block-range math (end = start + range − 1); adjust new_start_block expectations.
    • Prevent duplicate error signaling by switching to .then in process_payments.
    • Broaden max-block-range regex; use transaction_count(..., None); add nonce/log warnings on batch submit.
  • CI:
    • Update macOS runner to macos-latest.
  • Tests/Utils:
    • Update messages (“suspected failures”), builders (build_with_addresses), and numerous unit/integration tests to reflect API and logic changes.

Written by Cursor Bugbot for commit 06dd37499d57594de58cb200c8d1d604cedccb45. This will update automatically on new commits. Configure here.

bertllll avatar Oct 09 '25 10:10 bertllll