-
xmr-pr
ACK-J opened issue #8193: Monero Wallet Transaction Exporter Bugs
-
xmr-pr
-
pedro_
hello there
-
JohnLee[m]
How do I verify the Monero address?
-
wernervasquez[m]
<JohnLee[m]> "How do I verify the Monero..." <- Verify what about it?
-
JohnLee[m]
wernervasquez[m]: Verify that the address format is correct, and whether there is an rpc interface to verify it?
-
dEBRUYNE
JohnLee[m]: You could use this tool ->
xmr.llcoins.net/addresstests.html
-
wernervasquez[m]
John Lee: Also, if it is an address you control, you could send a trivial test amount to it and see if it arrives.
-
JohnLee[m]
Great, I now want to verify through the rpc interface can it be done, or how can I use the code to verify?
-
JohnLee[m]
before I send test amount to it
-
wernervasquez[m]
John Lee: I am unfamiliar with the rpc. However, I have written code to generate monero addresses. I tested it by using the code that generates a one time address and the code that scans for one time addresses.
-
wernervasquez[m]
John Lee: further, i checked that the private key times the basepoint equalled the public key for the view key, spend key, and one time key
-
wernervasquez[m]
If I can generate a one time address, recognize it, and derive the spend key for it (and generate the address from my private keys)...I would think that is all the functionality you need to test.
-
wernervasquez[m]
I would also look at the unit tests. I imagine one of the tests has to be what you are looking for. You could adapt that code to test your address instead of the test case.
-
wernervasquez[m]
But hopefully there is something even easier that someone else here knows.
-
moneromooo
There is a RPC for it. Did you not find it ?
-
JohnLee[m]
which one
-
-
JohnLee[m]
validate_address
-
JohnLee[m]
Analyzes a string to determine whether it is a valid monero wallet address and returns the result and the address specifications.
-
jtgrassie
-
bootlegbilly[m]
hey everyone
-
bootlegbilly[m]
Does anyone have any advice on reduing the amount of timeouts from the monero wallet rpc
-
bootlegbilly[m]
I've just resorted to sending calls over and over until it responds but every couple of requests there's always a timeout
-
plowsof[m]
i just accept its broken, and launch it with the 'pid' file argument - then use the process id to close it. and restart it 😝
-
moneromooo
Depends what RPC I guess.
-
bootlegbilly[m]
Damn lmao, alright ill just do that
-
moneromooo
If you can, ask for less work (ie, if you want to check whether 10k key images are spent, call 5 times with 2k per call)
-
bootlegbilly[m]
moneromooo: The wallet rpc, generally the daemon rpc calls go through
-
moneromooo
Otherwise, just incresae the timeout.
-
bootlegbilly[m]
I've just been trying to cache certain RPC calls when they work in the meantime
-
bootlegbilly[m]
moneromooo: Is like 3.5 seconds okay?
-
moneromooo
You might also try to disable auto refresh.
-
moneromooo
Likely too short.
-
bootlegbilly[m]
What does autorefresh do?
-
bootlegbilly[m]
Alright ill bump it to 5
-
bootlegbilly[m]
It's running locally though so i didnt expect it to take so long
-
moneromooo
Refreshnug means asking the daemon for new blocks and processing any txes in them. That can block for a bit.
-
bootlegbilly[m]
Ohhh
-
bootlegbilly[m]
Just out of curiosity why wouldn't that run asynchronosly
-
bootlegbilly[m]
Or however you spell that jaja
-
bootlegbilly[m]
Like accepting both RPC calls while waiting for any new daemon blocks
-
moneromooo
Easier.
-
bootlegbilly[m]
I get that jaja
-
moneromooo
You need to lock the outputs data structure for both (typically).
-
bootlegbilly[m]
Just out of curiosty would there be ways of making certain wallet rpc calls by directly sending calls to the daemon?
-
moneromooo
So it wouldn't gain much unless you start doing things really cleverly.
-
bootlegbilly[m]
Like instead of get_balance to wallet rpc I jsut request a bunch of blocks from the daemon RPC and scan those
-
moneromooo
Yes.
-
moneromooo
er, not for *that*.
-
bootlegbilly[m]
moneromooo: I'm not well versed in CPP dev, but what about a RWLock structure
-
bootlegbilly[m]
moneromooo: Oh damn, how come?
-
bootlegbilly[m]
Btw moneromoo I just wanna say I'm a massive fan
-
moneromooo
That's what the wallet does, and it cashes it. Scanning the chain is *lengthy*. Like an hour.
-
bootlegbilly[m]
Like you and the rest of the Monero dev team are geniuses imho
-
moneromooo
A rw lock might help in some cases I guess, but the outputs structure is complex.
-
bootlegbilly[m]
Okay I think i understand better
-
bootlegbilly[m]
Do you have anyway you suggest of being able to asynchronouosly get dtata from the wallet RPC while still keeping it relatively up to date?
-
moneromooo
Then again, most of the incoming blocks don't result in new outputs, so it actually would gain a fair bit. But... more work/testing.
-
moneromooo
Rephrase that, I did not understand.
-
bootlegbilly[m]
As in is there any way of telling the Wallet RPC to refresh while still allowing it to take RPC requests
-
moneromooo
You can tell the wallet to refresh when you want.
-
bootlegbilly[m]
Like are there certain wallet calls that would be easier to do by sending and receiving data directly from the daemon
-
moneromooo
So, after you're done with a series of RPC.
-
moneromooo
Maybe. I'd have to go through the list and think :)
-
moneromooo
Well, an easy one: start_mining.
-
moneromooo
That just proxies I think.
-
bootlegbilly[m]
Sorry I don't mean to keep bugging you, but what about if I can have a large amount of RPC calls at pretty much any time (since it's a service)
-
bootlegbilly[m]
There are some calls I've started to convert to just use the daemon
-
moneromooo
You can do that by disabling auto refresh and refreshing manually :)
-
moneromooo
Actually, I think a refresh request might even be async... I did not add that so I'm not sure.
-
bootlegbilly[m]
But a lot of the important ones like get_balance and get_payments I only know how to do through the wallet
-
bootlegbilly[m]
And yea I'll definetly start refreshing manually, thank you for that
-
moneromooo
Those might gain from a rwlock, yes. Just needs someone to dump the time into it.
-
moneromooo
And as it is, monerod would likely gain more than the wallet from a rwlock.
-
bootlegbilly[m]
I'd honestly work on it myself (since it'd be super helpful for the stuff I'm working on) but I only know a ton of Rust and v little Cpp
-
bootlegbilly[m]
Would there be any places in the codebase in particular you think would benefit from a RWLock
-
bootlegbilly[m]
Since I could definetly try to begin work
-
moneromooo
The blockchain lock (blockchain.cpp) is the main culprit.
-
bootlegbilly[m]
Sweet, thank you so much for all your help moneromoo
-
moneromooo
A few people said they'd work on it. One of them actually did, but had a patch with that and various other unrelated changes so didn't get used.
-
bootlegbilly[m]
I'll definetly start work on it, though no guarantees I'll get it done jaja
-
moneromooo
Thanks :)
-
bootlegbilly[m]
Ooh is that patch linked anywher,e that would help massively
-
bootlegbilly[m]
Ofc, thank you :)
-
moneromooo
It should be on github as a PR IIRC.
-
moneromooo
No idea if it was correct fwiw.
-
bootlegbilly[m]
This is super random but would you want a PR updating the Copyright year?
-
bootlegbilly[m]
Idk if its like too stupid to add or not
-
moneromooo
Every year we get them. Pretty sure someone or several someones already sent one.
-
bootlegbilly[m]
Oh alright lol I won't touch that then
-
selsta
we didn't merge them last year
-
bootlegbilly[m]
selsta: You mind if i ask how come?
-
selsta
-
selsta
also going through hundred of files checking if the script didn't mess anything up is kinda annoying and low priority
-
selsta
but if you want to open one for 2022 there isn't one yet
-
bootlegbilly[m]
if i get the rwlock PR finished ever, I probably will right after
-
bootlegbilly[m]
So if this were to get merged and everything, would it really be in the next Monero release (pending no problems ofc)
-
UkoeHB
is there any purpose to updating the copyright year? like some legal significance?
-
moneromooo
Copyright protections last... N years from the date of creation of the copyrighted thing). Marking the last modification date gives you extra weight in your argument that your copyright was violated, if you try to sue.
-
moneromooo
So you should be able to get away with updating it every 10 years or so.
-
bootlegbilly[m]
Hey moneromoooo, in blockchain.cpp on line 4959, why is everything locked and unlocked in a loop?
-
bootlegbilly[m]
Is it just so that other processors can quickly grab a lock if needed?
-
moneromooo
Of course, the thing that's re-copyrighted is not the whole file, just the modifications, so it's murky I guess.
-
moneromooo
Yes. It avoids a deadlock in this case.
-
bootlegbilly[m]
Thank you, i swer i was looking at it for a good minute wondering why the hell that would hapepn
-
moneromooo
I think. Assuming some other thread can start a batch while having the lock.
-
moneromooo
hyc might know more of the details.
-
bootlegbilly[m]
Oh aren't locks seperate from the actual data they store in cpp
-
bootlegbilly[m]
Would anyone mind explaining CRITICAL_REGION_LOCAL in blockchain.cpp
-
bootlegbilly[m]
I see it everwhere and I'm vaguely getting it creates a lock but i never see it call unlcok
-
bootlegbilly[m]
Does it unlock when dropped? (I'm not too familiar with CPP RAII)
-
moneromooo
git grep CRITICAL_REGION_LOCAL
-
moneromooo
It's unlocked when it goes out of scope.
-
bootlegbilly[m]
Ty