Mirobit / bitcoin-node-manager

:bar_chart: Lightweight dashboard and control system for bitcoin nodes
MIT License
122 stars 62 forks source link

Rules idea #21

Closed mcjoshea closed 3 years ago

mcjoshea commented 4 years ago

Due to upload bandwidth constraints my connection can sometimes be sucked dry by my Bitcoin node.

To stop this I have set up some rules to limit each nodes traffic at 500 Mb per day. This works well but I do not want to limit any of the research nodes, with the binocular icon, or my separate Windows node.

I'd like a way of letting individual peers bypass the rules, or a way of adding an exception so that selected peers are never restricted.

Mirobit commented 3 years ago

Interesting idea. I am not sure I have to time to implement it. I put it on my To-Do list, but with a low priority.

An quick an easy solution could that you whiteliste those peers in your bitcoin.conf and I add an option to exclude whitelisted peers from rules

bitcoin.conf whitelist=some.ip

Mirobit commented 3 years ago

I implemented (743c4cf) the solution mentioned above. By default rules ignore all whitelisted peers. You actively need to change the rule settings to include whitelisted peers. This should prevent BNM fro accidentally banning banning important peers. Let me know if that works for you.

mcjoshea commented 3 years ago

Thanks for doing this. I added my peers to the whitelist and all looks good. Quite like the shield icon next to the peer's ID number.

One thing I have noticed is that I can't see any way to differentiate between nodes from the same IP address. Like here:

image

Any idea if it is actually possible to do this? I'm guessing it's not. Not a big deal anyway. I can always remove the IP addresses from the whitelist.

By the way, how do the research nodes get their binocular icon? Is that from the IP address look up?

Mirobit commented 3 years ago

I totally forgot that I put the shield icon in there ;)

By the way, how do the research nodes get their binocular icon? Is that from the IP address look up?

BNM just checks if the client is one of the following: Snoopy|Coinscope|bitnodes|dsn.tm.kit.edu|multiven These clients are purely made for monitoring the network. This doesn't mean that regular Bitcoin Core clients are not monitoring the network. But this is impossible to know.

One thing I have noticed is that I can't see any way to differentiate between nodes from the same IP address. Like here:

I am not sure what you want to achieve here. Do you only what to whitelist one of these? I think there is nothing you can do about it. But it is interesting to see two different clients from the same IP. I haven't noticed this before.

mcjoshea commented 3 years ago

Yes I was trying to think of a way to whitelist just one of the nodes but I don't think it's actually possible.

Bitcoin only gives the option to add a IP address to the whitelist. I guess they never envisaged anyone wanting to whitelist a single node when multiple nodes are running at the same IP address.

In the example above I expect they have one node making outbound connections and the other working as normal behind some sort a NAT.

I'm really happy with your whitelist functionality. Thanks for adding it!