Balance discrepancies in 1.5.23-beta #548

Closed
opened 2023-06-02 16:08:17 +00:00 by christophersanborn · 11 comments
christophersanborn commented 2023-06-02 16:08:17 +00:00 (Migrated from gitlab.com)

After replay with 1.5.23-beta, some accounts show differences in core balance, even before the hardfork date is triggered.

Steps to reproduce: MainNet

  • Sync a 1.5.19 node to mainnet (or use an existing node)
  • Sync a 1.5.23-beta node to mainnet.
  • Using 1.5.19 API: Query account balances for accounts hiltos-son (or in inspect object 2.5.15718) and observe the balance of PPY.
  • Using 1.5.23-beta API: Query account balances for accounts hiltos-son (or in inspect object 2.5.15718) and observe the balance of PPY.
  • Compare balances

Expected result:

Balances should agree between software versions.

Encountered result:

Account: hiltos-son
  • Balance returned by 1.5.19: 1018.14502 PPY
  • Balance returned by 1.5.23-beta: 1028.14502 PPY (10 PPY more than 1.5.19)
Account: will-cook
  • Balance returned by 1.5.19: 748.39173 PPY
  • Balance returned by 1.5.23-beta: 725.05840 PPY (23.33333 PPY less than 1.5.19)

Additional notes:

Observed balance discrepancies are all in SONs accounts, and issue seems related to SONs operations. However, an exhaustive comparison has not yet been performed, and the presence of balance discrepancies in non-SONs accounts has not been ruled out.

Test has been carried out using a version of 1.5.23-beta with the hardfork date in the future (2023-07-05), so the discrepancy is not a result of having traversed the hard-fork date.

After replay with 1.5.23-beta, some accounts show differences in core balance, even before the hardfork date is triggered. ## Steps to reproduce: MainNet * Sync a 1.5.19 node to mainnet (or use an existing node) * Sync a 1.5.23-beta node to mainnet. - Suggest using build artifact from this pipeline, as it has mainnet HF date set to July 5, which is still in the future, and can therefore sync with mainnet: https://gitlab.com/PBSA/peerplays/-/pipelines/879332133 * Using 1.5.19 API: Query account balances for accounts `hiltos-son` (or in inspect object `2.5.15718`) and observe the balance of PPY. * Using 1.5.23-beta API: Query account balances for accounts `hiltos-son` (or in inspect object `2.5.15718`) and observe the balance of PPY. * Compare balances ### Expected result: Balances should agree between software versions. ### Encountered result: ##### Account: hiltos-son - Balance returned by 1.5.19: 1018.14502 PPY - Balance returned by 1.5.23-beta: 1028.14502 PPY (10 PPY _*more*_ than 1.5.19) ##### Account: will-cook - Balance returned by 1.5.19: 748.39173 PPY - Balance returned by 1.5.23-beta: 725.05840 PPY (23.33333 PPY _*less*_ than 1.5.19) ### Additional notes: Observed balance discrepancies are all in SONs accounts, and issue seems related to SONs operations. However, an exhaustive comparison has not yet been performed, and the presence of balance discrepancies in non-SONs accounts has not been ruled out. Test has been carried out using a version of 1.5.23-beta with the hardfork date in the future (2023-07-05), so the discrepancy is not a result of having traversed the hard-fork date.
christophersanborn commented 2023-06-02 16:08:17 +00:00 (Migrated from gitlab.com)

assigned to @vampik

assigned to @vampik
vampik commented 2023-06-18 18:27:34 +00:00 (Migrated from gitlab.com)

The reason for balance discrepancies was pay_sons function.

The reason for balance discrepancies was `pay_sons` function.
vampik commented 2023-06-18 18:29:43 +00:00 (Migrated from gitlab.com)

mentioned in commit 97272106663736ad6bfd8e295fc5d8d2a31cb0c5

mentioned in commit 97272106663736ad6bfd8e295fc5d8d2a31cb0c5
vampik commented 2023-06-18 18:30:57 +00:00 (Migrated from gitlab.com)

mentioned in merge request !231

mentioned in merge request !231
vampik commented 2023-06-19 07:12:43 +00:00 (Migrated from gitlab.com)

mentioned in commit 277c40d15f4f4dfda82f11ac1e5cec6f13016ca6

mentioned in commit 277c40d15f4f4dfda82f11ac1e5cec6f13016ca6
vampik commented 2023-06-30 05:25:19 +00:00 (Migrated from gitlab.com)

mentioned in commit 58eefb8a16ca9597875df824b96db5fee3ee4474

mentioned in commit 58eefb8a16ca9597875df824b96db5fee3ee4474
vampik commented 2023-06-30 05:28:27 +00:00 (Migrated from gitlab.com)

mentioned in merge request !234

mentioned in merge request !234
vampik commented 2023-07-01 11:51:02 +00:00 (Migrated from gitlab.com)

mentioned in commit ae0a895daf

mentioned in commit ae0a895dafa002a5b2d2f423caf1011d87bad52b
vampik commented 2023-07-01 11:51:02 +00:00 (Migrated from gitlab.com)

mentioned in commit dd2a531364

mentioned in commit dd2a531364714ea24d1d39cb9954459d7bcb918d
vampik commented 2023-07-03 11:23:17 +00:00 (Migrated from gitlab.com)

assigned to @christophersanborn

assigned to @christophersanborn
vampik commented 2023-07-06 05:34:52 +00:00 (Migrated from gitlab.com)
Fixed and tested in snapshot [snapshot-1.5.23-beta-vlad5-2023-05-01T00.00.00.json](/uploads/d7c09ce03db9e1d8727fd387ea9aa3b2/snapshot-1.5.23-beta-vlad5-2023-05-01T00.00.00.json) [snapshot-1.5.19-2023-05-01T00.00.00.json](/uploads/8384c85e5efd7a37074aea55d2ecc6ab/snapshot-1.5.19-2023-05-01T00.00.00.json)
vampik (Migrated from gitlab.com) closed this issue 2023-07-06 05:35:17 +00:00
Sign in to join this conversation.
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: Peerplays_Blockchain/peerplays_migrated#548
No description provided.