This copy is an interesting dev's slack conversation on bundles, transactions, hashing of PoW and signature in IOTA. It can help us to know more about the IOTA data structure.
Could someone provide me with structure of a tx? What fields are there? Can I see a JSON strucutre of a full tx?
and with some explanations. Don’t know what Tag, Bundle, Trunk, Branch, and Essence mean :slightly_smiling_face:
wiki - IOTA Wiki of most relevant and important topics
trunk / brunch = two tips that you reference
public final long value; // <0 spending transaction, >=0 deposit transaction / message
I thought it was like UTXO ?
@come-from-beyond always says "it's 60% account-based, 40% UTXO"
is trytes to bytes length justs *2/3 or more complicated?
2187 trytes is roughly 1312 bytes.
2187 trytes is 1 chunk of a signature (i.e.
Is there a post somewhere really explaining the bundles?
8 bits store 5 trits
ah, cool thx
and 8 trits = 1 tryte or different again?
https://iota.readme.io/docs maybe (edited)
1 tryte = 3 trits (edited)
bundle = chain of txs which reference each other via "trunkTransaction"
there is a tail with "currentIndex" = 0
bundle is atomic
we go along the chain of trunkTxs while incrementing currentIndex is not equal to "lastIndex"
this is basics of bundles
I’m still a bit confused. Does trunk mean the transaction which output you want to spend?
a typical payment with 256-bit security looks like this:
tx #0 // spending from Alice address // value = -100
tx #1 // complementary spending from Alice address (because each increase of +128 bits security adds an extra complementary tx) // value = 0
tx #2 // depositing to Bob address // value = +70
tx #3 // depositing to Alice change address // value = +30
this is a complete bundle
it's atomic because all or none txs will be approved by others
and the bundle can be arbitrary large?
virtually yes, it's limited to roughly 2 trillion elements (edited)
it's 7.6 trillion
whole country can spend their state budget with M-of-N multisig
but how do I include the signatures for each spending?
first you construct "raw" bundle
then you calculate bundle hash
then you sign that hash
and copy signatures into corresponding txs with correct offset
Ok, but what’s the signature field then in the main transaction for (structure that references the bundle) ?
it stores signatures if value < 0 and messages if value > 0 (edited)
for value == 0 there are nuances
@dom https://github.com/iotaledger/wiki/blob/master/hackathon-guide.md#make-a-transfer anchor doesn't work (edited)
does the bundle consists of tx ids?
would make more sense
there is no such structure as bundle, it's manifested only on meta-level
bundle is set of txs
so we can't say that bundle consists of tx ids, it consists of txs
which have ids/hashes (edited)
do you know Bitcoin transaction structure?
if you do - in IOTA it's different
while we can think of IOTA txs as of inputs/outputs in Bitcoin we should remember that IOTA txs are separate objects
in Bitcoin you get a whole tx because they are indivisible, in IOTA its equivalent, i.e. bundle, is divisible
there are plenty of incomplete bundles in tangle now, and some txs are lost forever
because we use UDP
I thougt a bundle was atomic
it's atomic when processed
we collect txs but don't start processing (validation, approval) until we collect all txs
in Bitcoin we have to think how to share large txs with others
in IOTA basic unit of interaction is a tx and it has fixed size
this matters when we are in IoT
with constrained bandwidth and constrained processing power
alothough a typical bitcoin tx is much smaller than one IOTA transaction :slightly_smiling_face:
yes, but if you add quantum resistance it will change drastically
80% is occupied by signature
But Bitcoin has in principle the same quantum resistance because you use hashes of pub keys
it's an urban legend
while you are waiting for your tx to be included into a block a quantum adversary will doublespend 100 times
dare to race against him (whose tx is included by miners who will prefer higher fee)?
in other words it's safe only if you don't want to spend your coins
potentially. It still takes time to crack private key
it's believed to be as fast as generating a signature
if you have a quantum computer of the size of today’s computers..
if quantum computers don't appear then bitcoin sigs will be much shorter with the same level of security (edited)
until quantum computers are competitive, Lightning network variants thereof will be there such that you typically only have to send signatures between a few parties
and Bitcoin can switch to quantum proof signatures
and then the load of the network is much smaller
there are some nuances:
@come-from-beyond always says "it's 60% account-based, 40% UTXO"
in IOTA 100 inputs will be grouped into 1 output
we target IoT where a lot of small transfers are met much more often than few big ones
Bitcoin will require higher bandwidth consumption even without quantum computers threat
and I don't mention very computing intensive tx validation of Bitcoin yet (edited)
in IOTA it's plain summing without necessity to order
not many ppl know that except block size limit there is op limit in Bitcoin
it's not hard to make IoT devices to spend eternity for tx validation
so Bitcoin has its niche and IOTA has its niche and they will barely intersect
if a miracle happens and today IoT devices adopt Bitcoin then once Bitcoin migrates to quantum-proof sigs 100s millions if not billions IoT devices will be thrown away because it's easier to replace them instead of upgrading
if they adopt IOTA you’ll have to throw them away next week because there will be changes :slightly_smiling_face:
IOTA protocol is set in stone, we don't even have "version" field anywhere :slightly_smiling_face: (edited)
I mean, it will take quite some time till real tiny embedded IOT devices will support any of this
yes, it won't happen today
_Dominic Wörner: _
besides PoCs of course
we are working on hardware support for IOTA :jinn: (edited)
that means hashing for PoW and Signatures will be optimized?
Yes, with Curl ASIC
hey, thanks for the discussion. I’ll have to do some other work but I’ll try to wrap my head around your structure late. But I think It’ll be helpful if there would be a document explaining this better. The whitepaper doesn’t really touch that.
aye, more documentation would be helpful
@domwoe You need to consider the fact that 'Distributed Ledgers' has not been in the mind of chip designers before outside of gaining profits through mining. Once a DLT is established as standard every chip will of course come with this component (its free of charge)
Once a Machine Economy, Data Integrity and ID of Things become standard part of the ecosystem on the software side, of course the hardware adapts. This is how all technological progress happens, and it's non-controversial.
This is not like the insane idea of 21 Inc of putting powerhungry asics in your fridge, this is a collection of thousands of logic gates that already fit on the processor die, it literally consumes no energy for all practical purposes
I agree on most but if it is literally consuming no energy for all practical purposes it’s a bad mechanism against spam
Not when you take into consideration the quantity of devices involved