paint-brush
Fiber Network: Mheni Network Yakavakirwa paCKBby@ckb
3,136 kuverenga
3,136 kuverenga

Fiber Network: Mheni Network Yakavakirwa paCKB

by Nervos CKB7m2024/09/13
Read on Terminal Reader

Kurebesa; Kuverenga

Fiber Network chizvarwa chinotevera, chakajairika mheni network yakavakirwa paNervos CKB uye off-chain chiteshi. Yakagadzirirwa kupa kukurumidza, yakaderera-mutengo, uye decentralized akawanda-tokeni kubhadhara uye peer-to-peer transactions yeRGB++ assets.
featured image - Fiber Network: Mheni Network Yakavakirwa paCKB
Nervos CKB HackerNoon profile picture
0-item
1-item


Overview

Fiber Network chizvarwa chinotevera, chakajairika mheni network yakavakirwa paNervos CKB uye off-chain chiteshi. Yakagadzirirwa kupa kukurumidza, yakaderera-mutengo, uye yakatemerwa akawanda-tokeni kubhadhara uye peer-kune-vezera kutengeserana kweRGB++ midziyo.

Background

Evolution uye Matambudziko eBlockchain Technology

Blockchain tekinoroji yakakurumidza kushanduka kubva pakatanga Bitcoin. Pakutanga yakagadzirirwa kubhadhara kuri nyore, yakawedzera zvishoma nezvishoma muzvikamu zvakasiyana-siyana zvakadai sezvibvumirano zvekuchenjera, mari yakagadziriswa (DeFi), uye ma-non-fungible tokens (NFTs). Zvisinei nemabhenefiti ayo akakosha mukuchengetedzeka, pachena, uye kuendesa matunhu, blockchain tekinoroji inotarisana nematambudziko akati wandei mu scalability uye kukurumidza kwekutengesa.


  1. Scalability . Traditional blockchains seBitcoin neEthereum vanotarisana nemabhodhoro akakosha mukutengesa kwekutengesa. Nekuda kweBitcoin's block size limit uye 10-minute block generation time, network yayo inogona chete kugadzirisa nezve 7 transactions pasekondi; Ethereum, kunyangwe yakagadziridzwa, ichine dhizaini yekugadzirisa huwandu iri pasi pechinyakare kubhadhara network.


  2. High transaction fees . Sezvo kusangana kwetiweki kunowedzera, mari yekutengeserana inokwira zvakanyanya. Semuenzaniso, mari yegesi paEthereum network panguva dzepamusoro inogona kudarika mari yekutengeserana pachayo, inokanganisa zvakanyanya ruzivo rwevashandisi uye kuderedza kukwanisa kwe micropayments.


  3. Nguva refu yekusimbisa kutengeserana . Mune zvechinyakare blockchain network, kutengeserana kunofanirwa kumirira akawanda block simbiso kuti ionekwe seyekupedzisira. Izvi zvinogona kutora maminetsi kusvika maawa, zvichiita kuti dzisakodzere kubhadhara ipapo.


Kunyangwe Nervos CKB yakagadziridza maererano nekuita uye nguva yekusimbisa, ichiri kuda kuwedzera kukurumidza kwekutengesa uye kudzikisa mutengo wekutengesa kuzadzisa zvinodiwa zve micropayments uye kubhadhara ipapo.

Kufemerwa kubva kuMheni Network

