02:40:58 How can smart contracts be implemented on xmr? 02:45:23 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. 03:27:29 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? 03:28:05 Note: This will decrease privacy by a certain degree, but I wonder what the tradeoff would be, especially with larger ring sizes 03:29:33 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 03:30:12 And if the wallet trusted the daemon, the speedup could be massive due to significant bandwidth decreases 03:42:28 Where is the daemon getting these rKv values? 03:44:31 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 03:45:31 Basically the daemon sends data necessary to calculate view tags, wallet calculates view tags, wallet then requests relevant txs 03:45:48 Also great job on the proposal man, you're fucking smart 05:17:58 Can we ship momero miner with the blockchain data as a docker container for easier setup and convience? 12:15:46 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). 15:16:40 hey i would like to start looking into the codebase of monero a bit and getting familiar with the code. 15:16:40 I am currently running gentoo and i code c++ in my emacs. how are you devs developing monero? 15:16:40 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? 15:17:53 I have all installed locally. But you can also go the docker way, feather wallet is built that way for example. 15:18:36 I do remember complains about the docker file bitrotting though. Updates to keep it functional would be nice if you choose to use it ^_^ 15:19:08 There is also the depends system, which is a bit in the middle. 15:21:16 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. 15:21:17 what is the depends system? never heard of it 15:24:44 It is a build system which can be used to build deterministic binaries. 15:27:06 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 15:35:26 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? 15:36:52 is there something you want to do in the code? 15:37:18 not specifically i would just like to help where i can in the future 15:37:41 i wanted to do some refactoring maybe now that the standart was changed to C++14 15:37:59 but overall i just wanted to be able to help where i can 15:38:38 i thought i would get an idea where to help once i understand the overall structure a bit better 15:41:48 I don't think there is any intro to the codebase. You'll just have to wander around I guess. 15:42:36 Bounty: Write an intro to the codebase :D 15:43:31 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 15:47:18 no, it is very difficult to get refactor PRs approved... maybe you could review some existing PRs 15:49:33 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. 15:50:27 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 :) 15:51:24 ok i see, then i guess i will review some other PRs and try to understand what they are doing 15:51:45 but first i need to get it to build on my system haha :D 15:52:16 "make" will typically work right. The cmake part will tell you of most things that might be missing. 15:52:54 yeah thats what i am currently doing i type use make and then install what cmake is telling me is missing 15:54:31 is there a prefered way to create a compilation database or should i just call `cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE ..` 15:54:49 * is there a prefered way to create a compilation database or should i just call 15:54:49 `cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE ..` 16:02:41 here comes my first stupid question what is epee? 16:03:02 A library of useful functions and base classes. 16:11:55 where does the name come from? :) 16:25:37 "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? 16:26:29 UB fixes, yes. Compiler warning fixes, depends. 16:27:01 ok then i will go on a UB hunt after i have checked out some PRs 16:27:26 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. 16:28:01 moneromooo: ok yeah that makes sense 18:10:00 hey yall, theoretical conversation, If i wanted to fork monero, basically in name only, to make a memecoin, what would I need to do 18:11:51 look at other monero forks, see what they did, look on monero stackexchange, ... 18:13:29 sorry, new here, toss me a fork and I can look into it 18:13:43 also lol, stackexchange.. because that never gets old. 18:13:59 Guest46: Wownero 18:14:10 nailed it. 18:20:49 oh, yall are based on cryptonote 18:20:50 cool 18:27:53 how do you all run the tests after changing stuff? just with `make release-test`? core_tests take forever 18:33:01 sent u pm 18:44:06 thanks a lot, was this somewhere public available and i was just to stupid to find it? 18:47:57 No I worked it out with people in this channel a couple months ago 18:48:14 Iirc someone was going to update the readme, idk if that happened 19:35:45 when i run the unit tests i get some red logs like: 19:35:45 `2021-10-30 19:24:34.782 E Unable to send transaction(s) via Dandelion++ stem` 19:35:45 but it say all tests passed at the end. is this normal? 19:38:43 * atomfried[m] uploaded an image: (88KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/WZOigchivChIcxqNeXcfMQGc/image.png > 19:41:25 atomfried: Interestingly, I recently got that same error message on the Townforge testnet. I hadn't seen it before this point. 19:41:46 atomfried[m]: yes normal, it is testing an error state 19:47:49 "atomfried: yes normal, it is..." <- ok thank you :D i guess my project setup is ready ... lets go :D 20:57:38 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 https://libera.ems.host/_matrix/media/r0/download/libera.chat/400b3b2419b12d9333af7a38e9b7650ddd0a443d) 20:58:39 this is also present in some other files in `src/blockchain_utilities/` 21:01:48 I know without even looking what it's gonna be... 21:04:23 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` 21:05:15 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. 21:06:38 (Replacing all pointers by refs and vice versa whrever these objcets are used all over the source is most definitely obtrusive) 21:06:47 intrusive 21:06:56 How the hell did I end up with obtrusive... 21:07:56 this looks ugly even if it's not an UB 21:09:05 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 21:10:06 are you sure this is not UB? 21:10:06 https://en.cppreference.com/w/cpp/memory/unique_ptr/operator* 21:10:06 says `The behavior is undefined if get() == nullptr` 21:11:55 sech1: m_mempool expects a reference to a `Blockchain`not a ptr 21:12:14 that reference is a pointer internally and it will be nullptr 21:14:10 https://github.com/monero-project/monero/blob/master/src/cryptonote_core/cryptonote_core.cpp#L228 21:14:19 oh my, this is a can of worms waiting to be opened one day 21:15:21 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 21:16:18 sech1: ah yeah i see 21:16:40 tx_memory_pool constructor does nothing essentially, so it's safe for now 21:22:29 "if tx_memory_pool constructor..." <- i am not entirly convinced by this after reading a bit: 21:22:30 ```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. ] 21:22:30 `` 21:22:39 s/``/```/ 21:22:56 * i am not entirly convinced by this after reading a bit: 21:23:00 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. ] 21:26:39 I was talking about cryponote_core.cpp 21:26:46 blockchain_utilities is not that important 21:26:57 but it is an UB in blockchain_utilities 21:27:09 ah ok i was mixing that up, sorry 21:27:32 I am reasonably sure cryptonote_core does a similar thing. 21:28:14 If not, then it seems updating blckchain_utilities to use the same system would be a good fix. 21:38:56 is it always that a 1:1 relationship? a `Blockchain`has a `tx_memory_pool` which has a reference to the same `Blockchain` back? 21:40:34 if so maybe one could own the other and initialize it with `*this` in the ctor 21:52:04 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 22:30:01 Oh, I've done just that recently actually. 22:30:18 Maybe just for unit tests... 22:33:10 Ah, found it, txpv branch. 22:33:20 It was failing there for CLANG IIRC. 22:33:36 Odd it would fail only there and not for stuff in utilities then... 22:34:47 where in the txpv branch is it? i would like to try to fix this as my first contribution 😅😅😅 (if thats ok i guess) 22:35:27 Latest commit. A fix for the rest would be welcome, this is just a few lines per instance. 22:39:43 where should i put this `BlockchainAndPool`struct? or should i just define it localy where needed? 22:41:13 Maybe a common file in blockchain_utilities, since they all use the same copy/paste init code ? 22:41:40 Unless the UB also happens in other places ?