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