Pages:
Author

Topic: *** Complete Guide on How to Create a New Alt Coin – Update 2018 *** (Read 20862 times)

newbie
Activity: 2
Merit: 0
Can someone on here please explain what needs to be done to soft-fork an old .9 version altcoin that I did to be 13.2 or higher ?

I have tried everything I can think of, and there are 0 guides on this out there that I can find.


Any help would be greatly appreciated.


Thank you!
newbie
Activity: 4
Merit: 0
When sending between two clients, an error message occurs -

Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or endable -fallbackfee.

What does this mean, and how do I fix it?

Log extract below....

2018-06-01T22:48:18Z Fee Calculation: Fee:16600 Bytes:166 Needed:16600 Tgt:0 (requested 0) Reason:"PayTxFee set" Decay 0.00000: Estimation: (-1 - -1) nan% 0.0/(0.0 0 mem 0.0 out) Fail: (-1 - -1) nan% 0.0/(0.0 0 mem 0.0 out)
2018-06-01T22:48:23Z CommitTransaction:
CTransaction(hash=578d837469, ver=2, vin.size=1, vout.size=2, nLockTime=157)
    CTxIn(COutPoint(a3a8c8cd92, 0), scriptSig=160014a7419391b687baff02, nSequence=4294967293)
    CScriptWitness(3045022100887e2a97a954e5300a92ddb920256955112fe0977121b1fd9b9876b8144b246602200 f067e29f0a555a914034d13b9203390448832f43277f447c42404119e5c328001, 03a0415edb85fbdbf4b9ab3b759c3f660b8e87fe57b7dc852237a5a670ee1ba791)
    CTxOut(nValue=48.99983400, scriptPubKey=a914b4f55ca5f2a9a9a67c6dd4f8a2)
    CTxOut(nValue=1.00000000, scriptPubKey=a9147bcc4af60d02ea64d6ad3dcfc0)
2018-06-01T22:48:23Z keypool keep 1001
2018-06-01T22:48:23Z AddToWallet 578d837469ebf22fe9fff4a97ad87c11ee4453ade47c36c378c9941374d4f2e9  new
2018-06-01T22:48:23Z CommitTransaction(): Transaction cannot be broadcast immediately, no-witness-yet (code 64)
2018-06-01T22:49:51Z keypool added 1 keys (1 internal), size=2000 (1000 internal)

Do we have to wait 432 blocks before we can send between clients for segwit to activate?
Have you figured this out yet? I've mined 432 blocks, (the client turning on and off in between, idk if that matters) and it still says the same thing. I'm on block 440 right now, and I am not able to send a transaction, i just get the same CommitTransaction() error. When I use -prematurewitness to bypass that, nothing happens, it says that it's been relayed but my laptop that is running a node receives nothing. When I enable -prematurewitness on both machines, my laptop actually displays that a transactions has been sent to it but it never gets confirmed in the blockchain. And when I try to use a Bech32 address, it just says "CommitTransaction(): Transaction cannot be broadcast immediately, scriptpubkey". I don't really know what to do, any help would be appreciated.
newbie
Activity: 5
Merit: 0
Hi,
Am trying to create Altcoin with the version bitcoin v21.99.0-5574e4896-dirty (release build) and the problem when i change all and i try to mine i have Error . So i tried  ./bitcoin-cli -rpcconnect=127.0.0.1 -rpcuser=user -rpcpassword=pass -rpcport=8003 getblocktemplate
error code: -10
error message:
Bitcoin Core is in initial sync and waiting for blocks...

How can i resolve this ?


The change what i made is ==>
Code:
int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE * 4000; // use the original bitcoin genesis block

        pchMessageStart[0] = 0xf0;
        pchMessageStart[1] = 0xb0;
        pchMessageStart[2] = 0xb0;
        pchMessageStart[3] = 0xd0;

consensus.nMinimumChainWork = uint256S("0x0");
consensus.defaultAssumeValid = uint256S("0x0")
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
ALl vSeeds.emplace_back commented

legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Hello, I have successfully built Bitcoin Core v0.20.0 on my Ubuntu 18.04.

I have made every single change you did. The only part I didn't do is the 12th, because I didn't have to. I don't care about changing genesis block. So I left Satoshi's there.