Iyo Mheni Network, yakatsetseka 2 yekuyera mhinduro yeBitcoin network, yakabudirira kuwana nekukurumidza, yakaderera-inodhura micropayments kuburikidza ne-off-chain transaction uye nzira dzekubhadhara. Mafungiro ayo makuru anosanganisira:


  1. Kubhadhara nzira : Vashandisi vanogadzira nzira dzekubhadhara pa-cheni. Kana chiteshi chavhurwa, mapato ese ari maviri anogona kuita unlimited off-chain transaction, kungogadzirisa pa-cheni kana chiteshi chavharwa. Izvi zvinoderedza zvakanyanya nhamba ye-on-chain transactions, inovandudza kukurumidza kwekutengesa, uye inoderedza mari yekutengeserana.


  2. Hash Nguva-Yakiyiwa Zvibvumirano (HTLC) : Kuburikidza neHTLCs, iyo Mheni Network inova nechokwadi chekuchinjisa homwe kuchinjirwa, kuderedza ngozi yevamwe. Kunyangwe kana off-chain transactions ikakundikana, vashandisi vanogona kuchengetedza mari yavo kuburikidza ne-on-chain makondirakiti.


  3. Routing mechanism : Iyo Mheni Network inoshandisa akawanda-hop routing, ichibvumira vashandisi kupedzisa kubhadhara pasina kuvhura nzira dzakananga nevanogamuchira, nekudaro kuwedzera network kuchinjika uye usability.

Zvakanakira zveNervos CKB

Nervos CKB ipuratifomu ye blockchain yakatarisana nekuita zvakasiyana uye chengetedzo. Dhizaini yayo yakasarudzika inopa mabhenefiti akasiyana mukugadzirisa blockchain scalability uye nyaya dzekudyidzana:


  1. Consensus mechanism : Kubva pane iyo NC-Max consensus protocol, inosanganisa Humbowo hweBasa (PoW) nemaitiro ekurenda ehurumende, kuve nechokwadi chekuchengetedzwa kwetiweki uye kushandiswa kwezviwanikwa zvinobudirira.


  2. Yakasimba smart kondirakiti kugona : CKB yakasarudzika Cell modhi uye RISC-V yekuraira seti chaiyo muchina inosimudzira zvakanyanya kugona kweiyo UTXO modhi. Izvi hazvingo tsigire Turing-yakazara smart zvibvumirano asi zvakare shandisa zvinhu zviri nyore senge account abstraction uye zvibvumirano, zvichipa kuchinjika kurongeka, kudyidzana kuri nani, uye scalability yezvikumbiro zvakaiswa.


  3. Tokenomics : CKB's tokenomics inokurudzira kubata kwenguva refu uye zvine musoro kushandiswa kwetiweki zviwanikwa, ichipa yakachengeteka uye yakagadzikana nharaunda yakasarudzika yezvikumbiro, vanogadzira, uye vashandisi.

Kukosha kweFiber Network Project

Nekuvaka zviteshi zve-off-cheni paNervos CKB, tinovavarira kubatanidza chiitiko chakabudirira cheMheni Network neCKB's tekinoroji zvakanakira kugadzira inokurumidza, isingadhuri, uye yakaganhurwa yakawanda-asset chaiyo-nguva yekubhadhara network. Zvakananga:


  1. Kugadzirisa scalability nyaya : Kuburikidza ne-off-cheni yekubhadhara chiteshi uye akawanda-hop routing, Fiber Network inogona kuwana yakakwira-kuburikidza kutengeserana kwekugadzirisa, kusangana nezvinodiwa zvevashandisi vakakura.


  2. Kuderedza mutengo wekutengesa : Nekudzikisa kuwanda kwe-on-cheni kutengeserana, inodzikisa muripo wekutengesa, zvichiita kuti micropayments igoneke uye ishande.


  3. Kuvandudza transaction kumhanya : Iyo yekukurumidza simbiso ye-off-chain transaction inopa kupatsanurwa kwechipiri mubhadharo wekusimbisa chiitiko chakakodzera akasiyana ekubhadhara ipapo ipapo.


  4. Multi-asset rutsigiro : Fiber Network inotsigira kubhadhara mumhando dzakasiyana dzemidziyo yedhijitari, ichipa vashandisi huwandu hwakawanda hwekubhadhara sarudzo.


  5. Kudyidzana : Fiber Network inotsigira kudyidzana neBitcoin Mheni Network, ichipa rutsigiro rwekubhadhara-cheni kubhadhara uye kutamiswa kwezvinhu.

Architecture Design

Zvose Architecture

