Pages:
Author

Topic: ppcoin offline coinstake creation - page 2. (Read 13886 times)

donator
Activity: 994
Merit: 1000
October 05, 2012, 02:29:15 PM
#5
I think the critical question is how much information is needed to generate the input for the coinstake hash. The Hash is computed the following way:

HASH( nBits + block.nTime + (txindex.pos.nTxPos - txindex.pos.nBlockPos) + pcoin.first->nTime + pcoin.second + txNew.nTime )

1) nBits: The difficulty recorded in the last valid block.
2) block.nTime: The timestamp of block containing the transaction referenced by stake
3) (txindex.pos.nTxPos - txindex.pos.nBlockPos): Relative byte position of the transaction referenced by the stake.
4) pcoin.first->nTime: The timestamp of the transaction referenced by the stake
5) pcoin.second: The output number in the transaction referenced by the stake
6) txNew.nTime: the timestamp of the coinstake transaction.

I didn't find more documentation of what the specific fields mean. Maybe Sunny can help with explaining them.

However, the offline creation of a coinstake transaction does NOT require you to meet the HASH target in advance. It just requires you to sign a coinstake transaction which is dated correctly.

Thus the only thing which needs permutation in advance is txNew.nTime, and the coinstake reward needs to be calculated correctly for the "anticipated" time.

The validation node will still have to test coinstake candidates against the current state of the network. (nBits)
sr. member
Activity: 448
Merit: 250
October 05, 2012, 01:25:33 PM
#4
It's something to consider for the long term but probably lot of work involved.
I don't think so. If I find the time I may do it myself. I expect about 2-3 hours of programming required.


Lets get some discussion/consensus going either way. 

I think it's definately something that needs discussing though.
donator
Activity: 994
Merit: 1000
October 05, 2012, 01:22:00 PM
#3
It's something to consider for the long term but probably lot of work involved.
I don't think so. If I find the time I may do it myself. I expect about 2-3 hours of programming required.

Dunno if all these new bitcoin transaction types may help somewhere also.
Unlikely. When the coinstake is created the full information for a valid signature has to be available. When coinstake is created on the validation nodes, this necessarily means that the information has to be on the node.

The only solution is to split creation and consumption to different machines.
legendary
Activity: 1205
Merit: 1010
October 05, 2012, 01:15:23 PM
#2
It's something to consider for the long term but probably lot of work involved.

Dunno if all these new bitcoin transaction types may help somewhere also.
donator
Activity: 994
Merit: 1000
October 05, 2012, 12:12:47 PM
#1
this is a reminder that we need an air gaped solution to create coinstake. In the long run it's a liability to have the private keys on the validation nodes.

From my current understanding this would work:

1) offline: generate coinstake transaction candidates (CSTC) by sequentially changing the time stamp from now up to a future time (e.g. a year from now)  and save them on disk.

2) transfer

3) online: ppcoind reads CSTCs from file and filters them by applying a sliding window over the timestamp. If a CSTC meets the target specs it gets consumed and the corresponding stake cannot longer be used.

rinse and repeat every 1-2 months or so (to bring consumed stake back online).

Ideally this would be a feature of ppcoin in the future, but maybe someone already hacked something like this? If so please post here.
Pages:
Jump to: