欢迎来到环境100文库! | 帮助中心 分享价值,成长自我!

环境100文库

换一换
首页 环境100文库 > 资源分类 > PDF文档下载
 

RUFF (Ruff Chain)白皮书.pdf

  • 资源ID:3905       资源大小:403.82KB        全文页数:24页
  • 资源格式: PDF        下载权限:游客/注册会员/VIP会员    下载费用:10碳币 【人民币10元】
快捷注册下载 游客一键下载
会员登录下载
三方登录下载: 微信开放平台登录 QQ登录   微博登录  
下载资源需要10碳币 【人民币10元】
邮箱/手机:
温馨提示:
支付成功后,系统会自动生成账号(用户名和密码都是您填写的邮箱或者手机号),方便下次登录下载和查询订单;
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 
友情提示
2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,既可以正常下载了。
3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰   

RUFF (Ruff Chain)白皮书.pdf

pRuffIoTBlockchainWhitepaper[1]WorkingDraft,October2017, Rev.0.7.1SummaryRuffisa platdesignedtoimprove commerceby combiningtheInternetofThingsandblockchaintechnology. Ruffincorporatesa distributedoperatingsystemwithan openblockchain,usingvirtual businessto businessnetworksanda consensusalgorithmto realizebetterofflinesolutionsforinationflow andproduct sourcing needs.InCAPchoices, thetraditionalblockchainsacrificesusability toenhancetheconsistency anddistributionfaulttolerance.Ruff,througha combination ofedgecomputingandblockchainapplications,enhancesusabilityso astomeetthe InternetofThingsdemandforreal-timeflexibility.Thekeyproblem thatwewanttosolveisabout providingtrustedinteroperabilityandpaidinteroperabilitybetweendifferentIoTdevicesystems, andusingthesedevices’computingpowerto buildanopenRuffecosystem.BackgroundTheInternetofThingsoftenprovesanisolated,closed systemwhereinwideareaIoTandlocal IoTareunableto interact.Privatizedindustrialsystemsand IDC-basedITnetworksaredifficulttoconnect.However, IoTdata oftenrequireshighconsistency andsecurity, whichisaproblem thatnocentralizedtechnology can readilysolve.ModernIoTtechnologiesareoftenaccompaniedbyredundantnodesand mixedupclouds, but blockchain offersthepossibilityofa totalsolutiontoconsistencyandsecurityissues.Unfortunately,blockchaindevelopmentcurrentlysuffersfromlackofinfrastructure,hightechnical threshold,andexcessivetechnicalrisk.So far,thereareno maturesolutionstothescalabilityproblemsthat arefrequentlypointedout. Asaresult, thecurrentdistributedappdevelopmentissparseand remainsat thevirtuallevel,not yethavingrealworldinteractivity.FragmentationFrom itsbeginningthe Internetof Thingshas alwaysbeenfragmented.For instance,itstilltakesaspecificmobileapptoopeneach ofa growingnumber ofbikesharingmodels,whileintelecommunicationsyoucangenerallycallanyoneonanycarrier.WhyistherenosimplersolutionfortransportationoptionsThereisnostandardfor equivalentnodes,and theresultisbreakdown.Moreover,beyond transportationtools,theIoTconnectedthingswehave around ustodaylikedoors, lights, alarms, coffeemachines, andallsoon areon closedisolatednetworks.Thisfragmentationisnotjustprentamong differentproduct typesbut alsoamongproductsbelongingtothesametypesaswell.Thereissimplynot enoughhomogeneityamong IoTconnectedthingsforcurrent modelsto offerthenetworkabilitywealready enjoy inotherwaysthroughcomputersand mobiledevices.DotheseproblemsmeanthereisnopossiblesolutionatpresentTheanswerisnegative.Whatisneededistheintroductionofoperatingsystemandmiddlewareconcepts,compatibility withthe fragmentedspectrumIoThardware devices,andaunifiedprogramminginterface.StandardizationITtechnology isstandardizedoverall.For example,personalcomputers interactwithserversthroughthe httpprotocol presentedonthebrowser, whichisaofstandardization. Thenetworkforexchangesbetweendifferentbitcoinnodesisalsostandardized.Only byconstantlystandardizingfragmentedproductswillitbepossibleto unifycommunication among nodesorcreateaconsensusnetworkamong nodes.TheentireInternetofThingsindustryhasbeenstrivingforstandardizationfor over20 years.Onthephysicallevel,standardsexistfor WiFi,BLE,Zigbeeandsoon, andatthelevelofindustrialnetworksthereareModbus, Profibus, industrialethernet,andsoon, through inindustrialnetworksdifferentstandardscanbeincompatible.Neverthelessstandardizationhasnot beenachievedattheapplicationlevel.Machine A andMachineBmay beabletoconnect,butMachineAdoesnotknowanyinstructionsanipulatingorrequestingdatafrom MachineB.Worsestill,evenwithindevicesdifferentdriversanddifferentsoftwarevendorsfollowdifferentproprietaryprotocols, makingitdifficultforapplicationstointeract.Easeof useSometimescommands willnotbe readable.WIth GPIO_14highlevel-lowleveloperations,serialportcompatibility andswitch rolesmay sometimesbeunknown.Youoftenneedthefollowingdefinition.RCC_APB2PeriphClockRCC_APB2Periph_GPIOB, ENABLE;GPIO_LED.GPIO_Pin GPIO_Pin_1 |GPIO_Pin_11 |GPIO_Pin_14 |GPIO_Pin_15;GPIO_LED.GPIO_Mode GPIO_Mode_Out_PP;GPIO_LED.GPIO_Speed GPIO_Speed_50MHz;GPIO_InitGPIOB, amp;GPIO_LED;However,thisapproach isdifficultto bepromoteintheapplicationengineercommunity, asitsthresholdisconsiderable,itiseasyto writebuggy code,and readabilitycontinuesto remainlow.Engineerspreferthefollowingprogrammings39;led-green39;.on;39;led-red39;.off;Theaboveparagraph uses RuffOS programmingcode, and morecan befound at http//www.ruff.io.AsofDecember2017, 13,521 engineersworldwide haveregisteredwith theRuffcommunity, withmore thanhalfofthem purchasingtheRuffboard anddeployingcode.Whenthereisastandardapplicationlayerprotocol betweennodes, thecommunication betweennodesremainsat theabstractlevelofinteractionsbetween devices,such aspayments,requests,verifications,andsoon.Whenmultipledevicesconnectinteractivelytheabstraction levelwilltendtobevery high.At themostbasiclevel,thisistheinteractionbetween differentapplications.Unifyingstandardsintheapplicationlayeristhemosturgentchallengetosolveforthe InternetofThings.Itisalsoanimportantinfrastructureconsiderationfor theinterconnectivity andinteroperability ofallthingsinthefuture.IoTstandardizationwillnotbeimplementedviaa centralizedcloud. Rather, startingfrom computingattheedgecomputingnodelevel,thetraditionalmodulecloud model willabandoned.Thisapplicationlogicwill aunifiedprogrammingmodelbasedoutsideoffirmware.ReliableinteroperabilitybetweenIoT devicesEverysmart devicehasanaddress,andwhenthedeviceissoldthemerchantentersthisaddressintothehardwareand providesaQR codefor containinga privateaddresskeyinthehardware’spackaging.Thecontrol center, by obtainingtheprivatekey,sendsthedeviceabindcommandsignedwith theprivatekeythat enablescompletecontrol of thehardware. Afterthebinding,thecontrol centercandeletethedevice39;sprivatekeyandsaveit’sownprivatekey. Peer-to-peercontrolThe control center operates the device by initiating a control TX with itsown signature to the device. No chain involvement is required, but control center andequipmentareonlinewhenneeded. Chain-statebasedcontrol Whenthecontrolendcan not establisha point-to-point connectionwiththedevice,thecontrolendcan consumetokensandwritea quot;statechangequot;TXor quot;controlcommandquot; TX on the chain to operate the target device. Each of these TX are equallynecessary. The target device can synchronize its status or control commands directly withthe chain, or through a trusted light node such as a bridge device. Blockchain thus solvesthe problems inherent in cloud operation and the maintenance costs and stability issues ofconnectingall devicestothecloud. Automated control There is no need to use contracts to set the logic of quot;turn off the airconditioner when the temperature is below 15 Cquot;. Such custom control logic can beimplemented using the console app built with traditional development language, reducingequipment support contract costs, but also reduce the likelihood of main chain jammingwhenrunningcontracts.Basedontheimplementationoftheabove, multiplevendorscantogether anopenecosystemonRuff.TimesequencedataMostIoTdataisarrangedintimesequences, makingita naturalfitforthe blockchain.Timestampdatacanbe appliedtopreventreplayattacksandsolveproblems causedby concurrentdeadlocks.Inthe pastthisdatawasnot effectivelycombinedonisolatedcentralizednetworks, withtheultimateissueofdata consistencyincirculation. ERP,MES, WMS andothercentralizedsystemssimplycannot ensureconsistentproduct traceabilityintheproduction, storage,andcirculationprocesses.Ruff39;sedgecomputingnodewillsynchronizethetimestampasthecore datavalue, thuscontrollingthebusinesslogicwithinthelocal area network.Timestampswillbesynchronizedacrosstheentireblockchain network, tracingthebehavior ofallnodesinthenetworkatthesametimetomakethestateofthenetworkrestorableatagivenpoint.ConsensusmechanismToaccount forthecomputingpowerofmasterdevicesintheInternetofThingswechoseDPoSasRuff’sconsensusalgorithm.Accordingto thisalgorithm, peoplewho holdtokensacrossthenetworkcanchooseblock producersthrough avotingsystem.Anyonecan participateinblockproductiononce elected.Thissystemproducesablock every9seconds.At anyonemoment,onlyoneproducer isauthorized toproducea block.Iftheblock isnotsuccessfullydeliveredwithinacertaintimeperioditwillbeskippedover.Any fullnodecan beacandidatefora specifictransaction,andthesystemgenerates105proxy agentsfrom candidatesvia avotingmechanism.Thefollowingfigureshowsthenumberofproxy agentsunderthecircumstancesof5possibleblockdistributionsWebresourcesarenot free,anda rewardwillbeissuedwheneverablock containingIoTcontractsisgenerated.Blockgenerationinoursystemiscountedbasedon105blocksperperiod.Atthebeginningofeachperiod,theprocessofpicking105proxy agentsfrom candidatesiscalleda round.Thereisa fixednumberof105 slotsinaround, andtherewillbe105blocks. Allcandidatescanvote VOTETXtoselectthenextroundofproxy agents.Each block containsitsownround andslotnumbers inadditionto itsown height.Round numbersarecontinuous, whileslotnumbersmay not becontinuous.Candidatesmustinitiateatransactiontype Voteonaturn, andselectagivennumber ofproxyagentsfrom avalidcandidatelist.Ifthetotal numberofcandidatesexceeds318,thenpreviousroundproxieswillnotbeallowedto bere-elected.Whenthecurrentround ofblock slotsreaches 105 If a quorum for a vote cannot be obtained, all current proxies will be reelected by default forthenextround. If a voting quorum is reached, the 105 proxies with the highest vote count will be selectedforthenextround.Basedonthehash ofthelastslotblock ofthepreviousround, adefinitelistof roundproxies’blockorderscanbeobtained.Eachblock, distributedbytheagentresponsiblefortheslot, isdistributedata 9secondintervalfrom theprevious block.Otheragentsnotcurrently responsiblefor blockdistributionwillberesponsiblefortransactioncollection, andwhenitistheirturn todistributemust giveprioritytotransactionsnot yetincluded.Transactioncollection isdeterminedbyround.Iffor exampleitisproxy agentN’sturnbuttheagent’snodeisdropped,thenthenextagentwillautomaticallydistributethenextblockafter 18seconds.A slotvacancy willbereportedfor thepreviousround, andfor thecurrent round thenumber ofblocksstillreach 105.Byanalyzingthe chaindatafor votetransactionsandblock slots,aswellasroundvalue.You canthereforedeterminewhichcandidatesdoanddo notwork well.Duringaround, an agentmayinitiateapollto disqualifycertaincandidates.Ifa proxy agentfailsto delivera blockon time,forexample,theagentwillbeblockedfrom distributionfor thenext24 hours.Thenallcandidateswillvoteonwhether todisqualifythecandidateornot.ChaincontrolInthe typicalstructureabove, thelightnodesandthecontrol nodeareonthesame intranet.Whenalightnodebindsto thecontrol node,thecontrol nodeisallowedtocontrol thelightnodefromthemasterchain.Weusecommandsignaturesto achievechain-basedcontrol. DeviceinitializationThemanufacturer ofthelightnode devicewritesapublic-privatekeypairintothedeviceandthenprintstheprivatekeyonthedevice39;sinstructionsorpackageintheofatwo-dimensionalcode. DevicebindinWhenactivatedthelightnodeisplacedinanetworkenvironmentwhereitcanconnect toandcommunicatewiththecontrol node.Thecontrol nodetheninitiatesabindingcommand, whichcontainsthepublickeyofthecontrol node.Afterthecommand iscreated, thedevice’sprivatekeymustbetedtosignthebindingcommand. Afterthesignatureiscompletethebindingcommandissentto thedevice.Afterreceivingthebindingcommand, thedeviceverifiesthesignature.Theverificationisperedby recordingthecontrol node’spublickey. Thecontrolnodecannolongerstorethelightnode39;sprivatekey. ControlcommandverificationThecommand receivedbythelightnodewillverifyandagreetocutethe commandaslongasithas thesignatureofitsrecordedcontrol node. Loggingcommandhistory ontothemasterchainIfnecessary, thecontrol nodewilllog allcontrol commandsthat havebeenissued,andwhenevercommunicationwiththebackbone isrestored,publishthehistory andcontrol resultrecordsto themasterchain.LightningchaindifferentialmechanismThecontrol nodecan createafixedat contract on themasterchainusinga CreateContracttransaction.Thecontractisgenerally attedinthetermsquot;Ifyou giveme acertainnumber oftokens,I willallowyou touse thefollowingcommand undercertainconditions.quot;Thesuccessfulcreationofthecontract willreturnto savethecontract blockheightandtransactionhashtogetherreferredto astheContractAddress.Theusercan initiatea Calltransactionto acontract address.Aftersavingthetransactiontothemasterchain, thecontrol nodewillcontinuallycheck fortransactionsfrom theinitiatedcontract.Onceatransactionisdetected, thecontrol nodechecks toseeiftheuserhasenoughtokenstocompleteit.Ifso, thetransactionwillbesuccessful,initiatingaReturn transactioncontainingtheresultofthecontract cution anda not-yetcommittedcodefor aReviewtransaction.Reviewisamulti-signed“Seq”signaturetransaction.TheReturntransactionisconfirmedby themasterchainafterthecontract issuccessfullycuted,atwhich timetheuser39;stokenswillbetransferredto thecontrol node39;saccount.Aftersometime, iftheuserfeelsthatthehardware isnothandlingthesubsequentcommandscorrectly, thenhecanextracttheReviewtransaction’spreviouslysignedReturntransaction, signhisowndigitalsignature,and aReviewtransaction tothemasterchain, andthenegativereportwilltakeeffect.Asthissequenceisfixed,userswillhaveto makeregisteredcomplaintsby dueprocess.Ifa particularcontract gathersnumerous such reports,thecontrol appwillinteractivelyprompttheuserthatthecontract hasa largenumber ofnegativereviews.NodeclassificationInternetofThingsnodesare oftenvery smallcomputingunits.Duetotheirpowerconsumptionrequirements,theircomputingpowerisverylow, theirmemory isvery small, andtheMCU cannotexceed512 kb.TheLinuxversionofanodeisattherouter level,andthestorageislikewiseverysmall, withMCU only having1MFlashmemory.It isvery difficultfor sucha nodetoparticipateinconsensusprocesses.Therefore,thestructure oftheInternetofThingsisnecessarilycomposedof multiplenodescomprisinga network.Therewillbeoneormore applicationsinthisnetwork,andapplicationswillgo through theapplicationinterface andinteract ontheblockchain.Thecomputingpowerrequiredforlocal applicationswillbedrawn from theedgecomputingunit,potentiallya gatewayor router.Applicationscan managethe local networkinacentralizedordecentralizedway andinteractwiththechain. Accordingtothis,weclassifythenodesintheRuffecosystemasfollowsLightnodescutorsTheapplicationcontrol interfacewillrequestnetworkauthenticationination,and afterverifyingcorrect implementationwillissueacontract tothe user,suchasthereleaseofpropertyaccessrights.Thelightnoderolecanbeassumedbyasimpledevicewithoutstoragecapacity, andthecostcan beaslowasafewdollars.Fullnodes( Recorders)Fullnodeswillbeableto record allination, participateineventregistration ormodifybroadcasts,andvoteforother nodes.Moreover, fullnodescan becomerepresentativenodes.Deviceswithhighperance willact havea greaterroleas nodesonthenetwork.Dueto theconsensusalgorithm ofnotusingPoWandthelow computational burdenontheen/p

注意事项

本文(RUFF (Ruff Chain)白皮书.pdf)为本站会员(币链财经)主动上传,环境100文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知环境100文库(点击联系客服),我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2017 环境100文库版权所有
国家工信部备案号:京ICP备16041442号-6

收起
展开