Pages:
Author

Topic: [ANN] Scripts to predict superblocks JKC,SXC,DMD,ELP,GDC,GIL,LKY,NUG,PHS,SPT,STR (Read 3393 times)

sr. member
Activity: 434
Merit: 250
Check this simple script for automating this and making it more useful than just a PoC.
https://github.com/nicoschtein/superblocks-php

Feedback appreciated!

Very nice.  I also wrote a little php script to allow web access, but yours is much better!  When I get around to updating the superblock binary setup I'll submit a PR to superblocks-php to keep it working as expected.

Thanks ! Do let me know so the two projects are always compatible with each other, i mean superblocks-php is nothing without a working version of superblocks...

There is a Mersenne Twister PHP library out on the web - http://kingfisher.nfshost.com/sw/twister/ - and PHP supports MT rands internally also.   I couldn't get either way to report the same results as the c++ version.  Maybe it is possible to do a pure PHP version, if someone can figure out the correct setup.

Or even a pure perl or python version would be nice Wink
Im not an expert here, but even though both state that they support MT rands, the results will vary based on the implementation of the actual algorithm. I think stackoverflow.com would be a nice place to ask for a MT rand compatible implementation on a scripting lang.
member
Activity: 98
Merit: 10
Check this simple script for automating this and making it more useful than just a PoC.
https://github.com/nicoschtein/superblocks-php

Feedback appreciated!

Very nice.  I also wrote a little php script to allow web access, but yours is much better!  When I get around to updating the superblock binary setup I'll submit a PR to superblocks-php to keep it working as expected.

There is a Mersenne Twister PHP library out on the web - http://kingfisher.nfshost.com/sw/twister/ - and PHP supports MT rands internally also.   I couldn't get either way to report the same results as the c++ version.  Maybe it is possible to do a pure PHP version, if someone can figure out the correct setup.

Or even a pure perl or python version would be nice Wink
sr. member
Activity: 434
Merit: 250
Check this simple script for automating this and making it more useful than just a PoC.
https://github.com/nicoschtein/superblocks-php

Feedback appreciated!
member
Activity: 98
Merit: 10

We all know that it's trivial to get the next block value for all these variable/superblock coins. 

But is it possible to do variable rewards without all miners knowing what's coming next? 

I think yes.  And to do it you need to use the current block hash.   But it will involve some changes.

Each individual miner will have to decide on a block value before mining a block.    This is required because the block value is in the coinbase.  And the coinbase is in the block header via the transactions hash merkle root.  And of course the block header is what we use to get the ultimate block hash that seeds the random generator.

For example:  ExampleCoin has variable block values from 1 to 100.   

A valid ExampleCoin block must meet the difficulty level AND meet the 'chance' level. 

Chance level is defined as:  1 / BlockValue.   

A block with 1 examplecoin would have a chance level of 1/1, or 100%.   It doesn't matter what the rest of the block Hash is, it will always be good.

A block with 2 examplecoins would have a chance level of 1/2, or 50%.  All the way up a block with 100 examplecoins would have a chance level of 1/100, or 1%.   For all these, to be a valid block: a random number derived from the current block hash must beat the chance.

Please poke some holes in this idea before I'm forced to code it up and release it as a new altcoin.


member
Activity: 98
Merit: 10
Interesting, I actually started doing this myself as soon as i found that a coin had "random" super blocks.
But got more on to running mining pools and left that as an unfinished weekend project...

Quote
In a computer NOTHING is random.
Submitted a PR with DMD support, check it out and if it works fine you can merge.
 Grin

Yup, this is a weekend project that got a bit out of hand.   

Thanks for the pull request.  I'll do a quick check and then merge it in.

I was thinking about changing the structure a bit. Instead of individual getnextblockvalue binaries for each coin, have just one binary that takes coin name as first arg.    Then all the coin settings could be put into just 1 file with a big if statement to set the correct stuff per whatever coin.   

Hmmm.. Weekend is coming up Wink

sr. member
Activity: 434
Merit: 250
Interesting, I actually started doing this myself as soon as i found that a coin had "random" super blocks.
But got more on to running mining pools and left that as an unfinished weekend project...

Quote
In a computer NOTHING is random.
Submitted a PR with DMD support, check it out and if it works fine you can merge.
 Grin
sr. member
Activity: 434
Merit: 250
Interesting, I actually started doing this myself as soon as i found that a coin had "random" super blocks.
But got more on to running mining pools and left that as an unfinished weekend project...

