Should we give up on backward compatibility for the NFTDescriptor
contract?
#1109
Replies: 3 comments
-
Thank you for the discussion. I support giving up on backward compatibility based on the 2nd and 3rd points. As for the 1st point, I agree the maintenance cost isn't negligible, but this applies to most things, and in this case, the effort required is minimal (as outlined in solution below). I'd argue that the issue arises due to the testing approach used in If size were not a limiting factor, backward compatibility can offer an advantage. If we update the SVG art in the future and earlier lockup versions still hold significant TVL, we might want to refresh their NFTs look. Re my proposed solution, (originally shared on Slack), if we decide to retain backward compatibility in v2.0.0: The issue lies with this text, "This NFT represents a payment stream in a Sablier Lockup", which generates the following descriptions:
This redundancy occurs because mapSymbol returns strings prefixed with To resolve this, we can adjust the text in this line to “This NFT represents a payment stream in a”. With this change,
Alternatively, we could modify the text to "This NFT represents a payment stream in a Sablier". In this case, This change is necessary regardless, be avoid repetition of "Sablier Lockup Sablier Lockup" in v2.0.0. Re A better approach would be to independently generate the |
Beta Was this translation helpful? Give feedback.
-
UPDATE: As discussed on Slack, feel free to drop backward compatibility. Thanks @andreivladbrg. I am in favor of maintaining backward-compatibility for now, in V2.0.0. Post this release, we can consider letting go of backward-compatibility. The fact that we haven't updated the NFT descriptors in the previous releases is simply an error. We should do that, at least on the chains with large TVL. I will create a task on Notion about this, and I will ask @maxdesalle to submit the transactions in Safe. Edit: it'd be better to update the NFT descriptor after the V2.0.0 release so that the string is generated correctly, and to minimize the workload for all of us.
I'd prefer the text to say this (see my comment here):
And:
I agree with this @smol-ninja, could you please create a GitHub issue? |
Beta Was this translation helpful? Give feedback.
-
As discussed on slack, we will no longer support backwards compatibility. |
Beta Was this translation helpful? Give feedback.
-
In the latest PR #1108, we realized that we had an incorrect string returned by the
tokenURI
function. This was a consequence of the package tethering and the singleton. The issue consisted of having too many "Sablier" and "Lockup" words included in the string.One of the reasons for making this mistake was that we wanted to maintain backward compatibility, i.e. allowing the latest version of the
NFTDescriptor
contract to be compatible with all previous releases, even though the actual SVG was not changed (just small things). But in reality, we have never updated the previous versions of the contract with the latest, and those small changes require a non-zero effort from our side. As we release more versions, the difficulty of keeping track of backward compatibility will likely rise exponentially. For example, these lines:v2-core/src/LockupNFTDescriptor.sol
Lines 73 to 83 in 9ef51a3
are required just to maintain compatibility with the previous wording we used for token (asset). If, in the future, we decide to rename the token to "asset" again (hypothetically—we can’t know for sure in advance), we will need to handle all such cases. This is just one example; there are more places.
Another argument is that the
NFTDescriptor
is at its size limit, so adding a lot of logic just for backward compatibility will reduce the potential for design improvements, as there is no more space left.TLDR:
Having said that, should we give up on backward compatibility? Curious to hear what you think, @sablier-labs/solidity.
Beta Was this translation helpful? Give feedback.
All reactions