paint-brush
Inethiwekhi yeFayibha: Inethiwekhi yoMbane esekwe kwi-CKBnge@ckb
3,137 ukufunda
3,137 ukufunda

Inethiwekhi yeFayibha: Inethiwekhi yoMbane esekwe kwi-CKB

nge Nervos CKB7m2024/09/13
Read on Terminal Reader

Inde kakhulu; Ukufunda

I-Fiber Network sisizukulwana esilandelayo, inethiwekhi yombane eqhelekileyo eyakhiwe kwi-Nervos CKB kunye ne-off-chain channels. Yenzelwe ukubonelela ngokukhawuleza, ngexabiso eliphantsi, kunye nokunikezelwa kweentlawulo ezininzi zeethokheni kunye neentengiselwano zoontanga kwii-asethi ze-RGB ++.
featured image - Inethiwekhi yeFayibha: Inethiwekhi yoMbane esekwe kwi-CKB
Nervos CKB HackerNoon profile picture
0-item
1-item


Isishwankathelo

I-Fiber Network sisizukulwana esilandelayo, inethiwekhi yombane eqhelekileyo eyakhiwe kwi-Nervos CKB kunye ne-off-chain channels. Yenzelwe ukubonelela ngokukhawuleza, ngexabiso eliphantsi, kunye nokunikezelwa kweentlawulo ezininzi zeethokheni kunye neentengiselwano zoontanga kwii-asethi ze-RGB ++.

Imvelaphi

Ukuzivelela kunye neMingeni yeTekhnoloji yeBlockchain

Itekhnoloji yeBlockchain iye yavela ngokukhawuleza ukusukela ekuqaleni kweBitcoin. Ekuqaleni yenzelwe iintlawulo ezilula, iye yanda ngokuthe ngcembe kwiindawo ezahlukeneyo ezifana nezivumelwano ze-smart, i-decentralized finance (DeFi), kunye nee-non-fungible tokens (NFTs). Ngaphandle kweenzuzo zayo ezibalulekileyo kukhuseleko, elubala, kunye nokwabela amagunya, itekhnoloji ye-blockchain ijongene nemiceli mngeni emininzi kwi-scalability kunye nesantya sokuthengiselana.


  1. Ukubaleka . Iibhlokhi zemveli ezifana neBitcoin kunye ne-Ethereum zijongene nemiqobo ebalulekileyo kurhwebo. Ngenxa yobungakanani bobungakanani bebhloko yeBitcoin kunye ne-10-minute block block time time, network yayo inokusebenza kuphela malunga ne-7 transactions ngomzuzwana; I-Ethereum, nangona iphuculwe, isenamandla okusebenza kwentengiselwano engaphantsi kweenethiwekhi zentlawulo zemveli.


  2. Iintlawulo eziphezulu zentengiselwano . Njengoko ingxinano yenethiwekhi inyuka, iintlawulo zentengiselwano zinyuka kakhulu. Ngokomzekelo, iifizi zegesi kwinethiwekhi ye-Ethereum ngexesha lexesha eliphakamileyo lingadlula inani lokuthengiselana ngokwalo, lichaphazela kakhulu amava omsebenzisi kunye nokunciphisa ukwenzeka kwee-micropayments.


  3. Amaxesha okuqinisekisa intengiselwano amade . Kwiinethiwekhi ze-blockchain zendabuko, ukuthengiselana kufuneka kulinde iziqinisekiso ezininzi zebhloko ukuba zithathwe njengezokugqibela. Le nkqubo ingathatha imizuzu ukuya kwiiyure, iyenza ingafaneleki kwimiba yokuhlawula ngoko nangoko.


Nangona i-Nervos CKB yenze uphuculo ngokwemiqathango yokusebenza kunye namaxesha okuqinisekisa, kusafuneka inyuse ngakumbi isantya sokuthengiselana kunye nokunciphisa iindleko zokuthengiselana ukuhlangabezana neemfuno ze-micropayments kunye neentlawulo ezikhawulezayo.

Impembelelo evela kuMbane woMbane

I-Lightning Network, isisombululo se-2 sokulinganisa kwinethiwekhi ye-Bitcoin, iphumelele ngempumelelo i-micropayments ekhawulezayo, enexabiso eliphantsi ngokusebenzisa i-off-chain transactions kunye nemijelo yokuhlawula. Iikhonsepthi zayo eziphambili ziquka:


  1. Iitshaneli zentlawulo : Abasebenzisi benza amajelo okuhlawula kwikhonkco. Nje ukuba ijelo livulwe, omabini amaqela angenza intengiselwano ngaphandle kwekhonkco elingenamkhawulo, kuphela ukulungisa i-chain xa itshaneli ivaliwe. Oku kunciphisa kakhulu inani leentengiselwano ze-on-chain, iphucula isantya sentengiselwano, kwaye ithoba imirhumo yentengiselwano.


  2. I-Hash Time-Locked Contracts (HTLC) : Nge-HTLCs, i-Lightning Network iqinisekisa ukuhanjiswa kwengxowa-mali ekhuselekileyo, ukunciphisa umngcipheko we-counterparty. Nokuba i-off-chain transactions ingaphumeleli, abasebenzisi basenokuzikhusela iimali zabo ngeekontraki ze-on-chain.


  3. Indlela yomzila : Inethiwekhi yoMbane isebenzisa i-multi-hop routing, evumela abasebenzisi ukuba bagqibe iintlawulo ngaphandle kokuvula iziteshi ezithe ngqo kunye nabamkeli, ngaloo ndlela baphucula ukuguquguquka kwenethiwekhi kunye nokusebenziseka.

Izinto ezilungileyo ze-Nervos CKB

I-Nervos CKB yi-platform ye-blockchain egxile kwizinto ezininzi kunye nokhuseleko. Uyilo lwayo olwahlukileyo lubonelela ngeenzuzo ezahlukeneyo ekujonganeni ne-blockchain scalability kunye nemicimbi yokusebenzisana:


  1. Indlela yemvumelwano : Ngokusekelwe kwi NC-Max iprotocol yokuvumelana, idibanisa ubungqina boMsebenzi (i-PoW) kunye neendlela zerenti karhulumente, ukuqinisekisa ukhuseleko lwenethiwekhi kunye nokusetyenziswa okusebenzayo kwezibonelelo.


  2. Amandla ekhontrakthi enobuchule obunamandla : Imodeli yeCell eyodwa ye-CKB kunye ne-RISC-V yomyalelo usete umatshini wenyani uphucula kakhulu ubunakho bemodeli ye-UTXO. Oku akuxhasi nje kuphela iTuring-complete izivumelwano ze-smart kodwa kukwaphumeza ngokulula iimpawu ezinjengokuthatyathwa kweakhawunti kunye neminqophiso, ukubonelela ngeprogrammability ebhetyebhetye ngakumbi, ukusebenzisana okungcono, kunye ne-scalability yezicelo ezinatyisiweyo.


  3. I-Tokenomics : I-tokenomics ye-CKB ikhuthaza ukubamba ixesha elide kunye nokusetyenziswa okunengqiqo kwemithombo yothungelwano, ukubonelela ngokukhuselekileyo kunye nokugcinwa kwendawo ephantsi kwezicelo, abaphuhlisi kunye nabasebenzisi.

Ukubaluleka kweProjekthi yeFiber Network

Ngokwakha imijelo ye-off-chain kwi-Nervos CKB, sijonge ukudibanisa amava aphumeleleyo kwiNethiwekhi yoMbane kunye neenzuzo zobugcisa zeCKB ukudala uthungelwano olukhawulezayo, oluphantsi, kunye nolwahlulo lwentlawulo ye-asethi yexesha lokwenene. Ngokukodwa:


  1. Ukusombulula imiba ye-scalability : Ngokusebenzisa imijelo yokuhlawula i-off-chain kunye nomzila we-multi-hop, i-Fiber Network inokufikelela kwi-high-throughput transaction processing, ukuhlangabezana neemfuno zabasebenzisi abakhulu.


  2. Ukunciphisa iindleko zokuthengiselana : Ngokunciphisa i-frequency of transactions on-chain, iyanciphisa imirhumo yokuthengiselana, ukwenza i-micropayments inokwenzeka kwaye isebenze.


  3. Ukuphucula isantya sentengiselwano : Uqinisekiso olukhawulezileyo lwentengiselwano ye-off-chain inikezela ngamava okuqinisekisa intlawulo yesibini elungeleleneyo iimeko ezahlukeneyo zokuhlawula kwangoko.


  4. Inkxaso ye-asethi ezininzi : I-Fiber Network isekela iintlawulo kwiintlobo ze-asethi zedijithali, ezinikezela abasebenzisi uluhlu olubanzi lweendlela zokuhlawula.


  5. Ukusebenzisana : I-Fiber Network isekela ukusebenzisana kunye ne-Bitcoin Lightning Network, inikezela ngenkxaso yeentlawulo ze-cross-chain kunye nokudluliselwa kwe-asethi.

Uyilo lwezoYilo

I-Architecture iyonke

