Author

Topic: SolidCoin: Mining the powerblocks (Read 2136 times)

hero member
Activity: 686
Merit: 564
November 14, 2011, 03:10:53 PM
#14
A sensible way to do it, is just whenever a new block is found, do a bytecount of this new block hash (or the last half, if you want constant chance), and if that is larger than [somevalue], make it a powerblock. This way, you couldn't predict when a powerblock was going to happen, and if you found a block that's not a powerblock, you'd still want to post it, due to the blockreward.
Yeah, except as RealSolid just reminded me, you need to know how much the block is worth in advance so you can set the correct value in the generate transaction. Which is apparently why it's based on the previous blocks. (There may be ways of hacking around this, but if memory serves me correctly they'd complicate the transaction validation code for all transactions.)
hero member
Activity: 714
Merit: 504
^SEM img of Si wafer edge, scanned 2012-3-12.
November 14, 2011, 09:40:12 AM
#13
A sensible way to do it, is just whenever a new block is found, do a bytecount of this new block hash (or the last half, if you want constant chance), and if that is larger than [somevalue], make it a powerblock. This way, you couldn't predict when a powerblock was going to happen, and if you found a block that's not a powerblock, you'd still want to post it, due to the blockreward.

Of course, then his goons and all other people in his circlejerk wouldn't have another arbitrary advantage.
hero member
Activity: 686
Merit: 564
November 14, 2011, 09:18:37 AM
#12
You also can't use information in the block being generated because a miner could manipulate it to make every block a power block.  The only thing you can use is the block chain since that's the only state that all clients share, and, that is what solidcoin does.
You should be able to use the block hash of the current block, actually; the only way to make every block a power block is to discard all the blocks that don't meet the criteria, and you'd make more money by just submitting them to the network. I've no idea why RealSolid did it this way. (It's been known for a while though; RealSolid gave a copy of IsPowerBlock to someone trusted prior to power blocks launching and he eventually pastebinned it and posted it in IRC.) The other quirk is:

Quote
    if(trustedcount>=128 && usercount>=239) return true;        //1 in 16 chance for user, 1 in 2 for trusted, = 1 in 32 total
This should've been either usercount>239 or usercount>=240; the current version gives odds of about 1 in 30 rather than the intended 1 in 32.
member
Activity: 115
Merit: 10
November 13, 2011, 07:53:44 PM
#11
The current block being a Power Block depends on both the last trusted block and the last user block:

    if(trustedcount>=128 && usercount>=239) return true;        //1 in 16 chance for user, 1 in 2 for trusted, = 1 in 32 total

As of now, there is only one control node generating trusted blocks at a time.  This control node can effectively "turn off" power blocks entirely, or double the probability of one occurring, or anything in between.

When a control node generates a block it can count up the bits, if they are >= 128, it could discard the block and generate another one instead of transmitting it.  It could be a bit more clever by checking if the prior user block was >=239 before deciding if it should discard the block it just generated, this would minimize the impact on the network.

A control node could increase the probability of a power block in a similar way.  It could discard blocks it generates unless they meet the criteria for power blocks ( bits >=128 ) this would make the power blocks be entirely depended on the prior user block, gving it a 1 in 16 chance.

legendary
Activity: 1190
Merit: 1000
November 12, 2011, 11:55:07 PM
#10
i've been following it since first day of SC1.

it's just king realscam exceeds my expectation on how he is going to screw other people...er...miners.

Ah I see my opinion could not get any lower of him really so nothing he does surprises me, only thing that would lower it I think would be finding out he diddled little kids, then I would think yup he has hit a new low even for him.

If Realsolid had gotten that gig he wanted at Penn State...

Too soon?
hero member
Activity: 798
Merit: 1000
November 12, 2011, 10:25:44 PM
#9
...and, trusted nodes have 1/2 probability of getting powerblocks? daaaaaaamn.

No, the last trusted block has a 1/2 probability of being a correct seed for a power block. 1/2 * 1/16 = 1/32

Still an absolutely, astonishingly stupid idea.
legendary
Activity: 1764
Merit: 1006
November 12, 2011, 08:44:01 PM
#8
i've been following it since first day of SC1.

it's just king realscam exceeds my expectation on how he is going to screw other people...er...miners.
legendary
Activity: 1764
Merit: 1006
November 12, 2011, 08:34:29 PM
#7
whoa.

powerblock mining only.
that's pretty interesting...anybody else tried beside beecee1?


