Giter VIP home page Giter VIP logo

Comments (16)

LuKePicci avatar LuKePicci commented on July 1, 2024 2

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?

from nvoc_by_fullzero_community_release.

papampi avatar papampi commented on July 1, 2024 1

Or ... We can go back to have the contents of 0algo_id in 1bash :)

from nvoc_by_fullzero_community_release.

LuKePicci avatar LuKePicci commented on July 1, 2024

from nvoc_by_fullzero_community_release.

papampi avatar papampi commented on July 1, 2024

Will make a temporary fix for now.
6540de5#diff-50bc5d486d9a2333d241198cf7dfa2f3

from nvoc_by_fullzero_community_release.

LuKePicci avatar LuKePicci commented on July 1, 2024

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.

from nvoc_by_fullzero_community_release.

Alysko avatar Alysko commented on July 1, 2024

Why do you have isolate 0algo_id?

from nvoc_by_fullzero_community_release.

papampi avatar papampi commented on July 1, 2024

I myself liked it the way it was, inside 1bash.
Easier to add coins for users to edit only 1 file and ...

from nvoc_by_fullzero_community_release.

LuKePicci avatar LuKePicci commented on July 1, 2024

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.

from nvoc_by_fullzero_community_release.

LuKePicci avatar LuKePicci commented on July 1, 2024

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.

from nvoc_by_fullzero_community_release.

papampi avatar papampi commented on July 1, 2024

As always you have another great idea.

from nvoc_by_fullzero_community_release.

papampi avatar papampi commented on July 1, 2024

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?

from nvoc_by_fullzero_community_release.

LuKePicci avatar LuKePicci commented on July 1, 2024

Keep it separate, it avoids repeating that chunk of code mostly everywhere

from nvoc_by_fullzero_community_release.

papampi avatar papampi commented on July 1, 2024

@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 :))

from nvoc_by_fullzero_community_release.

Alysko avatar Alysko commented on July 1, 2024

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.

from nvoc_by_fullzero_community_release.

LuKePicci avatar LuKePicci commented on July 1, 2024

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.

from nvoc_by_fullzero_community_release.

LuKePicci avatar LuKePicci commented on July 1, 2024

Fixed in #97

from nvoc_by_fullzero_community_release.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.