{"id":34631,"date":"2019-10-31T21:59:31","date_gmt":"2019-10-31T18:59:31","guid":{"rendered":"https:\/\/prohoster.info\/blog\/ton-telegram-open-network-chast-2-blokchejny-shardirovanie\/"},"modified":"2019-10-31T21:59:31","modified_gmt":"2019-10-31T18:59:31","slug":"ton-telegram-open-network-chast-2-blokchejny-shardirovanie","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/ton-telegram-open-network-chast-2-blokchejny-shardirovanie","title":{"rendered":"TON: Telegram Open Network. Pjesa 2: Blockchain-et, shardimi","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"TON: Telegram Open Network. Pjesa 2: Blockchain-et, shardimi\" src=\"\/wp-content\/uploads\/2019\/05\/e2a24aa1dda6a435e60da257af662853.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Ky ky tekst \u00ebsht\u00eb vazhdimi i nj\u00eb serie artikujsh, n\u00eb t\u00eb cil\u00ebt shqyrtoj struktur\u00ebn (ndoshta) t\u00eb rrjetit t\u00eb shp\u00ebrndar\u00eb Telegram Open Network (TON) q\u00eb pritet t\u00eb dal\u00eb k\u00ebt\u00eb vit. <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/post\/354366\/\">pjes\u00ebn e kaluar<\/a><\/noindex> Un\u00eb p\u00ebrshkrova nivelin e tij m\u00eb themelor - m\u00ebnyr\u00ebn e nd\u00ebrveprimit t\u00eb nod\u00ebve mes tyre.<\/p>\n<p><\/p>\n<p>P\u00ebr rastin se e kujtoj, q\u00eb zhvillimi i k\u00ebtij rrjeti nuk ka lidhje me mua dhe t\u00eb gjitha materialet jan\u00eb marr\u00eb nga burime t\u00eb hapura (edhe pse t\u00eb paverifikuara) - <noindex><a rel=\"nofollow\" href=\"https:\/\/denull.ru\/telegram\/ton-tech.pdf\">dokumenti<\/a><\/noindex> (po ashtu ka nj\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/denull.ru\/telegram\/ton.pdf\">brosur\u00eb<\/a><\/noindex>, e cila p\u00ebrmbledh n\u00eb m\u00ebnyr\u00eb shkurtore pikat kryesore), e cila u shfaq n\u00eb fund t\u00eb vitit t\u00eb kaluar. Sasia e informacionit n\u00eb k\u00ebt\u00eb dokument, sipas mendimit tim, d\u00ebshmon p\u00ebr autenticitetin e tij, edhe pse nuk ka asnj\u00eb konfirmim zyrtar p\u00ebr k\u00ebt\u00eb.<\/p>\n<p><\/p>\n<p>Sot do t\u00eb shikojm\u00eb komponentin kryesor t\u00eb TON - blockchain-in.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h3 id=\"bazovye-ponyatiya\">Koncepte Baz\u00eb<\/h3>\n<p><\/p>\n<p><strong>Llogari<\/strong> (<em>account<\/em>). Nj\u00eb grup t\u00eb dh\u00ebnash, i identifikuar nga nj\u00eb num\u00ebr 256-bit\u00ebsh <em>account_id<\/em> (shpesh ky \u00ebsht\u00eb \u00e7el\u00ebsi publik i pronarit t\u00eb llogaris\u00eb). N\u00eb rastin themelor (shih m\u00eb posht\u00eb <em>blockchain-i zero<\/em>), k\u00ebto t\u00eb dh\u00ebna n\u00ebnkuptojn\u00eb balanc\u00ebn e p\u00ebrdoruesit. \"T\u00eb huazosh\" nj\u00eb <em>account_id<\/em> mund ta b\u00ebj\u00eb kushdo, por t\u00eb ndryshosh vler\u00ebn e tij mundesh vet\u00ebm sipas rregullave t\u00eb caktuara.<\/p>\n<p><\/p>\n<p><strong>Kontrata inteligjente<\/strong> (<em>smart-contract<\/em>). N\u00eb thelb - nj\u00eb rast i ve\u00e7ant\u00eb i llogaris\u00eb, e cila \u00ebsht\u00eb e pasuruar me kodin e kontrat\u00ebs inteligjente dhe ruan variablat e saj. N\u00eb rastin e \"portofolit\", mund t\u00eb depozitosh dhe t\u00ebrheq\u00ebsh para nga ai sipas rregullave relativisht t\u00eb thjeshta dhe t\u00eb p\u00ebrcaktuara m\u00eb par\u00eb, por n\u00eb rastin e kontrat\u00ebs inteligjente k\u00ebto rregulla shkruhen n\u00eb form\u00ebn e kodit t\u00eb saj (n\u00eb nj\u00eb gjuh\u00eb programimi t\u00eb plot\u00eb t\u00eb Turing-ut).<\/p>\n<p><\/p>\n<p><strong>Gjendja e blockchain-it<\/strong> (<em>state of blockchain<\/em>). K\u00ebshtu, gjendja e t\u00eb gjitha llogarive\/konttratave inteligjente (n\u00eb nj\u00eb kuptim abstrakt - nj\u00eb tabel\u00eb hash, ku \u00e7el\u00ebsat jan\u00eb identifikues t\u00eb llogarive dhe vlerat jan\u00eb t\u00eb dh\u00ebnat e ruajtura n\u00eb llogari).<\/p>\n<p><\/p>\n<p><strong>Mesazhi<\/strong> (<em>message<\/em>). M\u00eb lart kam p\u00ebrdorur shprehjen \"depozitoni dhe t\u00ebrhiqni para\" - ky \u00ebsht\u00eb nj\u00eb shembull specifik i mesazhit (\"t\u00eb d\u00ebrgoj\u00eb <em>N gram\u00eb<\/em> nga llogaria <em>account_1<\/em> n\u00eb llogarin\u00eb <em>account_2<\/em>\"). \u00cbsht\u00eb e qart\u00eb se nj\u00eb mesazh t\u00eb till\u00eb mund ta d\u00ebrgoj\u00eb vet\u00ebm nj\u00eb nod\u00eb q\u00eb zot\u00ebron \u00e7el\u00ebsin privat t\u00eb llogaris\u00eb <em>account_1<\/em> dhe q\u00eb \u00ebsht\u00eb n\u00eb gjendje ta konfirmoj\u00eb k\u00ebt\u00eb me n\u00ebnshkrim. Rezultati i d\u00ebrgimit t\u00eb mesazheve t\u00eb tilla p\u00ebr nj\u00eb llogari normale \u00ebsht\u00eb rritja e balanc\u00ebs s\u00eb saj, dhe p\u00ebr kontrat\u00ebn inteligjente - ekzekutimi i kodit t\u00eb saj (i cili do t\u00eb procesoj\u00eb pranimin e mesazhit). Natyrisht, jan\u00eb t\u00eb mundshme edhe mesazhe t\u00eb tjera (t\u00eb cilat transferojn\u00eb jo sasi monetare, por t\u00eb dh\u00ebna t\u00eb rastit mes kontratave inteligjente).<\/p>\n<p><\/p>\n<p><strong>Transaksioni<\/strong> (<em>transaction<\/em>). Fakti i d\u00ebrgimit t\u00eb mesazhit quhet transaksion. Transaksionet ndryshojn\u00eb gjendjen e blockchain-it. Blloqet n\u00eb blockchain p\u00ebrb\u00ebhen pik\u00ebrisht nga transaksionet (regjistrimet e d\u00ebrgimit t\u00eb mesazheve). N\u00eb k\u00ebt\u00eb kuptim, gjendja e blockchain-it mund t\u00eb paraqitet si nj\u00eb baz\u00eb t\u00eb dh\u00ebnash inkrementale \u2014 t\u00eb gjitha blloqet jan\u00eb \u00abdife\u00bb q\u00eb duhet t\u00eb aplikohen nj\u00ebra pas tjetr\u00ebs p\u00ebr t\u00eb marr\u00eb gjendjen aktuale t\u00eb DB-s\u00eb. P\u00ebr specifikat e paketimit t\u00eb k\u00ebtyre \u00abdifeve\u00bb (dhe rikthimin e gjendjes s\u00eb plot\u00eb mbi to) do t\u00eb flitet n\u00eb artikullin e ardhsh\u00ebm.<\/p>\n<p><\/p>\n<h3 id=\"blokcheyn-v-ton-chto-eto-i-zachem\">Blockchain n\u00eb TON: \u00e7far\u00eb \u00ebsht\u00eb dhe p\u00ebrse?<\/h3>\n<p><\/p>\n<p>Si\u00e7 u p\u00ebrmend n\u00eb artikullin e kaluar, <em>blockchain \u00ebsht\u00eb nj\u00eb struktur\u00eb t\u00eb dh\u00ebnash, elementet (blloqet) e s\u00eb cil\u00ebs jan\u00eb renditur n\u00eb nj\u00eb \u00abzinxhir\u00bb, dhe \u00e7do bllok i ardhsh\u00ebm i zinxhirit p\u00ebrmban hash-in e atij t\u00eb m\u00ebparshmi<\/em>. N\u00eb komentet u hodh nj\u00eb pyetje: p\u00ebrse ka nevoj\u00eb p\u00ebr nj\u00eb struktur\u00eb t\u00eb till\u00eb t\u00eb dh\u00ebnash, kur tashm\u00eb kemi DHT \u2014 nj\u00eb tabel\u00eb t\u00eb shp\u00ebrndar\u00eb t\u00eb hash-eve? \u00cbsht\u00eb e qart\u00eb se disa t\u00eb dh\u00ebna mund t\u00eb ruhen edhe n\u00eb DHT, por kjo p\u00ebrshtatet vet\u00ebm p\u00ebr informacionin q\u00eb nuk \u00ebsht\u00eb shum\u00eb \u00absensitiv\u00bb. Balancat e kriptomonedh\u00ebs nuk mund t\u00eb ruhen n\u00eb DHT \u2014 n\u00eb radh\u00eb t\u00eb par\u00eb p\u00ebr shkak t\u00eb munges\u00ebs s\u00eb verifikimeve p\u00ebr <em>integritetin<\/em>. N\u00eb thelb, e gjith\u00eb kompleksiteti i struktur\u00ebs s\u00eb blockchain-it rritet p\u00ebr t\u00eb parandaluar nd\u00ebrhyrjet n\u00eb t\u00eb dh\u00ebnat q\u00eb ruhen n\u00eb t\u00eb.<\/p>\n<p><\/p>\n<p>Megjithat\u00eb, blockchain n\u00eb TON duket edhe m\u00eb i komplikuar se n\u00eb shumic\u00ebn e sistemeve t\u00eb tjera t\u00eb shp\u00ebrndara \u2014 dhe ka dy arsye p\u00ebr k\u00ebt\u00eb. E para \u2014 d\u00ebshira p\u00ebr t\u00eb minimizuar nevoj\u00ebn p\u00ebr <em>forks<\/em>. N\u00eb kriptovalutat tradicionale, t\u00eb gjitha parametrat jan\u00eb caktuar n\u00eb faz\u00ebn fillestare dhe \u00e7do p\u00ebrpjekje p\u00ebr t'i ndryshuar ato \u00e7on praktikisht n\u00eb shfaqjen e nj\u00eb \u00abuniversi alternativ t\u00eb kriptovalut\u00ebs\u00bb. Arsyja e dyt\u00eb \u2014 mb\u00ebshtetje p\u00ebr ndarjen (<em>sharding<\/em>, <em>shardim<\/em>) t\u00eb blockchain-it. Blockchain \u00ebsht\u00eb nj\u00eb struktur\u00eb, e cila nuk mund t\u00eb b\u00ebhet m\u00eb e vog\u00ebl me kalimin e koh\u00ebs; dhe zakonisht \u00e7do nod, i cili \u00ebsht\u00eb p\u00ebrgjegj\u00ebs p\u00ebr funksionimin e rrjetit, detyrohet ta ruaj\u00eb at\u00eb plot\u00ebsisht. N\u00eb sistemet tradicionale (centralizuara) p\u00ebr t\u00eb zgjidhur probleme t\u00eb tilla aplikohet sharding: nj\u00eb pjes\u00eb e regjistrimeve n\u00eb DB ndodhet n\u00eb nj\u00eb server, nj\u00eb pjes\u00eb \u2014 n\u00eb nj\u00eb tjet\u00ebr, etj. N\u00eb rastin e kriptomonedhave, nj\u00eb funksionalitet i till\u00eb \u00ebsht\u00eb ende mjaft i rrall\u00eb \u2014 n\u00eb ve\u00e7anti p\u00ebr shkak t\u00eb faktit se \u00ebsht\u00eb e v\u00ebshtir\u00eb t\u00eb shtohet sharding n\u00eb nj\u00eb sistem ku ai nuk ishte parashikuar fillimisht.<\/p>\n<p><\/p>\n<p>Si do t\u00eb planifikoj\u00eb TON t\u00eb zgjidh\u00eb t\u00eb dy problemet e p\u00ebrmendura m\u00eb sip\u00ebr?<\/p>\n<p><\/p>\n<h3 id=\"soderzhimoe-blokcheyna-vorkcheyny\">P\u00ebrmbajtja e blockchain. Vorkchain.<\/h3>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"TON: Telegram Open Network. Pjesa 2: Blockchain-et, shardimi\" src=\"\/wp-content\/uploads\/2019\/05\/c4f0f6e6702322ad4312cb262b3a0fab.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>S\u00eb pari, le t\u00eb flasim p\u00ebr at\u00eb se \u00e7far\u00eb planifikohet t\u00eb ruhen n\u00eb blockchain. Atje do t\u00eb ruhen gjendjet e llogarive (\u00abportofol\u00ebve\u00bb n\u00eb rastin bazik) dhe kontratat smart (p\u00ebr thjesht\u00ebsi, do t\u00eb konsiderojm\u00eb se \u00ebsht\u00eb e nj\u00ebjta gj\u00eb si llogarit\u00eb). N\u00eb thelb, kjo do t\u00eb jet\u00eb nj\u00eb tabel\u00eb hash standarde \u2014 identifikuesit do t\u00eb sh\u00ebrbejn\u00eb si \u00e7el\u00ebsa <strong>account_id<\/strong>, nd\u00ebrsa vlerat do t\u00eb jen\u00eb struktura t\u00eb dh\u00ebnash q\u00eb p\u00ebrmbajn\u00eb gj\u00ebra t\u00eb tilla si:<\/p>\n<p><\/p>\n<ul>\n<li>bilanci;<\/li>\n<li>Kodi i kontrat\u00ebs smart (vet\u00ebm p\u00ebr kontratat smart);<\/li>\n<li>Depozita e t\u00eb dh\u00ebnave t\u00eb kontrat\u00ebs smart (vet\u00ebm p\u00ebr kontratat smart);<\/li>\n<li>statistika;<\/li>\n<li>(<em>opsionale<\/em>) \u00e7el\u00ebsi publik p\u00ebr transfertat nga llogaria, me default account_id;<\/li>\n<li>rendi i mesazheve dal\u00ebse (k\u00ebtu regjistrohen p\u00ebr d\u00ebrgim te marr\u00ebsi);<\/li>\n<li>lista e mesazheve t\u00eb fundit t\u00eb dor\u00ebzuara p\u00ebr k\u00ebt\u00eb llogari.<\/li>\n<\/ul>\n<p><\/p>\n<p>Si\u00e7 u tha, blloqet p\u00ebrb\u00ebhen drejtp\u00ebrdrejt nga transaksionet \u2014 mesazhe t\u00eb dor\u00ebzuara n\u00eb llogarit\u00eb e ndryshme account_id. Megjithat\u00eb, p\u00ebrve\u00e7 account_id, mesazhet p\u00ebrmbajn\u00eb gjithashtu nj\u00eb fush\u00eb 32-bit <em>workchain_id<\/em> \u2014 identifikuesi i ashtuquajtur <strong>vorkchain<\/strong> (<em>workchain<\/em>, <em>blloku i pun\u00ebs<\/em>). Kjo lejon q\u00eb t\u00eb ket\u00eb disa blockchain t\u00eb pavarur nga nj\u00ebri-tjetri me konfiguracione t\u00eb ndryshme. N\u00eb t\u00eb nj\u00ebjt\u00ebn koh\u00eb, workchain_id = 0 konsiderohet rast special, <strong>vorkchain-i zero<\/strong> \u2014 bilancet q\u00eb ndodhen aty do t\u00eb korrespondojn\u00eb me kriptovalut\u00ebn TON (Grams). Me gjas\u00eb, n\u00eb fillim nuk do t\u00eb ekzistojn\u00eb t\u00eb tjera vorkchain.<\/p>\n<p><\/p>\n<h3 id=\"shardcheyny-infinite-sharding-paradigm\">Shardchains. Paradigma e Sharding-ut t\u00eb Pafund.<\/h3>\n<p><\/p>\n<p>Por rritja e numrit t\u00eb blockchain-ve nuk ndalon k\u00ebtu. Le t\u00eb kuptojm\u00eb sharding-un. Imagjinoni se \u00e7do llogari (account_id) ka blockchain-in e vet \u2014 aty ndodhen t\u00eb gjitha mesazhet q\u00eb i vijn\u00eb \u2014 dhe gjendjet e t\u00eb gjith\u00ebve k\u00ebtyre blockchain-ve ruhen n\u00eb node t\u00eb ve\u00e7anta.<\/p>\n<p><\/p>\n<p>Sigurisht, kjo \u00ebsht\u00eb shum\u00eb e shpenzueshme: me siguri, n\u00eb secilin nga k\u00ebto <strong>shardchains<\/strong> (<em>shardchain<\/em>, <em>blloku i shard-it<\/em>) transaksionet do t\u00eb mb\u00ebrrijn\u00eb shum\u00eb rrall\u00eb, dhe do t\u00eb nevojiten shum\u00eb node t\u00eb fuqishme (p\u00ebr t'u shkuar p\u00ebrpara, v\u00ebrej se b\u00ebhet fjal\u00eb jo vet\u00ebm p\u00ebr klient\u00eb n\u00eb telefonat mobil \u2014 por p\u00ebr server\u00eb t\u00eb r\u00ebnd\u00ebsish\u00ebm).<\/p>\n<p><\/p>\n<p>Prandaj, shardchains kombinon llogarit\u00eb sipas prefikseve binar\u00eb t\u00eb identifikuesve t\u00eb tyre: n\u00ebse shardchain ka prefiks 0110, at\u00ebher\u00eb do t\u00eb p\u00ebrfshihen transaksionet e t\u00eb gjitha account_id q\u00eb fillojn\u00eb me k\u00ebto numra. Ky <em>shard_prefix<\/em> mund t\u00eb ket\u00eb nj\u00eb gjat\u00ebsi nga 0 deri n\u00eb 60 bit \u2014 dhe e r\u00ebnd\u00ebsishme, mund t\u00eb ndryshoj\u00eb dinamikisht.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"TON: Telegram Open Network. Pjesa 2: Blockchain-et, shardimi\" src=\"\/wp-content\/uploads\/2019\/05\/568aec7ad3d8cc3e268f0e60d453b502.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Kur sa nj\u00eb nga shardchain-\u00ebt fillon t\u00eb pranoj\u00eb nj\u00eb num\u00ebr t\u00eb tep\u00ebrt transaksionesh, nyjat q\u00eb punojn\u00eb mbi t\u00eb, sipas rregullave t\u00eb caktuara paraprakisht, \"ndajn\u00eb\" at\u00eb n\u00eb dy fije t\u00eb reja \u2014 prefikset e tyre do t\u00eb jen\u00eb nj\u00eb bit m\u00eb t\u00eb gjata (dhe p\u00ebr nj\u00ebr\u00ebn prej tyre ky bit do t\u00eb jet\u00eb 0, nd\u00ebrsa p\u00ebr tjetr\u00ebn \u2014 1). P\u00ebr shembull, <em>shard_prefix<\/em> = <u>0110<\/u>b do t\u00eb ndahet n\u00eb <u>0110<\/u>0b dhe <u>0110<\/u>1b. Nga ana tjet\u00ebr, n\u00ebse dy \"fije\" fqinj\u00eb fillojn\u00eb t\u00eb ndihen mjaft komode (p\u00ebr nj\u00eb periudh\u00eb t\u00eb caktuar), ato p\u00ebrs\u00ebri do t\u00eb bashkohen.<\/p>\n<p><\/p>\n<p>Pra, sharding-u b\u00ebhet \"nga posht\u00eb lart\" \u2014 ne supozojm\u00eb se secili llogari ka shardin e vet, por ato \u2014 deri n\u00eb nj\u00eb moment \u2014 jan\u00eb \"ngjitur\" sipas prefikseve. Kjo n\u00ebnkupton <strong>Paradigma Infinite Sharding<\/strong> (<em>paradigm\u00ebn e sharding-ut t\u00eb pafund<\/em>).<\/p>\n<p><\/p>\n<p>Ve\u00e7an\u00ebrisht do t\u00eb doja t\u00eb theksoja se workchain-\u00ebt ekzistojn\u00eb vet\u00ebm n\u00eb m\u00ebnyr\u00eb virtuale \u2014 n\u00eb t\u00eb v\u00ebrtet\u00eb, <em>workchain_id<\/em> \u00ebsht\u00eb nj\u00eb pjes\u00eb e identifikuesit t\u00eb caktuar t\u00eb shardchain-it. Duke folur n\u00eb nj\u00eb gjuh\u00eb formale, \u00e7do shardchain p\u00ebrcaktohet nga nj\u00eb \u00e7ift numrash (<em>workchain_id<\/em>, <em>shard_prefix<\/em>).<\/p>\n<p><\/p>\n<h3 id=\"ispravlenie-oshibok-vertikalnye-blokcheyny\">Korrigjimi i gabimeve. Bllokchain-et vertikale.<\/h3>\n<p><\/p>\n<p>Tradicionalisht mendohet se \u00e7do transaksion n\u00eb blockchain \u00ebsht\u00eb \"i gdhendur n\u00eb gur\". Megjithat\u00eb, n\u00eb rastin e TON-it parashikohet mund\u00ebsia p\u00ebr \"t\u00eb shkruar historin\u00eb\" \u2014 n\u00eb rast se dikush (n\u00eb k\u00ebt\u00eb rast, <em>nyja-\"peshkatar\"<\/em>) d\u00ebshmon se nj\u00eb nga blloqet \u00ebsht\u00eb n\u00ebnshkruar n\u00eb m\u00ebnyr\u00eb t\u00eb gabuar. N\u00eb k\u00ebt\u00eb rast, n\u00eb shardchain-in p\u00ebrkat\u00ebs shtohet nj\u00eb bllok korrigjues, q\u00eb p\u00ebrmban hash-in e bllokut q\u00eb po korrigjohet (e jo t\u00eb bllokut t\u00eb fundit n\u00eb shardchain). Duke e para shardchain-in si nj\u00eb zinxhir blloqesh q\u00eb i p\u00ebrgjigjet horizontalisht, mund t\u00eb thuhet se blloku korrigjues bashk\u00eblidhet me bllokun e gabuar jo n\u00eb t\u00eb djatht\u00eb, por sip\u00ebr \u2014 prandaj besohet se ai b\u00ebhet pjes\u00eb e nj\u00eb \"blockchain-i vertical t\u00eb vog\u00ebl\". K\u00ebshtu, mund t\u00eb thuhet se shardchain-et jan\u00eb <em>blockchain t\u00eb dyansh\u00ebm<\/em>.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"TON: Telegram Open Network. Pjesa 2: Blockchain-et, shardimi\" src=\"\/wp-content\/uploads\/2019\/05\/eda526705f5febd37995901b5542264c.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>N\u00eb rastin kur pas nj\u00eb bloku t\u00eb gabuar blloqet e m\u00ebvonshme referoheshin n\u00eb ndryshimet e b\u00ebr\u00eb prej tij (dmth, ishin realizuar transaksione t\u00eb reja mbi baza jo valide), ato blloqe gjithashtu do t\u00eb ken\u00eb shtres\u00ebn e korrigjimit sip\u00ebr. N\u00ebse blloqet nuk preknin informatat \"e goditura\", ato nuk do t\u00eb ishin t\u00eb prekur nga k\u00ebto \"val\u00eb korrigjuese\". P\u00ebr shembull, n\u00eb ilustrimin e m\u00ebsip\u00ebrm, transaksioni i bllokut t\u00eb par\u00eb u cil\u00ebsua si i pavlefsh\u00ebm, q\u00eb rrit bilancin e llogaris\u00eb C \u2014 prandaj transaksioni q\u00eb ul bilancin e k\u00ebtij llogarie n\u00eb bllokun e tret\u00eb gjithashtu duhet t\u00eb anulohet, dhe mbi vet\u00eb bllokun do t\u00eb komitohet nj\u00eb bllok korrigjues.<\/p>\n<p><\/p>\n<p>Duhet t\u00eb theksohet \u2014 ndon\u00ebse blloqet korrigjuese shfaqen t\u00eb pozicionuara \"sip\u00ebr\" origjinal\u00ebve, n\u00eb fakt ato do t\u00eb shtohen n\u00eb fund t\u00eb p\u00ebrkat\u00ebsit blockchain (aty ku duhet t\u00eb jen\u00eb kronologjikisht). Pozicioni dy-dimensionale vet\u00ebm tregon se n\u00eb cil\u00ebn pik\u00eb n\u00eb blockchain ato do t\u00eb \"lidhen\" (p\u00ebrmes hash-it t\u00eb bllokut origjinal q\u00eb ndodhet brenda tyre).<\/p>\n<p><\/p>\n<p>Mund t\u00eb filozofojm\u00eb separatisht p\u00ebr sa e mir\u00eb \u00ebsht\u00eb zgjidhja \"t\u00eb ndryshosh t\u00eb kaluar\u00ebn\". Duket se, n\u00ebse ne lejojm\u00eb mund\u00ebsin\u00eb e shfaqjes s\u00eb nj\u00eb blloku t\u00eb gabuar n\u00eb sharding, at\u00ebr nuk duhet t\u00eb p\u00ebrjashtohet mund\u00ebsia e shfaqjes s\u00eb nj\u00eb blloku korrigjues t\u00eb gabuar. K\u00ebtu, sa mund t\u00eb gjykoj, ndryshimi \u00ebsht\u00eb n\u00eb numrin e nyjeve q\u00eb duhet t\u00eb arrijn\u00eb konsensus mbi blloqet e reja \u2014 mbi \u00e7do sharding do t\u00eb punohet nga nj\u00eb \"<em>grup pune<\/em>\" i nyjeve (shum\u00eb shpesh q\u00eb ndryshojn\u00eb p\u00ebrb\u00ebrjen e tyre), nd\u00ebrsa futja e blloqeve korrigjuese do t\u00eb k\u00ebrkoj\u00eb miratimin e t\u00eb gjitha <em>nyjeve-validatore<\/em>. M\u00eb shum\u00eb p\u00ebr validatoret, grupet e pun\u00ebs dhe role t\u00eb tjera t\u00eb nyjeve do t'ju tregoj n\u00eb artikullin tjet\u00ebr.<\/p>\n<p><\/p>\n<h3 id=\"odin-blokcheyn-chtob-pravit-vsemi\">Nj\u00eb blockchain, p\u00ebr t\u00eb kontrolluar t\u00eb gjith\u00eb<\/h3>\n<p><\/p>\n<p>M\u00eb lart \u00ebsht\u00eb p\u00ebrmendur shum\u00eb informacion mbi llojet e ndryshme t\u00eb blockchain-\u00ebve, q\u00eb gjithashtu duhet t\u00eb ruhet diku. N\u00eb ve\u00e7anti, b\u00ebhet fjal\u00eb p\u00ebr informacionin e m\u00ebposht\u00ebm:<\/p>\n<p><\/p>\n<ul>\n<li>p\u00ebr numrin dhe konfigurimet e workchains;<\/li>\n<li>p\u00ebr numrin e sharding-\u00ebve dhe prefikset e tyre;<\/li>\n<li>p\u00ebr cilat nyje jan\u00eb p\u00ebrgjegj\u00ebse aktualisht p\u00ebr cilat sharding;<\/li>\n<li>hash-et e blloqeve t\u00eb fundit t\u00eb shtuar n\u00eb t\u00eb gjitha sharding.<\/li>\n<\/ul>\n<p><\/p>\n<p>Si\u00e7 keni mundur t\u00eb kuptoni, t\u00eb gjitha k\u00ebto gj\u00ebra regjistrohen n\u00eb nj\u00eb tjet\u00ebr depo-bllokchain \u2014 <strong>masterchain<\/strong> (<em>masterchain<\/em>, <em>master blockchain<\/em>). Fal\u00eb pranis\u00eb s\u00eb hash-eve n\u00eb blloqet e t\u00eb gjitha shardchains, ai e b\u00ebn sistemin shum\u00eb t\u00eb lidhur. Kjo do t\u00eb thot\u00eb gjithashtu se gjenerimi i nj\u00eb blloku n\u00eb masterchain do t\u00eb ndodh\u00eb menj\u00ebher\u00eb pas gjenerimit t\u00eb blloqeve n\u00eb shardchains - pritet q\u00eb blloqet n\u00eb shardchains t\u00eb shfaqen pothuajse nj\u00ebkoh\u00ebsisht af\u00ebrsisht \u00e7do 5 sekonda, nd\u00ebrsa nj\u00eb bllok tjet\u00ebr n\u00eb masterchain nj\u00eb sekond\u00eb pas k\u00ebsaj.<\/p>\n<p><\/p>\n<p>Por kush do t\u00eb jet\u00eb p\u00ebrgjegj\u00ebs p\u00ebr realizimin e gjith\u00eb k\u00ebsaj pune titanike - p\u00ebr d\u00ebrgimin e mesazheve, ekzekutimin e kontratave inteligjente, formimin e blloqeve n\u00eb shardchains dhe masterchain, dhe gjithashtu verifikimin e blloqeve p\u00ebr gabime? A do ta b\u00ebjn\u00eb gjith\u00e7ka fshehtazi telefonat e miliona p\u00ebrdoruesve me klientin e instaluar t\u00eb Telegramit? Ose ndoshta ekipi i Durov do t\u00eb heq\u00eb dor\u00eb nga idet\u00eb e decentralizimit dhe do ta b\u00ebjn\u00eb k\u00ebt\u00eb server\u00ebt e tyre si m\u00eb par\u00eb?<\/p>\n<p><\/p>\n<p>N\u00eb t\u00eb v\u00ebrtet\u00eb, asnj\u00eb nga k\u00ebto p\u00ebrgjigje nuk \u00ebsht\u00eb e sakt\u00eb. Por hap\u00ebsira e k\u00ebtij artikulli po mbaron shpejt, prandaj diskutimi mbi rolet e ndryshme t\u00eb nyjeve (ju mund t\u00eb keni v\u00ebn\u00eb re p\u00ebrmendjen e disa prej tyre), si dhe mekanikat e funksionimit t\u00eb tyre do t\u00eb vazhdoj\u00eb n\u00eb pjes\u00ebn tjet\u00ebr.<\/p>\n<p>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/354568\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u2014 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u0433\u043e\u0442\u043e\u0432\u044f\u0449\u0435\u0439\u0441\u044f \u043a \u0432\u044b\u0445\u043e\u0434\u0443 \u0432 \u044d\u0442\u043e\u043c \u0433\u043e\u0434\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 Telegram Open Network (TON). \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0435\u0451 \u0441\u0430\u043c\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0443\u0437\u043b\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044d\u0442\u043e\u0439 \u0441\u0435\u0442\u0438 \u044f \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u044e \u0438 \u0432\u0435\u0441\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":26098,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-34631","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/ton-telegram-open-network-chast-2-blokchejny-shardirovanie\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47TON: Telegram Open Network. \u0427\u0430\u0441\u0442\u044c 2: \u0411\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u044b, \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 | ProHoster\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/ton-telegram-open-network-chast-2-blokchejny-shardirovanie\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:59:31+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:59:31+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47TON: Rrjeti i Hapur t\u00eb Telegramit. Pjesa 2: Blockchain, shardimi | ProHoster","description":"","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/ton-telegram-open-network-chast-2-blokchejny-shardirovanie","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47TON: Telegram Open Network. \u0427\u0430\u0441\u0442\u044c 2: \u0411\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u044b, \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 | ProHoster","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/ton-telegram-open-network-chast-2-blokchejny-shardirovanie","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:59:31+00:00","article:modified_time":"2019-10-31T18:59:31+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"34631","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 20:00:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 02:17:24","updated":"2026-01-21 20:00:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/34631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=34631"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/34631\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/26098"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=34631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=34631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=34631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}