-
m-relay
<rbrunner7:monero.social> I am trying to rewrite `bool node_server<t_payload_net_handler>::make_new_connection_from_peerlist(network_zone& zone, bool use_white_list)`
-
m-relay
<rbrunner7:monero.social> It iterates over either the list of known white peers, or known gray peers, and builds a list of candidates to choose from later
-
m-relay
<rbrunner7:monero.social> The list of candidates is a list of indexes into the peer lists that are managed by the `peerlist_manager` class.
-
m-relay
<rbrunner7:monero.social> It later picks peers out of those lists again, using the indexes.
-
m-relay
<rbrunner7:monero.social> I claim that's *not* clean, quite in principle. The peerlists are dynamic, there are methods like `peerlist_manager::remove_from_peer_gray` that will invalidate any indexes that you "put away".
-
m-relay
<rbrunner7:monero.social> That's why internally the peerlist manager only modifies the lists under protection of a lock.
-
m-relay
<rbrunner7:monero.social> There is *no* lock that protects the whole of `make_new_connection_from_peerlist`.
-
m-relay
<rbrunner7:monero.social> If my analysis is correct, what do people here knowing more about this stuff than me think? Is there an easy method to handle this that is clean? If not, can we risk to neglect the problem and claim that it's super improbable that some other thread makes our indexes invalid in just the same hundredths of a second?
-
m-relay
<rbrunner7:monero.social> After all, the code is like that for many years, and it looks like we did not run into problems with it, or at least no recognizable problems ...
-
sech1
It can be a race between selecting an index, then using it and some other thread updating peer lists
-
sech1
But the worst it can do is select some other adjacent peer
-
sech1
There are bounds checks in those functions anyway
-
sech1
Actual access to peer lists is guarded by locks in all cases. It's just indices that can get out of date.
-
m-relay
<rbrunner7:monero.social> Yes, I came to the same conclusion what can happen: Every leap year you don't get the peer you want, and if you are careful not to access behind current list length, it won't ever really crash. But I will sink now entire work days into improving this, coming up with a better selection algorithm avoiding spy nodes, and if there is a reasonable way to deal with this cleanly, well, n<clipped message>
-
m-relay
<rbrunner7:monero.social> ow is the time to do so :)
-
m-relay
<rbrunner7:monero.social> One simple approach that I brainstormed just now is a counter in the peer list manager, counting list modifications, and if that counter changes "on the way" in my method, I just throw my indexes away and start again.
-
sech1
The proper way is to get actual peers instead of indices, and not care if the list changes after it
-
sech1
More resource and CPU intensive though
-
m-relay
<rbrunner7:monero.social> Do I have to copy those peers? Will they get released if they are removed from the lists? I would guess so.
-
m-relay
<rbrunner7:monero.social> I could of course just put away what I need to know about those peers, it's not that much info, I could make a little separate strudct for that.
-
m-relay
<rbrunner7:monero.social> *struct
-
sech1
yes, you will need to copy the data you need
-
m-relay
<rbrunner7:monero.social> Ok, thanks, maybe I will try something along these lines
-
m-relay
<josejesussanchezrueda:matrix.org> hi
-
m-relay
<syntheticbird:monero.social> epic name
-
m-relay
<josejesussanchezrueda:matrix.org> hi
-
m-relay
<josejesussanchezrueda:matrix.org> :)
-
m-relay
<josejesussanchezrueda:matrix.org> Hablas en español¿?
-
m-relay
<syntheticbird:monero.social> no sorry it's an english only channel
-
m-relay
<josejesussanchezrueda:matrix.org> ok
-
m-relay
<josejesussanchezrueda:matrix.org> Mining Power Monitoring Issue with supportxmr.com?
-
m-relay
<josejesussanchezrueda:matrix.org> Hello,
-
m-relay
<josejesussanchezrueda:matrix.org> I've recently set up a PC to mine Monero and would like to monitor its mining power. However, I'm having trouble accessing the statistics on
supportxmr.com. The site seems to be giving me issues or not loading properly.
-
m-relay
<josejesussanchezrueda:matrix.org> Could you please guide me on how I can check my hashrate and mining performance? Are there alternative ways to monitor my miner’s performance if the website is down?
-
m-relay
<josejesussanchezrueda:matrix.org> Thanks in advance for your help!
-
m-relay
<ofrnxmr:xmr.mx> Monero Support or Monero Mining
-
m-relay
<ofrnxmr:xmr.mx> The the mining channel first
-
m-relay
<ofrnxmr:xmr.mx> Try* the
-
selsta
jeffro256: reminder regarding 9916 for release
-
selsta
.merge+ 9910 9909 9908
-
xmr-pr
Added
-
selsta
.merge+ 9920
-
xmr-pr
...
-
m-relay
<ofrnxmr:xmr.mx> Lol, why'd it say "..."
-
m-relay
<jeffro256:monero.social> Passive aggressive PR bot
-
plowsof
.merges
-
xmr-pr
9908 9909 9910 9920
-
m-relay
<binarybaron:matrix.org> Does wallet2.h or wallet2_api.h have support for adding another keypair to an existing wallet to sweep a single utxo to the „main“ keypair of the same wallet?
-
m-relay
<jeffro256:monero.social> Like importing an enote so you can spend it from another wallet? Not AFAIK