Open chefnaphtha opened 4 months ago
also the haveno folder in the home dir being global and not per-network should probably be fixed before this is released but a separate issue for that is probably best
There should be some warning about the importance of the files integrity, otherwise scammers could ask people to add their own nodes/arbitrators to it to my understanding put them on an orderbook where every single offer is made and arbitrated by the scammer, allowing them to drain any trade. Maybe also some mechanism to check the integrity against existing networks like a hash of the file and a big warning if it doesn't match.
i think haveno should get the network details from a json (or other) file, at some point an ui for this would be nice
the network operators would release the network json file, which will then be downloaded by people that want to connect to that network and loaded into the main haveno app
right now the way its done is to fork the app and hardcode the network details into the code, then build that separately. i think it's a waste of computing resources and a security risk (people running random binaries off the internet), not to mention it's simply inefficient to have a completely separate binary for every single network when only a few vars need to change
the variables that would need to be loaded from the json file (and un-hardcoded) are:
arbitrator public keys (
string[]
): https://github.com/haveno-dex/haveno/commit/946a80f5168342ecec578431d42354bfe88b652f https://github.com/haveno-dex/haveno/commit/a22c9035efd53de41fe8e3e52a774ab58d756794 https://github.com/haveno-dex/haveno/commit/4ecfe15714b3093b8711fa3e659f94a5b19259ecfees (object?) https://github.com/haveno-dex/haveno/commit/e532f2ddc6e606430c97bcfff9bcf0514ed0d755
seednodes (
string[]
) (this is hardcoded into a file, code that reads that file needs to be updated) https://github.com/haveno-dex/haveno/commit/14486131830980cc14c48997495bf4f3e560e399xmr network (mainnet/stagenet/testnet) (
string
) (this is in package.gradle, same as above) https://github.com/haveno-dex/haveno/commit/58ffc9a5f22816c77733813ef103f1403c5a15f5my proposed config file example would look something like this: