Skip to content

Conversation

utkarshg6
Copy link
Collaborator

@utkarshg6 utkarshg6 commented Sep 12, 2025

Note

Replace fingerprint-based pending-payables with sent/failed tx tracking and new receipt/status types; refactor scanners/scheduling, adjust blockchain receipt API, compute chain-based defaults, and drop the pending_payable table.

  • Accountant/Scanners:
    • Introduce DetailedScanType; replace ReportTransactionReceipts with TxReceiptsMessage and PendingPayableFingerprintSeeds with RegisterNewPendingPayables.
    • Revamp PendingPayableScanner with in-memory caches, recheck logic, and distinct handling for confirmations/reclaims/validation failures.
    • Rename ScanRescheduleAfterEarlyStopScanReschedulingAfterEarlyStop; refine retry/reschedule behavior.
    • Switch amount/gas fields to amount_minor/gas_price_minor; update comparisons and logs.
  • Blockchain:
    • process_transaction_receipts now returns a map keyed by TxHashByTable to TxReceiptResult using StatusReadFromReceiptCheck.
    • Update send flow and logs; minor wording tweak (gas price “computed by this Node”).
  • Data structures/Errors:
    • Add TxHashByTable, StatusReadFromReceiptCheck, TxBlock; rework TxStatus/FailureStatus with ValidationStatus and PreviousAttempts (serde support).
    • Refine RPC/Blockchain error kinds (split local/remote) and display.
  • DB/Migrations:
    • Compute default ScanIntervals per-chain; migrate scan_intervals accordingly.
    • Remove pending_payable table (migration 10→11); adjust schema and DAO usage.
  • Config/Validation:
    • Validate scan-intervals relationship and payment-thresholds; expose neighborhood/rate/scan settings.
  • Tests/Utils:
    • Extensive test updates; add serializer mocks, receipt builders, and helper utilities.

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

@bertllll bertllll changed the title GH-605: Review 1 GH-605: Review two Sep 12, 2025
hashes_and_balances: hashes_and_paid_amounts,
})
.expect("Accountant is dead");
// TODO: GH-701: We were sending a message here to register txs at an initial stage (refer commit - 2fd4bcc72)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why couldn't you also just comment it out instead of deleting the good inspiration for the person who will be fixing this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the commit hash.

bertllll and others added 3 commits September 15, 2025 10:15
* GH-642: interim commit

* GH-642: interim commit

* GH-642: interim commit

* GH-642: big initial messy reconstruction continuing...

* GH-642: big initial messy reconstruction... just realized I may've forgotten to update with the last changes from the other card

* GH-642: tests compiling...failing lots of them

* GH-642: fn confirm_transactions has been reimplemented

* GH-642: fn handle_failed_transactions has been reimplemented

* GH-642: fixed mainly internal, but smaller functions in the pending payable scanner; various From and Display implementations and these sorts

* GH-642: progressed quite greatelly; fixed many tests; took action against the mark pending payable rowid fn

* GH-642: another bunch fixed...down to 24

* GH-642: another bunch fixed...down to 10

* GH-642: the base of this card is done

* GH-642: lots of fixes in names

* GH-642: filling cache with failed txs to recheck at startup

* GH-642: rpc failers during receipt checks can be handled now

* GH-642: interim commit

* GH-642: first I need to finish the impl of the db system of tx statuses...opened in its own PR and then will start from here on

* GH-642: pending payable scanner machinery has been given the true skeleton

* GH-642: before creating a new whole folder for scanner utils

* GH-642: interim commit

* GH-642: preparing tests before writing the guts of the core fns

* GH-642: integration of the caches...100% at start_scan, 90% finish_scan

* GH-642: another big portion of work in interpreting the receipts

* GH-642: finishing tests for the receipt interpretation but I should rearrange the code a bit - maybe to add a separative class

* GH-642: mod structure changed, new file for TxReceiptInterpreter

* GH-642: fixed two unreliable tests

* GH-642: interim commit

* GH-642: worked away on the implementation of handling failed txs

* GH-642: more todos!() gone

* GH-642: processing failures is done; next tx confiramtions

* GH-642: tx reclaim implemented

* GH-642: finished the brain functions in PPS

* GH-642: ValidationStatus extension - huge chunk of work; still some failing tests remain

* GH-642: interim commit (some of the Validation error stuff will have to be fixed)

* GH-683: savepoint

* GH-683: interim commit

* GH-683: mostly done

* GH-683: renamed error

* GH-683: additional fix to renaming

* GH-683: finished

* GH-642: finished

* GH-683: fixed for a review

* GH-683: fixed screwed string replacement

* GH-683: finished fixing it

* GH-683: another fix...BlockchainError

* GH-642: added unreachable!

* GH-642: before bigger issue addressing

* GH-642: got rid of the BlockchainFailure::Unrecognized layer

* GH-642: savepoint

* GH-642: hashmap for receipt status result deployed

* GH-642: finally solid... as much as under this card, tests fixed

* GH-598-json-hotfix: interim commit

* GH-642: dragging the failing tests down to bare minimum

* GH-642: interim commit

* GH-642: before fixing the todo!() left over

* GH-642: finished

* GH-642: cosmetics

* GH-642: grrr - cosmetics - forgot e

* GH-642: review 2 addressed

* GH-642: added the cache clean-up on getting a scan error

---------

Co-authored-by: Bert <[email protected]>
* GH-689: finished

* GH-689: fixes after auto-review

---------

Co-authored-by: Bert <[email protected]>
cursor[bot]

This comment was marked as outdated.

bertllll and others added 5 commits September 16, 2025 13:11
* GH-606-v2: db and help msgs + the interface document

* GH-606-v2: constraint/raletion between scan intervals established

* GH-606: final clean-up

* GH-606-v2: after review

* GH-606-v2: formatting

---------

Co-authored-by: Bert <[email protected]>
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants