Closed cbesot closed 6 years ago
Uhm, I intentionally avoided adding that line to 0miner, I though it was redundant. Will check.
Da: cbesot Inviato: lunedì 11 giugno 2018 21:36 A: papampi/nvOC_by_fullzero_Community_Release Cc: Subscribed Oggetto: [papampi/nvOC_by_fullzero_Community_Release] source 0algo_id missing?(#95)
Hi guys, I don't know if I failed a git pull, merge or whatever, but miner doesn't start. In fact, I need to add source "${NVOC}/0algo_id" to 0miner. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Ok, the problem is that 0miner is not sharing the context of 3main. Sourcing 1bash or 0algo_id populates the environment of 3main with variables, but they're not exported. I don't like having settings script executed and sourced multiple times once for each script context since settings inconsistency may occur, but we already have the same problem with 1bash so let's keep the temp fix for now. The alternative should be to execute 0miner in the same context of 3main... I'm quite unconvinced about that.
Or ... We can go back to have the contents of 0algo_id in 1bash :)
Why do you have isolate 0algo_id?
I myself liked it the way it was, inside 1bash. Easier to add coins for users to edit only 1 file and ...
Because 1bash should be user defined settings only, algo identification is not settings. And it should not be part of 3main because it's subject to frequent changes by prousers when they add new coins.
I myself liked it the way it was, inside 1bash. Easier to add coins for users to edit only 1 file and …
It's a real mess pap, think about installing updates. You can keep a copy of old 1bash safe, but algos are likely to be updated. And BTW you always need to edit also 0miner and webinfo when adding new miners.
Granted that adding new algos by only editing 1bash is not possible, I can suggest to implement a way for users to define new COIN->ALGO mappings within 1bash. In other words, the ALGO id determination must be outside 1bash because is not something a user can touch: the fact that "ETHASH" id is like that is hardcoded, a user should not be able to set ALGO=eThAsh so "ALGO=" should not appear in 1bash. On the other hand the fact that a new coin NCN is mapped to an already implemented ALGO id can be user defined. So, we can havein 1bash something like:
EQUIHASH_COINS=ZEC,BTG,NCN ETHASH_COINS=ETH,PIRL …
Then algo identification in 0algo_id should be something like: if $COIN in $EQUIHASH_COINS then ALGO=EQUIHASH
as a nice consequence of this, adding coins for algos already supported is only a matter of editing 1bash, and defining coins sets for unknown, wrong or unsupported algo ids does not break anything. This should finally decouple adding coins from adding algos/miners. This means that if we add a new algo and a new miner a user has not to rewrite its config to a new 1bash. What do you think?
As always you have another great idea.
Then it became some small lines with no edits/changes when adding coins, we can either add them to scripts that need algo identification (0miner, minerinfo and 3main) or end of 1bash. lol .... I keep pushing to get them to 1bash... Or you still like to have separate algo_id?
Keep it separate, it avoids repeating that chunk of code mostly everywhere
@LuKePicci Applied your amazing idea to PR #96 Just 20 line codes, and we dont need to source 0algo_id in every script any more :))
In a linux way, I think you (or we, but I'm lost in git branches) should separate master conf than user conf. For example, with possibility to add coin, algo and perhaps miners in a user file. The aim is to keep this file out of sync process and facilitate git pull or others way of update/sync.
I agree, in fact what I suggested is to only keep coin->algo mappings in user conf (which is 1bash) and keep aside any file that needs to be edited (by pro-user only) to add algos and miners, In future, also algos and miners could be easy to add by managing them in separate plugins.
Fixed in #97
Hi guys, I don't know if I failed a git pull, merge or whatever, but miner doesn't start. In fact, I need to add
source "${NVOC}/0algo_id"
to 0miner.