匿名用户2021年12月24日
157阅读

技术信息

系统类型
Web3
授权协议
View license

作品详情

PoolDesig/Theory

Theodejs-poolisbuiltaroudasmallseriesofcoredaemosthatshareaccesstoasigleLMDBtablefortrackigofshares,withMySQLbeigusedtocetralizecofiguratiosadesuresimpleaccessfromlocal/remoteodes.Thecoredaemosfollow:

api-MaiAPIforthefrotedtouseadpulldatafrom.Expectstobehostedat/remoteShare-MaiAPIforcosumigsharesfromremote/localpools.Expectstobehostedat/leafApipool-Wherethemierscoectto.logRuer-Databasesharecleaup.paymets-Hadlesallpaymetstoworkers.blockMaager-UlocksblocksaddistributespaymetsitoMySQLworker-Doesregularprocessigofstatisticsadsedsstatuse-mailsforo-activemiers.

APIlistesoport8001,remoteSharelisteso8000

moeroocea.stream(Therefereceimplemetatio)usesthefollowigsetup:

https://moeroocea.streamishostedoitsowserver,asthemaiwebsiteisastaticfrotedhttps://api.moeroocea.streamhostsapi,remoteShare,logRuer,paymets,blockMaager,worker,asthesemustallbehostedwithaccesstothesameLMDBdatabase.

SampleCaddyfileforAPI:

https://api.moeroocea.stream{proxy/leafApi127.0.0.1:8000proxy/127.0.0.1:8001corsgzip}

Itiscriticallyimportatthatyourwebserverdoesottrucatethe/leafApiportiooftheURLfortheremoteSharedaemo,oritwillotfuctio!LocalpoolserversDOusetheremoteSharedaemo,asthisprovidesabuffericaseofaerrorwithLMDBoraotherbugwithithesystem,allowigsharesadblockstoqueueforsubmissioassooastheleafApi/remoteSharedaemosarebackupadrespodigwith200's.

SetupIstructiosServerRequiremets4GbRam2CPUCores(withAES_NI)60GbSSD-BackedStorage-Ifyou'redoigamulti-serveristall,theleafodesdooteedthismuchstorage.Theyjusteedeoughstoragetoholdtheblockchaiforyourode.Thepoolcomescofiguredtouseupto24GbofstorageforLMDB.AssumigyouhavethelogRuerworkerruig,itshouldevergetearthissize,butbeawarethatit/ca/bloatreadilyifthigserror,sobereadyforthis!Notably,thishappestobeapproximatelythesizeofa4Gbliodeistace,whichiswherethemajorityofautomateddeploymettestighappeed!Pre-DeployIfyou'replaigousige-mail,you'llwattosetupaaccoutathttps://mailgu.com(It'sfreefor10ke-mails/moth!),soyoucaotifymiers.Thisalsoservesasthebackedforpasswordresetemails,alogwithothersortsofe-mailsfromthepool,icludigpoolstartup,poolMoeroddaemolags,etcsoit'shighlysuggested!Pre-Geeratethewallets,ordo't,it'suptoyou!You'lleedtheaddressesaftertheistalliscomplete,soI'dsuggestmakigsureyouhavethemavailable.Iformatioosuggestedsetupsarefoudbelow.Ifyou'regoigtobeofferigPPS,PLEASEmakesureyouloadthepoolwalletwithXMRbeforeyougettoofaralog.YourpoolwilltriggerPPSpaymetsoitsow,adfairlyreadily,soyoueedsomefloatithere!Makeao-rootuser,adrutheistallerfromthere!DeploymetviaIstallerAddyouruserto/etc/sudoers,thismustbedoesothescriptcasudoupaddoit'sjob.Wesuggestpasswordlesssudo.Suggestedlie:<USER>ALL=(ALL)NOPASSWD:ALL.Oursamplebuildsuse:pooldaemoALL=(ALL)NOPASSWD:ALLRuthedeployscriptasaNON-ROOTUSER.Thisisveryimportat!Thisscriptwillistallthepooltowhateveruserit'sruiguder!Also.Gogetacoffee,thissuckerbootstrapsthemoeroistallatio.Oceit'scomplete,chageascofig.jsoappropriate.Itispre-loadedforalocalistallofeverythig,ruigo127.0.0.1.Thiswillworkperfectlyfieifyou'reusigasigleodesetup.You'llalsowattosetbid_iptotheexteralIPofthepoolserver,adhostametotheresolvablehostameforthepoolserver.pool_idismostlyusedformulti-serveristallatiostoprovideuiqueidetifiersithebacked.Youwillalsowattoru:source~/.bashrcThiswillactivateNVMadgetthigsworkigforthefollowigpm2steps.You'lleedtochagetheAPIedpoitforthefrotedcodeithepoolui/build/globals.jsadpoolui/build/globals.default.js--Thiswillusuallybehttp(s)://<yourserverFQDN>/apiulessyoutweakcaddy!Thedefaultdatabasedirectory/home/<userame>/pool_db/isalreadybeecreateddurigstartup.Ifyouchagethedb_storage_pathjustmakesureyouruserhaswritepermissiosforewpath.Ru:pm2restartapitoreloadtheAPIforusage.Hopitothewebiterface(Shouldbeathttps://<yourserverIP>/admi.html),thelogiwithAdmiistrator/Password123,MAKESURETOCHANGETHISPASSWORDONCEYOULOGIN.<-Thisstepiscurretlyotactive,we'rewaitigforthefrotedtocatchup!HeaddowtotheMaualSQLCofiguratiototakealookatwhateedstobedoebyhadforow.Fromtheadmipael,youcacofigureallofyourpool'ssettigsforaddresses,paymetthresholds,etc.Oceyou'rehappywiththesettigs,goaheadadstartallthepooldaemos,commadsfollow.

功能介绍

Pool Design/Theory The nodejs-pool is built around a small series of core daemons that share acce...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论