seraphis-migration / wallet3

Info and discussions about a hypothetical full 'wallet2' rewrite from scratch
MIT License
14 stars 0 forks source link

How to use, or not use, 'Jamtis' for any identifiers in our project #24

Open rbrunner7 opened 1 year ago

rbrunner7 commented 1 year ago

Seraphis and Jamtis are the two main new technologies that we deal with here when writing a new core wallet for Monero. For more info about those two see e.g. the page Seraphis and Jamtis Resources in the project wiki.

It's one thing to mention and thus acknowlegde and honor both in prose describing that future Monero cryptocurrency, and another to use them both in our names for folders, files, C++ classes and methods and so on. It's quite simple: If we include both in many such names, they may become long and harder to use than shorter names mentioning only one.

In his library @UkoeHB seems to mostly use, whether following a conscious decision or not, the following convention: Name a thing using only seraphis except if that thing is predominantly about Jamtis.

Thus, starting at the very top, it's the Seraphis library and not the Seraphis and Jamtis library, with a folder name in the source code tree of merely seraphis and not seraphis_jamtis or even seraphis_and_jamtis.

I would not underestimate this question even it's a quite narrow one in the frame of our big project. On the one hand we should pay proper respect to @tevador 's Jamtis work, becaust that's well deserved, but on the other hand we should try to come up with readable code using good names, and more often than not a short name is better than a long name if no important info is lost by making it shorter.

rbrunner7 commented 1 year ago

I like the convention that is now realized in the library to use jamtis as part of a name only sparingly, if something is more or less directly about Jamtis. I vote for using it also for the wallet we build. I really see no win to add jamtis in more places, and I am sure there will be a lot of other places to mention tevador's important work.

Personally I wouldn't even include it in abbreviations if we need some. @DangerousFreedom1984 coined jsw for jamtis-seraphis-wallet as a namespace identifier in his prototype code. I say why not only sw, as we seem to be ok with a project name of Seraphis wallet (see #15). That's enough because already unique, that's short, that's 2 letters in line with the 2 letters sp from the library. Maybe we even start a trend of 2-letter namespace names with this to bring some order into naming.

Anyway, you could argue that if we use 2 names Seraphis and Jamtis why only those two, why stop at that? Isn't it also about CLSAG, RingCT, and Bulletproofs? Maybe I exaggerate a bit here, but if we standardize on merely Seraphis for most names we avoid any slippery slopes in the first place :)

UkoeHB commented 1 year ago

Jamtis is an implementation detail of seraphis, which is an abstract protocol that doesn't specify an address scheme. Hence jamtis is 'nested' in seraphis:

namespace sp
{
namespace jamtis
{
...
} //namespace jamtis
} //namespace sp
DangerousFreedom1984 commented 1 year ago

I like the proposal of two letters namespaces. Would be nice to also start listing the current and future classes of each namespace.