-
aberdeenik[m]
How can smart contracts be implemented on xmr?
-
Rucknium[m]
aberdeenik: They probably won't be implemented on XMR itself. A software fork of Monero might be able to do it, though. For example, Townforge -- which is a software fork of Monero -- implements state machines, which is a simple kind of smart contract.
-
jerfo
Regarding the recent view tag proposal, what do yall think about using it to also reduce the # of txs transmitted over the line by asking for only txs that contain certain view tags?
-
jerfo
Note: This will decrease privacy by a certain degree, but I wonder what the tradeoff would be, especially with larger ring sizes
-
jerfo
How it would work: The daemon sends only the shared secrets rKv to the wallet, then the wallet calculates the view tags, then requests transactions with those view tags. It could also ask for "decoy" view tags to inject a larger anonyity set
-
jerfo
And if the wallet trusted the daemon, the speedup could be massive due to significant bandwidth decreases
-
UkoeHB
Where is the daemon getting these rKv values?
-
jerfo
Sorry, I meant that the daemon sends the R values, which then the view tag = first byte of H(rKv) is calculated by the wallet
-
jerfo
Basically the daemon sends data necessary to calculate view tags, wallet calculates view tags, wallet then requests relevant txs
-
jerfo
Also great job on the proposal man, you're fucking smart
-
aberdeenik[m]
Can we ship momero miner with the blockchain data as a docker container for easier setup and convience?
-
UkoeHB
jerfo: yes this is what that view tag proposal does (more or less). You have to compute `rKv` for every output (or at least every tx), there is no way to avoid computing that (unless you start adding user IDs to the blockchain).
-
atomfried[m]
hey i would like to start looking into the codebase of monero a bit and getting familiar with the code.
-
atomfried[m]
I am currently running gentoo and i code c++ in my emacs. how are you devs developing monero?
-
atomfried[m]
do you have a docker container which contains the project and all the dependencies or something? or do you have all the dependencies installed on your system?
-
moneromooo
I have all installed locally. But you can also go the docker way, feather wallet is built that way for example.
-
moneromooo
I do remember complains about the docker file bitrotting though. Updates to keep it functional would be nice if you choose to use it ^_^
-
moneromooo
There is also the depends system, which is a bit in the middle.
-
atomfried[m]
i have never tried to use the docker setup tbh maybe i will try it. i guess installing the deps locally would be quite a hussle to get all the versions right.
-
atomfried[m]
what is the depends system? never heard of it
-
moneromooo
It is a build system which can be used to build deterministic binaries.
-
atomfried[m]
moneromooo: i guess i will have a look at this maybe i can create a compile_comands.json from it such that my language server understands the project
-
atomfried[m]
is there some instruction or overview or introduction to the codebase? like what does what? or should i just start anywhere and try to understand the structure? any idea how i can get into the structure of the code fast?
-
UkoeHB
is there something you want to do in the code?
-
atomfried[m]
not specifically i would just like to help where i can in the future
-
atomfried[m]
i wanted to do some refactoring maybe now that the standart was changed to C++14
-
atomfried[m]
but overall i just wanted to be able to help where i can
-
atomfried[m]
i thought i would get an idea where to help once i understand the overall structure a bit better
-
UkoeHB
I don't think there is any intro to the codebase. You'll just have to wander around I guess.
-
Rucknium[m]
Bounty: Write an intro to the codebase :D
-
atomfried[m]
is there some simple refactoring that comes into your mind that i could start with? or a simple first issue with which i could start? there seems to be no such thing like a "good first issue" tag or something
-
UkoeHB
no, it is very difficult to get refactor PRs approved... maybe you could review some existing PRs
-
moneromooo
If real refactoring (that is, merging different very similar bits of code), it seems good. If a euphemism for "rewrite so I like it better", then probably not a good idea.
-
moneromooo
Of course the devil is in the details, and since I'm no longer the main contributor I try to shut up and let others do what they please now :)
-
atomfried[m]
ok i see, then i guess i will review some other PRs and try to understand what they are doing
-
atomfried[m]
but first i need to get it to build on my system haha :D
-
moneromooo
"make" will typically work right. The cmake part will tell you of most things that might be missing.
-
atomfried[m]
yeah thats what i am currently doing i type use make and then install what cmake is telling me is missing
-
atomfried[m]
is there a prefered way to create a compilation database or should i just call `cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE ..`
-
atomfried[m]
* is there a prefered way to create a compilation database or should i just call
-
atomfried[m]
`cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE ..`
-
atomfried[m]
here comes my first stupid question what is epee?
-
moneromooo
A library of useful functions and base classes.
-
h4sh3d
where does the name come from? :)
-
atomfried[m]
<moneromooo> "If real refactoring (that is..." <- how about fixing compiler warnings and searching UB with a static analyser would such PRs have a better chance getting merged?
-
moneromooo
UB fixes, yes. Compiler warning fixes, depends.
-
atomfried[m]
ok then i will go on a UB hunt after i have checked out some PRs
-
moneromooo
If it's just torturing the code so the compiler shuts up, unlikely. If it's hiding something we should know, probably not. If it's fixing an actual problem, yes. If it's fixing the warning by making the code better, probably.
-
atomfried[m]
moneromooo: ok yeah that makes sense
-
Guest46
hey yall, theoretical conversation, If i wanted to fork monero, basically in name only, to make a memecoin, what would I need to do
-
selsta
look at other monero forks, see what they did, look on monero stackexchange, ...
-
Guest46
sorry, new here, toss me a fork and I can look into it
-
Guest46
also lol, stackexchange.. because that never gets old.
-
Rucknium[m]
Guest46: Wownero
-
Guest46
nailed it.
-
Guest46
oh, yall are based on cryptonote
-
Guest46
cool
-
atomfried[m]
how do you all run the tests after changing stuff? just with `make release-test`? core_tests take forever
-
UkoeHB
sent u pm
-
atomfried[m]
thanks a lot, was this somewhere public available and i was just to stupid to find it?
-
UkoeHB
No I worked it out with people in this channel a couple months ago
-
UkoeHB
Iirc someone was going to update the readme, idk if that happened
-
atomfried[m]
when i run the unit tests i get some red logs like:
-
atomfried[m]
`2021-10-30 19:24:34.782 E Unable to send transaction(s) via Dandelion++ stem`
-
atomfried[m]
but it say all tests passed at the end. is this normal?
-
-
Rucknium[m]
atomfried: Interestingly, I recently got that same error message on the Townforge testnet. I hadn't seen it before this point.
-
UkoeHB
atomfried[m]: yes normal, it is testing an error state
-
atomfried[m]
<UkoeHB> "atomfried: yes normal, it is..." <- ok thank you :D i guess my project setup is ready ... lets go :D
-
atomfried[m]
I run cppcheck to check if i can find some UB which i can fix and found this in `src/blockchain_utilities/blockchain_depth.cpp:139-140`:... (full message at
libera.ems.host/_matrix/media/r0/do…b2419b12d9333af7a38e9b7650ddd0a443d)
-
atomfried[m]
this is also present in some other files in `src/blockchain_utilities/`
-
moneromooo
I know without even looking what it's gonna be...
-
atomfried[m]
it is some kind of cyclic thing where `Blockchain`needs a `tx_memory_pool`and a `tx_memory_pool`needs a reference to a `Blockchain`
-
moneromooo
Yes. I don't know if it's actuall UB, since the pointer is not dereferenced while NULL. If you find a non obtrusive better way to init them, go for it.
-
moneromooo
(Replacing all pointers by refs and vice versa whrever these objcets are used all over the source is most definitely obtrusive)
-
moneromooo
intrusive
-
moneromooo
How the hell did I end up with obtrusive...
-
sech1
this looks ugly even if it's not an UB
-
sech1
how does that even work, m_mempool grabs nullptr and it should stay nullptr even when core_storage.reset(new Blockchain(m_mempool)); is run
-
atomfried[m]
are you sure this is not UB?
-
atomfried[m]
-
atomfried[m]
says `The behavior is undefined if get() == nullptr`
-
atomfried[m]
sech1: m_mempool expects a reference to a `Blockchain`not a ptr
-
sech1
that reference is a pointer internally and it will be nullptr
-
sech1
-
sech1
oh my, this is a can of worms waiting to be opened one day
-
sech1
if tx_memory_pool constructor tries to call any of m_blockchain_storage methods, it will be UB because m_blockchain_storage is not initialized at that point
-
atomfried[m]
sech1: ah yeah i see
-
sech1
tx_memory_pool constructor does nothing essentially, so it's safe for now
-
atomfried[m]
<sech1> "if tx_memory_pool constructor..." <- i am not entirly convinced by this after reading a bit:
-
atomfried[m]
```A reference shall be initialized to refer to a valid object or function. [Note: in particular, a null reference cannot exist in a well-defined program, because the only way to create such a reference would be to bind it to the “object” obtained by dereferencing a null pointer, which causes undefined behavior. As described in 9.6, a reference cannot be bound directly to a bit-field. ]
-
atomfried[m]
``
-
atomfried[m]
s/``/```/
-
atomfried[m]
* i am not entirly convinced by this after reading a bit:
-
atomfried[m]
A reference shall be initialized to refer to a valid object or function. [Note: in particular, a null reference cannot exist in a well-defined program, because the only way to create such a reference would be to bind it to the “object” obtained by dereferencing a null pointer, which causes undefined behavior. As described in 9.6, a reference cannot be bound directly to a bit-field. ]
-
sech1
I was talking about cryponote_core.cpp
-
sech1
blockchain_utilities is not that important
-
sech1
but it is an UB in blockchain_utilities
-
atomfried[m]
ah ok i was mixing that up, sorry
-
moneromooo
I am reasonably sure cryptonote_core does a similar thing.
-
moneromooo
If not, then it seems updating blckchain_utilities to use the same system would be a good fix.
-
atomfried[m]
is it always that a 1:1 relationship? a `Blockchain`has a `tx_memory_pool` which has a reference to the same `Blockchain` back?
-
atomfried[m]
if so maybe one could own the other and initialize it with `*this` in the ctor
-
sech1
moneromooo it does similar thing, but more "properly", without dereferencing a null pointer. The fix for blockchain utilities would be create a struct containing tx_memory_pool and Blockchain and initialize both in the constructor
-
moneromooo
Oh, I've done just that recently actually.
-
moneromooo
Maybe just for unit tests...
-
moneromooo
Ah, found it, txpv branch.
-
moneromooo
It was failing there for CLANG IIRC.
-
moneromooo
Odd it would fail only there and not for stuff in utilities then...
-
atomfried[m]
where in the txpv branch is it? i would like to try to fix this as my first contribution 😅😅😅 (if thats ok i guess)
-
moneromooo
Latest commit. A fix for the rest would be welcome, this is just a few lines per instance.
-
atomfried[m]
where should i put this `BlockchainAndPool`struct? or should i just define it localy where needed?
-
moneromooo
Maybe a common file in blockchain_utilities, since they all use the same copy/paste init code ?
-
moneromooo
Unless the UB also happens in other places ?