Uyilo lulonke lweFiber Network lubandakanya ezi modyuli zingundoqo zilandelayo:


  1. Imijelo yeNtlawulo yangaphandle (iiChaneli zeFayibha)
  2. Iikhontrakthi ze-on-Chain (HTLC)
  3. Ii-Multi-Hop Routing
  4. Inkonzo yeMboniselo

Imijelo yeNtlawulo ye-Off-chain

Imijelo yentlawulo ye-Off-chain ngundoqo we-Fiber Network, eyenza ukuthengiselana okuninzi ngaphandle kwe-chain kunye ne-on-chain settlement kuphela xa umjelo uvaliwe. Lo matshini unciphisa kakhulu inani leentengiselwano ze-on-chain, iphucula isantya sokuthengiselana, kwaye ithoba imirhumo yentengiselwano. Ukuqukunjelwa komsebenzi jikelele kungokulandelayo:


  1. Ukuvula isitishi : Amaqela amabini avula itshaneli yokuhlawula kwi-chain, itshixa isixa esithile se-CKB okanye i-RGB++ ye-asethi.


  2. Ukuthengiswa kwe-off-chain : Xa ijelo livuliwe, omabini amaqela angenza inani elingenamkhawulo leentengiselwano ze-off-chain, ukuhlaziya i-channel state kunye nentengiselwano nganye ngaphandle kokusasazwa ngokukhawuleza kwikhonkco.


  3. Ukuvala isitishi : Xa naliphi na iqela lithatha isigqibo sokuvala itshaneli, ijelo lokugqibela lisasazwa kwityathanga ukuze kulungiswe, kuqinisekiswa ukuba iibhalansi zokugqibela zawo omabini amaqela ziqinisekisiwe.


Ifomati yonxibelelwano lomyalezo inokubhekiselwa kuyo IFayibha Network yeP2P yeProtocol yoMyalezo .

Iikhontrakthi ze-On-Chain

Okwangoku, sisebenzisa i-Hash Time-Locked Contracts (HTLC) ukuqinisekisa ukhuseleko lwe-off-chain transactions kunye nokugcina ukuhambelana ne-Lightning Network. Oku kunciphisa umngcipheko weqela, ukuqinisekisa ukuba nokuba i-off-chain transactions ingaphumeleli, abasebenzisi bangakwazi ukukhusela iimali zabo ngokusebenzisa izivumelwano ze-on-chain.


Ukuqukunjelwa komsebenzi jikelele kungokulandelayo:


  1. Ukuqaliswa kwentengiselwano : Umqalisi wentlawulo udala intengiselwano nge-hashlock kunye nexesha lokuvala, kwaye utshixe isixa esithile se-CKB.


  2. Ukuqinisekiswa kwe-Hash : Ummkeli wentlawulo kufuneka anike umfanekiso ochanekileyo we-hash ngexesha elichaziweyo lokuvula ukuthengiselana kunye nokugqiba ukudluliselwa kwengxowa-mali.


  3. Imbuyekezo yexesha lokuvala : Ukuba umamkeli uyasilela ukubonelela nge-hash preimage echanekileyo ngexesha elichaziweyo, intengiselwano iya kuzivula ngokuzenzekelayo kwaye ibuyisele imali kumqalisi wentlawulo.


Enkosi ngokugqibelela kwe-CKB's Turing, sinokusebenzisa izivumelwano eziguquguqukayo nezikhuselekileyo kwikhonkco. Siya kwandisa ngakumbi ukusebenza kwekhontrakthi kwixesha elizayo, elifana nokwazisa indlela yokurhoxiswa esekelwe kwiinguqulelo kunye neZibhambathiso eziKhuselekileyo zePoint Time-Locked.

Multi-hop Routing

Umzila we-Multi-hop uvumela abasebenzisi ukuba bagqibe iintlawulo ngokusebenzisa iindawo ezininzi eziphakathi ngaphandle kokuseka iindlela zokuhlawula ngokuthe ngqo kunye nenkampani. Lo matshini wongeza ukuguquguquka kwenethiwekhi kunye nokugubungela.


Ukuqukunjelwa komsebenzi jikelele kungokulandelayo:


  1. Ukufunyanwa kwendlela : Umqali wentlawulo ufumanisa eyona ndlela ilungileyo ukusuka kuye ukuya kumamkeli wentlawulo ngokusebenzisa imodyuli yomzila.


  2. Ukuvalwa kwendlela : Indawo nganye endleleni idala iikhontrakthi ezihambelanayo zeHTLC, iqinisekisa ukudluliselwa kwengxowa-mali okukhuselekileyo.


  3. Ukugqitywa kwentlawulo : Ummkeli wentlawulo uvula i-HTLC, kwaye iimali zidluliselwe ngokulandelelana kwi-node nganye endleleni.


