I see that the conversation has now moved/focused on the technical details of the implementations proposed in this thread. However, I will still post my answer in the question asked from Kian (regarding pain points we have experienced) in case it is helpful for anyone.
I am focusing on implementing breaking changes in Sidecar’s endpoints and one available endpoint is staking. Quite some months ago, there were some breaking changes in the staking pallet and this was a major pain point for me.
My pain point was to understand the logic of the latest staking changes, the motivation behind those changes from a runtime/performance perspective and then determine how I would retrieve the information needed and asked from a user/tooling perspective.
If I understand correctly, here you are discussing how
we will access the info needed. But who decides what
information is needed or important? These view functions sound very interesting and super useful but what exactly will we be viewing? Who decides what is the valuable info for the user/external teams? From what I have seen from the staking changes, the information we get from storage calls are not necessarily what we need in the tooling side. To finally get the info needed, someone has to:
- understand in depth the logic implemented in the staking pallet
- compare this logic with the logic needed in the tooling side
- if this differs, write the code to manipulate the info retrieved
- and finally get the result that the final user is asking
To mention a concrete example : a team wants to see if the rewards of a nominator were claimed or not. This is a simple question for a user but not as simple to retrieve with storage calls. Someone needs to know:
- all the details of validator/nominator rewards and how those are distributed
- then see what calls are available
- retrieve the data available from these calls
- manipulate those data to get the final info that the user is asking
For me, it is important to understand the questions users will ask, their needs in data retrieval aspect, and be able to provide that information easily. From what I gather, the core developers are focused on making the chain faster and more efficient. I’m not sure how aligned these two sides are, or if sometimes the goals of one side might collide with those of the other.
Another pain point I would like to mention is communication. When a core developer explains breaking changes, it is often done from a chain-runtime perspective. However, a person reading those changes does not necessarily share the same perspective. Taking the same example with the staking changes, when a user asks if a validator claimed their rewards, they can mean :
- the reward that is from their personal stake
- or/and the rewards originating from the percentage from their nominators stake
From a core dev perspective, this question typically includes both types of rewards so the distinction is not emphasized. From a user perspective though, it can be the first case or both, and the distinction needs to be made and clearly explained. What I found helpful and a solution to this communication issue was to ask a lot more questions and avoid making assumptions—especially the assumption that the person I’m speaking with shares my perspective.
Having said all that, I need to highlight that regarding those staking changes the help/patience and multiple explanations from @ankan were huge and invaluable and I am very grateful for.