09:12:44 Greetings, I'm currently using monero-python and I have questions about the way people test their code when it deals with monero. 09:12:44 So far I have setup a private test network in a container, that runs 2 daemons, and creates 2 wallets with deterministic adresses, and uses a low difficulty. 09:12:44 My test suite then setup a pytest fixture that runs the container, starts mining on one of the 2 addresses, waits for the wallet to have enough xmr to spend. 09:12:44 The "issue" I'm facing is the following: mining takes time. Afaik the first mined xmr becomes available only at height 60, is it something I can tweak to increase speed ? 09:12:47 Another question is : can I mine up to a given height and stop mining once reached ? I didn't see an rpc command parameter for that (up to x height) 09:12:50 But after I made all those questions, I'm reaching that point where I'm just wondering if integrated testing is the way to go and if I should not mock the various monero part I'm interested in interacting with. 09:12:53 thanks for the read ! 09:29:27 euri10 use --fixed-difficulty parameter for monerod to mine faster 09:29:57 yep already set at 1 09:30:59 then it should be very fast to mine 60 blocks 09:32:33 There's a generate_blocks RPC, you tell it how many blocks to mine. See tests/functional_tests. 09:33:08 Also, set MONERO_FASTER_POW=1 if you don't care about verifying the PoW from another program. It'll use keccak IIRC. 09:35:27 Ah nvm that never got merged. You can apply it from my "crash" branch if you don't mind running a slightly patched daemon. 09:36:04 ok ok :) good infos here, will definitely check that 09:37:38 https://git.townforge.net/townforge/townforge/commit/d8e4f4078598221a2f7320564a507c9d5bbce6a3 is the one with keccak, it doesn't seem to be in my crash branch. Should be easy to merge. 09:38:42 Also, generate_blocks only works in regtest mode for some reason, but I doubt that'll be a problem here. 09:39:17 what is regtest mode ? 09:40:03 A global state set by --regtest IIRC, which enables that and a "delete chain before we start". 09:40:40 ok ok, with all that hopefully I can speed up my test suite, many thanks 09:40:45 Which made me add a --keep-fake-chain because useful, especially to investigate when stuff went wrong. So not sure why this mode exists in the first place. 13:27:00 @moneromooo as soon as I add the regtest flag to the daemon command, it seems the daemon is not accepting rpc connections anymore, is that possible ? I raised an issue here, maybe you have better insights: https://github.com/monero-ecosystem/monero-python/issues/117 13:47:48 It is possible, but not expected. 13:48:13 IIRC the python functional tests use that mode, so it RPC didn't work, all tests would fail. They do not. 13:48:56 ok I'll dig into it then thanks 13:49:26 Make sure you're sending to the correct port, just in case. 13:49:36 ie, check netstat 13:50:03 regtest is a mainnet base, so the default port would be 18081, if you did not override it. 13:51:19 ok I'm trying with 28081 but I'm using `monerod --stagenet --no-igd --hide-my-port --data-dir stagenet/node_01 --p2p-bind-ip 127.0.0.1 --log-level 1 --rpc-bind-ip 0.0.0.0 --add-exclusive-node 127.0.0.1:38080 --confirm-external-bind --detach --fixed-difficulty 1 --p2p-bind-port 28080 --rpc-bind-port 28081 --zmq-rpc-bind-port 28082` 13:51:52 will try with a mainnet base and report 14:00:42 ok that was the --stagenet flag that somehow was clashing with regtest 14:07:04 Oh, one difference regtest has: it always starts from the latest known mainnet fork. 14:07:47 So you'll likely have BP+ etc, if you have recent code. 14:11:01 can high fee be a possible result of bug rather then malicious node? 14:11:22 is there a check in monerod preventing from sending high fee estimation? 14:14:22 MajesticBank: Don’t think so, maybe Monerod shouldn’t relay a tx with say 10x avg fee ; so these malacious nodes will become useless 14:55:48 * > <@MajesticBank:libera.chat> is there a check in monerod preventing from sending high fee estimation? 14:55:48 Don’t think so, maybe Monerod shouldn’t relay a tx with say 10x avg fee ; so these malacious remote nodes will become useless 14:56:57 "Don’t think so, maybe Monerod..." <- Before adding some changes to decentralized cryptocurrency it's better to think whether it's resistant to any abuse 15:00:22 was under impression that custom fee was banned on consensus level 15:06:52 and we couldn't find malicious node so far 15:07:20 "was under impression that custom..." <- source ? 15:07:25 All fees are allowed. 15:08:16 The wallet will send a tx with more than x10 fee if asked by priority setting. 15:08:37 You need to do that in order to push your tx in the face of a glut that fills blocks. 15:08:40 MajesticBank: code of decentralized project should work under any conditions, no need to find any malicious node, just write code properly 15:08:53 Though a wallet change could allow you to get away with less than that, the code just quantizes atm. 15:12:36 custom fee make transaction look different on blockchain 15:12:58 so CEX can use custom fee to make their transactions different from others 15:13:22 they can also use faulty decoy algorithms 15:15:05 just pointing some future places for improvements 15:16:09 MajesticBank: we had some discussion about using 'discretized fees' (probably for seraphis) 15:16:49 Who is supposed to use different fee from minimum one ? 15:17:01 https://github.com/monero-project/meta/issues/691 15:20:50 MajesticBank: we also have talked about 'binning' for decoy selection, where the ring members are divided into bins with a small on-chain range. If someone's 'decoy selection algorithm' is badly implemented (i.e. selecting the bin locations), then at least the decoy members within the real bin will add some obfuscation. 15:22:29 The wording was oddly reminiscent of "they can do it on purpose". But if they want to do that, nothing can help since they can just make public a list of their txes. 15:22:37 One idea is to bake the larger decoy selection algorithm into consensus, but IMO that's too difficult to get right (both choosing the algorithm and then making it robustly deterministic). 15:23:07 Why is it difficult ? 15:23:36 Integer math for the gamma function ? 15:24:32 yes, there would be lots of edge cases that are hard to validate 15:25:46 UkoeHB: do you already know at least one such edge case that is hard to validate ? 15:26:51 I mean hard to validate in total, i.e. identify all the edge cases, understand them, and make sure they don't cause problems. 15:27:44 UkoeHB: If cryptography can be squashed and merged without any validation, why not to do the same here ? 15:27:46 hahahaha 15:28:50 What does that mean ? 15:31:33 I didn't try to implement deterministic decoy selection, and don't plan to, but if someone wants to try I will look at it of course. 15:32:25 Oh no I meant the squashing cryptography line :) 15:32:52 It's pretty misleading to say 'without any validation' when it's really 'without validation that meets my standards' (which we'd probably get closer to if you participated instead of hiding behind your indignation). 15:33:54 Oh, it was just some snark, nothing actually useful ? nvm then. 15:34:45 moneromooo: or not a snark, who knows 15:34:57 Well, explain :) 15:35:31 yes, please offer a solution instead of expecting other people to solve your problems for you 16:02:35 should the wallet implement a check, like "are you sure?" when the fee is larger than txn amount? 16:03:43 hyc: seems like a good idea, or even like 10-25% of the txn amount 16:05:50 FWIW, the base tx fee goes up only with average block reward. It's probably a fair bet it won't ever go above 110% of the current base tx fee (within current consensus rules). 16:06:07 (am I forgetting an input that makes it go up ?) 16:06:34 Actually, not a fair bet. That'd imply ~50% chance. I mean a sure bet :) 16:07:58 hmm good point 18:15:12 hyc Would you be willing to review https://github.com/monero-project/monero/pull/8322? My OpenSSL is kind of spotty, but it appears to work well. I hope it would be kind of hard to be able to fake SHA-256 lol 18:15:15 Or anyone else who is comfortable with OpenSSL 18:23:50 sure 18:28:19 thanks I appreciate it! You set me straight on the other PR 18:42:41 .merge+ 8321 18:42:41 Added 19:38:53 .merge+ 8312 19:38:53 Added 19:53:17 selsta I actually have one more cleanup patch incoming for 8312 19:53:40 should be no big deal, just cosmetic in depends pkg descriptions 19:53:41 ok will remove it for now 19:53:45 .merge- 8312 19:53:45 Removed 21:29:08 selsta: 8312 ready for another try anyway 21:30:53 ok will try 21:36:49 .merges 21:36:49 -xmr-pr- 8046 8220 8226 8235 8262 8277 8278 8279 8280 8281 8293 8300 8301 8302 8304 8321 21:51:50 How much faster does this make syncing? https://github.com/monero-project/monero/pull/8262 21:54:08 What are the community nodes? https://github.com/monero-project/monero-gui/pull/3897#issuecomment-1114004700 21:56:19 I would guess not more than a few % 21:58:25 @sgp The community node list isn't a thing *yet* but it would replace the Monero GUI using random nodes in simple mode 22:02:14 feather wallets list : https://github.com/feather-wallet/feather/blob/master/src/assets/nodes.json