Transaction Information Vs Metadata - Interpreting What Has Happened
With Bitcoin equally good equally most "Crypto 1.0" currencies, the transactions are unproblematic in addition to elegant. You specify which coins you're spending, what are the redemption requirements, in addition to that's almost it. Influenza A virus subtype H5N1 transaction either goes through, is included inward a block in addition to tin last spent, or it never gets included in addition to tin last safely ignored. However, when nosotros await at the to a greater extent than complex Crypto 2.0 systems, things start to instruct to a greater extent than complicated - in that location are many to a greater extent than states a transaction tin last in, in addition to nosotros require additional metadata to figure out what genuinely happened.
The agency Ripple handles its transactions is a proficient illustration of the information vs metadata. When submitting a transaction, nosotros submit its information - our intent of what nosotros desire the transaction to do. For example:
{
"TransactionType" : "Payment",
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Amount" : {
"currency" : "USD",
"value" : "1",
"issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
},
"Fee": "10",
"Flags": 2147483648,
"Sequence": 2,
}
Transaction information vs metadata
The agency Ripple handles its transactions is a proficient illustration of the information vs metadata. When submitting a transaction, nosotros submit its information - our intent of what nosotros desire the transaction to do. For example:
{
"TransactionType" : "Payment",
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Amount" : {
"currency" : "USD",
"value" : "1",
"issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
},
"Fee": "10",
"Flags": 2147483648,
"Sequence": 2,
}
Indicates that nosotros desire to mail 1USD from rf1... to ra5... in addition to nosotros pay the fee of 10. Now, when nosotros submit the actual transaction, nosotros likewise encounter its metadata:
{
"id": 6,
"status": "success",
"type": "response",
"result": {
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Amount": {
"currency": "USD",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "1"
},
"Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Fee": "10",
"Flags": 2147483648,
"Sequence": 2,
"SigningPubKey": "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB",
"TransactionType": "Payment",
"TxnSignature": "3045022100D64A32A506B86E880480CCB846EFA3F9665C9B11FDCA35D7124F53C486CC1D0402206EC8663308D91C928D1FDA498C3A2F8DD105211B9D90F4ECFD75172BAE733340",
"date": 455224610,
"hash": "33EA42FC7A06F062A7B843AF4DC7C0AB00D6644DFDF4C5D354A87C035813D321",
"inLedger": 7013674,
"ledger_index": 7013674,
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Balance": "99999980",
"Flags": 0,
"OwnerCount": 0,
"Sequence": 3
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
"PreviousFields": {
"Balance": "99999990",
"Sequence": 2
},
"PreviousTxnID": "7BF105CFE4EFE78ADB63FE4E03A851440551FE189FD4B51CAAD9279C9F534F0E",
"PreviousTxnLgrSeq": 6979192
}
},
{
"ModifiedNode": {
"FinalFields": {
"Balance": {
"currency": "USD",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "2"
},
"Flags": 65536,
"HighLimit": {
"currency": "USD",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "0"
},
"HighNode": "0000000000000000",
"LowLimit": {
"currency": "USD",
"issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"value": "100"
},
"LowNode": "0000000000000000"
},
"LedgerEntryType": "RippleState",
"LedgerIndex": "96D2F43BA7AE7193EC59E5E7DDB26A9D786AB1F7C580E030E7D2FF5233DA01E9",
"PreviousFields": {
"Balance": {
"currency": "USD",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "1"
}
},
"PreviousTxnID": "7BF105CFE4EFE78ADB63FE4E03A851440551FE189FD4B51CAAD9279C9F534F0E",
"PreviousTxnLgrSeq": 6979192
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
},
"validated": true
}
}
Which specifies, with other things, AffectedNodes - the actual nation modify exacted on the system. It specifies the residuum modify of multiple addresses the transaction rippled through. This tin last particularly of import when in that location are multiple paths a transaction could take, perchance fifty-fifty spanning many dissimilar currencies in addition to entities.
How Ripple Works - Gateways in addition to Pathways
All inward all:
- Transaction information specifies what nosotros want the organization to do
- Transaction metadata specifies what did happen inward the system
Lets await at a few examples of why this distinction is important.
Blockchain interpretation inward Bitcoin 2.0
Some people role the term "Bitcoin 2.0" in addition to "Crypto 2.0" interchangeably. I personally brand the distinction of using the starting fourth dimension term solely when referring to systems built on top of Bitcoin itself - Mastercoin/Omni, Counterparty, Colored Coins, etc., spell using the instant term for all cryptocurrency systems allowing i to number custom currencies (which includes Bitcoin 2.0s equally good equally systems similar Ripple, Ethereum, etc.).
The distinction is of import hither because Bitcoin 2.0 systems inherently direct keep no command over which of their transactions are included inward the Bitcoin blockchain they are using. Unlike Bitcoin, 2 conflicting transactions tin last included inward the block in addition to the organization has to last able to translate them correctly. Without transaction metadata, it is difficult to tell at a glance whether a transaction is valid in addition to spendable, or whether it is a double-spend in addition to should last ignored.
Influenza A virus subtype H5N1 cautionary tale of the partial payment flag
In 2014 JustCoin, a Ripple gateway, got into a lot of trouble due to a pocket-size characteristic inward Ripple real few people noticed earlier thus - the partial payment flag. When a transaction is created with that flag, it signals to the network "I desire to pay the soul equally much equally I tin upwards to the boundary specified", rather than "I desire to pay the soul just this much". So for illustration if my transaction information specifies the amount I'm paying to last 1'000'000USD, but my residuum is solely 10USD, without the partial payment flag the transaction would fail, in addition to with the flag it would succeed but solely give a soul 10USD.
The large occupation JustCoin ran into was that the transaction information even thus would quote the large number, fifty-fifty if real piddling was sent, in addition to solely past times examining the metadata would they last able to encounter how much money was genuinely sent. This meant their attackers could rack upwards bogus deposits in addition to cash out of the gateway, leaving it curt on funds.
Transaction successful, payment failed
While working on a Ripple gateway inward the past, I got to explore a few dissimilar terminate states a transaction tin terminate upwards inward - a transaction tin last non included inward a block in addition to last inward an undefined state, it tin last included inward a block in addition to last successfully applied, included inward a block in addition to partially applied (partial payment, opened upwards exchange), or it tin last included inward a block but even thus fail. In the context of Bitcoin, the concluding nation would last unthinkable.
Influenza A virus subtype H5N1 scenario where a transaction is non applied to a block is similar to Bitcoin's unconfirmed transaction - it is inward a nation of limbo. However, with Bitcoin i tin even thus pass other outputs without worrying almost the transactions interfering with i unopen to other - each transaction output tin last spent independently. For systems relying on address balances rather than transaction outputs, a dangling transaction tin last a blocker. This is why professional person transactions are sent with an expiration engagement (after which the transaction volition definitely neglect in addition to non produce anything), equally good equally sending a NOP transaction to overwrite the expired transactions to let everything else to transcend away through.
Successful transactions that applied fully are pretty straightforward - everything went through (or equally much equally could inward instance of partial payment flags).
Open-ended transactions are initialized past times i transaction, but terminate upwards existence fulfilled past times other transactions. This applies by in addition to large to the decentralized commutation offers - it's similar to placing a bid on a marketplace in addition to waiting for i or to a greater extent than asks to fulfill it. The transaction solely closes when it is fully fulfilled, or it becomes invalid due to depression balance, etc.
Failed transactions existence included inward a block by in addition to large apply to Bitcoin 2.0s in addition to balance-based cryptocurrencies. Those transactions either are inevitable - whatever valid Bitcoin transaction tin last included inward a Bitcoin block, but it tin last an invalid Omni transaction -, or they are in that location for simplicity's sake - to produce nothing, consume a sequence number and let adjacent transactions to last committed.
Conclusions
Transaction information specifies what nosotros desire the organization to do, spell transaction metadata specifies what did hap inward the system. While non equally of import to Bitcoin in addition to other starting fourth dimension generation cryptos, the transaction metadata becomes to a greater extent than in addition to to a greater extent than of import for to a greater extent than complex Crypto 2.0 systems.
Sumber http://tpbit.blogspot.com/
We have sell some products of different custom boxes.it is very useful and very low price please visits this site thanks and please share this post with your friends. 정보이용료 현금화
ReplyDeletei am always looking for some free stuffs over the internet. there are also some companies which gives free samples. 신용카드 현금화
ReplyDelete