Iyo yakazara dhizaini yeFiber Network inosanganisira anotevera epakati mamodule:


  1. Off-Chain Payment Channels (Fiber Channels)
  2. On-Chain Contracts (HTLC)
  3. Multi-Hop Routing
  4. Basa reWatchtower

Off-cheni Payment Channels

Off-cheni yekubhadhara nzira ndiyo musimboti weFiber Network, inogonesa akawanda off-cheni kutengeserana ne-on-cheni kugadzirisa chete kana chiteshi chavharwa. Iyi nzira inoderedza zvakanyanya nhamba ye-on-chain transactions, inovandudza kukurumidza kwekutengesa, uye inoderedza mari yekutengeserana. General workflow ndeiyi inotevera:


  1. Kuvhura Chiteshi : Mapato maviri anovhura nzira yekubhadhara pa-cheni, achikiya imwe huwandu hweCKB kana RGB ++ midziyo.


  2. Off-chain transactions : Kana chiteshi chavhurwa, mapato ese ari maviri anogona kuitisa nhamba isina muganho ye-off-chain transaction, kuvandudza chiteshi chechiteshi nekutengeserana kwega kwega pasina kutepfenyura nekukurumidza kune cheni.


  3. Kuvhara Chiteshi : Kana bato rafunga kuvhara chiteshi, iyo yekupedzisira chiteshi inotepfenyurwa pa-cheni kuti igadziriswe, kuve nechokwadi chekuti masara ekupedzisira emapato ese asimbiswa.


Iyo meseji yekudyidzana fomati inogona kutaurwa mu Fiber Network P2P Mharidzo Protocol .

On-Chain Contracts

Parizvino, tinoshandisa Hash Time-Locked Contracts (HTLC) kuti tive nechokwadi chekuchengetedzwa kwe-off-chain transactions uye kuchengetedza kuenderana nemheni Network. Izvi zvinoderedza njodzi yevamwe, kuve nechokwadi chekuti kunyangwe kana off-chain transaction ikatadza, vashandisi vanogona kuchengetedza mari yavo kuburikidza ne-on-chain makondirakiti.


General workflow ndeiyi inotevera:


  1. Transaction initiation : Iye wekutanga kubhadhara anogadzira kutengeserana nehashlock uye timelock, uye anokiya imwe chiyero cheCKB.


  2. Hash verification : Iye anogamuchira mubhadharo anofanira kupa iyo chaiyo hashi preimage mukati menguva yakatarwa yekuvhura kutengeserana uye kupedzisa kuchinjisa homwe.


  3. Nguva yekudzoserwa mari : Kana iye anogamuchira akatadza kupa iyo chaiyo hashi preimage mukati menguva yakatarwa, kutengeserana kunozovhura otomatiki uye kudzosera kune wekutanga kubhadhara.


Nekuda kweCKB's Turing kukwana, tinokwanisa kuita zvinochinjika uye zvakachengeteka pa-chetani zvibvumirano. Tichawedzera mashandiro ekondirakiti mune ramangwana, sekuunza shanduro-yakavakirwa pakukanzura michina uye yakachengeteka zvakanyanya Point Time-Locked Contracts.

Multi-hop Routing

Multi-hop routing inobvumira vashandisi kupedzisa kubhadhara kuburikidza neakawanda epakati node pasina kumisikidza nzira dzekubhadhara dzakananga nemumwe. Iyi meshini inowedzera kuchinjika uye nekuvhara network.


General workflow ndeiyi inotevera:


  1. Kuwanikwa kwenzira : Iye anotanga kubhadhara anowana iyo chaiyo nzira kubva kwavari kuenda kune anobhadhara mubhadharo kuburikidza neiyo routing module.


  2. Nzira yekuvhara : Node yega yega munzira inogadzira inoenderana zvibvumirano zveHTLC, kuve nechokwadi chekuchinjisa homwe.


  3. Kupedzwa kwekubhadhara : Anobhadhara anovhura iyo HTLC, uye mari inotamiswa zvakatevedzana kune imwe neimwe node munzira.


Isu tichazoshandisawo kubhadhara-cheni pano tichishandisa zvibvumirano zveHTLC, tichitsigira kudyidzana neMheni Network kuburikidza nemuchinjiko-chetani hub sevhisi. Kuti uwane rumwe ruzivo, ndapota tarisa kune Payment Channel Cross-Chain Protocol ine HTLC .

Basa reWatchtower

Iyo watchtower sevhisi chinhu chakakosha cheFiber Network, ine basa rekutarisa mamiriro e-off-chain yekubhadhara nzira uye nekuona kuchengetedzwa kwemachaneli nemari. Mabasa nemabasa ayo ndeaya anotevera:


  1. Kutariswa kwechiteshi : Chaiyo-nguva yekutarisa mamiriro ekubhadhara chiteshi chevashandisi vese vari kutora chikamu, kusanganisira kuvhura, kugadzirisa, nekuvhara machaneli.


  2. Anomaly kuonekwa : Kuona zviitwa zvisina kujairika mumatanho, sevashandisi vane hutsinye vari kuedza kuvhara machanera nematunhu ekare kana kurwiswa kwekushandisa kaviri.


  3. Proactive mhinduro : Kana zvisizvo zvikaonekwa, nekukasira kutepfenyura nyika yazvino chiteshi kune blockchain network kudzivirira kurasikirwa kwehomwe nekuda kwehunhu hwakashata.

Kufambira mberi Kwezvino uye Zvirongwa Zveramangwana

Parizvino tapedza prototype yeFiber Network, tichiita mabasa ekutanga ekuvhura, kuvandudza, nekuvhara chiteshi pakati penodhi mbiri, uye zvakare kuona mashandiro emuchinjiko neBitcoin Mheni Network. Iyo kodhi yeprojekiti inogona kuwanikwa mune inotevera GitHub repositories:


  1. https://github.com/nervosnetwork/fiber

  2. https://github.com/nervosnetwork/fiber-scripts


Matanho edu anotevera anosanganisira kupedzisa multi-hop routing uye watchtower masevhisi, pamwe nekuvandudza iyo RPC interface uye SDK kufambisa nyore kuwana kune vanogadzira kuFiber Network.


Iyo yakawanda-hop routing protocol yakavakirwa paDijkstra algorithm yekutsvaga nzira dzekubhadhara, nekudaro kudzikisira muripo wenzira uye nekuvandudza mwero webudiriro yeakawanda-hop nzira yekubhadhara. Mushure mekunge Fiber Network yaenda kurarama, isu tichakwirisa iyo routing algorithm zvichienderana netiweki traffic uye maitiro ekushanda. Isu tinotarisira kupa 2 kana 3 nzira dzekutsvaga nzira dzekuchinja kune dzakasiyana siyana dzevashandisi zvido uye zvido. Fiber Network ichaunzawo nzira dzakawanda dzekubhadhara nzira, kupatsanura huwandu hwakakura hwekubhadhara muzvikamu zvakawanda, chimwe nechimwe chichifambiswa nenzira dzakasiyana, zvichiwedzera kuwedzera mukana wekubhadhara kwakabudirira.


Iyo watchtower sevhisi ichapihwa nedzimwe node muFiber Network. Aya ma node acharamba ari online, achitarisisa mamiriro asina kujairika munetiweki, uye anobatsira kuchengetedza zvinhu mumachaneli. Iyo yekutarisisa sevhisi inozoteedzerawo muchinjiko-cheni hub sevhisi. Kunyangwe kana vashandisi vange vasiri pamhepo kwekanguva, iyo yekutarisa sevhisi inogona kuona yakabudirira kuchinjana nemheni Network.


Pamusoro pezvo, isu tichafunga kuwedzera mamwe maficha kuFiber Network, sekushandisa kuchengetedzwa kwekuvanzika algorithms inosimudzira CKB's programmability, uye zvichibva pane izvi, optimize routing algorithms uye watchtower masevhisi kusimudzira kuchengetedzeka uye kuvanzika kweruzivo rwekubhadhara kwevashandisi.