Separate GUI "client" and siad?

  • After running Sia for a while on my windows box I decided to move it over to my "home server" as it needs to be on all the time if I want to host. And, running a windows machine 24/7 increases the risk as windows as such isn't the safest os on planet and in my particular case the machine makes noise.
    So I want to know the optimal way to move the node.
    At this moment I do have the UI node running and the headless node is syncing consensus.
    Could I speed the syncing (and save my internet bandwidth) by telling the new node to fetch data from my running and synced node over the local network address?

    The server is a SmartOS box, running SIA in a zone (not a classic VM), and the first impression is really good- siad is running and syncing. But I am concerned about the ease of use. I don't want to ssh into the server to do things with sia...
    Could I use it in a "split system" (UI and siad on separate machines)?

  • The first part is solved,
    "siac gateway connect" is there to tell the new node where the old one is.
    But I don't know if that gives a syncing speed boost...

  • gateway connects is (I believe, but I'm very new to this as well) not what you want. That's for gateways connecting to the sia-p2p network, not for 'sharing a single installation' or something like that.

    The way to try it would be to close your Windows sia-ui completely (make sure there is no running siad.exe or siac.exe) and go to your Sia data folder. It's normally in "%APPDATA%\Sia-UI\sia" (you can type this in a Windows Explorer location bar).
    On recent Windows versions this means "C:\Users<yourwindowsusernamehere>\AppData\Roaming\Sia-UI\sia"

    Most important one to copy is 'wallet' and 'consensus' I guess. But to be sure copy everything to your Sia CLI installation on your smartos box. You need to figure out what the sia data folder there is though. Go search for a 'consensus.db' and it'll make things clear I guess.

    consensus.db is the big one, it's the whole 'sync' process. Copy that over and you shouldn't have to resync on your smartos machine. It probably will have to verify the entire file so it might still take long (hours?) to start up the first time, but if correctly done it will not have to redownload and resync.

    Now, running siad on your smartos box should run your sia installation there. If you copied over all the contents with a bit of luck your wallet is intact and ready to go on that installation (you could try unlocking it with siac from the commandline on your smartos box, as a test, and then checking balance and such). You might have to use the '--api-addr' commandline parameter when running siad on your smartos box, to not default to localhost:9980 but default to <your-internal-ip-address>:9980. I'm not sure, never tested with this.

    Now, how to interface with it? This is where I stop and I have no experience.
    In your sia-ui download folder (NOT your data folder) in the folder resources\app is a 'config.json' file which configures some things. Like how to start 'siad.exe' (it should not so maybe you have to remove stuff here) and where (and how??) to start siac.exe.
    If it now uses siac.exe with the '--addr' parameter you could point it at the IP address of your smartos box to remotely control the siad running there, but like I said I don't know if that's even possible in the config file and if so, how it would be done. I'm happy using the commandline for most stuff, and file uploads I use the sia-ui for.

    Maybe go search in the .js files in the sia-ui download folder if you could at the -a or --addr flag to siac?
    It appears it might be possible for the Terminal plugin, but I don't know if it will work for all the other parts of the sia-ui app.

  • @joris.mak
    Thanks for the tips.
    The "problem" with syncing has solved itself as I didn't have time to interfere or watch the process, after roughly 12h the new node has synced completely. Now I'm wondering about other people complaining about the long syncing time from what I had the impression it could take 2-3 days. I'm not sure but maybe the connection to the "on the local network running node" did help a bit, as the hardware of the smartos box isn't powerful at all. It's a 2GHz celeron, the sia node zone is residing on a consumer grade SSD (Corsair Force LS) and zone RAM usage is capped to 8GB.

    The other reason of not really moving the existing node was (still is) the impression that I can make mistakes and break it or in worst case lose the coins. I know, I can recover with the seed, but as some people tell there are problems afterwards, why should I try to break and fix things that are working? So I'll use my existing wallet only as a wallet for holding coins ("cold wallet" with seed on paper only) and play around with new ones.

    A quick additional question-
    is (or will be?) siad capable to work with more than one wallet? I mean something like "concurrent multiuser capability" where the wallet password is the key for accessing "own files" and files belonging to other wallets are not accessible or visible.

Log in to reply