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.






评论