[bug] RPC lookup_vote_ids returns error on worker proposal votes. #574

Closed
opened 2023-12-07 16:53:21 +00:00 by christophersanborn · 7 comments
christophersanborn commented 2023-12-07 16:53:21 +00:00 (Migrated from gitlab.com)

Function database_api_impl::lookup_vote_ids() in libraries/app/database_api.cpp exceeds recursion depth when passed a worker-proposal vote ID.

Affects: As a result of this, the RPC get_full_accounts will fail when querying accounts that have voted for (or against) any worker proposals. As a second order result, login to NEX for these accounts is also broken, as NEX uses get_full_accounts for account name validation in the login screen.

Solution: The solution is increase the static variant recursion depth in the cases where the vote_id_type is worker.

Screen Shot 2023-12-07 at 11.16.17 AM.png

Screen Shot 2023-12-07 at 11.16.42 AM.png

Function `database_api_impl::lookup_vote_ids()` in libraries/app/database_api.cpp exceeds recursion depth when passed a worker-proposal vote ID. Affects: As a result of this, the RPC `get_full_accounts` will fail when querying accounts that have voted for (or against) any worker proposals. As a second order result, login to NEX for these accounts is also broken, as NEX uses `get_full_accounts` for account name validation in the login screen. Solution: The solution is increase the static variant recursion depth in the cases where the vote_id_type is `worker`. ![Screen Shot 2023-12-07 at 11.16.17 AM.png](/uploads/95d74fafca46521a7faaaed47486418f/Screen_Shot_2023-12-07_at_11.16.17_AM.png) ![Screen Shot 2023-12-07 at 11.16.42 AM.png](/uploads/8fa696785d2ec134a84cf5a3b92e23de/Screen_Shot_2023-12-07_at_11.16.42_AM.png)
christophersanborn commented 2023-12-07 16:53:22 +00:00 (Migrated from gitlab.com)

assigned to @vampik

assigned to @vampik
christophersanborn commented 2023-12-07 17:00:23 +00:00 (Migrated from gitlab.com)

mentioned in issue #572

mentioned in issue #572
vampik commented 2023-12-11 05:44:12 +00:00 (Migrated from gitlab.com)

mentioned in commit a818edc08d

mentioned in commit a818edc08d04a3182d08a0c17df950f7444bfa2f
vampik commented 2023-12-11 05:45:07 +00:00 (Migrated from gitlab.com)

mentioned in merge request !258

mentioned in merge request !258
vampik commented 2023-12-11 08:30:29 +00:00 (Migrated from gitlab.com)

mentioned in commit fef5131a96

mentioned in commit fef5131a96a220030c781c8e6a1816d06c18290a
vampik (Migrated from gitlab.com) closed this issue 2023-12-11 16:37:49 +00:00
vampik commented 2023-12-14 13:21:49 +00:00 (Migrated from gitlab.com)

mentioned in commit 3c5e417c5e3357acea37c41a139319bd76c3a87f

mentioned in commit 3c5e417c5e3357acea37c41a139319bd76c3a87f
vampik commented 2023-12-14 13:37:15 +00:00 (Migrated from gitlab.com)

mentioned in commit cada740d73

mentioned in commit cada740d73a268475ddce5ce5318149258c5a9b7
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#574
No description provided.