Quote
In a computer NOTHING is random.
member
Activity: 98
Merit: 10
Second pull request sent.

Redcoin, lets add getnextblockvalue!


https://github.com/redcoinproject/redcoin/pull/2
hero member
Activity: 546
Merit: 500
Thanks for not just ignoring SXC like (almost) everybody else.
newbie
Activity: 37
Merit: 0
Great thread! It was quite funny watching you explain to hydroponica how his coin actually works!
member
Activity: 98
Merit: 10
First pull request sent:

Gil, let's add getnextblockvalue!

https://github.com/hydroponica/gil/pull/1
member
Activity: 98
Merit: 10
How silly.  It seems I missed Argentum, which uses a variable reward.   Added to the list!
member
Activity: 98
Merit: 10
Code:
./gild getmininginfo
{
    "blocks" : 56927,
    "nextblockvalue" : 21.00000000,
    "currentblocksize" : 0,
    "currentblocktx" : 0,
    "difficulty" : 0.24834964,
    "errors" : "",
    "generate" : false,
    "genproclimit" : -1,
    "hashespersec" : 0,
    "networkhashps" : 19308859,
    "pooledtx" : 1,
    "testnet" : false
}

member
Activity: 98
Merit: 10
Maybe a better baby step is to create new *coin rpc command:

getnextblockreward

entirely possible to do for:  CDC, DMD, ELP, GDC, GIL, JNK, LKY, NUG, PHS, RED, SPT, STR, SXC

I wonder if any of the devs of those coins would be interested in adding such a command to the official clients?
This would require them to actually know how to code



Coding is Hard!   But I did it anyways.   I have a working prototype of a new rpc command: getnextblockvalue.   I added it into latest bitcoin code as a first test.  That worked fine, even if a bit useless.    Then added it into Gil as second test, and that is working fine also. 

So to the developers of  CDC, DMD, ELP, GDC, GIL, JNK, LKY, NUG, PHS, RED, SPT, STR, and/or SXC:  who will be the first to release an updated client with getnextblockvalue support?   I'll be glad to help with the code Smiley


member
Activity: 98
Merit: 10
First post updated with info for Superblocks 0.4.2

https://github.com/superblocks/superblocks

New this version:
- added Get Next Block Reward script for ELP
- more code finangling and restructuring
- updated test script


member
Activity: 98
Merit: 10
First post updated with info for Superblocks Version 0.4.

https://github.com/superblocks/superblocks

New this version:
- added GRW (Growthcoin) to the superblock coin list
- better code, setup and ouput for 'Get Next Block Reward' scripts (GIL, LKY, NUG, SPT)
- better output for generate reward lists for JKC, SXC
- precompute lucky hash cut outs scripts for NUG, SPT
- a makefile!  
- a test script!

With the code structure change, it should be easier now to create 'Get Next Block Reward' programs for the rest of the superblock coins (CDC, DMD, ELP, GDC, GRW, PHS, RED, STR).   Coming soon!

hero member
Activity: 708
Merit: 500
Maybe a better baby step is to create new *coin rpc command:

getnextblockreward

entirely possible to do for:  CDC, DMD, ELP, GDC, GIL, JNK, LKY, NUG, PHS, RED, SPT, STR, SXC

I wonder if any of the devs of those coins would be interested in adding such a command to the official clients?
This would require them to actually know how to code

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Maybe a better baby step is to create new *coin rpc command:

getnextblockreward

entirely possible to do for:  CDC, DMD, ELP, GDC, GIL, JNK, LKY, NUG, PHS, RED, SPT, STR, SXC

I wonder if any of the devs of those coins would be interested in adding such a command to the official clients?
This would require them to actually know how to code
member
Activity: 98
Merit: 10
Maybe a better baby step is to create new *coin rpc command:

getnextblockreward

entirely possible to do for:  CDC, DMD, ELP, GDC, GIL, JNK, LKY, NUG, PHS, RED, SPT, STR, SXC

I wonder if any of the devs of those coins would be interested in adding such a command to the official clients?

member
Activity: 98
Merit: 10
Don't touch my NUG  Angry

Oh noes!#    But don't worry.    A working miner is far away in the future, especially If I'm the only one working on it.    And there are other coins that would be more worthwhile to "superblock-mine".

Pages:
Jump to: