-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
Description
Area
Voting Pillar
Domain
gov.tools
Which wallet were you using?
No response
Context
Several Governance Actions fail to load on the GovTool interface, returning a 500 Internal Server Error. The issue arises when attempting to access specific proposals that share the same txHash and have a single-digit index (e.g., #1, #2, #3).
Affected Governance Actions:
- https://gov.tools/governance_actions/8ad3d454f3496a35cb0d07b0fd32f687f66338b7d60e787fc0a22939e5d8833e#1
- https://gov.tools/governance_actions/8ad3d454f3496a35cb0d07b0fd32f687f66338b7d60e787fc0a22939e5d8833e#2
- https://gov.tools/governance_actions/8ad3d454f3496a35cb0d07b0fd32f687f66338b7d60e787fc0a22939e5d8833e#3
Backend error message:
Multiple proposals found for id: 8ad3d454f3496a35cb0d07b0fd32f687f66338b7d60e787fc0a22939e5d8833e#1. This should never happen
Steps to reproduce
- Attempt to open one of the affected Governance Action detail pages.
- Observe that the page fails to load.
- There is an error HTTP 500 error and backend logs indicate multiple matches for the given ID.
Actual behavior
- Page fails to load due to backend query returning multiple proposals for what should be a unique
proposal_id.
Root Cause
- A SQL
LIKEquery is used to retrieve proposals based onproposal_id, e.g.,LIKE '%#1'. - This inadvertently matches other proposals such as
#11,#12, etc. - The same issue affects
#2(matching#21,#22, etc.) and#3(matching#31,#32, etc.). - This leads to multiple results where only one is expected, triggering the failure.
Likely source of the issue:
list-proposals.sql
Expected behavior
Each Governance Action detail page should load reliably when accessed via a valid and unique proposal ID.
Backend query should return exactly one result per request.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Status
Done