Commit 2acc8c1
committed
fix: restore light node rewards and persist pending rewards across restarts
- Fix light node reward processing in process_reward_window_internal (Path 1):
merge reward_light_nodes into all_summaries alongside reward_heartbeats,
matching the existing correct behavior in the receiver/sync path (Path 4)
- Fix light node reward processing in MacroBlock creator path (Path 3):
same merge of reward_light_nodes, ensuring the creator node calculates
identical rewards to all receiver nodes (full determinism across all paths)
- Add RocksDB persistence for pending rewards in Path 3 (creator) and
Path 4 (receiver/sync): save_pending_reward called after every emission
MacroBlock so rewards survive node restarts
- Add startup recovery from state snapshot: if RocksDB pending_rewards is
empty (pre-v3.35 nodes that never persisted), recover baseline amounts
from state snapshot accounts and immediately seed RocksDB for future restarts
- Fix missing next_ping_time and next_ping_window in already_registered
response for light nodes (both state check and gossip registry check),
preventing undefined ping timer after wallet restore on mobile
- Fix duplicate node registration for Super nodes in handle_register_node:
check storage.get_nodes_by_wallet upfront and return already_registered
response instead of creating a new registration TX
- Fix clock drift handling in HealthPing: decouple signature verification
from message age check so last_block_height is always updated on valid sig
- Drop consensus messages during fast sync when local node is far behind
network height to prevent invalid block reports
Made-with: Cursor1 parent 3dfd4c7 commit 2acc8c1
5 files changed
Lines changed: 300 additions & 113 deletions
File tree
- applications/qnet-mobile/src
- components
- screens
- development/qnet-integration/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5883 | 5883 | | |
5884 | 5884 | | |
5885 | 5885 | | |
| 5886 | + | |
| 5887 | + | |
5886 | 5888 | | |
5887 | 5889 | | |
| 5890 | + | |
5888 | 5891 | | |
5889 | 5892 | | |
5890 | 5893 | | |
5891 | | - | |
5892 | | - | |
5893 | | - | |
| 5894 | + | |
| 5895 | + | |
| 5896 | + | |
| 5897 | + | |
| 5898 | + | |
5894 | 5899 | | |
5895 | 5900 | | |
5896 | 5901 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1768 | 1768 | | |
1769 | 1769 | | |
1770 | 1770 | | |
1771 | | - | |
1772 | | - | |
1773 | | - | |
1774 | | - | |
1775 | | - | |
1776 | | - | |
1777 | | - | |
1778 | | - | |
1779 | | - | |
1780 | | - | |
1781 | | - | |
1782 | | - | |
1783 | | - | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
1784 | 1794 | | |
1785 | 1795 | | |
1786 | 1796 | | |
| |||
0 commit comments