Orphan blocks while PoS Minting?

I uninstall 0.3 and install 0.4 a couple of days ago.
Then I started PoS minting last night using “walletpassphrase XXX 9999999 true” command.
Found 3 blocks so far and they are all orphans.
Is there anyone has the same situation?

[quote=“redlee, post:1, topic:2205”]I uninstall 0.3 and install 0.4 a couple of days ago.
Then I started PoS minting last night using “walletpassphrase XXX 9999999 true” command.
Found 3 blocks so far and they are all orphans.
Is there anyone has the same situation?[/quote]
I think Ben made a comment about it in the chat.

From the debug log file at my Raspberry Pi, I found that I also got two orphan PoS blocks(I’m now using V0.4). There are aslo some “accepted orphan tx” and “stored orphan tx” in the log file.

Could someone explain it in detail?

Thanks.

When finding a PoS block by minting, I believe this happens:

a) The person who creates a PoS block gets it propagated the fastest across the network first. (Has more confirms, gets accepted as being the next block in the chain)

OR

b) Who ever has a better PoS hash (more difficult target) that created that block wins when they happen at exactly the same time.

So lots of people are minting PoS blocks at the same time. If you only have 8 connections to peers, and someone else has 35 connections to peers, chances are their PoS block will be accepted by more peercoin nodes than yours.

If you are minting, I think it is a good idea to increase your maxconnections=35 or some thing like that in your ppcoin.conf file. Also configure your router to allow inbound tcp 9901 to point to your ppcoin host so you can allow more than just the standard 8 peers…

So it will be normal to find a PoS block, and have it orphaned if you are not connected to enough peers.

I’m really over-tired right now, so if I am not explaining these points properly, hopefully some one can step in…

[quote=“ppcman, post:4, topic:2205”]When finding a PoS block by minting, I believe this happens:

a) The person who creates a PoS block gets it propagated the fastest across the network first. (Has more confirms, gets accepted as being the next block in the chain)

OR

b) Who ever has a better PoS hash (more difficult target) that created that block wins when they happen at exactly the same time.

So lots of people are minting PoS blocks at the same time. If you only have 8 connections to peers, and someone else has 35 connections to peers, chances are their PoS block will be accepted by more peercoin nodes than yours.

If you are minting, I think it is a good idea to increase your maxconnections=35 or some thing like that in your ppcoin.conf file. Also configure your router to allow inbound tcp 9901 to point to your ppcoin host so you can allow more than just the standard 8 peers…

So it will be normal to find a PoS block, and have it orphaned if you are not connected to enough peers.

I’m really over-tired right now, so if I am not explaining these points properly, hopefully some one can step in…[/quote]

Thank you ppcman!

I think it is most probably because of my slow network bandwidth/network latency and the limited peer connections (only 8 connections, I compiled it without UPNP support). One PoS block was orphaned by another PoS block about 8 minutes later, and the other PoS block was orphaned by a PoW block around 55 seconds later. So it seems my PoS block was not accepted by so many peers.

I will have a try to set maxconnections to be around 35. Let’s see it.

When looking at the code, it seems to me that all blocks being minted for the same height will have the same difficulty/target/nbits:

Looks like the GetNextTargetRequired function above is only based on previous blocks.

So block network propagation speed might be the key to successful minting, could someone confirm that? Or did I miss something?

I have tried to compile everything on this wiki page: https://wiki.peercointalk.org/index.php?title=Peercoin_chain_trust