Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOON] RPC-connection #105

Open
coinflow opened this issue Dec 18, 2017 · 45 comments
Open

[MOON] RPC-connection #105

coinflow opened this issue Dec 18, 2017 · 45 comments

Comments

@coinflow
Copy link

coinflow commented Dec 18, 2017

Hi Rav3nPL,

could I ask you to help Mooncoin again with tuning p2pool-rav according to the new wallet/client? That would be great.

The new wallet ( --> https://github.com/mooncoincore/wallet ) was compiled and installed alongside a freshly cloned p2pool-rav. But obviously an RPC-call is not possible.

I have found this one: litecoin-project/litecoin#371 where the user also has problems with the latest Litecoin-wallet to make it possible to work together with a p2pool-code. Since the newest Mooncoin-wallet is based on the latest Litecoin (as far as I know), could it be, that the linked solution would work in your p2pool-version for Mooncoin, too? See here: https://github.com/ilsawa/p2pool-ltc/commit/2af67a8cc7d0c498479f080f0652e02c4c826497

Since I don't know what the correct value for the Mooncoin-genesis-block would be, could you test that and possibly change the relevant passages in your pool-script to be correct? That would be really nice.

Notice: The new dev has changed back to the "official" naming conventions, meaning, that the paths that the Mooncoin-wallet creates, are with small letters again. Maybe this is of help for your updates of the code.

Thank you very much.

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 18, 2017

RPC command "help" is no longer throwing back required string.
I`ll try t change it to check for genesis block hash (like in BTC some time ago).

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 18, 2017

try 9a00696

@coinflow
Copy link
Author

Just cloned again freshly. Then starting p2pool it gives me:
...
yield helper.check_genesis_block(bitcoind, 'bd687cbbac4842724d4b1dfd2e1a6ce35d765db05635b3ebd3810ba66ac5aee9')))
^
SyntaxError: invalid syntax
...

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 18, 2017 via email

@coinflow
Copy link
Author

coinflow commented Dec 18, 2017

This seems to work:

RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
(yield helper.check_genesis_block(bitcoind, 'bd687cbbac4842724d4b1dfd2e1a6ce35d765db05635b3ebd3810ba66ac5aee9'))
))
SUBSIDY_FUNC = lambda height: 2000000*100000000

So the problem was obviously in number and position of the brackets.

Could you consolidate the networks-files for Mooncoin?
In ../p2pool/bitcoin/networks there are Mooncoin.py and mooncoin.py (and *.pyc)
Also both versions in ../p2pool/networks

So it would be great to have this consolidated based on mooncoin.py, I assume?

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 18, 2017

Changed brackets c78d7f2
Two Mooncoin.py are necessary, this is how p2pool is build.
One is for daemon data, second to pool data.

@coinflow
Copy link
Author

But not one with capital M and one with small m, right?

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 18, 2017

Done.
It was because at some point I do commit from Windoze, it is case-insensitive ;]

@coinflow
Copy link
Author

Great! Thanks.

@gblass
Copy link

gblass commented Dec 22, 2017

I tried using the new mooncoin.py and recomplied but I am getting crazy DOA shares, and my miner is showing that I found 70,000 Blocks, and then my time to block is showing 14038880326535135797651516507108282486575107470786560.0 years
Something isn't working, any thoughts?

@gblass
Copy link

gblass commented Dec 27, 2017

still not working, and I have a lot of people that would like to use or create Mooncoin Nodes. Can we do some testing?

@coinflow
Copy link
Author

coinflow commented Dec 27, 2017

Hi gblass,

do you mean the miner found 70000 blocks, or shares? A very high rate of DOA-shares at the beginning is normal. That should level out over time. At least here it is.

Have you opened the relevant ports (see the code), so that your node can connect with others and get in sync?

The time to block is indeed strange, but I assumed, that is normal, if the sharechain is new/reset and the first block not found already ...??

Rav3nPL? What are your thoughts? Could you set up a test node and connect to the Mooncoin P2Pool, in order to check whether everything runs correctly?

@coinflow
Copy link
Author

Maybe the same problem like here: #106 ?

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 27, 2017 via email

@mooncoincore
Copy link

@Rav3nPL Hi, I'm Vassilis the new official mooncoin dev. if you need any help I'm here! My email also is [email protected]!

@Rav3nPL Rav3nPL changed the title RPC-connection [MOON] RPC-connection Dec 27, 2017
@mooncoincore
Copy link

if you are with just a software miner everything is fine.. if you connect with antminer(support Scrypt) for example (500MH/s) in few secs.. in miner status page you got few thousands "Found Blocks".
@coinflow do you get any real blocks as pool?

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 27, 2017

Just updated repo, It is working on my side, connected to 3 P2Pool peers, reorganized sharechain.
Try pull and restart pool and miners.
At start it WILL throw wazillion DOA shares, until it adjust diff to miner.
My node: http://rav3n.dtdns.net:9664

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 27, 2017

2017-12-27 22:37:30.822790 P2Pool: 3531 shares in chain (1795 verified/3532 total) Peers: 3 (2 incoming)

2017-12-27 21:37:48 UpdateTip: hash=3faf50b0d.. height=1179321 diff=1b404e86 algo=scrypt ver=0x00000001 log2_work=57.365018 tx=2032684 date='2017-12-27 21:40:05' prog=1.000015 cache=43.6MiB(193623tx)

@gblass
Copy link

gblass commented Dec 27, 2017

I just connected my antminer to test. Still getting tons of found block son the miner.
image

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 27, 2017

Miner is probably interpreting accepted shares as blocks found.
Or maybe something in diff reporting on pool side.

@mooncoincore
Copy link

mooncoincore commented Dec 27, 2017

its antminer L3+ 505MH/s
its connected on raven test pool http://rav3n.dtdns.net:9664

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 27, 2017

Pool log:

2017-12-27 22:50:27.378941 P2Pool: 3564 shares in chain (1829 verified/3566 total) Peers: 3 (2 incoming)
2017-12-27 22:50:27.379072  Local: 458MH/s in last 10.0 minutes Local dead on arrival: ~1.5% (1-3%) Expected time to share: 1.8 minutes
2017-12-27 22:50:27.379105  Shares: 8 (0 orphan, 0 dead) Stale rate: ~0.0% (0-33%) Efficiency: ~171.5% (115-172%) Current payout: (0.0000)=0.0000 MOON
2017-12-27 22:50:27.379139  Pool: 1348MH/s Stale rate: 41.7% Expected time to block: 5396623891178943933527132785432502450478847480561664.0 years
2017-12-27 22:50:30.389047 P2Pool: 3564 shares in chain (1829 verified/3566 total) Peers: 3 (2 incoming)
2017-12-27 22:50:30.389181  Local: 461MH/s in last 10.0 minutes Local dead on arrival: ~1.5% (1-3%) Expected time to share: 1.8 minutes
2017-12-27 22:50:30.389214  Shares: 8 (0 orphan, 0 dead) Stale rate: ~0.0% (0-33%) Efficiency: ~171.5% (115-172%) Current payout: (0.0000)=0.0000 MOON
2017-12-27 22:50:30.389247  Pool: 1348MH/s Stale rate: 41.7% Expected time to block: 5396623891178943933527132785432502450478847480561664.0 years

Block ETA is odd, need look into current P2Pool LTC code, maybe I`m missing something.

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 27, 2017

Well, I`m not 100% sure but this code is basing on older P2Pool, it is not prepared for SegWit and it can produce invalid blocks...
We need hit at least one block to verify that, probably I need to move to new P2Pool code base that supports SegWit.

@coinflow
Copy link
Author

How can we see, whether we found an invalid block?

@coinflow
Copy link
Author

coinflow commented Dec 28, 2017

@coinflow do you get any real blocks as pool?

Not with the new wallet yet. With the older ones we found a lot of blocks. The last block was this one: https://chainz.cryptoid.info/moon/block.dws?1151546.htm
See here for further stats of P2Pool-blocks: https://chainz.cryptoid.info/moon/extraction.dws?1.htm

@gblass
Copy link

gblass commented Dec 28, 2017

I can confirm with @coinflow we used to get blocks often, nothing since use of the new wallet.

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 28, 2017

If no one mine coin I can't resolve anything.
My node will be up few more days.
If no one use this P2Pool I'll kill it.

@gblass
Copy link

gblass commented Dec 28, 2017 via email

@coinflow
Copy link
Author

coinflow commented Dec 28, 2017

https://bitcointalk.org/index.php?topic=1733963.msg27112792#msg27112792
Hopefully some miners will find the way to your node, Rav3nPL.

@gblass
Copy link

gblass commented Dec 28, 2017

i have pointed ny antminer to your pool again.

@coinflow
Copy link
Author

Hi Rav3n,
did you find the time to look at the code again?

@mooncoincore
Copy link

@Rav3nPL @coinflow @gblass I found the problem.. is in the wallet code retarget function. I'm trying to fix it now..

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 31, 2017 via email

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 31, 2017 via email

@mooncoincore
Copy link

mooncoincore commented Dec 31, 2017

I have gave the code for test.. if you want to test it the "fixed" code is in https://github.com/mooncoincore/wallet .
The retarget was not broken.. the previous dev copy paste the old code to new without set the right variable type(cbignum need to be now arith_uint256.. if i remember right)..
so the target was not broken but in retarget function the return value of target was very odd because wasn't the all number!
It took me 2 weeks to dig in 3nd person code to found out that!
Now returns a "logical" difficulty and ETA.

@gblass
Copy link

gblass commented Dec 31, 2017

We did it!! Thanks everyone:
image

@mooncoincore
Copy link

@Rav3nPL please give me your btc address to send you a small donation for your help!
Also we are going for segwit.. so if you support with your pool soft segwit will be amazing!

@gblass
Copy link

gblass commented Dec 31, 2017

Thank you @coinflow @Rav3nPL @mooncoincore
image
image

@Rav3nPL
Copy link
Owner

Rav3nPL commented Dec 31, 2017

@mooncoincore fix in wallet also fixed block ETA display in pool.
See http://rav3n.dtdns.net:9664/
Expected time to block | 0.177 hours
For tips you can use my address 1Rav3nkMayCijuhzcYemMiPYsvcaiwHni

For segwit support I need move all my patches to new codebase, because current is bit obsoloete (like 2 versions behind). It is still working fine for non-segwit coins.

@gblass
Copy link

gblass commented Jan 3, 2018

Can we increase the total work per block from 3000 to something larger? THere are a lot of people interested in Mining MoonCoin now, but sometimes they get no shares because they get taken from very large Pools.
image

@Rav3nPL
Copy link
Owner

Rav3nPL commented Jan 3, 2018

It is regulated in another way.
P2Pool can raise share diff for large miners.
BUT mining witch so low power can lead to dust-like payouts, that can be high-fee when spending.
Ifs1 is intrested in mining, he should do it 24/7, and if we have share every 2 days he will be paid every 2 days - in amount proportional to pool speed.
This is SCRYPT coin, so it should be mined ONLY by ASICs.
GPU/CPU mining is still possible, but NOT recommended, because there is lots coins that can be mined and make some profit.
You should point this to the potential miners.
Giving them tips to use cgminer/minerd is pointless.
ONLY ASICs!

@coinflow
Copy link
Author

coinflow commented Jan 3, 2018

Basically right, that Mooncoin is not really mineable with CPU and GPU. But you can use cgminer/minerd with ASICs, too.

@coinflow
Copy link
Author

coinflow commented Jan 3, 2018

And what gblass is asking is, what could be a nice upgrade for P2Pool-technology, if not already available: the software could adjust the mining-difficulty according to the hashrate of the single miner. Just like it is in the MPOS- and NOMP-pools. Could this be developed? Would be great.

@Kiefff
Copy link

Kiefff commented Jan 4, 2018

Seems that p2pool LTC has around 18,000 share for the 3day sharechain. With mooncoin, seems to be only around 3000 shares? So once p2pool Moon reached 50GH, many miners had trouble submitting shares that didnt get pushed out of the sharechain within hours. The miners are all using ASICs...

@Rav3nPL
Copy link
Owner

Rav3nPL commented Jan 4, 2018

We can change share chain data, but it require "restart" of the sharechain. Lenght of share chain not changing share diff, share chain need to be longer than pool block ETA.
Maybe we can do it on new code base? I not see it should be changed ATM.
Share diff is ONLY calculated by current pool speed vs share speed. It is artificial raised for miners that have majority of shares.
If we want "easier share" we have to lower share time. BUT - it leads to two bad things:

  • some ASICs are not happy by often work reset and lead to more DOA/lower hash speed
  • pool node that have majority of pool hashing power will orphan many shares from other nodes

OFC it also need chain reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants