Direct Integration with Bitcoin

I think that’s a great idea (and would limit the discussion in this topic to just Bitcoin integration :sweat_smile:).

I definitely had a fair amount of questions regarding stability that Andreas Rossberg answered in this post, and I know it’s a major point of concern for developers.

One of the main issues here I see is not a lack of stable data structures themselves, but an understanding of what makes those data structures stable. Additionally, many of the motoko-base library data structures such as HashMap.mo were released as classes (to aid in programming style familiarity & adoption), but didn’t include any documentation or assurances about their stability in the library or code itself, or information how to make them stable, which I think created some of this confusion in the first place.

Once developers understand stability on the IC, it’s not that difficult to turn an unstable data structure into a stable one (I’m speaking purely from the perspective of a Motoko developer, so I can’t speak for the Rust developer’s experience with stability). So I’m not sure that a single forum topic would help any more than expanding the developer documentation.

Specifically, I would add the following content to this section https://smartcontracts.org/docs/language-guide/upgrades.html

  • Provide a link to https://smartcontracts.org/docs/language-guide/language-manual.html#stability, with some concrete language examples (in both Motoko and Rust), including some do’s and dont’s that showcase transformations of an unstable data structures into a stable data structures (i.e. transforming a class with instance variables and methods into a stable object and functions)
  • Tie in information about how to use developer tooling (i.e. dfx, etc.) to safely check upgrade compatibility, and(feature request) perhaps even the variables that will remain stable (and any changes (like a git diff) to those stable variables.

Maybe at the very least we move this discussion to a separate forum post. I definitely think asking the community about what type of functionality they’d want out of a BTree library would be beneficial.

4 Likes