darkrenaissance / darkfi

Anonymous. Uncensored. Sovereign.

Home Page:https://dark.fi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merge mining with Monero

SChernykh opened this issue · comments

I've just found out about https://dark.fi/insights/development-update-q423.html and took a look at your merge mining proxy. It doesn't seem to be 100% compatbile with what me and @moneromooo-monero are trying to implement now.

Please read through https://github.com/SChernykh/p2pool/blob/merge-mining/docs/MERGE_MINING.MD (a WIP documentation) and monero-project/monero#9073 (merge mining fixes for Monero).

As far as I can see, your mm proxy can't be used to mine multiple chains together right now, because it doesn't calculate the Merkle root hash of all merge mined chains (it's single chain only?).

Hi. What the proxy implements right now is just solomining a single chain.
The idea is that someone can fire up xmrig in daemon mode, and have the proxy inject the necessary merge mining data into the getblocktemplate call.

I will read through your suggestions, thanks.

Thanks!

All the reference code is in src/cryptonote_basic/merge_mining.cpp and https://github.com/monero-project/monero/blob/master/src/rpc/core_rpc_server.cpp#L2070 on the Monero side (plus fixes in monero-project/monero#9073), and in src/merge_mining_client.cpp, src/merkle.cpp on P2Pool side.

Documentation is far from ready, but you can ask questions here.

@SChernykh

Is the general idea that this proxy should have RPC methods that let p2pool query it for darkfi-specific merge mining data, and then be able to include it alongside others in the blocktemplate it's sending to workers?

AFAICT this would require a p2pool operator to run our proxy and potentially the full node alongside the pool software.

No, P2Pool will be a proxy between aux chains and XMRig, and it provides a stratum port for XMRig. The RPC methods are supposed to be implemented on the node side (i.e. monerod in Monero). No other proxy will be required if these RPC methods are supported, and P2Pool will be able to mine multiple chains.

The reason P2Pool works as a proxy itself, is that it creates its own block templates for Monero, and it doesn't use get_block_template RPC at all.

Yes, it will require miners to run a full node for each chain, but they can also connect to public remote nodes (less reliable, but easier to set up).

aha I see, so your idea is that the actual full node implements the necessary merge mining methods?

Excellent, I will look into this deeper these days. Thanks ;)

Yes, the idea is that the full node implements a minimum set of RPCs that will be enough for P2Pool to merge mine.

Will be leaving relevant commits for reference here.

@parazyd Any updates on this?