WIP: Add Pakcoin hex output support and incremental backup recovery #8

Closed
abushaheer wants to merge 1 commit from (deleted):pakcoin-hex-support into main
First-time contributor

This PR adds support for Pakcoin (PAK) using the new getblock hex output capability and improves the backup/recovery system.
Changes

  1. Pakcoin RPC Support (Core Fix)
    Uses getblock($hash, 0) for Pakcoin to retrieve raw hex block data
    Other coins continue using legacy getblock($hash, false)
    Unified RPC block fetching logic with verbosity parameter
  2. Incremental Backup Recovery
    Added support for _backup_1 and _backup_2 incremental backups
    Automatically selects most recent backup based on file modification time
    Falls back to full AUX backup if incremental backups don't match
  3. Bug Fixes
    Fixed json_decode → unserialize bug in recovery code (line 678)
    Fixed undefined $offset in exception message
    Changed incomplete block handling from exception to graceful break
  4. Code Cleanup
    Removed unused reconstructBlockFromRpc() function
    Removed unused encodeVarInt() function
    Added resume offset logging for better debugging
    Testing
    Verified with Pakcoin node at 127.0.0.1:7966
    Tested getblock verbosity 0, 1, 2 - all working
    Recovery from orphaned blocks tested successfully
This PR adds support for Pakcoin (PAK) using the new getblock hex output capability and improves the backup/recovery system. Changes 1. Pakcoin RPC Support (Core Fix) Uses getblock($hash, 0) for Pakcoin to retrieve raw hex block data Other coins continue using legacy getblock($hash, false) Unified RPC block fetching logic with verbosity parameter 2. Incremental Backup Recovery Added support for _backup_1 and _backup_2 incremental backups Automatically selects most recent backup based on file modification time Falls back to full AUX backup if incremental backups don't match 3. Bug Fixes Fixed json_decode → unserialize bug in recovery code (line 678) Fixed undefined $offset in exception message Changed incomplete block handling from exception to graceful break 4. Code Cleanup Removed unused reconstructBlockFromRpc() function Removed unused encodeVarInt() function Added resume offset logging for better debugging Testing Verified with Pakcoin node at 127.0.0.1:7966 Tested getblock verbosity 0, 1, 2 - all working Recovery from orphaned blocks tested successfully
abushaheer closed this pull request 2026-04-25 09:01:42 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Communitycoins.Rooty/Ring-Of-Trust-service!8
No description provided.