'Soft' deprecation of get_ledger_version host function
#1816
dmkozh
started this conversation in
Core Advancement Proposals
Replies: 1 comment
-
|
This is reasonable imo, especially because there's no use of the fn on mainnet at all, no contract imports it. Iirc the fn was added in the early days with the intent that someone might release a new wasm that uses new features coming in a future protocol version, but those features wouldn't be triggered until a new protocol was available. When it was decided that the protocol would not support contracts built for future versions until an upgrade occurred, we never thought to remove the fn or revisit its purpose. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Soroban supports
get_ledger_versionhost function that gets ledger protocol version. The function has been included just for the sake of 'completeness' of ledger information in the initial release of Soroban (p20), alongside withget_ledger_sequenceandget_ledger_timestampfunctions. However, unlike the latter functions, there is seemingly no valid use case forget_ledger_version:This observation is also confirmed by the fact that there are no live Soroban contracts on mainnet that use
get_ledger_versionhost function.The presence of this function increases conceptual complexity for certain actually useful use cases, such as replaying the older ledger snapshots with the newer versions of host. Thus the proposal is to deprecate this function starting from protocol 25. Since just removing the host function is still potentially dangerous, even if no-one uses it right now, a 'soft' deprecation mechanism is proposed:
Note, that this plan doesn't require any protocol changes until protocol 26, so there is still plenty of time to share any feedback or concerns here.
Beta Was this translation helpful? Give feedback.
All reactions