-
sythaeryn_aerie[
Hi! Is it possible to create a visual studio solution for monero-gui and compile it with MSVC?
-
selsta
sythaeryn_aerie[: you can try it, cmake allows you to create a visual studio solution
-
selsta
but there is no support for it if it doesn't work
-
selsta
-
sythaeryn_aerie[
<selsta> "sythaeryn_aerie: you can try it,..." <- thanks! I think I need some slightly more detailed steps how to make cmake generate a Visual Studio solution for the monero project. I am an experienced C++ programmer, but primarily with game development, so I spent my whole life in the windows ecosystem, where I only had to care about C++ in Visual Studio. I'd like to contribute to Monero, and I think I'd be able to quickly get
-
sythaeryn_aerie[
into most of the code, but I'd also like to keep using the tools I know best, being Visual Studio and all its related tools. are any of the monero devs using visual studio or is that something unusual?
-
hyc
none
-
hyc
everything is built with either gcc or clang toolchains
-
selsta
on Windows mingw64 is used
-
hyc
everything is built from bash shell
-
hyc
for main CLI build we don't even use mingw64 anymore, we just cross-compile from linux
-
sech1
I'm using Visual Studio
-
sech1
So p2pool supports VS. But yes, Monero tools don't support it
-
hyc
they might. cmake might work. but nobody has bothered to check, and nobody will care if it doesn't.
-
sech1
VS supports clang toolchain, so in theory it could work. But you'd need to find all dependencies too.
-
hyc
waste of time. Windows as a base OS is so much slower than Linux it kills productivity
-
sythaeryn_aerie[
hyc: I am never slowed down by my OS in any way, so I think that statement doesn't really make sense. there are obviously a huge amount of programmers who use windows every day. I'm not a Microsoft fan at all, but they know one thing, and that's how to make good tools for developers, because that's obviously what they need themselves.
-
sech1
I wouldn't say so. After a proper tuning, XMRig is faste on Windows for me. GUI differences are a matter of taste
-
sech1
yes, VS is very good for developers
-
hyc
no, I'm talking about basics like file I/O
-
hyc
NTFS is a shitty slow filesystem
-
hyc
the Windows memorry manager sucks, manages cache poorly
-
hyc
tools are whatever they are, but it's just lipstick on a pig
-
sech1
can't comment on file I/O, I don't run file servers :D
-
sech1
sythaeryn_aerie try cmake .. -G "Visual Studio 16 2019" -T ClangCL -A x64
-
sythaeryn_aerie[
most open source projects make it easy to get a visual studio .sln generated to make it easy for anyone to contribute who likes to simply use VS. I think it would be good if Monero would try to do the same. making it as easy as possible for people like me to help the project. I'm sure there's a lot of people like me who know C++ very well but are primarily working on the windows side of things and might not be familiar with the
-
sythaeryn_aerie[
toolchain Monero is setup around
-
sech1
it should create clang project for VS
-
sech1
actually I'll try it right now. Need to install C++ clang tools for VS first.
-
sythaeryn_aerie[
sech1: thanks!
-
hyc
you sound like a spoiled child. "your open source project that doesn't use any of the tools I'm familiar with should bend over backwards to add support for my tools"
-
sech1
yeah, cmake didn't work. It can't find dependencies, so it will take a while to even make it generate .sln
-
sythaeryn_aerie[
<hyc> "you sound like a spoiled child...." <- I'm sure you'd agree that for an open source project it's quite ideal when the barrier to entry for any skilled programmer who wants to help is as low as possible and everyone can use their favorite tools for the job, because what matters is the code that's written and not what tools or OS someone uses for it. visual studio is very popular and there are a lot of C++ programmers who use
-
sythaeryn_aerie[
it every day for their work, so I am sure long-term it would bring many new contributors to the project if they could easily contribute using the tools they are used to. and that's something everyone would benefit from.
-
hyc
beside the point. the project is driven by volunteers. if nobody on the project uses <your favorite tools> then who has the responsibility to learn how to integrate your toolchain?
-
hyc
who has the time to do the work? who has the time to maintain it, when nobody uses it?
-
hyc
and it's more than just "the code" since there are subtle differences in header files and supported APIs between MSVC and gcc/clang
-
sythaeryn_aerie[
since Visual Studio seems to work fine with clang too, MSVC support might not be relevant, clang alone should be fine. as long as I could use the visual studio tools, I'd be happy.
-
hyc
great, make yourself happy.
-
hyc
it's nobody else's job to do things for you.\
-
sythaeryn_aerie[
<hyc> "great, make yourself happy." <- I'm not sure why you're so salty. I have come here because I'd like to contribute to Monero in my free time - I have not asked you to do anything for me. Visual Studio is the most popular development tool for C++, and I personally am sure it would benefit the Monero project a lot long-term to make it easy to use for Monero development. just my opinion. you are obviously free to disagree and
-
sythaeryn_aerie[
just ignore my thoughts on it.
-
hyc
... you have asked "someone" on the project to add support for your tools, that nobody on the project uses
-
moneromooo
It's just how hyc is, straight to harsh :D It's a bit annoying but there's not going to be a change there.
-
hyc
a good open source developer understands that if you want something done, you do it.
-
moneromooo
My own opinion is that if you can make it work with minimal changes, why not. But it it's more than a few #defines, not worth the bother.
-
moneromooo
If you want to add a MSVC project file to the repo though, you'd have to maintain it, or it'll get removed.
-
moneromooo
(or find some other rube to maintain it :P)
-
hyc
if you think it'll be such a great boon to the project but you can't be bothered to do it yourself, then certainly no one else on the project will be motivated to do it
-
spirobel[m]
so you guys mostly use codeblocks atm?
-
moneromooo
Did they ask for someone else to do it ?
-
hyc
they keep saying it would be great to have it - but are they expecting it to magically appear?
-
hyc
no. for it to appear, someone has to do the legwork.
-
moneromooo
But they said they wanted to work on monero. Sounds like a "I could start with that" to me.
-
hyc
and again, "great, make yourself happy"
-
spirobel[m]
so what is the official "monero core team certified ide"? codeblocks, vim or emacs?
-
leonarth
do you guys know if there's a way to extract the daily transactions on my wallet and create a daily report of all in/out
-
moneromooo
Yes, see src/wallet/*defs.h (or utils/python_rpc/framwework)
-
sythaeryn_aerie[
<moneromooo> "But they said they wanted to..." <- I'd love to, but unfortunately that's not really something I could start with - the main work there seems to be "making cmake happy" and that's outside of my area of expertise
-
leonarth
thank you moneromooo
-
hyc
the wallet rpc lets you constrain by block height. not by date.
-
hyc
so you'd need to keep a side record of the last height you checked before
-
moneromooo
I think there might be a new RPC to get a height from a date.
-
hyc
that's only an estimate
-
hyc
not sure how well it overlaps for consecutive dates
-
moneromooo
But in any case, if you get the txes, you get the timestamps anyway, so you can bin them then.
-
moneromooo
True, it's not actually monotonous...
-
sech1
sythaeryn_aerie your best shot is to try configure VS Code to use mingw64 toolchain because clang toolchain on Windows is also not supported
-
leonarth
you then suggest to extract all txs which returns me an obj w/ containing the dates, then I can filter by day and sum all amounts
-
leonarth
and I can do that via the RPC API calling into monerod
-
sech1
sythaeryn_aerie or just install msys2/mingw64 and follow the build instructions. I personally couldn't make Visual Studio Debugger work with it on Windows, and it's not the first time I tried
-
moneromooo
Either monerod (for all txes) or monero_wallet_rpc (for just that wallet's txes).
-
sech1
for text editor, VS Code will be just fine
-
hyc
I've never seen anything re: cross-compatible debug formats
-
leonarth
can I query monerod to return all txs pertinent only to my wallet address?
-
hyc
so no, should not expect that to ever work
-
moneromooo
Yes, if you have the txids.
-
moneromooo
But you can't tell the daemon "get me txes to or from address 4xxx", that'd defeat hte point.
-
leonarth
those need to be extracted from the wallet still
-
leonarth
I understand thank you moneromooo
-
leonarth
can the wallet be setup on a server in read-only?
-
hyc
yes, that's a view-only wallet
-
moneromooo
Yes.
-
leonarth
thank you guys for the info
-
sythaeryn_aerie[
sech1: since I am a C++ programmer spending a lot of time using tools like the Visual Studio Debugger and Visual Studio Profiler usually, I don't think I'd enjoy working on a C++ project without having access to those tools...
-
spirobel[m]
<leonarth> "can I query monerod to return..." <- I think working with wallet_rpc or some other wallet related api is probably best. Here is how monero gui does it:
github.com/monero-project/monero-gu…walletqt/TransactionHistory.cpp#L82 it imports from wallet2_api
github.com/monero-project/monero/bl…master/src/wallet/api/wallet2_api.h
-
hyc
^ that's one of the biggest problems with working with M$ tools. they don't support open standards (like DWARF debug info) and they don't publish specs of their PDB format to enable open source projects to support theirs.
-
sech1
sythaeryn_aerie I understand, I myself work mostly in VS (both at work and in my own projects). You can try to check out p2pool first, it supports VS. It's not so hard to work with Monero codebase once it's set up in msys2/mingw64
-
sech1
hyc while VS tools are excellent, I agree on this point. M$ tries to lock users to their ecosystem and are often successful
-
spirobel[m]
<sech1> "hyc while VS tools are excellent..." <- but VS code is fine. it is open source. But visual studio is still closed source right? the naming is so confusing. It is so similar.
-
spirobel[m]
s/but//
-
sech1
VS code is just a text editor with tons of plugins
-
sech1
Maybe you can set it up to be comfortable, but 99% you won't be able to use VS debugger with the Monero codebase
-
sythaeryn_aerie[
<sech1> "hyc while VS tools are excellent..." <- one good thing is that MSVC has become a lot more standard compliant in recent years
-
hyc
you can barely use any debugger with the monero codebase on windows. the object file format blows up from all the symbol data
-
leonarth
thank you spirobel[m]
-
sythaeryn_aerie[
hyc: I don't quite understand why? what's the issue there? obviously big projects like Chromium can be debugged fine on Windows. Monero is not "bigger" I'd assume?
-
hyc
there's a limit of something like 32768 symbols per object file
-
sythaeryn_aerie[
my main work is with Unreal Engine 4 code. which is also a huge codebase.
-
hyc
and with the wild overuse of templates, boost, and other C++ syntactic garbage, many of the object files hit that limit\
-
hyc
I recall the only thing that worked reliably was the PSDK debugger
-
sythaeryn_aerie[
hyc: is that some issue related to the toolchain used or something? as I said I don't have any experience with non-windows projects, but at least with VS and MSVC I've never, ever heard of there being any project running into something like a 32768 symbols limit for debugging or something similar
-
hyc
it may be this was only an issue on the 32bit builds. I don't remember now
-
hyc
and we ought to be phasing out 32bit builds soon anyway
-
hyc
yeah, this was an issue with gcc/gdb and COFF object files. Since MSVC uses PDB it probably didn't affect that
-
sech1
speaking of, PSDK debugger? I've been using debug printf so far :D it would be nice to have working debugger on Windows
-
hyc
well, it's asm-level only, but yeah. microsoft debugger
-
sech1
asm-level only works perfectly fine in VS too
-
sech1
just attach to the running process and open ASM view
-
hyc
-
hyc
WinDbg
-
spirobel[m]
<sythaeryn_aerie[> "is that some issue related to..." <- maybe this can be an opportunity for you to learn about linux and the toolchains there. Using one ide too much can also become a crutch.
-
sech1
ah, WinDbg
-
sech1
spirobel true. Even at my work, where it's mostly VS and Windows, we use quite a bit of clang and linux toolchains for server-side tools
-
sythaeryn_aerie[
I find it hard to imagine how I could debug my own code without having access to the VS debugger, only having to reply on stuff like prints.... I'd think that would make everything take 10x longer and be way less fun. it's just deeply engrained in my workflow to use all the VS tools. I love to have access to the VS profiler and easily see how much time every individual line of code takes to run too. and having a quick and easy
-
sythaeryn_aerie[
right click -> go to disassembly to judge what exactly the compiler is doing and if I'm happy with that
-
sythaeryn_aerie[
spirobel[m]: problem is I'm really happy with the workflow I'm used to and I love writing C++ code but I don't love learning about toolchains and stuff, so it would be quite hard to motivate me to spend time with something like that... and I'm already busy with enough projects anyways
-
sech1
"to judge what exactly the compiler is doing" gcc toolchain can do that too, you can compile a single cpp file into .S asm file and check it out
-
sech1
also, if the code you write is self-contained, nothing prevents you from doing it in VS and then just plugging it into the Monero codebase
-
sythaeryn_aerie[
sech1: if there would be anything so self contained that would be useful, yeah
-
moneromooo
^ good point there
-
sythaeryn_aerie[
if no one has ever been able to run the monero code through the VS profiler, I'd really love to be able to do that... I'm sure it would easily identify many potential optimizations
-
sech1
anyway, you can start with
github.com/SChernykh/p2pool#windows-1 - p2pool is not part of Monero codebase, but it's tightly integrated. At least you could learn how to use RPC and ZMQ interfaces
-
sech1
Monero code was run through the profiler (not VS) before
-
sech1
some parts are optimized (like Supercop crypto library)
-
moneromooo
Something like bulletproofs might be easy-ish to extract to build with whatever tools you like, including that profiler. Speeding those up even more would be nice.
-
sech1
That's not a good starting point :D Any change in bulletproofs has a potential for infinite money glitch :D
-
moneromooo
There are tests and reviews.
-
sech1
true, but optimizing bulletproofs requires deep knowledge of the underlying math, and what the code in bulletproofs.cc does is just calling low-level crypto functions
-
moneromooo
I optimized it without knowning much of the math :P
-
sech1
it uses functions from monero\src\crypto\crypto-ops.c as far as I can see. Optimizing those would be nice
-
sythaeryn_aerie[
<moneromooo> "Something like bulletproofs..." <- often the code that people know should be fast is already quite fast, and the most significant improvements can be had from code that people did not consider too relevant for the overall speed of the program before which is then only noticed by profiling
-
sech1
-
» moneromooo looks at several people rush to their editor with anguished looks
-
moneromooo
Those are already the optimized supercop code, no
-
moneromooo
?
-
sech1
crypto-ops.c?
-
moneromooo
If not, then I agree, it'd be a very good target.
-
sech1
I'm still not sure where supercop is actually used
-
sech1
I think it's only for wallet scanning
-
moneromooo
Also, the person doing the profiling/sorting needs not be the one to do the speedups.
-
sythaeryn_aerie[
moneromooo: that's true, yeah
-
sythaeryn_aerie[
but often finding out what code needs to be optimized more is actually more work than doing the optimizations :P
-
sythaeryn_aerie[
unless stuff is already super optimized
-
selsta
sythaeryn_aerie[: maybe you can do a review of this PR?
monero-project/monero #8046
-
selsta
it's wallet optimization related
-
Rucknium[m]
sythaeryn_aerie: Please join #monero-recruitment:monero.social
-
selsta
moneromooo: there are some new review comments here
monero-project/monero #7819
-
moneromooo
Thanks
-
xmr-pr
woodser opened issue #8168: Don't require --rpc-login with --rpc-access-control-origins
-
xmr-pr
-
UkoeHB
sythaeryn_aerie[: if you want toolchain support improvement, you could create a bounty for it (a bit more motivating than 'please do this work for me for free')
-
Guest36
would it be possible to add privacy-preserving scripting to monero using zk proofs?
-
UkoeHB
maybe? lol
-
Guest36
like, have all the utxo's pay to a hash of a script, and then when spending the uxto the spender would create a zk-proof that they a) have a script that matches the hash in the utxo they're consuming, and b) their transaction fulfills the conditions in the script
-
Guest36
you may notice that this removes stealth addresses an subaddresses. I'll soon explain how to add them back in, if someone can confirm that my idea has any merit.
-
UkoeHB
are they trustless setup?
-
Guest36
I haven't actually implemented anything. this is purely my speculation >:D
-
UkoeHB
is it theoretically, a trustless setup?
-
Guest36
yes
-
Guest36
i guess?
-
UkoeHB
guess? isn't that kinda important?
-
Guest36
it probably would be possible to create a zk-proof that does this and is trustless.
-
Guest36
if not, we shouldn't implement this
-
Guest36
you're the zk wizard, what do you think?
-
UkoeHB
wizard? um all I know about is Monero ^.^
-
Guest36
the idea for reimplementing subadresses and stealth adresses goes like this. To create a subadress you take the main script hash and append to it a subadress index, and then hash them together. This is the subadress. To send to someone using a stealth adress you first create a shared secret with them, and then you append the shared secret to their
-
Guest36
public adress (either a main or sub adress) and hash them together and publish the result to the blockchain as a "script public key".
-
UkoeHB
Idk anything about zk scripting, so if you write up a doc explaining how it all works, that would be pretty helpful
-
Guest36
lets say that you want to spend a utxo sent to a stealth-subadress. You create a zk proof that you input publicly the hash on the blockchain and the block height. You also input secretly the stealth shared secret, the subadress index, any hash preimages or other garbage the script checks and the actual script. the zk proof then proves to everybody
-
Guest36
that 1) the script you used was the script being referenced and 2) the script indeed allows you to spend the utxo.
-
UkoeHB
you lost me at "You create a zk proof"
-
UkoeHB
how?
-
Guest36
I can't write that right now because I have to go to sleep. sorry for my bad english