Bitcoin Forum
March 28, 2024, 04:11:17 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / BitcoinJ / Porting bitcoinj -- specific issue? on: August 08, 2014, 01:46:57 AM
So, I've been doing some dev work and I'm a little stuck. I managed to change most parameters of bitcoinj to match my coin -- merkel hash, genesis hash, the works! Grin

However, under NetworkParameters, I can't seem to crack the second hex value.

I've determined as much that the first is simply the scriptSig from the genesis block, so difficulty bits + timestamp message.

Here's a snippet of the try catch around it:

try {
            // A script containing the difficulty bits and the following message:
            //
            //   "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
            byte[] bytes = Utils.HEX.decode
                    ("04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f7 2206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73");
            t.addInput(new TransactionInput(n, t, bytes));
            ByteArrayOutputStream scriptPubKeyBytes = new ByteArrayOutputStream();
            Script.writeBytes(scriptPubKeyBytes, Utils.HEX.decode
                    ("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3 8c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f"));
            scriptPubKeyBytes.write(ScriptOpCodes.OP_CHECKSIG);
            t.addOutput(new TransactionOutput(n, t, FIFTY_COINS, scriptPubKeyBytes.toByteArray()));
        } catch (Exception e) {
            // Cannot happen.
            throw new RuntimeException(e);
        }

How does one even find the second value? It appears to be a public key of sorts.
2  Alternate cryptocurrencies / Announcements (Altcoins) / [ANN!] -- [MAG] << MagCoin >> [X11 || No PREMINE/IPO || Fast] on: August 06, 2014, 09:36:05 PM
Bounty donation address: mSrDurwNvaFw3UX39WbkgDCdg6k8AhHtBs

ATTENTION MPOS POOL OWNERS:
$config['getbalancewithunconfirmed'] = true;
SHOULD BE
$config['getbalancewithunconfirmed'] = false;

MagCoin





Basic Specifications
  • Algorithm: [X11]
  • Block Time: [3 Min]
  • Reward: [Calculation-based/adaptive (see "rewards" section below)]
  • Difficulty Adjustment: [KGW adaptive algorithm]
  • Total Number of Coins: [2.5 billion]


Rewards Calculation
        Previously, rewards was not explicitly stated, because it is dynamically calculated based upon this formula:
            [(10 * difficulty) / (number of blocks + 129600)] * 129600
        Thus, a higher difficulty contributes to a higher payout per block, while the height (or number of blocks) prevents a suddenly-increasing difficulty from giving out too many coins. This means that MagCoin is also inherently more resilient to profit-pools (pools that mine the most profitable coin, which often can cause hashrate spikes). Additionally, with KGW smoothly adjusting difficulty, the coin will be very stable.


Why You Should Mine It
  • Using X11 means you'll be hashing much cooler -- no more are days of sitting in a far-too-heated room monitoring cgminer!
  • KGW difficulty changes + reward calculations will never be sudden, so value will stabilize quickly, and the coin won't jump all over the place.
  • P2pool has already been modified to work with it, so you can run your own node from day one. It's as simple as git cloning a repo I've set up.
  • A reasonable cap on the total number of coins helps with maintaining necessary scarcity.
  • The innovative reward-calculation feeds into concepts of economics, as it balances difficulty and block payout.


Miners
        MagCoin utilizes X11 cryptography, so any DarkCoin miner should work without any fuss. There are also modified kernels in some miners, which may offer a hashrate increase. I personally do not use them. The GPU miner link can be found below in the "Assets" section. Note: on my first try, I didn't get the GPU miner to work. You might not, either. The first thing you'll want to check is that you have the latest version of Catalyst, though. I have 14.4, and I'm having success. If you have problems, post here OR any DarkCoin mining thread, as the programs are the same! Also, as with all GPU mining, it takes some time and tuning to get maximal performance, so don't be disappointed if your hashrate seems low to begin with! Also, check to see your conf file specifies intensity, as the default is 8 (which is very low, even for crappy GPUs). Finally, if the x11mod kernel doesn't work, try using the darkcoin kernel instead.
        CPU miners are a bit trickier, though. As quoted from CPUCoinList.com, "There are several versions of CPU miners for X11. There are currently two versions of the CPU miner. If your CPU supports the AVX/AES instruction sets, use the 1.3 version. If not, use the 1.2c version." There is also a README file in the 1.3 version's ZIP file, so read-up. I tried several miners with my AMD Phenom, but ultimately wasn't successful with any of the 1.3 miners. So, when in doubt, just go 1.2. Note: when running the miner, be sure to specify "X11" with the -a flag, like this: "minerd.exe -a X11 --url=http://somepool.com:1234 -u test -p x". Otherwise, it will default to SCRYPT!


Pools


Assets


Bounties
Bounty donation address: mSrDurwNvaFw3UX39WbkgDCdg6k8AhHtBs

        I am a human being, after all, so I can't do everything (sure wish I could). Hence, I'll be offering bounties (in the form of PayPal). If you would like to be paid in MAG, I am perfectly okay with that. Just PM me and we'll figure something out, since MAG doesn't actually have a value yet (until it gets onto an exchange). However, you could look at it as an investment opportunity (in which case you would have a great bargain if it becomes successful). My advisement is: if it's easy to you, take payment in MAG, since you have nothing to lose. If it's time consuming or difficult, opt to be paid via PayPal. All payments will be sent as a gift, hence no chargebacks.
      
  • Android wallet: [100 MAG]
  • Online open-source wallet: [not yet set]
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!