ergoplatform / ergodocs

https://docs.ergoplatform.com/
22 stars 60 forks source link

Box / UTXO - pick one and be clear about what it is #46

Closed kieransimkin closed 1 year ago

kieransimkin commented 1 year ago

Hey, I'm a new guy coming over from Cardano - I just wanted to raise the fact that I find the "box" terminology unnecessarily confusing. It's not clear from anywhere in the documentation that "Box" and "UTXO" are basically synonyms - they seem to be used interchangeably, but there's no clear definition that I can see that explains that they are interchangeable terms.

Also, why? For many people coming from more well known chains, we're familiar with the term UTXO, so we don't really need it dumbed-down - creating two differing terminologies for the same thing just creates potential for confusion, and a jargon barrier for new developers.

I have to say, as a Cardano developer, my assumption was that Ergo would be broadly similar - it's quite off-putting to me when I consult the documentation to see a load of unfamiliar terminology. Don't get me wrong, I'm all for using new terminology to describe new things, but if a box is just an extended UTXO, then why give it a new name? More importantly - if you're going to give something a new name that could cause potential for confusion - you need a clearly linked page saying "What is the difference between a UTXO and a Box?" - "answer: none"

glasgowm148 commented 1 year ago

Hey there, welcome to Ergo! I appreciate your feedback about the clarity of our documentation. I'll work on improving it to make it more welcoming for developers new to Ergo! Thanks for bringing it to our attention.

The term 'box' was likely chosen to stress that it's not just an extended UTXO. It's like a multifunctional container holding all sorts of data. (Which is how Cardano also sees it even if they don't want to admit it)

Now, onto the fun bit about the term 'box.' I had to do a bit of a deep dive, but found that it was actually introduced in a Scorex paper back in 2016.

A box can have some additional data inside. For example, it can contain a domain record or a certificate.

Scorex, a foundational framework that Ergo is built upon, has played a pivotal role in kushti's professional journey, leading him to IOG before he branched out to initiate Ergo. Before his involvement with ScoreX, kushti was a core developer at Nxt, an early chain that extended the UTXO model. It's possible that the terminology may have been influenced by his experiences there. Good question for the next AMA!

glasgowm148 commented 1 year ago

Asked kushti on a recent AMA

https://youtu.be/a_tBdzWPjHU?t=2194

In the transcript, Kushti is discussing the history and usage of the term "box" in relation to UTXOs and the Cardano blockchain. Kushti is asked about the origin of the term and whether it relates to his time at NXT or elsewhere. Kushti clarifies that the term "box" originated around 2015 or 2016, predating IOG (Input Output Global). He mentions that IOG does not use the term. Kushti explains that "box" is a general term that is used to represent UTXOs, which are visualized or depicted as boxes. He further explains that the term signifies an element of state, emphasizing the importance of considering the state of the blockchain first. Kushti provides an example, mentioning that the initial state of the Cardano blockchain includes three boxes without any associated transactions before the Genesis block. He notes that transactions modify the state of the blockchain, but the focus is primarily on understanding the state before exploring how transactions impact it.

I've made some clarifications in the text, and will continue to do so. I hadn't come across this perspective before so thanks for sharing it! Closing this for now.