Skip to content

Instantly share code, notes, and snippets.

@cleancoindev
Forked from samjoshuva/litecoin fork
Created May 28, 2023 23:48
Show Gist options
  • Save cleancoindev/e80d63926bb022377755d434544edca9 to your computer and use it in GitHub Desktop.
Save cleancoindev/e80d63926bb022377755d434544edca9 to your computer and use it in GitHub Desktop.

Revisions

  1. @samjoshuva samjoshuva revised this gist Feb 25, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion litecoin fork
    Original file line number Diff line number Diff line change
    @@ -132,7 +132,7 @@ nano generate.sh
    echo "Mining... Press [CTRL+C] to stop"
    while :
    do
    tetherwin-cli generatetoaddress 1 "MP1LnTDE48kFpQo28nRmakEVrcNFiHUCyy"
    tetherwin-cli generate 1
    done

    chmod +x generate.sh
  2. @samjoshuva samjoshuva revised this gist Jan 25, 2021. 1 changed file with 12 additions and 1 deletion.
    13 changes: 12 additions & 1 deletion litecoin fork
    Original file line number Diff line number Diff line change
    @@ -126,6 +126,17 @@ chmod 0600 litecoin.conf

    litecoin-cli getblockchaininfo

    faithcoin-cli generate 1 //mine the blocks
    nano generate.sh

    #!/bin/bash
    echo "Mining... Press [CTRL+C] to stop"
    while :
    do
    tetherwin-cli generatetoaddress 1 "MP1LnTDE48kFpQo28nRmakEVrcNFiHUCyy"
    done

    chmod +x generate.sh

    ./generate.sh


  3. @samjoshuva samjoshuva revised this gist Jan 25, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion litecoin fork
    Original file line number Diff line number Diff line change
    @@ -121,7 +121,7 @@ chmod 0600 litecoin.conf
    addnode=ip-address-of-other-node:port-no // add n number of addnode to connect to network
    listen=1

    litecoind -daemon // run
    litecoind -deprecatedrpc=accounts // run


    litecoin-cli getblockchaininfo
  4. @samjoshuva samjoshuva revised this gist Jan 25, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion litecoin fork
    Original file line number Diff line number Diff line change
    @@ -89,7 +89,7 @@ python genesis.py -a scrypt -z "BBC NEWS 20/Dec/2017 Bitcoin Cash deals frozen a

    cd ${litcoin-fork-root}

    ./autogen.h
    ./autogen.sh
    ./configure --without-gui //use without-gui parameter to exclude qt stuff


  5. @samjoshuva samjoshuva revised this gist Jan 25, 2021. 1 changed file with 16 additions and 8 deletions.
    24 changes: 16 additions & 8 deletions litecoin fork
    Original file line number Diff line number Diff line change
    @@ -54,14 +54,22 @@ nano src/chainparams.cpp
    nano src/validation.cpp
    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 >= 1)
    return 0;

    CAmount nSubsidy = 1 * COIN; // minners reward
    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    return nSubsidy;
    int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;
    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
    return 0;

    CAmount nSubsidy = 100 * COIN;
    // Subsidy is cut in half every 210,000 blocks which will occur approximate$

    if(nHeight < 11)
    {
    nSubsidy = 100000 * COIN;
    }

    //nSubsidy >>= halvings;
    return nSubsidy;

    }


  6. @samjoshuva samjoshuva revised this gist Jan 23, 2021. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion litecoin fork
    Original file line number Diff line number Diff line change
    @@ -93,7 +93,9 @@ cd src
    strip litecoind
    cd $HOME

    mkdir .litecoin && cd .litecoin
    litecoind

    cd .litecoin

    nano .litecoin.conf
    server=1
  7. @samjoshuva samjoshuva revised this gist Jan 23, 2021. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions litecoin fork
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@

    apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
    apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
    apt-get install libminiupnpc-dev
    apt-get install libzmq3-dev
    sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
    sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
    sudo apt-get install libminiupnpc-dev
    sudo apt-get install libzmq3-dev

    sudo add-apt-repository ppa:bitcoin/bitcoin
    sudo apt-get update
  8. @samjoshuva samjoshuva revised this gist Jan 23, 2021. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions litecoin fork
    Original file line number Diff line number Diff line change
    @@ -4,14 +4,13 @@ apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev
    apt-get install libminiupnpc-dev
    apt-get install libzmq3-dev

    sudo add-apt-repository ppa:bitcoin/bitcoin
    sudo apt-get update
    sudo apt-get install libdb4.8-dev libdb4.8++-dev

    git clone https://github.com/litecoin-project/litecoin.git


    wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
    echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c



    find ./ -type f -readable -writable -exec sed -i "s/Litecoin/Faithcoin/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/LiteCoin/FaithCoin/g" {} \;
  9. @samjoshuva samjoshuva revised this gist Jul 5, 2019. 6 changed files with 122 additions and 112 deletions.
    31 changes: 0 additions & 31 deletions executing
    Original file line number Diff line number Diff line change
    @@ -1,31 +0,0 @@
    cd ${litcoin-fork-root}

    ./autogen.h
    ./configure --without-gui //use without-gui parameter to exclude qt stuff


    make // wait for upto an hour if you are getting error on doc/man

    make install

    cd src
    strip litecoind
    cd $HOME

    mkdir .litecoin && cd .litecoin

    nano .litecoin.conf
    server=1
    rpcuser=user
    rpcpassword=password

    cd ${litcoin-fork-root}


    chmod 0600 litecoin.conf


    // depoly second instance do same procedures, change in .litecoin.conf

    addnode=ip-address-of-other-node:port-no // add n number of addnode to connect to network
    listen=1
    122 changes: 122 additions & 0 deletions litecoin fork
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,122 @@

    apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
    apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
    apt-get install libminiupnpc-dev
    apt-get install libzmq3-dev


    git clone https://github.com/litecoin-project/litecoin.git


    wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
    echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c



    find ./ -type f -readable -writable -exec sed -i "s/Litecoin/Faithcoin/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/LiteCoin/FaithCoin/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/LTC/FTH/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/litecoin/faithcoin/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/litecoind/faithcoind/g" {} \;


    find ./ -type f -readable -writable -exec sed -i "s/lites/blessings/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/photons/graces/g" {} \;



    find ./ -type f -readable -writable -exec sed -i "s/9333/9666/g" {} \; // change default port




    cd ${lite-coin-fork}
    nano src/chainparams.cpp
    consensus.nSubsidyHalvingInterval = 11; //maximum coin supply


    pchMessageStart[0] = 0xd0;
    pchMessageStart[1] = 0xe1;
    pchMessageStart[2] = 0xf5;
    pchMessageStart[3] = 0xec;


    base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,35);

    base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,35);

    base58Prefixes[EXT_PUBLIC_KEY] = {0xff, 0x88, 0xB2, 0x1E};

    base58Prefixes[EXT_SECRET_KEY] = {0xff, 0x88, 0xAD, 0xE4};

    //comment out checkpointData block


    nano src/validation.cpp
    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 >= 1)
    return 0;

    CAmount nSubsidy = 1 * COIN; // minners reward
    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    return nSubsidy;
    }


    nano src/amount.h

    static const CAmount COIN = 100000000; // coin value
    static const CAmount CENT = 1000000; // how far coin can be splited
    static const CAmount MAX_MONEY = 84000000 * COIN; // total number of coin


    git clone https://github.com/lhartikk/GenesisH0
    cd GenesisH0
    python genesis.py -a scrypt -z "BBC NEWS 20/Dec/2017 Bitcoin Cash deals frozen as insider trading is probed" -p "040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9" -t 1513784917 -n 2084524493

    //change 12 word for your convence


    cd ${litcoin-fork-root}

    ./autogen.h
    ./configure --without-gui //use without-gui parameter to exclude qt stuff


    make // wait for upto an hour if you are getting error on doc/man

    make install

    cd src
    strip litecoind
    cd $HOME

    mkdir .litecoin && cd .litecoin

    nano .litecoin.conf
    server=1
    rpcuser=user
    rpcpassword=password

    cd ${litcoin-fork-root}


    chmod 0600 litecoin.conf


    // depoly second instance do same procedures, change in .litecoin.conf

    addnode=ip-address-of-other-node:port-no // add n number of addnode to connect to network
    listen=1

    litecoind -daemon // run


    litecoin-cli getblockchaininfo

    faithcoin-cli generate 1 //mine the blocks


    13 changes: 0 additions & 13 deletions renaming your coin parameters
    Original file line number Diff line number Diff line change
    @@ -1,13 +0,0 @@
    find ./ -type f -readable -writable -exec sed -i "s/Litecoin/Faithcoin/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/LiteCoin/FaithCoin/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/LTC/FTH/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/litecoin/faithcoin/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/litecoind/faithcoind/g" {} \;


    find ./ -type f -readable -writable -exec sed -i "s/lites/blessings/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/photons/graces/g" {} \;



    find ./ -type f -readable -writable -exec sed -i "s/9333/9666/g" {} \; // change default port
    6 changes: 0 additions & 6 deletions running and testing
    Original file line number Diff line number Diff line change
    @@ -1,6 +0,0 @@
    litecoind -daemon // run


    litecoin-cli getblockchaininfo

    faithcoin-cli generate 1 //mine the blocks
    12 changes: 0 additions & 12 deletions system prerequesties
    Original file line number Diff line number Diff line change
    @@ -1,12 +0,0 @@

    apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
    apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
    apt-get install libminiupnpc-dev
    apt-get install libzmq3-dev


    git clone https://github.com/litecoin-project/litecoin.git


    wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
    echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c
    50 changes: 0 additions & 50 deletions things needed to be changed
    Original file line number Diff line number Diff line change
    @@ -1,50 +0,0 @@
    cd ${lite-coin-fork}
    nano src/chainparams.cpp
    consensus.nSubsidyHalvingInterval = 11; //maximum coin supply


    pchMessageStart[0] = 0xd0;
    pchMessageStart[1] = 0xe1;
    pchMessageStart[2] = 0xf5;
    pchMessageStart[3] = 0xec;


    base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,35);

    base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,35);

    base58Prefixes[EXT_PUBLIC_KEY] = {0xff, 0x88, 0xB2, 0x1E};

    base58Prefixes[EXT_SECRET_KEY] = {0xff, 0x88, 0xAD, 0xE4};

    //comment out checkpointData block


    nano src/validation.cpp
    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 >= 1)
    return 0;

    CAmount nSubsidy = 1 * COIN; // minners reward
    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    return nSubsidy;
    }


    nano src/amount.h

    static const CAmount COIN = 100000000; // coin value
    static const CAmount CENT = 1000000; // how far coin can be splited
    static const CAmount MAX_MONEY = 84000000 * COIN; // total number of coin


    git clone https://github.com/lhartikk/GenesisH0
    cd GenesisH0
    python genesis.py -a scrypt -z "BBC NEWS 20/Dec/2017 Bitcoin Cash deals frozen as insider trading is probed" -p "040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9" -t 1513784917 -n 2084524493

    //change 12 word for your convence


  10. @samjoshuva samjoshuva created this gist Jul 5, 2019.
    31 changes: 31 additions & 0 deletions executing
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    cd ${litcoin-fork-root}

    ./autogen.h
    ./configure --without-gui //use without-gui parameter to exclude qt stuff


    make // wait for upto an hour if you are getting error on doc/man

    make install

    cd src
    strip litecoind
    cd $HOME

    mkdir .litecoin && cd .litecoin

    nano .litecoin.conf
    server=1
    rpcuser=user
    rpcpassword=password

    cd ${litcoin-fork-root}


    chmod 0600 litecoin.conf


    // depoly second instance do same procedures, change in .litecoin.conf

    addnode=ip-address-of-other-node:port-no // add n number of addnode to connect to network
    listen=1
    13 changes: 13 additions & 0 deletions renaming your coin parameters
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    find ./ -type f -readable -writable -exec sed -i "s/Litecoin/Faithcoin/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/LiteCoin/FaithCoin/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/LTC/FTH/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/litecoin/faithcoin/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/litecoind/faithcoind/g" {} \;


    find ./ -type f -readable -writable -exec sed -i "s/lites/blessings/g" {} \;
    find ./ -type f -readable -writable -exec sed -i "s/photons/graces/g" {} \;



    find ./ -type f -readable -writable -exec sed -i "s/9333/9666/g" {} \; // change default port
    6 changes: 6 additions & 0 deletions running and testing
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    litecoind -daemon // run


    litecoin-cli getblockchaininfo

    faithcoin-cli generate 1 //mine the blocks
    12 changes: 12 additions & 0 deletions system prerequesties
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@

    apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
    apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
    apt-get install libminiupnpc-dev
    apt-get install libzmq3-dev


    git clone https://github.com/litecoin-project/litecoin.git


    wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
    echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c
    50 changes: 50 additions & 0 deletions things needed to be changed
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    cd ${lite-coin-fork}
    nano src/chainparams.cpp
    consensus.nSubsidyHalvingInterval = 11; //maximum coin supply


    pchMessageStart[0] = 0xd0;
    pchMessageStart[1] = 0xe1;
    pchMessageStart[2] = 0xf5;
    pchMessageStart[3] = 0xec;


    base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,35);

    base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,35);

    base58Prefixes[EXT_PUBLIC_KEY] = {0xff, 0x88, 0xB2, 0x1E};

    base58Prefixes[EXT_SECRET_KEY] = {0xff, 0x88, 0xAD, 0xE4};

    //comment out checkpointData block


    nano src/validation.cpp
    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 >= 1)
    return 0;

    CAmount nSubsidy = 1 * COIN; // minners reward
    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    return nSubsidy;
    }


    nano src/amount.h

    static const CAmount COIN = 100000000; // coin value
    static const CAmount CENT = 1000000; // how far coin can be splited
    static const CAmount MAX_MONEY = 84000000 * COIN; // total number of coin


    git clone https://github.com/lhartikk/GenesisH0
    cd GenesisH0
    python genesis.py -a scrypt -z "BBC NEWS 20/Dec/2017 Bitcoin Cash deals frozen as insider trading is probed" -p "040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9" -t 1513784917 -n 2084524493

    //change 12 word for your convence