Once I open Bitcoin Core this is what it returns:



I changed everything from the source files so I can create my own blockchain. Although, I get these which make me think that something goes wrong:





I haven't said this before, but I'm going to be really generous with the merits to anyone that will help me creating a coin with its own blockchain.

I hope the fault isn't on v0.20.0.
newbie
Activity: 1
Merit: 0
Hello

I tried to do this post in order to finally change PoW threshold to create blocks faster. Unfortunately I encountered a problem, after those 13 steps  I came up to run bitcoind command and all I got was core dumped error. like this :

Code:
~$ bitcoind
bitcoind: chainparams.cpp:132: CMainParams::CMainParams(): Assertion `consensus.hashGenesisBlock == uint256S("0000000001e075d779592db22d19573375d05db23bdafd0a8b06c89fb2985d89")' failed.
Aborted (core dumped)

It seems it won't accept my genesis hash and with bitcoin-cli command it says "can not connect to server 127.0.0.1:6332. I can't even add the node with its command .Here is my bitcoin.conf :

rpcuser=admin
rpcpassword=admin
server=1
rpcallowip=127.0.0.1
rpcport=6332
listen=1
gen = 1

I tried so hard but couldn't find out what i'm missing. I followed all the steps precisely.  I will be beyond grateful if some body take some time and answer my question.


bitcoin is easy way after used this guide you need understand used some c++ skill to do.

I have some knowledge of c++ but right now I can not even test my fork. I don't know why I get this error. I didn't change address prefixes. It won't be a problem,will it ?

you need change consensus of bitcoin follow up old guide. you can see on my profile i visit old guide. then mix with this one. + you need change pcmessage that important thing on unique. and put pztime to make sense of change before doing alive. you need prepare of this. old guide + this one made complete part of puzzle. try experiment on testnet before launch and you will meet same as this and you need some trick to make it appear your genesis. by generate timestamp another two just default or put anything~

Thank You. I solved it. It was One line that I carelessly commented because it was not in the main guide.

me too

can you help me?
thank you very much
newbie
Activity: 1
Merit: 0
Hi, Thank you very much for your post. It helps me a lot.
Now I encountered a problem.
I run the following two bitcoinds:
Code:
bitcoind -conf=/home/bitcoinbitcoin.conf -rpcport=8332 -rpcbind=192.168.1.70 -connect=0 -listen=1 -maxtipage=432000000

bitcoind -conf=/home/bitcoin/peer2/bitcoin.conf -rpcport=6332 -rpcbind=192.168.1.70 -addnode=192.168.1.70:8333

When I try getblocktemplate,  it shows:
error code: -10
error message:
Bitcoin Core is in initial sync and waiting for blocks...

When I try miner, it shows:
HTTP request failed: The requested URL returned error: 500 Internal Server Error
[2019-10-15 14:25:53] json_rpc_call failed, retry after 30 seconds
newbie
Activity: 1
Merit: 0
Everything runs well after following this guide, however there are SEGWIT errors when sending from client to client wallets. Can we expand on resetting the SEGWIT parameters in chainparams.cpp?

Hi, I have faced exactly the same error. Did anybody solve this problem? Everything worked fine for creating a new altcoin. Mining (CPUminer) is working and blocks are created accordingly. However transaction from one user to another is not confirmed and not validated. I guess this error relates to SEGWIT in chainparams.cpp. I tried many ways and get no positive results. Any suggestion?
newbie
Activity: 1
Merit: 0
Hi all i folowed the guide got an alt coin up and running all 3 vm nodes i setup find each other cpu miner works only to mine to bech32 adresses if you try mine to legacy adress it wont be credited so my question is i try send some coin from one wallet to another but the transaction does not end up in the mempool i run bitcoin source code 0.16.3
newbie
Activity: 5
Merit: 0
I have created a clone of the latest version of Litecoin using this guide. All appears fine, have 2 wallets running, using minerd and it's constantly finding blocks. But for some reason my balance (on both wallets) remains at 0.

What could be wrong?

Hi there! Can you (or anyone) please provide me the code to generate a genesis for the latest Litecoin core (i think its 0.17.1). Been at it for three weeks with various methods and scripts and cant seem to crack it without the hashes being wrong. Tried GenesisH0 script, custom code off the net old and new, but nothing seems to get my past the assert failed. Really appreciated. thank you
full member
Activity: 615
Merit: 154
CEO of Metaisland.gg and W.O.K Corp
A  different thread about the same subject, but updated for 2019 and Bitcoin 0.17/0.18 has been posted here: https://bitcointalksearch.org/topic/complete-guide-on-how-to-create-a-new-alt-coin-update-2019-5134256
copper member
Activity: 115
Merit: 4
Does anyone know how to hack in BIP34 from block 1 after genesis?

It seems like this almost never works, and is something of a hack.  It fails out with -reindex and -txindex saying bad-cb-height, which is the block height in the coinbase tx.  So to set the BIP34 height and hash, how is that worked in unless you can specify you want BIP34's block height with a CPU miner?  That must be the only way to do it, then go back and validate everything.

Otherwise, maybe the only way to work around it is to skip the genesis block and start from block 1 with that block hash.  Assuming the block heights are in the coinbase tx.

Anyone figured out how to enable BIP34 from the start, aside from genesis?  Like block 1, or doesn't that make sense at all?  Am I missing something?

Thanks!
full member
Activity: 615
Merit: 154
CEO of Metaisland.gg and W.O.K Corp
About windows 64/32 compilation, you can use make -i to ignore the errors. There will be errors due to one sha flavor compilation error, but it does not affect the result since other sha algorithms will compile fine and this one is optionnal, but without the -i it will stop the compilation.
Also when you say "mine 100 blocks" but how? Bitcoin 0.17.1 is not mining with Yiimp without stratum modification (due to changes in how the address verification is done with RPC)
And about DWG and Midas I have experienced both, they are falling with ccminer and the coin reject the mined block with an unexpected difficulty match error. I ended up continuing to use the basic Bitcoin reajustment code - which is working fine but reajusting every block.
Another solution is to check verification.cpp from the different version of Bitcoin (cash, sv etc...) and see how they dealed with reajustment.

Good guide!

A couple of updates for Bitcoin release 0.17.1 which I wanted to use.

Also if you want to build a Windows GUI wallet, you will have to git clone and add --branch v.0.17.1 (it accepts a tag) so you get the /depends directory and all the stuff inside needed for cross-compile dependencies.  That way you can cross-compile for Win 64 on Ubuntu and get a slick Bitcoin Core wallet.  If you know how to get gitian up and running, you can make a setup .exe.  If you have Mac libs, you can cross-compile for a Mac wallet, too.

So first swap out the RPC port step and instead change it here in src/chainparamsbase.cpp:

Code:
std::unique_ptr CreateBaseChainParams(const std::string& chain)
{
    if (chain == CBaseChainParams::MAIN)
        return MakeUnique("", 10332);   // I set my port to 10332, Bitcoin's is 8332, I left the rest alone
    else if (chain == CBaseChainParams::TESTNET)
        return MakeUnique("testnet3", 18332);
    else if (chain == CBaseChainParams::REGTEST)
        return MakeUnique("regtest", 18443);
    else
        throw std::runtime_error(strprintf("%s: Unknown chain %s.", __func__, chain));
}

In chainparams.cpp, set the P2P port under the pchMessageStart lines:

Code:
nDefaultPort = 10333;    // Bitcoin's is 8333, I set mine to a thousand above Litecoin's P2P port (9333)

Not long after that, when you create a genesis block with genesisgen or GenesisH0's Python tool, this line should look familiar:

Code:
genesis = CreateGenesisBlock(1553416095, 2546245826, 0x1d00ffff, 1, 50 * COIN);

That was mine, but now do the same thing for testnet, otherwise the daemon will fail with the assert on the genesis hash for it.  So in chainparams.cpp set your genesis block again.  Look for the Testnet (v3) comment and the process is the same for main-net

For bech32_hrp, I left mine as "bc" but you can change that.  Litecoin's is "ltc".  Note that with miners, I found they failed to mine to older style addresses, so you will probably have to bitcoin-cli getnewaddress, then bitcoin-cli getaddressinfo "addr" and find the bech32 address in there, and set that as your --coinbase-addr parameter with cpuminer, then it works.

with chainTxData in chainparams.cpp, set nTime to the UNIX timestamp of your genesis block and the nTxCount and dTxRate both to 0.

An important step to take if you publish your source on github is to mine say 100 blocks and have them confirmed, and adjust your nPowTargetTimespan as a minimum to try and prevent instamining.  People will find it and instamine it immediately, if it looks like a new alt-coin to them, leaving you with the likely situation that they out-gun you with a higher hashrate, and trying to catch up means you could get blocks, but they will all probably get orphaned.  And then leave your blockchain in a mess and your coin stalling.

I set mine to:

Code:
consensus.nPowTargetTimespan = 3 * 60 * 60; // three hours
consensus.nPowTargetSpacing = 2 * 60; // two minutes

to begin with.  It probably still isn't good enough in comparison to implementing DGW v3 or MIDAS or something of your own invention, in particular you might like to have difficulty readjustments done less than every 3 hours as above.  This works out for me just in a test environment, and I usually get my block every two minutes although sometimes a few will pop through every minute then it will slow down again and not find a few blocks for longer than the target of 2 minutes that I wanted.

You can also premine coins for yourself if you want to with the GetBlockSubsidy function in validation.cpp.

Please note I haven't tested this at all, but for example:

Code:
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
    int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;

    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return 0;

    // Premine in first ten blocks, the simple approach
    
    // Start with 5000 coins per block after genesis, but otherwise leave default subsidy unchanged
    CAmount nSubsidy = 50 * COIN;

    // First 10 blocks after genesis, up the subsidy to 5000 coins
    if (nHeight > 0 && nHeight <= 10) {
        nSubsidy = 5000 * COIN;
        // You may wish to leave out the halvings below and just
        return nSubsidy;
        // especially if you just premine in block #1 and leave it at that, but check
        // to make sure it doesn't get all screwed up...
    }

    // otherwise leave nSubsidy in its default state
    
    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years. (Not true for my adjustments, pay attention here)
    nSubsidy >>= halvings;
    return nSubsidy;
}

I left the coin supply and subsidy halving for the moment because it doesn't matter, it's not an alt-coin but a learn-by-doing exercise, trying to retrofit in the bare minimum of difficulty adjustments, experimenting with scripts in transactions (enabling some, trying new ones, going a bit crazy there but the programmable money part is a lot of fun for me), and looking at how more privacy of transactions could be implemented.  I expect I'm a couple of years away from that, but I hope to get there some day, otherwise it's worth trying to clone ZCash or another coin.

I think I've covered the bare basic bits as a follow-on to this guide if you want Bitcoin 0.17.1, you might run into make issues after changing everything from Bitcoin to NewCoin and so on.  So for example if the build process fails in doc/man (a situation I ran into before) saying it has no rule to make newcoind.1.  Stop., then just rename bitcoind.1 to newcoind.1 (and same for 3 other files there) then run make again and it will continue where it left off.

For a Windows QT wallet, cross-compiling on Ubuntu 18.04 LTS:

Code:
sudo apt-get update
sudo apt-get upgrade

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libboost-all-dev libboost-program-options-dev
sudo apt-get install libminiupnpc-dev libzmq3-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev unzip

// Get into your src directory, e.g.

cd ~/bitcoin-0.17.1

// For a 64-bit Windows wallet

sudo apt install g++-mingw-w64-x86-64

// Set mode to POSIX when it asks after running
sudo update-alternatives --config x86_64-w64-mingw32-g++

// Get ready and change into depends directory
PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g')
cd depends

// This will take a while
make HOST=x86_64-w64-mingw32

// Up one level to your top level src dir (not in /src, up from there to configure and make)
cd ..

// I use the latest Berkeley DB, so if like me you don't need "compatible" wallets,
// always configure with the latest Berkeley DB and pass in --with-incompatible-bdb

// This will also take a while...

./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --with-incompatible-bdb --prefix=/
make

If all goes well, the 64-bit Windos GUI wallet e.g. newcoin-qt.exe will be in the folder src/qt when compiled. The other tools newcoin-cli.exe, newcoin-tx.exe and the daemon newcoind.exe will be in the src folder.

So I think that's all for now for a quick and dirty Bitcoin 0.17.1 based on last year's Christmas Day release.
copper member
Activity: 115
Merit: 4
Good guide!

A couple of updates for Bitcoin release 0.17.1 which I wanted to use.

Also if you want to build a Windows GUI wallet, you will have to git clone and add --branch v.0.17.1 (it accepts a tag) so you get the /depends directory and all the stuff inside needed for cross-compile dependencies.  That way you can cross-compile for Win 64 on Ubuntu and get a slick Bitcoin Core wallet.  If you know how to get gitian up and running, you can make a setup .exe.  If you have Mac libs, you can cross-compile for a Mac wallet, too.

So first swap out the RPC port step and instead change it here in src/chainparamsbase.cpp:

Code:
std::unique_ptr CreateBaseChainParams(const std::string& chain)
{
    if (chain == CBaseChainParams::MAIN)
        return MakeUnique("", 10332);   // I set my port to 10332, Bitcoin's is 8332, I left the rest alone
    else if (chain == CBaseChainParams::TESTNET)
        return MakeUnique("testnet3", 18332);
    else if (chain == CBaseChainParams::REGTEST)
        return MakeUnique("regtest", 18443);
    else
        throw std::runtime_error(strprintf("%s: Unknown chain %s.", __func__, chain));
}

In chainparams.cpp, set the P2P port under the pchMessageStart lines:

Code:
nDefaultPort = 10333;    // Bitcoin's is 8333, I set mine to a thousand above Litecoin's P2P port (9333)

Not long after that, when you create a genesis block with genesisgen or GenesisH0's Python tool, this line should look familiar:

Code:
genesis = CreateGenesisBlock(1553416095, 2546245826, 0x1d00ffff, 1, 50 * COIN);

That was mine, but now do the same thing for testnet, otherwise the daemon will fail with the assert on the genesis hash for it.  So in chainparams.cpp set your genesis block again.  Look for the Testnet (v3) comment and the process is the same for main-net

For bech32_hrp, I left mine as "bc" but you can change that.  Litecoin's is "ltc".  Note that with miners, I found they failed to mine to older style addresses, so you will probably have to bitcoin-cli getnewaddress, then bitcoin-cli getaddressinfo "addr" and find the bech32 address in there, and set that as your --coinbase-addr parameter with cpuminer, then it works.

with chainTxData in chainparams.cpp, set nTime to the UNIX timestamp of your genesis block and the nTxCount and dTxRate both to 0.

An important step to take if you publish your source on github is to mine say 100 blocks and have them confirmed, and adjust your nPowTargetTimespan as a minimum to try and prevent instamining.  People will find it and instamine it immediately, if it looks like a new alt-coin to them, leaving you with the likely situation that they out-gun you with a higher hashrate, and trying to catch up means you could get blocks, but they will all probably get orphaned.  And then leave your blockchain in a mess and your coin stalling.

I set mine to:

Code:
consensus.nPowTargetTimespan = 3 * 60 * 60; // three hours
consensus.nPowTargetSpacing = 2 * 60; // two minutes

to begin with.  It probably still isn't good enough in comparison to implementing DGW v3 or MIDAS or something of your own invention, in particular you might like to have difficulty readjustments done less than every 3 hours as above.  This works out for me just in a test environment, and I usually get my block every two minutes although sometimes a few will pop through every minute then it will slow down again and not find a few blocks for longer than the target of 2 minutes that I wanted.

You can also premine coins for yourself if you want to with the GetBlockSubsidy function in validation.cpp.

Please note I haven't tested this at all, but for example:

Code:
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
    int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;

    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return 0;

    // Premine in first ten blocks, the simple approach
    
    // Start with 5000 coins per block after genesis, but otherwise leave default subsidy unchanged
    CAmount nSubsidy = 50 * COIN;

    // First 10 blocks after genesis, up the subsidy to 5000 coins
    if (nHeight > 0 && nHeight <= 10) {
        nSubsidy = 5000 * COIN;
        // You may wish to leave out the halvings below and just
        return nSubsidy;
        // especially if you just premine in block #1 and leave it at that, but check
        // to make sure it doesn't get all screwed up...
    }

    // otherwise leave nSubsidy in its default state
    
    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years. (Not true for my adjustments, pay attention here)
    nSubsidy >>= halvings;
    return nSubsidy;
}

I left the coin supply and subsidy halving for the moment because it doesn't matter, it's not an alt-coin but a learn-by-doing exercise, trying to retrofit in the bare minimum of difficulty adjustments, experimenting with scripts in transactions (enabling some, trying new ones, going a bit crazy there but the programmable money part is a lot of fun for me), and looking at how more privacy of transactions could be implemented.  I expect I'm a couple of years away from that, but I hope to get there some day, otherwise it's worth trying to clone ZCash or another coin.

I think I've covered the bare basic bits as a follow-on to this guide if you want Bitcoin 0.17.1, you might run into make issues after changing everything from Bitcoin to NewCoin and so on.  So for example if the build process fails in doc/man (a situation I ran into before) saying it has no rule to make newcoind.1.  Stop., then just rename bitcoind.1 to newcoind.1 (and same for 3 other files there) then run make again and it will continue where it left off.

For a Windows QT wallet, cross-compiling on Ubuntu 18.04 LTS:

Code:
sudo apt-get update
sudo apt-get upgrade

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libboost-all-dev libboost-program-options-dev
sudo apt-get install libminiupnpc-dev libzmq3-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev unzip

// Get into your src directory, e.g.

cd ~/bitcoin-0.17.1

// For a 64-bit Windows wallet

sudo apt install g++-mingw-w64-x86-64

// Set mode to POSIX when it asks after running
sudo update-alternatives --config x86_64-w64-mingw32-g++

// Get ready and change into depends directory
PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g')
cd depends

// This will take a while
make HOST=x86_64-w64-mingw32

// Up one level to your top level src dir (not in /src, up from there to configure and make)
cd ..

// I use the latest Berkeley DB, so if like me you don't need "compatible" wallets,
// always configure with the latest Berkeley DB and pass in --with-incompatible-bdb

// This will also take a while...

./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --with-incompatible-bdb --prefix=/
make

If all goes well, the 64-bit Windos GUI wallet e.g. newcoin-qt.exe will be in the folder src/qt when compiled. The other tools newcoin-cli.exe, newcoin-tx.exe and the daemon newcoind.exe will be in the src folder.

So I think that's all for now for a quick and dirty Bitcoin 0.17.1 based on last year's Christmas Day release.
full member
Activity: 615
Merit: 154
CEO of Metaisland.gg and W.O.K Corp
You can fork and create an altcoin by only changing the name of the coin (search all occurence of Bitcoin and BTC and replace them with yours), and change the RPC port.
It would do a fork of Bitcoin, and use the bitcoin blockchain.

If you want to solomine to get your premine without a headache and have your own blockchain, you don't need to change the public key (while it is advised, it is not not mendatory).

In that case you have 3 solutions:
1) keep the bitcoin values and start over a new blockchain by only doing a new genesis as explained in the tutorial. This will make a new functionnal blockchain but you will be stuck with POW for mining and will have to add some kind of protection like DGW to avoid having big miners canibilizing your mining. You will have to setup a stratum server to mine.

2) start from Litecoin or Dash that were designed from Bitcoin 0.14 and still have the solo mining features. Doing the genesis is identical for these as explained in this tutorial.

3) start from Bytecoin and use Cryptonight. It is a fairly different version of bitcoin, based on Bitcoin 0.12 I think but highly modified.

The 2) and 3) are not developed as actively as Bitcoin core, but are easy to get started.

Bitcoin Core will not run out of the box unless you modify the stratum code from Yiimp, and remove many checks from validation.cpp, /qt/bicoingui.cpp, mining.cpp etc... you need to be a sharp C++ coder to choose the Bitcoin core forking way.


So I feel like there's piece of simple info that is probably just known and expected that we know if we're interested in starting an Alt, but sadly it's not lol

Basically in this tutorial it's optional to rename BTC or bitcoin, so I guess the question is; is the symbol or name not actually assigned in the code it self?  Obviously in a wallet you can label it what ever you want and that asset has an address and network where you interact with it, and exchanges likewise are running nodes and in their displays can label blockchain "X" as what ever they want when it's displayed. 

So is the public key and/or network identifier the actual identifier for the coin and the coin name/symbol not actually dictated by the code?
newbie
Activity: 2
Merit: 0
So I feel like there's piece of simple info that is probably just known and expected that we know if we're interested in starting an Alt, but sadly it's not lol

Basically in this tutorial it's optional to rename BTC or bitcoin, so I guess the question is; is the symbol or name not actually assigned in the code it self?  Obviously in a wallet you can label it what ever you want and that asset has an address and network where you interact with it, and exchanges likewise are running nodes and in their displays can label blockchain "X" as what ever they want when it's displayed. 

So is the public key and/or network identifier the actual identifier for the coin and the coin name/symbol not actually dictated by the code?
full member
Activity: 615
Merit: 154
CEO of Metaisland.gg and W.O.K Corp
Another help for the altcoin developers. When this article was posted, it was possible to mine without using stratum, but now it is not possible.

Mining your altcoin involve more work than before (blame the Bitcoin core dev for that!). Satoshi made the first Bitcoin wallet with 3 main functions, sending/receiving and mining. The fact that the solo mining code is removed make it very complicated for the altcoin designers to use Bitcoin core as a fork, reason why they are mostly using Dash/Litecoin which are based from Bitcoin 0.14 to develop new altcoin. I think it is a shame, but I am not in a position to change anything in Bitcoin core so we can only try to find solutions.

How to mine your coin if you want to use Bitcoin core 0.18?

First you need to run your mining wallet using by the command line yourcoind -deprecatedrpc=accounts
Otherwise, getblocktemplate will not answer to stratum and mining will be impossible

(message to the Bitcoin core developers, how are we going to mine if you remove getblocktemplate?)

Right now, since getblocktemplate is not yet deprecated, we can use Yiimp to mine.

1) get an Ubuntu 0.18 server and use the script here https://github.com/NicolasChoukroun/yiimp_install_scrypt_ubuntu18.04 or https://github.com/xavatar/yiimp_install_scrypt_ubuntu18.04
and follow the instructions. To run stratum go in the /var/stratum directory and run ./run.sh sha
Careful to change the path of blocknotify to /var/stratum/blocknotify or it will not mine.

2) add your coin to Yiimp by using a second server that has its IP authorized to use the backend as explained in the instructions when you installed yiimp.
a good tutorial is here https://coinguides.org/yiimp-mining-pool/

3) compile your coin for PC and Unix, run the mining wallet where your installed Yiimp get an address (yourcoin-cli getnewaddress) and use it as main wallet and wallet in the coin configuration.

4) run yourcoin-qt -deprecatedrpc=account on a windows machine. Get ccminer-230 and edit one of the cmd file, enter the commands suggested by Yiimp (and do not forget to change the block notify address to /var/stratum/blocknotify)
Use the address of your windows wallet (getnewaddress) as parameter too ccminer230.exe as per instruction on how to use ccminer

Now you are ready to mine... run the cmd to get ccminer mining, it should work.

As you can see, the bitcoin core dev have made it really complicated to fork the latest Bitcoin core to do an altcoin.

full member
Activity: 615
Merit: 154
CEO of Metaisland.gg and W.O.K Corp
A couple of information to help doing an altcoin from latest version of bitcoin.
Lot of people are stuck because bitcoin 0.18 + have a lot of verification that are not taking in account the case of when you are at genesis (nheight=1) with one transaction.

The loading screen is blocking and you cannot mine without removing it. Getblocktemplate send an error "Loading blocks"

Latest version of Bitcoin (0.18) is adding a define in chain.h, this value is used in /qt/bitcoingui.cpp to show the blocking form or not.

Code:
MAX_BLOCK_TIME_GAP = 90 * 60

This value is too small for the first transactions, the genesis first tx is most of the time older than 90*60 seconds and that's what is blocking the wallet.

If you change this value to 3600*365, you will remove the loading screen and get the coin to mine.

Once your blockchain has more transactions (let say 1000 for example) and you are mining a block like a swiss clock every x minutes, you can reverse this parameter to a value close to x

sr. member
Activity: 868
Merit: 250
Founder Nur1Labs
OK, so above issue was with the latest Litecoin branch. When I switch to Litecoin 0.15, everything works fine. After some digging, it seems it has to do with the CPU mining software not compatible with the bech32 addresses (which were added in Litecoin 0.16).

When I fork the latest branch of Litecoin and start the wallets with the -addresstype=legacy switch, I am able to generated a legacy address and mine to it with minerd.

So far I was not able to find any working CPU miner that is compatible with the latest Litecoin version  Undecided

Anyone else busy with this?

 as you know for next version you must carefully follow up new version fork rules. so im used rebase as fine~
newbie
Activity: 4
Merit: 0
OK, so above issue was with the latest Litecoin branch. When I switch to Litecoin 0.15, everything works fine. After some digging, it seems it has to do with the CPU mining software not compatible with the bech32 addresses (which were added in Litecoin 0.16).

When I fork the latest branch of Litecoin and start the wallets with the -addresstype=legacy switch, I am able to generated a legacy address and mine to it with minerd.

So far I was not able to find any working CPU miner that is compatible with the latest Litecoin version  Undecided

Anyone else busy with this?
newbie
Activity: 4
Merit: 0
I have created a clone of the latest version of Litecoin using this guide. All appears fine, have 2 wallets running, using minerd and it's constantly finding blocks. But for some reason my balance (on both wallets) remains at 0.

This is an extract of debug.log:
Code:
2019-01-01 22:34:28 UpdateTip: new best=b9d30863f3b2aa7d8d9d0fe61673bff488dfa4a62d4d4eb8dbb865195d76276a height=383 version=0x20000000 log2_work=28.584985 tx=384 date='2019-01-01 22:34:25' progress=1.000000 cache=0.0MiB(323txo)
2019-01-01 22:34:30 CreateNewBlock(): block weight: 772 txs: 0 fees: 0 sigops 400
2019-01-01 22:34:33 UpdateTip: new best=ae8c37c06f5da0486c438bd6ef0e403c0ccd3481c4c8fed2ff48f990b527f780 height=384 version=0x20000000 log2_work=28.588737 tx=385 date='2019-01-01 22:34:30' progress=1.000000 cache=0.0MiB(324txo)
2019-01-01 22:34:35 CreateNewBlock(): block weight: 772 txs: 0 fees: 0 sigops 400
2019-01-01 22:34:43 UpdateTip: new best=1f94f804b286ef3a80f239e860b64e094abb823eee1e311edb1d857a8d9ae28b height=385 version=0x20000000 log2_work=28.592479 tx=386 date='2019-01-01 22:34:38' progress=1.000000 cache=0.0MiB(325txo)
2019-01-01 22:34:45 CreateNewBlock(): block weight: 772 txs: 0 fees: 0 sigops 400
2019-01-01 22:34:58 UpdateTip: new best=0d9fc3f15008d97b1caba26c8dde8163850f20d1db0c4446140d9e4fd941e8ae height=386 version=0x20000000 log2_work=28.596212 tx=387 date='2019-01-01 22:34:53' progress=1.000000 cache=0.0MiB(326txo)
2019-01-01 22:34:58 CreateNewBlock(): block weight: 772 txs: 0 fees: 0 sigops 400
2019-01-01 22:34:59 UpdateTip: new best=36c70adbf212df121a0a37e0e3cb3071459b4a50b989572145f7b62f19cbcdf9 height=387 version=0x20000000 log2_work=28.599935 tx=388 date='2019-01-01 22:34:58' progress=1.000000 cache=0.0MiB(327txo)
2019-01-01 22:35:01 CreateNewBlock(): block weight: 772 txs: 0 fees: 0 sigops 400
2019-01-01 22:35:09 UpdateTip: new best=54358b011951aa4a1035dfad6490e568c655c97c6cfca35b726eb508617deff7 height=388 version=0x20000000 log2_work=28.603648 tx=389 date='2019-01-01 22:35:06' progress=1.000000 cache=0.0MiB(328txo)
2019-01-01 22:35:11 CreateNewBlock(): block weight: 772 txs: 0 fees: 0 sigops 400

What could be wrong?
Pages:
Jump to: