02:44:34 hyc sech1 can you try leaving and rejoining 06:15:44 luigi1111w done 06:17:54 got it now 06:57:25 I've got p2pool running on testnet (2 nodes, 2 wallets so far). It runs with 1 second block time because I want to catch synchronization bugs faster. Instructions will be later today, but for now you can watch for 0in/2out blocks on https://testnet.xmrchain.net/ 09:01:57 test instructions are published: https://github.com/SChernykh/p2pool 09:02:08 hyc selsta moneromooo or whoever else was interested ^^^ 09:04:50 sech1: not important now but cmake has some warnings https://paste.debian.net/hidden/6de62345/ 09:05:33 I'm not strong with cmake 09:06:17 I think you'll get this warning if libzmq or libuv is not found 09:10:03 syntax looks correct so no idea 09:10:25 Odd, I see libuv and more in external already, and we need to install it ? 09:10:25 I have both libs 09:10:32 "debug" is followed by specifier "debug" means that whatever was between them is an empty string 09:10:42 right 09:11:11 libuv and stuff in external are just collecting dust there for now 09:11:24 I used them to build a fully static binary in Alpine 09:11:38 not collecting dust, I still use headers from these folders 09:12:10 So... we have to install the exact same version as those headers ? 09:12:18 No need for exact same version 09:12:39 just headers need to be compatible 09:13:29 I need to switch to git submodules and build everything locally, one more thing in a todo list 09:13:56 https://paste.debian.net/hidden/80ece6d0/ fails here currently 09:14:22 Interesting. What's your gcc version? 09:14:36 clang 12.0.5 09:15:07 right, clang is not supported yet 09:15:48 add INT_ENTRY(unsigned long) in log.h on line 168 09:18:58 that also explains your cmake warnings 09:19:10 I just don't have stuff for clang there 09:21:53 selsta what OS version is this? 09:22:51 macOS 11.5.2 09:23:13 currently stuck here https://paste.debian.net/hidden/7bd9b27e/ 09:24:18 clang is retarded 09:24:34 sizeof(value.s) should be available to the compiler there 09:26:22 I'll try to remove that part entirely, it's not so important 09:27:12 I don't have a Mac so it's 100% untested there, but wait until I update log.h 09:28:02 https://paste.debian.net/hidden/637d6381/ is needed to build here (Fedora). 09:28:37 Oh, I left a debug trace... 10:12:38 Is it expected to spew lots of "not enough data to verify block at height" messages ? 10:12:49 I have accepted shares from xmrig. 10:13:45 I also disabled FULL_MEM and LARGE_PAGES, in case I goofed that one up. 10:15:03 "not enough data" is ok 10:15:09 it means it haven't synced required blocks yet 10:15:26 it will verify this block later when it has enough data, obviously :) 10:15:41 Well, still hasn't stopped spewing. 10:15:59 It needs to sync 4000+ blocks first 10:16:20 currently down to height ~20230 10:16:49 OK, it's counting down indeed, at 21k now. 10:17:09 it syncs all blocks and then starts verifying from bottom to top 10:17:43 xmrig submitting shares means you're already mining from height 0, but it will reorg once you're synced 10:19:38 Nice, it's stopped spewing now. 10:20:06 I see "3 wallets" messages in the og 10:20:09 A new job a second on the xmrig side, whee. 10:20:10 *log 10:20:17 2 of those are mine, I suppose 3rd is yours 10:20:36 yes, it's running at 1 block/second 10:20:53 I see 3 too. That'd be consensus on the share chain side, right ? 10:21:00 yes 10:21:20 you can type "status" command in the p2pool console if you have it open 10:21:33 it'll probably be quickly buried under other log output 10:21:47 but you can open p2pool.log and check it out there 10:22:03 also "loglevel 2" to stop spam 10:22:23 but I recommend to run at maximum loglevel 5 to catch everything in case we get a chain split or bug or something 10:23:22 damn, status command doesn't print how many wallets are in the window. I forgot to add it 10:23:38 Nice, first coinbase. 10:24:05 0.001710546230 testnet XMR 10:24:21 it will grow to match your hashrate after PPLNS window passes 10:24:28 ~36 minutes 10:25:29 Since those wallet addresses are public, it'd need to have a large mention of such in the README at some point. ie, don't use for exchanges etc. 10:26:01 you can't use exchange deposit addresses for mining 10:26:10 because these are subaddresses 10:26:23 but yeah, I need to add it to README for the release 10:27:23 I thought of how to avoid making miner addresses public but couldn't come up with good solution. Miners could publish stealth addresses to pay to, but they depend on output index, so it's doesn't work for p2ppool 10:29:03 So one can estimate every address' hash rate too. 10:29:45 Anyway, nifty. Thanks for doing this :) 10:29:50 yes, and this estimate would be possible even with stealth addresses 10:30:11 because txkey only changes after pool finds Monero block 10:30:59 Public miner addresses are a bit of downside here. Miners will have to create entire new wallets and use them only for mining. 10:31:55 by the way, each pool share is a Monero block template and you can see BLOCK_BROADCAST (pruned) in the log. Pruned means coinbase transaction is skipped 10:32:16 because it can grow up to 80 KB and can be restored from sidechain data because it's part of consensus 10:33:21 I installed libuv1-dev and it still says UV_LIBRARY is missing 10:33:53 https://paste.debian.net/hidden/637d6381/ helped me with that. 10:34:19 moneromoooo your port 37890 is not open btw 10:34:24 my node can't connect to you 10:34:33 I know. It's a VPN provider. 10:34:49 cool thx 10:36:01 I must warn that I'm a noob with cmake mumbo-jumbo 10:36:10 feel free to make a PR to fix things 10:37:02 I think mine's a bodge. It should have worked, since monero has that kind of setup too. 10:39:05 I also needed libbbsd here on ubuntu21 10:40:36 moneromoooo what's your hashrate btw? 10:41:52 Looks like about 40 H/s. 10:42:16 Seems high. Depends what other VMs are doing, it'll likely go down to ~25. 10:42:47 (I set xmrig to light mode) 10:43:38 cool 10:43:54 and you got a payout almost immediately, this what p2pool is about 10:44:35 I run 2 nodes: first at 475 h/s and second at 963 h/s 10:45:03 so p2pool difficulty checks out, currently at 1460 10:48:39 "I also disabled FULL_MEM and LARGE_PAGES" do you mean you're running p2pool in light mode too? 10:48:56 Yes. 10:49:06 cool, it's good for testing 10:49:15 Can't afford the 2 GB per. Too many VMs. 10:49:15 light mode takes more time to verify blocks, more latency 11:03:19 Presumably, if someone were to run a p2pool instance with number of blocks set to, say, 100k, the typical payout amount would be 25x smaller, right ? 11:04:23 you probably can't fit 100k outputs in a 300 KB block 11:04:43 2160 outputs are already 80 KB 11:05:05 you can ramp it up to ~7000 but then there will be almost no space left for other transactions 11:05:30 also, you need 100k wallets if PPLNS window is 100k 11:06:09 p2pool combines payouts for shares with the same wallet address 11:12:29 Good :) 11:13:30 I did not realize that the share chain size itself was "merged" by wallet address. That's interesting. 11:13:57 I wonder if that opens a DoS vector. 11:14:37 Alice has a lot of the p2pool hash. If she gets unlucky in the last 20 minutes, she might decide to switch mining to many addresses, to flush the unlucky part quicker. 11:15:54 I don't get it. Alice still needs to mine blocks with the same difficulty no matter what wallet addresses she uses 11:16:18 Yes. 11:16:44 But if her shares are spready among N addresses, then the share chain "flushes" quicker. 11:16:51 no it doesn't 11:16:55 it flushes by block height 11:17:27 PPLNS window is calculated using block heights 11:17:34 Oh, I re-read and misundersood. Makes more sense now. 11:17:48 Is the merging consensus ? 11:17:55 ie, you check for uniqueness ? 11:18:22 Coinbase transaction is consensus to the last byte 11:19:09 coinbase tx is not even sent over the network, nodes restore it locally and then check keccak hash, PoW and so on. And check coinbase tx again just in case 11:19:59 merging is part of consensus, it's done deterministically - wallets are sorted and then duplicates are merged 11:20:16 That seems eerily similar to my "game tick" txes in my game. I regenerate them, and was thinking of omitting them from the actual network packet. 11:20:40 omitting them is kind of necessity with p2pool. Coinbase tx can get quite large 11:21:21 Looks like my coinbases have stopped increasing in amount now. 11:21:33 I guess we've reached 2160 blocks since I started. 11:21:48 they should be equal (approximately) to your hashrate divided by network diff 11:22:00 *by network hashrate 11:22:06 multiplied by block reward 11:22:34 *divided by p2pool diff 11:23:01 Handwavy close enough. 11:23:10 Oh, p2pool diff... 11:23:15 there are always luck variations if the number of your shares in PPLNS window is low 11:23:56 yes, for my dev PC it's 963/1404*2.083862640504 = ~1.4293 XMR 11:24:03 Spot on using p2pool hsah rate. 11:24:09 and it got last payout of 1.369020903033 XMR 12:26:23 first p2pool block with transactions in it: https://testnet.xmrchain.net/block/1794242 12:26:39 good that merkle tree calculation works properly 12:27:49 Also confirmed that it's possible to move mined funds 12:29:21 sweep_all transaction: https://testnet.xmrchain.net/tx/136025f6431d44979d3d9440cd818185153a8250d19a0081642111755c4e311d 12:29:31 that's what p2pool miners would do eventually 12:39:42 looking good so far, 1 second block time works: https://paste.debian.net/hidden/1fe179ea/ 13:16:06 ufff. syncing fresh testnet node 13:16:22 estimated 1.2 days left 13:17:46 mine synced in 5-6 hours 13:18:06 testnet has no checkpoints 13:18:29 anyone got a block export of it I could download? 13:19:15 can I do an export on live blockchain? I don't want to stop my node right now 13:19:28 yes, no problems with that 13:19:41 ok, what's the command? 13:19:53 monero-blockchain-export --testnet 13:19:56 should be all you need 13:20:01 oh, I forgot. I don't have a web server there 13:20:14 so I don't know how you would download it... 13:20:20 phooey 13:21:43 installed nginx, let's see what I can do 13:22:26 cool. was syncing from my rockpro64, now \I'm on my ryzen laptop should go faster anyway 13:24:07 4.6 hours estimated 13:36:21 hyc http://148.251.81.38/blockchain.raw 14:12:55 thanks, got it 14:52:09 ok I'm all connected 14:52:15 p2pool dies a lot\ 14:52:26 "Killed" 14:52:36 how much ram do you have? 14:52:40 prob out of RAM on this box since my regular node is here 14:52:45 4GB 14:52:49 try light mode 14:52:54 --light-mode in command line 14:52:58 ok 14:54:22 so, 25 hashes accepted so far 14:54:39 you're probably still syncing 14:54:50 I don't see 4 wallets in PPLNS window yet 14:55:17 oh, p2pool needs to sync still? 14:55:20 you'll see difficulty jump in xmrig, from 999 to ~1400 when your p2pool node reorgs 14:55:26 ok 14:55:32 still 999 for now 14:55:40 right now you're mining on your own chain from height 0 and p2pool is syncing in the meantime 14:55:55 give it 5-10 minutes 14:56:07 ok 14:56:59 p2pool logging is massive 14:57:09 yes, as intended 14:57:18 it'll get better after it's synced 14:57:28 cool 14:57:51 if you want you can try to set up logrotate to deal with logs 14:58:35 this isn't using easylogger huh, won't rotate by itself? 14:59:09 what block heights do you see in the log right now? It'll stop syncing when you get down to ~36900 14:59:14 no it won't rotate by itself 14:59:30 but it'll detect if you rename p2pool.log 14:59:46 ok 15:00:12 37124 15:00:17 getting there 15:00:47 oh I see you synced 15:00:57 got a bunch of blocks from you that you've been mining 15:00:57 ah there we are 15:01:06 from height 0, so my node discarded them 15:01:20 I stopped the miner in the meantime. just restarted now 15:01:27 I see 4 wallets in PPLNS window now 15:01:31 looks like you're in! 15:01:39 cool! 15:01:53 so the monerod and p2pool are running on my rockpro64 15:01:57 the miner is on my M1 mac 15:02:43 rockpro64 is ARM, right? Nice to test it there too 15:02:49 yes 15:03:13 rockchip RK3399, pair of Cortex A73 plus some A53 15:03:41 looks like my dev PC connected to you, I have 2 outgoing connections now 15:04:26 cortex A72, oops 15:05:05 yeah, nice that my fibre ISP gives me an actual routable IPv4 address 15:05:52 you butchered p2pool luck :D Still no block since you joind 15:06:04 doh 15:06:34 I've been suspicious of the M1 for a while. been solo mining for months and got nothing 15:06:58 but if it were generating invalid hashes we'd see errmsgs right? 15:07:06 yes 15:07:20 I don't see any verification errors, so my node accepts your shares 15:07:31 cool 15:08:12 finally 15:08:19 https://testnet.xmrchain.net/tx/a8f52f8c7f168a6fafa3c727f13fbd8f7522aca69c1a4e8eb0c5bcd192b2573d 15:08:22 the fact that this machine miscompiles my simple database benchmarking tool inspires no confidence 15:08:29 already 0.031080440002 XMR? What hashrate are you mining at? 15:08:46 283H/s 15:08:55 oh 15:09:10 you probably mined a lot of shares because we waited so long for a block 15:09:22 wallet shows .06xxx 15:09:34 ah, so 0.03... was mooo's 15:10:38 you should be getting ~0.35 XMR per block with current hashrates after your shares fill PPLNS window 15:10:42 in 30-40 minutes 15:11:50 I've been stopping/restarting mining a couple times when I needed oomph on a dev vm. 15:12:39 gonna spin up a thread on the rockpro64 15:12:49 stopping/restarting should work fine 15:12:50 in a while. recompiling xmrig now 15:13:13 hyc do you have enough RAM there to spin up xmrig too? 15:13:26 will find out ;) 15:13:39 if your node dies, you'll have to sync again 15:13:48 p2pool doesn't save blockchain 15:13:55 ? oh 15:14:02 by design 15:14:10 it's ephemeral, old blocks are pruned 15:14:28 ok 15:14:41 of course I can add saving, but saved data gets obsolete pretty quickly 15:14:55 prob not worth it then 15:15:09 saved blockchain is useless after ~6 hours with normal 10-second block time 15:16:47 unless you save in a circular buffer 15:16:51 that might be nice 15:17:52 it's probably needed anyway for the cases when you just need to restart p2pool node 15:17:58 and don't want to sync again 15:18:41 "Monero p2pool. Spent a week syncing the chain ? Sync you're done ? Sync again." 15:18:50 lol 15:19:12 4320 blocks can by up to 200-300 MB of data, depending on how many miners are on the pool 15:19:14 *can be 15:19:29 because initial sync doesn't use pruned blocks 15:19:59 another thing on my todo list :D 15:23:04 BTW, earlier, p2pool crashed on startup with unable to bind. I must have run it once before and it was in wait. 15:23:26 I did not have a stack trace in gdb sadly. 15:23:41 ./p2pool --version ends in a crash 15:24:19 lol 15:25:02 it doesn't even have this command line parameter, but it shouldn't crash 15:25:32 Hi! Excited about monero p2pool 15:26:15 sech1: wait 15:26:18 it's not a crash I think, just SIGABRT 15:26:29 didn't look properly 15:26:53 looks like I only have 235M free RAM, won't bother starting xmrig there 15:35:27 going to move monerod and p2pool to the mac 15:45:04 also don't forget to look at p2pool memory usage. It shouldn't be leaking memory. My node has been stable at 3469620/37780/10096 (VIRT/RES/SHR) 15:56:25 p2pool doesn't want to run on mac 15:56:34 I get an abort. haven't got a backtrace yet 15:57:03 starting under debugger gets an immediate abort, pthread_kill inside uv_rwlock_tryrdlock 15:57:32 2.6 GB resident. Looks like I did not take out the full mem after all. 16:00:03 hyc: does ./p2pool --help work? 16:00:05 without abort 16:02:40 Oh look, it's got a --light-mode. Should have looked before grepping and chaning... 16:03:02 I just ran ./p2pool --help here, I got the help, but it doesn't exit. 16:03:24 Ctrl+C 16:03:40 yes --help worked 16:03:54 without debugger, it starts and runs for a while before it aborts 16:03:56 there is a thread reading from stdin waiting for console command and it stops p2pool from exiting properly unless you press Ctrl+C 16:04:17 no need for ctrl+c on mac with --help 16:04:18 there don't appear to be any legal console commands 16:04:28 Stack in PM. 16:04:33 hyc: same here 16:04:41 Possibly ir crashes before the hang on mac :D 16:05:46 hyc p2pool has a few console commands, check console_commands.cpp 16:05:54 I don't have xmrig and monerod testnet setup here so can't fully test it 18:10:29 think I'll write a PR to add a help and exit cmd 18:10:33 though I guess EOF is fine 18:13:06 sure 18:14:30 BLOCK FOUND ooo 18:14:33 I'm working on the block cache (circular buffer as you suggested) 18:14:51 BLOCK FOUND is printed every time p2pool finds a block, not just your node 18:15:00 ah 18:15:07 because it will be rare thing on the mainnet 18:15:52 you'll see "submit_block: BLOCK_ACCEPTED at height ..." log message in addition to that if your node finds a block 18:16:13 it all scrolls by too uick to notice 18:16:38 you can grep the log 18:17:07 and the release will have more shy log level by default :) 18:37:26 will monerod overwrite my mainnet blockchain if i run a testnet ? 18:45:02 No. 20:11:37 What's up everyone. Is this channel exclusive to the p2pool project? 20:11:50 nope. all things monero-proof-of-work 20:13:48 Gotcha. Looks like I'm a little early to the pool party then.. hehe 20:14:06 well, p2pool is the topic du hour 20:14:09 du jour* 20:31:27 someone is fighting ETH for high fees? https://xmrchain.net/block/a48494d5cc4239d2b28d48b6699ebf74a75b34910f210eca79f33c0023203e09 20:33:29 0_o 20:36:10 2.9 xmr for the fee? what wallet implementation even allows that? 20:36:25 I can never get a clean exit, stratumserver hangs in destructor on uv_thread_join 20:36:25 sorry, 2.04 . 20:36:37 its lopp is still in uv_run even though uv_stop was called 20:37:08 p2pool, zmqreader, and p2pserver loops all stop/close cleanly 21:00:00 hyc I have the same problem in Linux, but it shuts down fine in Windows. It looks like it just doesn't close TCP sockets 21:01:10 sounds like a libuv bug then 21:02:07 yes, I remember that it got stuck even without xmrig connected. It couldn't close listen sockets 21:03:29 I've been experimenting with saving/loading pool blocks on startup and found out that initial sync is very fragile and depends on the order in which blocks are received 21:04:17 not sure how to make it robust, a bit of refactoring will be required 21:13:08 I was thinking it mainly got stuck when there are no miners connected, since that's my current tester 21:34:55 i just saw the pull request for the p2pool project you could avoid all the const char*, char[] etc when using std::string_view, the pull request literaly deploys its own string_view as a struct called strconst 21:36:26 all the static constexpr char[] = ... globals could be changed to be static constexpr auto bla = "someString"_sv 21:36:55 ofc the auto can be avoided if the author of the projects does not like auto 21:38:21 auto makes some things unnecessarily obscure, particularly when reading source code while debugging 21:39:24 yeah thats why i said the auto ofc is optional :D i code a lot of scala normaly which is why i dont care not seeing the type :D 21:39:50 it's a perfect example of C++ making irrelevant things easier up front and even harder later on 21:41:35 i use auto all the time and i have never got into problems using it, i guess its personal perference 21:42:10 i hate typing types, the compile knows exactly which type an expression has, why should i need to be forced to write it all the time? 21:42:20 debugging is usually an order of magnitude harder than writing code in the first place. so features like that are optimizing the wrong thing 21:42:50 auto does not make debugging much harder? 21:43:02 it either typchecks or it doesnt 21:43:12 that's not the point 21:43:26 i dont know what obscure useage of auto you are refering to which makes debugging harder 21:43:39 when you're trying to find a bug and you want to know sizeof(foo) or what fields are present etc 21:43:50 it's better when it's all explicitly spelled out in the source code 21:44:03 instead of you needing to invoke helpers to decipher it for you 21:44:43 typechecking isn't the issue, and again, it's trivial to do that up front 21:45:10 we call them efficiency elves 21:45:28 but when you're deep in the weeds, all of that abstraction just hides details you might need to know 21:45:47 i guess thats your opinion and i only see that argument made for c++, almost all modern languages support typeinference and nobody has the debugging problems 21:46:03 hyc I'll merge it tomorrow but I can already tell it won't compile on Windows because of "kill" call 21:46:21 sech1: yes, that's why I said it needs feedback... 21:46:34 but as i said i usually do scala or haskel so i am used to not writing types :D 21:46:50 almost all modern languages besides C and C++ are interpreted so they're really not worth discussing here 21:47:20 rust, scala, haskell ... non of that is interpreted 21:48:22 scala is a jvm language 21:48:50 yes? 21:48:59 never mind. this isn't the place for language debate\ 21:49:11 you are right :D 21:52:32 sech1: couldn't figure out why calling uv_stop(uv_default_loop()) from do_exit doesn't work, but it works from the signal handler 22:00:39 hm. it does work, but takes ~20 seconds to happen 22:02:54 They really should have made auto mean "do what I mean". Like, int process_data() { auto; } 22:03:01 Now that'd be somehting worth having. 22:03:10 ;) 22:04:26 hm, took 2 minutes that time. talk about flaky. why do people like libuv, again? looks like crap, to me. 22:06:54 basically it seems that uv_run sits in an epoll_wait() for a bunch of descriptors, which are usually network sockets 22:07:11 but if there's no network activity, it never wakes up for local things like uv_stop() 22:07:37 one would think they'd be smart enough to add a pipe in there for local event signaling 22:15:12 ok, so the workaround would be to just connect and immediately disconnect 22:15:17 that would wake up epoll_wait 22:15:31 and do it in shutdown_tcp() 22:16:35 libuv is hard to handle, but it wraps the most efficient network layers in each OS 22:29:21 do i have to have the ports open in my firewall for p2pool to work ? 22:32:25 it's not required, but it will work better with open ports 22:33:25 i'm sending shares and getting tx in the wallet, all good 22:43:23 nice 23:04:09 aha, figured out how to make sure the event loop wakes up immediately