{"id":576,"date":"2019-07-16T10:21:51","date_gmt":"2019-07-16T09:21:51","guid":{"rendered":"https:\/\/affidaty.io\/blog\/?p=576"},"modified":"2026-01-31T23:06:53","modified_gmt":"2026-01-31T22:06:53","slug":"inside-blockchain-the-transaction-how-and-by-what-it-is-composed","status":"publish","type":"post","link":"https:\/\/affidaty.io\/blog\/en\/2019\/07\/inside-blockchain-the-transaction-how-and-by-what-it-is-composed\/","title":{"rendered":"Inside blockchain. The transaction: how and by what it is composed."},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/1-ENG-Transazione-Hashing-Criptazione-1024x576.jpg\" alt=\"Transazione-Hashing\" class=\"wp-image-577 lazyload\"><noscript><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/1-ENG-Transazione-Hashing-Criptazione-1024x576.jpg\" alt=\"Transazione-Hashing\" class=\"wp-image-577\" srcset=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/1-ENG-Transazione-Hashing-Criptazione-1024x576.jpg 1024w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/1-ENG-Transazione-Hashing-Criptazione-300x169.jpg 300w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/1-ENG-Transazione-Hashing-Criptazione-768x432.jpg 768w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/1-ENG-Transazione-Hashing-Criptazione.jpg 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/2-ENG-Blockchain-easy-1024x267.jpg\" alt=\"Blockchain-easy\" class=\"wp-image-578 lazyload\"><noscript><img decoding=\"async\" width=\"1024\" height=\"267\" src=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/2-ENG-Blockchain-easy-1024x267.jpg\" alt=\"Blockchain-easy\" class=\"wp-image-578\" srcset=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/2-ENG-Blockchain-easy-1024x267.jpg 1024w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/2-ENG-Blockchain-easy-300x78.jpg 300w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/2-ENG-Blockchain-easy-768x200.jpg 768w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/2-ENG-Blockchain-easy.jpg 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<div style=\"height:52px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Intro.<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We started to recognize that the critical elements inside a<b> <strong><a href=\"https:\/\/affidaty.io\/blog\/en\/2019\/04\/blockchain-applications-the-future-is-here\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (apre in una nuova scheda)\">blockchain<\/a><\/strong> are the <strong>transaction<\/strong>, the blocks, the nodes and the ledger<\/b>. However, let\u2019s start from the beginning: what is a <strong>transaction<\/strong> inside a <strong>blockchain<\/strong>?<\/p>\n\n\n\n<div style=\"height:52px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The key concept is that transactions are stored inside a <b>hashed block, which \u201ccontains\u201d the information of the current block<\/b> and the hash of the previous one. That\u2019s why it\u2019s called \u201cchain\u201d: the block hash is unalterably connected to the previous one, so a block is immutably connected to the previous one, with everything it is stored inside.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nodes (<b>the \u201cConsensus\u201d or the \u201cproof of ..\u201d<\/b>) work inside the <strong>blockchain<\/strong>, validating it, keeping it safe, sharing it inside the distributed network.<b> The <strong><a href=\"https:\/\/affidaty.io\/blog\/en\/2019\/04\/blockchain-applications-the-future-is-here\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (apre in una nuova scheda)\">blockchain<\/a><\/strong>, therefore, is the totality of the blocks firmly connected, chained together<\/b>.&nbsp;<\/p>\n\n\n\n<div style=\"height:52px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/3-ENG-Nodi-1024x768.jpg\" alt=\"Nodi\" class=\"wp-image-579 lazyload\"><noscript><img decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/3-ENG-Nodi-1024x768.jpg\" alt=\"Nodi\" class=\"wp-image-579\" srcset=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/3-ENG-Nodi-1024x768.jpg 1024w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/3-ENG-Nodi-300x225.jpg 300w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/3-ENG-Nodi-768x576.jpg 768w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/3-ENG-Nodi.jpg 565w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<div style=\"height:52px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Speaking about the <strong>transaction<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As above mentioned, every block contains the transactions, which can be considered as the <b>\u201cdata\u201d constituting the \u201cshared databases\u201d composing the ledger of the <strong>blockchain<\/strong> (Distributed Ledger Technology).<\/b><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>transaction<\/strong>s can be shaped in different ways, according to the rules (governance) of a <strong>blockchain<\/strong>; due to the general <strong>transaction<\/strong> coding rules, these are structured in this way: <b>there is the sending user, the description of the <strong>transaction<\/strong> and finally the receiving user<\/b>. Both users have access to their cypher keys, besides obviously their <b>Wallet (digital wallet)<\/b>.<\/p>\n\n\n\n<div style=\"height:52px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Structure of the <strong>transaction<\/strong>: cypher keys<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><b>\u201cCipher keys\u201d<\/b> are the essential elements to open and run transactions. These aren\u2019t hard to understand: every user creates his\/her \u201c<b>digital wallet\u201d<\/b> right when he\/she decides to join the <strong>blockchain<\/strong> to use it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This wallet has the same function as a concrete one, with the difference of being digital. Imagine having access to an app on your smartphone or to your home banking system. Right,<b> to safely use this app on a <strong>blockchain<\/strong> <\/b>(both from a personal computer and a smartphone), you are given two cypher keys: one <b>private<\/b>, one <b>public<\/b>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These aren\u2019t physical keys, but cypher keys, digital ones, that is a series of alphanumeric codes. Both are essential because both have a specific function. For every couple of keys, the system creates a <b>public address <\/b>which is frequently linked to a QR code, that is a kind of barcode which can be used by smartphone cameras to ease some procedures.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For convenience, it is frequently stated that the public key is the <b>recipient address<\/b> when it is an alphanumeric code which is automatically calculated by the hash function of the public key. <b>So, technically speaking, a user can automatically obtain his\/her public address from his public key<\/b>. This process is meant to enhance even more the security.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <b>private key<\/b> is the one that is not to be shared with anyone (shortly you\u2019ll understand why), while the <b>public key<\/b> is the one that can be shared with everyone. Their use is easy to describe: the user that creates the <strong>transaction<\/strong> will sign it with its private key; he\/she will include the recipient public key.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The private key (in the preceding that will be shortly described) has a signing function, thanks to this you (that have the private key) assure that you initiated the <strong>transaction<\/strong> and consequently approved it.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s what happens:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Irene has a document that wants to share via <strong>blockchain<\/strong> with Alessio. She will access the software to create the <strong>transaction<\/strong> and share the material for a monetary fee (coin, cryptocurrency). She creates the <strong>transaction<\/strong>, inserting the document and eventual details; she will include her <b>digital signature<\/b> because she has to demonstrate to everybody that she is the owner of the paper she\u2019s selling;<br>\n<\/li><li><b>She creates the digital signature<\/b>: firstly, she hashes the document; then uses her private key to cypher the hash; that\u2019s why the ciphered hash is called <b>digital signature<\/b>. Technically speaking, these coding actions are not handmade by the user but are automatically generated by the system.<br>\n<\/li><li>Alessio accepts to pay the fee for Irene\u2019s document, the <strong>transaction<\/strong> between Irene and Alessio comes to life;<br>\n<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">And that\u2019s how another significant advantage of the <strong>blockchain<\/strong> comes to life: the user can verify the <strong>transaction<\/strong> and its digital signature, he\/she doesn\u2019t need to trust it blindly, he\/she can simply use the mathematical instruments that the <strong>blockchain<\/strong> provides.&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Alessio can verify the digital signature if he wants because it is allowed by the <strong>transaction: Alessio can decrypt Irene\u2019s digital signature using her public key. The outcome is the hash of the document (Hash A);<br>\n<\/strong><\/li><li><strong>Alessio can apply the same algorithm to the received, and the output will be the has of the received text (Hash B);<br>\n<\/strong><\/li><li><strong>Finally, Alessio can buy both hashes (Hash A and B) to be sure that the <strong>transaction<\/strong> has not been altered.<br>\n<\/strong><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">In essence: users use their private key to make fundamental actions, but they never&nbsp;share it: in this way the private key is not available to malicious users, so the digital signature is kept safe.<\/p>\n\n\n\n<div style=\"height:52px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/4-ENG-Creazione-Firma-Digitale-steps-1024x576.jpg\" alt=\"Creazione-Firma-Digitale-steps\" class=\"wp-image-580 lazyload\"><noscript><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/4-ENG-Creazione-Firma-Digitale-steps-1024x576.jpg\" alt=\"Creazione-Firma-Digitale-steps\" class=\"wp-image-580\" srcset=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/4-ENG-Creazione-Firma-Digitale-steps-1024x576.jpg 1024w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/4-ENG-Creazione-Firma-Digitale-steps-300x169.jpg 300w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/4-ENG-Creazione-Firma-Digitale-steps-768x432.jpg 768w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/4-ENG-Creazione-Firma-Digitale-steps.jpg 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<div style=\"height:52px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Once that the <strong>transaction<\/strong> has been secured, it\u2019s safety can be audited by comparing two figures:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>The hashing value of the ciphering between the digital signature and the public key, or Hash A;<br>\n<\/li><li>The hash value of the data inside the <strong>transaction<\/strong> (the file, image or document), or Hash B;<br>\n<\/li><\/ol>\n\n\n\n<div style=\"height:52px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/5-ENG-Verifica-della-firma-digitale-steps-1024x576.jpg\" alt=\"Verifica-della-firma-digitale\" class=\"wp-image-581 lazyload\"><noscript><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/5-ENG-Verifica-della-firma-digitale-steps-1024x576.jpg\" alt=\"Verifica-della-firma-digitale\" class=\"wp-image-581\" srcset=\"https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/5-ENG-Verifica-della-firma-digitale-steps-1024x576.jpg 1024w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/5-ENG-Verifica-della-firma-digitale-steps-300x169.jpg 300w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/5-ENG-Verifica-della-firma-digitale-steps-768x432.jpg 768w, https:\/\/affidaty.io\/blog\/wp-content\/uploads\/2019\/07\/5-ENG-Verifica-della-firma-digitale-steps.jpg 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/noscript><\/figure>\n\n\n\n<div style=\"height:52px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Now such <strong>transaction<\/strong> goes into the block while waiting for it to be filled up to its capacity, then closed and secured.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Intro. We started to recognize that the critical elements inside a blockchain are the transaction, the blocks, the nodes and the ledger. However, let\u2019s start from the beginning: what is a transaction inside a blockchain? Overview The key concept is that transactions are stored inside a hashed block, which \u201ccontains\u201d the information of the current [&hellip;]<\/p>\n","protected":false},"author":267,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jnews-multi-image_gallery":[],"jnews_single_post":{"subtitle":"","format":"standard","video":"","gallery":"","source_name":"","source_url":"","via_name":"","via_url":"","override":[{"single_blog_custom":"","sidebar":"","second_sidebar":"","share_position":"","share_float_style":"","post_date_format":"","post_date_format_custom":"","post_reading_time_wpm":"","zoom_button_out_step":"1","zoom_button_in_step":"1","number_popup_post":"1"}],"image_override":[{"single_post_thumbnail_size":"","single_post_gallery_size":""}],"trending_post_position":"","trending_post_label":"","sponsored_post_label":"","sponsored_post_name":"","sponsored_post_url":"","sponsored_post_logo":"","sponsored_post_desc":""},"jnews_primary_category":{"id":""},"jnews_social_meta":{"fb_title":"","fb_description":"","fb_image":"","twitter_title":"","twitter_description":"","twitter_image":""},"footnotes":""},"categories":[1487,349,525],"tags":[794,170,804,62,183,1444,145,846],"coauthors":[1176],"class_list":["post-576","post","type-post","status-publish","format-standard","hentry","category-educational-ita-en","category-educational-eng","category-real-applications-en","tag-ai-eng","tag-blockchain-en","tag-crypto-en","tag-ledger","tag-pos-en","tag-tracciabilita-en","tag-traceability","tag-wallet-eng"],"_links":{"self":[{"href":"https:\/\/affidaty.io\/blog\/wp-json\/wp\/v2\/posts\/576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/affidaty.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affidaty.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affidaty.io\/blog\/wp-json\/wp\/v2\/users\/267"}],"replies":[{"embeddable":true,"href":"https:\/\/affidaty.io\/blog\/wp-json\/wp\/v2\/comments?post=576"}],"version-history":[{"count":0,"href":"https:\/\/affidaty.io\/blog\/wp-json\/wp\/v2\/posts\/576\/revisions"}],"wp:attachment":[{"href":"https:\/\/affidaty.io\/blog\/wp-json\/wp\/v2\/media?parent=576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affidaty.io\/blog\/wp-json\/wp\/v2\/categories?post=576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affidaty.io\/blog\/wp-json\/wp\/v2\/tags?post=576"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/affidaty.io\/blog\/wp-json\/wp\/v2\/coauthors?post=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}