...and, trusted nodes have 1/2 probability of getting powerblocks? daaaaaaamn.
member
Activity: 115
Merit: 10
November 12, 2011, 07:19:29 PM
#6
Taking advantage of SoldCoin's PowerBlock weakness is easy.  All you have to do is modify the get_work function to return an error unless the current block being mined is a power block.  Even when you are solo mining you still go through the rpc interface for getting work.  This won't work if you are using someone else s pool because the check is done in the server before get_work returns, however, if you have several computers you can set them all to mine against a single solid coin instance and have your own mini-pool.

Here's all you need to do:
Open  rpc.cpp

after line 2106: "BLOCK_DATA blk;" add the line:
int isPowerBlock = 0;

after line 2153: "blk=pBlock->blk;" add the line:
if(pBlock->m_bPower) isPowerBlock = 1;

before line 2174: "return result'" add the line
if(!isPowerBlock) throw JSONRPCError(-10, "This is not a Power Block...");

Recompile, restart solidcoin, and start solo mining.  Your Hash Rate will be at zero and you'll see a steady stream of messages:
sc_getwork error: This is not a Power Block...

When it is time to mine a power block your Hash Rate will go above zero until the block is solved (by you or someone else) then it will go back down to zero as it waits for another power block.

If you are mining other coins at the same time, you'll want to 'nice' them so that solid coin gets most of the cpu when it is running.  (you should nice them anyway so mining doesn't slow down the rest of the stuff running on the computer.)  You can start your miners niced by putting "nice +19" in front of your minerd command like so:
nice +19 minerd --url http://example.com ---userpass greater:fool

You wouldn't want to 'nice' solidcoin so it gets more of the cpu when it is running.

member
Activity: 115
Merit: 10
November 12, 2011, 05:21:11 PM
#5
If I thought ScamCoin had a future I would write a miner which scanned the block chain and ONLY mined when the next block was a power block.  You could mine LTC 97% of the time and switch over to rape the power blocks.  

Modifying the built-in miner to do exactly this is incredibly easy.
newbie
Activity: 22
Merit: 0
November 12, 2011, 04:38:36 PM
#4
This can't be right. This idea is too fucking retarded, even for RealSolid.

Edit: Nevermind, it is real. SolidCoin is such a fucking joke.
donator
Activity: 1218
Merit: 1079
Gerald Davis
November 12, 2011, 04:19:34 PM
#3
LOLZ.  The latest in a string of failures.  

If I thought ScamCoin had a future I would write a miner which scanned the block chain and ONLY mined when the next block was a power block.  You could mine LTC 97% of the time and switch over to rape the power blocks.  

Also why would you base your "chance" function on something which isn't random (like block hash which is based on pre-selection). 
Instead of using the whole block hash if he instead just looked at the least significant 2 hexadecimal digital that would be perfectly random and even chance.
legendary
Activity: 1050
Merit: 1000
You are WRONG!
November 12, 2011, 03:24:34 PM
#2
WHY!!!!!!!?Huh solidcoins are begining to looking more like a game then a currency.

for shit sake! its not a scam anymore. its a way to entertain very very stupid people. I DON'T LIKE IT.
member
Activity: 115
Merit: 10
November 12, 2011, 02:55:30 PM
#1
According to SolidCoin, there is a 1 in 32 chance that a block is a PowerBlock, the number of coins you generate in a power block is double a normal block.

You can't use a random function to determine if a block is a powerblock because other clients wouldn't be able to verify it.  You also can't use information in the block being generated because a miner could manipulate it to make every block a power block.  The only thing you can use is the block chain since that's the only state that all clients share, and, that is what solidcoin does.

Here's the code that determines if a block is a power block:

bool Block_IsPowerBlock(const uint256 &trustedhash,const uint256 &userhash)
{
    unsigned char trustedcount=trustedhash.SumOfBytes();
    unsigned char usercount=userhash.SumOfBytes();
    if(trustedcount>=128 && usercount>=239) return true;        //1 in 16 chance for user, 1 in 2 for trusted, = 1 in 32 total
    return false;
}

It is called with the two previous block's hashes as arguments.

Since you can tell if a block is a power block just by looking at the hashes of two prior blocks, you can decide if you want to mine the block or not. You can choose to only mine power blocks.

I don't think this works out to exactly 1 in 32 blocks in practice since a good hash has to have some number of leading zero bits, as the difficulty gets higher the chance of a block being a power block goes down slightly.  Although this is unintended, it probably isn't bad.

If you only mine powerblocks, you'll get a higher payout for your cpu cycles. Most of the time (about 56 minutes per hour) you'll be idle. During the down times you can mine some other coin (like litecoin, or another cpu-friendly coin).

Jump to: