atto
atto copied to clipboard
Flag to Use Non-Default Node
Changing the node for atto can be a little weird to do. Recompiling just to change the node kind of limits atto in a few ways. Adding a --node
flag would override the default node in config.go without recompiling it, or changing it forever.
Especially useful for periods of downtime;
echo $SEED | atto --node "https://rainstorm.city/api" -a 0 balance
Check the balance of apex index from $SEED using the rainstorm.city
node, overwriting the default https://proxy.powernode.cc/proxy
.
I think it could be very useful. Any thoughts?
I thought that I would expand on this a bit. I have several compiled versions of atto which each use a different node; atto_rainstorm
, atto_powernode
etc. It just seems a bit superfluous.
Thanks for sharing your idea! Hardcoding config for things that shouldn't usually change is a design decision I took from the suckless community. I'm not yet convinced I should complicate the code to allow switching nodes, since this isn't something a regular user should have to do.
Could you elaborate a little bit on your use cases? Do you only do this when a server is down? In this case I would maybe consider putting a list of nodes into config.go
; if one node fails to respond, the next would be used automatically. Generally, however, I would advice not to use a node that frequently goes offline.
Could you elaborate a little bit on your use cases? Do you only do this when a server is down?
Yes. Something like this would only be for when a node is down. Offloading that decision to atto on connection failure would accomplish the same thing, so equally desirable.
The use case, currently, is if the primary hard-coded node is down the only two things you can do is either wait, or recompile with a new node. Adding a flag would allow you to change without recompiling, and on the fly. Round robin connecting would basically do the same thing (on error).
Hmm, I'm still not too convinced improving atto for this is necessary.
Can you elaborate on why you nodes go down so frequently? I feel like you have chosen a bad node, if it goes down so regularly, that you already have a go-to workaround for this.
Can you elaborate on why you nodes go down so frequently? I feel like you have chosen a bad node, if it goes down so regularly, that you already have a go-to workaround for this.
I use the natrium node. It goes down every so often, and when it is down, to use nano (as atto is my only wallet), I have to recompile or wait. It's a bit of a hassle, especially when using such a popular node. It's happened about three times this year so far.
It's unfortunate that the natrium node is that unreliable and I can give you no recommendation for a better node, but after thinking about it, I don't think this is a problem that I want to work around with atto. I don't want to complicate the code, just because some nodes are unstable. Sorry. I'm closing this issue for now.