Dev problem:submit block

I’m trying to write a miner proxy(that is more or less like a private pool for diffrent workers to mine into one wallet), and I got stuck on block submission part.

I read the code of CBlock class in Primecoin-QT, made some test so the primecoind can decode my input, and execute the cmd below:

primecoind submitblock 02000000867f77a9d29f6b517f9cdadb6c27cac2ad8ff2eabdc96072434ab84be4fa8b3218fcb3aa141565e2f003a90ebd015bf69268e287eec50dd5c9a4cd83bab798800e831d527cf8d2090a1900000758a36efcaac66b00

But the primecoind rejected my submission, so I guess there is some problem in my submitted hex data? Can anyone help me?

To be clear, the submitted hex data is in the form below:
version:02000000
prev block hash:867f77a9d29f6b517f9cdadb6c27cac2ad8ff2eabdc96072434ab84be4fa8b32
merklet root:18fcb3aa141565e2f003a90ebd015bf69268e287eec50dd5c9a4cd83bab79880
multiplier len:0e
multiplier:831d527cf8d2090a1900000758a36efcaac66b
tx count:00

I submitted the block immediately(within less than 1s) so I guess there is no expiration problem.

oh I checked the log, it seems that the primecoind accepted my submission but I can not get it by primecoind listtransactions!

ThreadRPCServer method=submitblock
CTxMemPool::accept() : accepted ce6b32e7167d2cab914b1a472ca5bbf3980529003e8228cc73a24e7881c0235b (poolsz 2)
Added 1 addresses from 95.111.8.79: 10 tried, 8817 new
Added 1 addresses from 85.214.107.46: 10 tried, 8816 new
Added 1 addresses from 95.111.8.79: 10 tried, 8817 new
received block 319ccb118231e24e54d0e7a1e49fc3112b4cbc953b03546b0818635355d31dda
Committing 14 changed transactions to coin database…
SetBestChain: new best=319ccb118231e24e54d0e7a1e49fc3112b4cbc953b03546b0818635355d31dda height=136656 difficulty=9.8179429 log2Work=25.267998 log2ChainWork=40.416073 tx=191843 date=2013-08-27 08:15:16 progress=0.008151
ProcessBlock: ACCEPTED
getblocks -1 to 0000000000000000000000000000000000000000000000000000000000000000 limit 500
getblocks -1 to 0000000000000000000000000000000000000000000000000000000000000000 limit 500
getblocks -1 to 0000000000000000000000000000000000000000000000000000000000000000 limit 500
getblocks -1 to 0000000000000000000000000000000000000000000000000000000000000000 limit 500
getblocks -1 to 0000000000000000000000000000000000000000000000000000000000000000 limit 500
Flushing wallet.dat
Flushed wallet.dat 2ms

sorry, checked on the wrong log line

this is the actual log

ThreadRPCServer method=submitblock
ERROR: CheckBlock() : size limits failed
ERROR: ProcessBlock() : CheckBlock FAILED
received block f30a59fad041ab254f597c4b3e2b5cee6ce680ec6395b2d88f287b42cd31ce69
Committing 1 changed transactions to coin database…

what does it mean by “size limits failed”?

seems there mus be at lease one transaction in the block submitted

but still can not figure out the transaction content…anyone help?

Pools/proxies and external miners need to prepare block in accordance to primecoin protocol. There is a CBigNum field in block header called bnPrimeChainMultiplier, which is the proof-of-work for primecoin blocks. See CBlockHeader in main.h.

Both jh00 and mtrlt have implementations to submit blocks properly. mtrlt told me that submission via getblocktemplate works fine without patch to primecoind. If you cannot get it to work maybe check with them for references.

Thanks Sunny, I went through the CBlock class source to find my submission lacks of coinbase tx. Still thanks a lot for your suggestion.

[quote=“Sunny King, post:6, topic:328”]Pools/proxies and external miners need to prepare block in accordance to primecoin protocol. There is a CBigNum field in block header called bnPrimeChainMultiplier, which is the proof-of-work for primecoin blocks. See CBlockHeader in main.h.

Both jh00 and mtrlt have implementations to submit blocks properly. mtrlt told me that submission via getblocktemplate works fine without patch to primecoind. If you cannot get it to work maybe check with them for references.[/quote]

I´m really looking forward to your solution to mine in one wallet with several machines on the same Network. If you need some testing, please feel free to contact me.

it is still under development(very early stage), and I’ve got little spare time so it will take a long time before I finish it—I guess you have to wait if you really need it

I don’t really need it, I just whould appreciate it since i whould have less work with management of my machines then.

If you have something working and need some testing I whould love to test it and give you some Feedback.

OK :slight_smile:

[quote=“MUTO, post:10, topic:328”]I don’t really need it, I just whould appreciate it since i whould have less work with management of my machines then.

If you have something working and need some testing I whould love to test it and give you some Feedback.[/quote]