Siza kuphumeza iintlawulo ezinqamlezileyo apha zisebenzisa izivumelwano zeHTLC, ukuxhasa ukusebenzisana kunye neNethiwekhi yoMbane ngenkonzo ye-cross-chain hub. Ukuze ufumane iinkcukacha ezithe vetshe, nceda ujonge ku IProtocol ye-Payment Cross-Chain Protocol ene-HTLC .

Inkonzo yeMboniselo

Inkonzo yokulinda yinxalenye ebalulekileyo yeFiber Network, ejongene nokubeka iliso kwimeko yeendlela zokuhlawula ngaphandle kwekhonkco kunye nokuqinisekisa ukhuseleko lwamajelo kunye neemali. Imisebenzi kunye neendima zayo zezi zilandelayo:


  1. Ukujongwa kwesitishi : Ukubeka iliso ngexesha lokwenyani kwimeko yejelo lokuhlawula kubo bonke abasebenzisi abathatha inxaxheba, kubandakanywa ukuvula, ukuhlaziya, kunye nokuvala amajelo.


  2. Ukufunyaniswa okungaqhelekanga : Ukubona imisebenzi engaqhelekanga kwitshaneli, njengabasebenzisi abakhohlakeleyo abazama ukuvala amajelo anelizwe elidala okanye uhlaselo oluchitha kabini.


  3. Impendulo ekhawulezileyo : Xa okungaqhelekanga kubhaqwe, ngokukhawuleza kusasaza ijelo letshaneli yamva nje kuthungelwano lwe-blockchain ukunqanda ilahleko yengxowa-mali ngenxa yokuziphatha kakubi.

Inkqubela phambili yangoku kunye nezicwangciso zexesha elizayo

Okwangoku sigqibe iprototype yeFiber Network, siphumeza imisebenzi esisiseko yokuvula, ukuhlaziya, kunye nokuvala amajelo phakathi kweendawo ezimbini, kunye nokuqinisekisa ukusebenza kwe-cross-chain kunye neBitcoin Lightning Network. Ikhowudi yeprojekthi inokufumaneka kwezi zigcina zeGitHub zilandelayo:


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

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


Amanyathelo ethu alandelayo aquka ukugqiba iindlela ezininzi ze-hop kunye neenkonzo zokubukela, kunye nokuphucula i-interface ye-RPC kunye ne-SDK ukulungiselela ukufikelela lula kubaphuhlisi kwi-Fiber Network.


I-protocol yomzila we-multi-hop isekelwe kwi-algorithm ye-Dijkstra ukukhangela iindlela zokuhlawula, ngokunciphisa imirhumo yendlela kunye nokuphucula izinga lempumelelo yeentlawulo zeendlela ezininzi. Emva kokuba iNethiwekhi yeFiber iphile, siya kwenza i-algorithm yendlela esekwe kwitrafikhi yenethiwekhi kunye neemeko zokusebenza. Silindele ukubonelela ngeendlela ezi-2 okanye ezi-3 zokukhangela iindlela zokuziqhelanisa neendlela ezahlukeneyo zokukhetha kunye neemfuno zabasebenzisi. I-Fiber Network iya kuzisa izicwangciso zokuhlawula iindlela ezininzi, ukwahlula iimali ezinkulu zokuhlawula kwiindawo ezininzi, nganye ihanjiswe ngeendlela ezahlukeneyo, ngokuqhubekayo ukwandisa amathuba okuba neentlawulo eziyimpumelelo.


Inkonzo yokulinda iya kubonelelwa ngezinye iindawo kwiFiber Network. Ezi nodi ziya kuhlala kwi-intanethi, zibeke esweni iimeko ezingaqhelekanga kuthungelwano, kwaye zincede ukukhusela ii-asethi kumajelo. Inkonzo yokubeka iliso iya kulandelela kwakhona inkonzo ye-cross-chain hub. Nangona abasebenzisi be-offline ixesha elithile, inkonzo yokubeka iliso inokuqinisekisa utshintshiselwano oluyimpumelelo kunye neNethiwekhi yoMbane.


Ukongeza, siza kuthathela ingqalelo ukongeza amanqaku angakumbi kwiNethiwekhi yeFiber, efana nokuphumeza iialgorithms zokhuseleko lwabucala ezixhasa ulungelelwaniso lwe-CKB, kwaye ngokusekwe koku, ukunyusela umgaqo we-algorithms kunye neenkonzo zokubukela ukunyusa ukhuseleko kunye nemfihlo yolwazi lwentlawulo yabasebenzisi.