2

im desperate to understand,i seriously tried

im new to iota but it is quite hard to understand how consensus is achieved in iota, and what is the transaction structure ? i also don't understand what is the role of weight and score , i understand how it works theoretically but how does the weight gets updated practically (what is the thing the gets transmitted in the network to update the weight)

and where does proof of work fit in(when is it used and why), it would be very nice if someone could provide a scenario or a diagram of how transactions are broadcast to finally getting approved by the network.

in the case of blockchain it is crystal clear how consensus is achieved, it is also confusing how come you can have only a subset of transaction (not all transactions like blockchain) and still validate transactions, isn't it necessary to have a complete view of transactions history (similar to Blockchain,you need the full Blockchain to verify)

how do i know as a node which tips to choose if i don't store transactions? a scenario of double spending attack would also be great, i know this is too much but i tried my best to understand the white paper and unfortunately it is very hard to understand.

1

let me try to reply here

im desperate to understand,i seriously tried

Good thing to be curious. This Illustrated Introduction is a good starting point to learn about today's IOTA: https://blog.iota.org/the-tangle-an-illustrated-introduction-4d5eae6fe8d4

Please be aware the IOTA is undergoing heavy design changes thanks to the experience gained in the last few years.

This changes are towards making IOTA enterprise ready and production ready, this phase is called Chrysalis: https://blog.iota.org/chrysalis-iota-1-5-phase-1-now-live-on-mainnet-958ec4a4a415

The end goal is the so called Coordicide, the removal of the Coordinator: https://coordicide.iota.org.

It will be referenced with a little more detail later in the answer.

im new to iota but it is quite hard to understand how consensus is achieved in iota, and what is the transaction structure ? i also don't understand what is the role of weight and score , i understand how it works theoretically but how does the weight gets updated practically (what is the thing the gets transmitted in the network to update the weight)

Most of these questions are answered in the Illustrated Introduction: https://blog.iota.org/the-tangle-an-illustrated-introduction-4d5eae6fe8d4

I'll add an excerpt of a more recent article about consensus for reference:

So how is consensus achieved in the IOTA Tangle?

Let us first look back at the Nakamoto consensus. One brilliant idea of the Nakamoto consensus is to make the consensus non-deterministic or probabilistic. Instead of all nodes of the (distributed) system agreeing on the correctness of a value, they agree on the “probability” of that value being correct.

The role of the leader in traditional consensus protocols is taken by the node that solves a given computational puzzle the fastest; this winner adds a new block to the blockchain. This way, the (distributed) network is building the ever-growing blockchain and agrees on the validity of the longest chain or the chain with most cumulative difficulty.

So why is this consensus probabilistic? In order to know that a certain transaction will be considered valid, in say 100 days, we have to know that the longest chain in 100 days will contain this given transaction.

In other words, we are interested in the probability that the longest chain in 100 days will contain this transaction. The probability that a transaction will not be reverted increases as the block which contains this transaction sinks “deeper” into the chain.

In the bitcoin blockchain, for example, it is recommended to wait until a transaction is six blocks deep in the blockchain. After this depth, the probability that a transaction is reverted is very low.

This effect also applies to the Tangle. The deeper — or more “enveloped” by the Tangle — a transaction gets the more final it becomes. In the following picture, the dark green transaction is validated by all light green transactions. As the number of light green transactions grows, the probability of the dark green transaction being in the future Tangle converges to 1.

enter image description here

But wait, the Tangle is different to a blockchain! While the blockchain is not allowed to contain two conflicting transactions, the Tangle may temporarily contain such transactions. Therefore, it may be that a malicious player attaches two conflicting transactions at different parts of the Tangle, like the dark green and the orange squares in the above picture.

These transactions may “survive” in the Tangle for a short time until honest nodes detect the conflict. Once such a conflict is detected, the nodes decide on which transaction to choose. In the example above, the darker green transaction is “more enveloped” by the Tangle and should eventually be approved by all nodes.

Source: https://blog.iota.org/consensus-in-the-iota-tangle-fpc-b98e0f1e8fa

At this point in time there is a supervising node called Coordinator.

The Coordinator works as follows:

Periodically, Coo (which is run by the IOTA Foundation) issues a normal signed transaction. These transactions are called milestones. IOTA’s definition of consensus is then very straightforward: a transaction is confirmed if and only if it is referenced (either directly or indirectly) by a milestone. It is Coo’s job to make sure a milestone does not contradict its predecessors. If Coo issues an invalid milestone, by referencing transactions which double spend or access non-existent funds, the rest of the nodes in the network will not accept it. This means that even if Coo messes up, no funds are lost and no transactions are reversed. Note that this is in no way meant to be secret or mysterious, and has been actively communicated since the very beginning (for example here, here, here & here). It does not give the IOTA Foundation the power to change history and does not imply that the Foundation can take users’ funds. In that sense, IOTA is already decentralized.

Source: https://blog.iota.org/coordinator-part-1-the-path-to-coordicide-ee4148a8db08

The plan to remove the Coordinator is called Coordicide and it is the actual focus of the IOTA Foundation.

Read more about the Coordicide here: https://coordicide.iota.org/

and where does proof of work fit in(when is it used and why), it would be very nice if someone could provide a scenario or a diagram of how transactions are broadcast to finally getting approved by the network.

The Proof of Work is actually used as anti-spam mechanism. In Iota it is not about money spend on each Transaction which adds the security. It is about Confirming others. The number of Transactions which an attacker has to confirm increases exponentially, because he confirms other transactions too. So he is not only attacking but also strengthening the network. This is the essential aspect. PoW is only used as protection against spam. So the number of Transactions one can make is limited.

Source: https://iota.stackexchange.com/a/530/3560

Every transaction in a bundle requires a nonce (this is the result of the PoW) in order to be accepted by the tangle network. IOTA’s PoW is directly comparable to Hashcash, as it serves a similar purpose to prevent spam, and in IOTA’s case, also to prevent sybil-attacks. When the PoW is done, the nonce of the transaction object should be updated. The transaction can now be broadcasted to the tangle network and wait for it to be approved by someone else.

Source: https://iota-news.com/iota-tutorial-proof-work-curl-nonce/

in the case of blockchain it is crystal clear how consensus is achieved, it is also confusing how come you can have only a subset of transaction (not all transactions like blockchain) and still validate transactions, isn't it necessary to have a complete view of transactions history (similar to Blockchain,you need the full Blockchain to verify)

Also blockchain does not need the full transaction history, see Blockchain pruning: https://coinguides.org/bitcoin-blockchain-pruning/

I would not bound this to the consensus question, since consensus is about the whole network agreeing if a transaction is valid or a double spend (this is the main reason consensus is necessary, to avoid people double spend funds). The ledger itself is the status of all wallets. Since at this point in time the amount of tokens present at each address is confirmed by the coordinator, every node can download a snapshot of the Tangle and validate it.

how do i know as a node which tips to choose if i don't store transactions? a scenario of double spending attack would also be great, i know this is too much but i tried my best to understand the white paper and unfortunately it is very hard to understand.

This question is connected to the questions before and should be answered in the Illustrated Introduction that has been already linked.

I hope this answers and sources will support your journey in discovering IOTA. 👋

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.