Você está na página 1de 10

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
sudo apt-get update && sudo apt-get upgrade

sudo apt-get install openssh-server -y


sudo nano /etc/ssh/sshd_config --- editar o arquivo e colocar PermitRootLogin
yes

Depois reiniciar
service ssh restart
passwd root ----- Coloque uma senha letra e numero use WinSCP

service sshd restart


sudo apt install nodejs-legacy
sudo apt-get install git

/* Dependencias*/

sudo apt-get update && sudo apt-get upgrade

sudo apt-get install git

sudo apt-get install

sudo apt-get install build-essential libboost-filesystem-dev libboost-program-


options-dev libboost-thread-dev libdb-dev libdb++-dev libminiupnpc-dev libssl1.0-
dev

sudo apt-get install libboost-all-dev qt5-default libqt5gui5 libqt5core5a


libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
libqrencode-dev

sudo apt-get install build-essential libtool autotools-dev automake pkg-config


libssl1.0-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 libgmp3-dev

sudo add-apt-repository ppa:bitcoin/bitcoin

sudo apt-get update

sudo apt-get install libdb4.8-dev libdb4.8++-dev

sudo apt-get update && sudo apt-get upgrade

git clone https://github.com/Betsplayer/Betsplayer_master.git

cd Betsplayer_master

make clean
cd src

cd leveldb

chmod +x build_detect_platform

make clean

make libleveldb.a libmemenv.a

cd ..

cd src

mkdir obj

chmod -R 7777 obj

cd obj/

mkdir zerocoin

chmod -R 7777 zerocoin

cd ..

make -f makefile.unix clean

make -f makefile.unix

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/* Pasta de Repositório do projeto*/

cd ~/
mkdir source_code
cd source_code

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/* Exemplo de função para renomear as informações */

find . -type f -print0 | xargs -0 sed -i 's/animalitycoin/BemTeViCoin/g'


find . -type f -print0 | xargs -0 sed -i 's/Animalitycoin/BemTeViCoin/g'
find . -type f -print0 | xargs -0 sed -i 's/AnimalityCoin/BemTeViCoin/g'
find . -type f -print0 | xargs -0 sed -i 's/AnimalityCoin-qt.pro/BemTeViCoin-
qt.pro/g'
find . -type f -print0 | xargs -0 sed -i 's/ANIMALITYCOIN/BemTeViCoin/g'
find . -type f -print0 | xargs -0 sed -i 's/ANTY/BTVC/g'

find . -type f -print0 | xargs -0 sed -i 's/Animality/BemTeViCoin/g'

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/* Alteração de Portas RPC e P2P */

find . -type f -print0 | xargs -0 sed -i 's/41590/51656/g'


find . -type f -print0 | xargs -0 sed -i 's/41589/51655/g'

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/* Alteração de Letra do endereço da moeda */

/*Mudar caracter da moeda - https://en.bitcoin.it/wiki/List_of_address_prefixes */

/* Va no arquivo - base58.h Linha 279*/

class CBitcoinAddress : public CBase58Data


{
public:
enum
{
PUBKEY_ADDRESS = 25, //Representa letra B maiusculo
SCRIPT_ADDRESS = 85,
PUBKEY_ADDRESS_TEST = 120,
SCRIPT_ADDRESS_TEST = 196,
};

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/* Criaçã das Keys da moeda - Sugiro que seja executado na raiz do projeto e
depositado em uma pasta "Keys" posteriormente*/

openssl ecparam -genkey -name secp256k1 -out alertkey.pem


openssl ec -in alertkey.pem -text > alertkey.hex
openssl ecparam -genkey -name secp256k1 -out testnetalert.pem
openssl ec -in testnetalert.pem -text > testnetalert.hex
openssl ecparam -genkey -name secp256k1 -out genesiscoinbase.pem
openssl ec -in testnetalert.pem -text > genesiscoinbase.hex

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
/* Passo de utilização da key criada */
/* Abra a chave criada testnetalert.hex - Copia a parte representada a baixo*/

pub:
04:cc:c3:67:36:a3:74:4a:d7:0d:e5:bc:2d:6d:d9:
26:01:8d:a5:1f:3b:dd:a2:b7:22:5c:86:2e:8a:27:
c2:ff:0d:c6:db:b3:f4:7e:de:91:aa:d1:f9:e7:63:
9b:35:f7:d1:1d:8a:83:94:da:b2:f2:9c:23:2a:bb:
c7:9c:84:7c:a5

/* Retire os sinais de 2 pontos e crie uma chave unica*/

04ccc36736a3744ad70de5bc2d6dd926018da51f3bdda2b7225c862e8a27c2ff0dc6dbb3f47ede91aad
1f9e7639b35f7d11d8a8394dab2f29c232abbc79c847ca5

/* Copie e cole em alert.cpp - Linha 25 "static const char* pszMainKey


=04ccc36736a3744ad70de5bc2d6dd926018da51f3bdda2b7225c862e8a27c2ff0dc6dbb3f47ede91aa
d1f9e7639b35f7d11d8a8394dab2f29c232abbc79c847ca5"*/

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/*Alteração dos NODES da moeda*/

/* Abra o arquivo net.cpp - Linha 1227 ou pesquise por // DNS seeds*/

/*Vai esta assim */

// DNS seeds
// Each pair gives a source name and a seed name.
// The first name is used as information source for addrman.
// The second name should resolve to a list of seed addresses.
static const char *strDNSSeed[][2] = {
{"exemple.node","exemple.node"}
};

/*Altere para */

// DNS seeds
// Each pair gives a source name and a seed name.
// The first name is used as information source for addrman.
// The second name should resolve to a list of seed addresses.
static const char *strDNSSeed[][2] = {
{"seu.node","seu.node"},
{"seu.node","seu.node"}
};

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/* Abra o arquivo main.cpp - Linha 43 - Altere conforme necessidade */

unsigned int nTargetSpacing = 3 * 60; // 3 minute


/* Abra o arquivo main.cpp - Linha 44 - Altere conforme necessidade */

unsigned int nStakeMinAge = 6 * 60 * 60; // 6 Hs

/* Abra o arquivo main.cpp - Linha 45 - Altere conforme necessidade */

unsigned int nStakeMaxAge = -1; // unlimited

/* Abra o arquivo main.cpp - Linha 46 - Altere conforme necessidade */

unsigned int nModifierInterval = 10 * 60; // time to elapse before new modifier is


computed

/* Abra o arquivo main.cpp - Linha 48 - Altere conforme necessidade */

int nCoinbaseMaturity = 15;

/* Abra o arquivo main.cpp - Linha 1001 - Altere conforme necessidade */

int64_t nSubsidy = 50 * COIN; //Block fixed

/* Abra o arquivo main.cpp - Linha 1051 - Altere conforme necessidade */

/* Caso queira fazer variação de POS - Deve ser alterado em main.h Linha 55*/

static const int64_t COIN_YEAR_REWARD = 1 * CENT;

/*Caso queira fazer variação de POS - Siga exemplo a baixo*/

int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees)


{
int64_t nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8);

if(nBestHeight <= 995){ //no POS


nSubsidy = nSubsidy * 0;
}
else if(nBestHeight <= 50000){ //F - 0 = POW
nSubsidy = nSubsidy * 285;
}
else if(nBestHeight <= 150000){ //F - 1
nSubsidy = nSubsidy * 295;
}
if (fDebug && GetBoolArg("-printcreation"))
printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRId64"\n",
FormatMoney(nSubsidy).c_str(), nCoinAge);

return nSubsidy + nFees;


}
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/* Abra o arquivo main.cpp - Linha 1119 - Altere conforme necessidade */

static const int64_t nTargetTimespan = 16 * 60; // 16 mins

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/* Abra o arquivo main.cpp - Linha 2632 ou pesquise por // Genesis block */

/* Altere a Fraze emtre aspas dupla, para uma de sua preferencia */

const char* pszTimestamp = "MinerStakeCoin";

/* Abra o arquivo main.cpp - Linha 2634 "txNew.nTime" e 2644 "block.nTime" */

/* Execute o comando no console linux e altere o nTime "date +%s" */

/* Altere o nTime das linhas a cima */

/* Em main.cpp altere a hashMerkleRoot */

/* Estara assim */

assert(block.hashMerkleRoot ==
uint256("0xc3a7ab92d079a7485965520d4a1918369ecfeaf2a86ae8f5449874c779c9321e"));

/* deve ficar assim */

assert(block.hashMerkleRoot == uint256("0x"));

/* Va ate main.h e altere a linha 57 */

/* Estara assim */

static const uint256


hashGenesisBlock("0x00000ea9f03e5ca5636a08d59f19e26be51b34aecefe0d046c1c3209c98a86a
5");

/* deve ficar assim */

static const uint256 hashGenesisBlock("0x");

/*Certifique se a linha 2648 esteja true como exemplo a baixo*/

if (true && (block.GetHash() != hashGenesisBlock)) {

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/*Comp 1° Fase */

cd leveldb/

chmod +x build_detect_platform
make clean
make libleveldb.a libmemenv.a

cd ..
make -f makefile.unix clean
make -f makefile.unix RELEASE=1
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/* Execute o "exemplecoind gerado */

cd src/
./thebigcoind -daemon

/* Isso vai gerar um erro*/

exemplecoind: main.cpp:linha: bool InitBlockIndex(): .................Aborted (core


dumped)

/* Vá ate a pasta da moeda */

cd ~
cd ./exemplecoin
sudo nano debug.log

/* No final do arquivo Copie a genesehash, hashMerkleRoot Gerada e a NONCE Altere


em main.cpp e no main.h*/
/* genesehash Linha 57 */
/* hashMerkleRoot Linha 2672 */
/* NONCE Linha 2646 */

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/*Compila 2° Fase */

cd ..
make -f makefile.unix clean
make -f makefile.unix RELEASE=1

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

/* Execute o novo "exemplecoind gerado */

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Error loading blkindex.dat

Em main.cpp comente a linha

/* // ppcoin: compute stake modifier


uint64_t nStakeModifier = 0;
bool fGeneratedStakeModifier = false;
if (!ComputeNextStakeModifier(pindexNew->pprev, nStakeModifier,
fGeneratedStakeModifier))
return error("AddToBlockIndex() : ComputeNextStakeModifier() failed");
pindexNew->SetStakeModifier(nStakeModifier, fGeneratedStakeModifier);
pindexNew->nStakeModifierChecksum = GetStakeModifierChecksum(pindexNew);
if (!CheckStakeModifierCheckpoints(pindexNew->nHeight, pindexNew-
>nStakeModifierChecksum))
return error("AddToBlockIndex() : Rejected by stake modifier checkpoint
height=%d, modifier=0x%016"PRIx64, pindexNew->nHeight, nStakeModifier);

*/
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

// miner's coin base reward


int64_t GetProofOfWorkReward(int64_t nFees)
{
int64_t nSubsidy = 50 * COIN; //Block fixed

if(nBestHeight == 0){ //PMiner


nSubsidy = 24000000 * COIN;
}
else if(nBestHeight <= 11){ // Swap
nSubsidy = 1000000 * COIN;
}
else if(nBestHeight <= 1000){ //F - 0 = POW
nSubsidy = 100 * COIN;
}
else if(nBestHeight <= 50000){ //F - 1
nSubsidy = 100 * COIN;
}
else if(nBestHeight <= 250000){ //F - 2
nSubsidy = 80 * COIN;
}
else if(nBestHeight <= 450000){ //F - 3
nSubsidy = 60 * COIN;
}
else if(nBestHeight <= 650000){ //F - 4
nSubsidy = 40 * COIN;
}
else if(nBestHeight <= 850000){ //F - 5
nSubsidy = 20 * COIN;
}
else if(nBestHeight <= 1050000){ //F - 6
nSubsidy = 10 * COIN;
}
else if(nBestHeight <= 1250000){ //F - 7
nSubsidy = 20 * COIN;
}
else if(nBestHeight <= 1500000) { //F - 8
nSubsidy = 60 * COIN;
}
else if(nBestHeight <= 200000) { //F - 9
nSubsidy = 80 * COIN;
}
else if(nBestHeight <= 2500000){ //F - 10
nSubsidy = 100 * COIN;
}

if (fDebug && GetBoolArg("-printcreation"))


printf("GetProofOfWorkReward() : create=%s nSubsidy=%"PRId64"\n",
FormatMoney(nSubsidy).c_str(), nSubsidy);

return nSubsidy + nFees;


}

// miner's coin stake reward based on coin age spent (coin-days)


int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees)
{
int64_t nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8);

if(nBestHeight <= 950){ //no POS


nSubsidy = nSubsidy * 0;
}
else if(nBestHeight <= 50000){ //F - 0 = POW
nSubsidy = nSubsidy * 285;
}
else if(nBestHeight <= 150000){ //F - 1
nSubsidy = nSubsidy * 295;
}
else if(nBestHeight <= 250000){ //F - 2
nSubsidy = nSubsidy * 305;
}
else if(nBestHeight <= 265000){ //BB - Bonus Block
nSubsidy = nSubsidy * 400;
}
else if(nBestHeight <= 275000){ //F - 2 B
nSubsidy = nSubsidy * 305;
}
else if(nBestHeight <= 450000){ //F - 3
nSubsidy = nSubsidy * 315;
}
else if(nBestHeight <= 650000){ //F - 4
nSubsidy = nSubsidy * 325;
}
else if(nBestHeight <= 700000){ //BB - Bonus Block
nSubsidy = nSubsidy * 500;
}
else if(nBestHeight <= 710000){ //F - 4 B
nSubsidy = nSubsidy * 325;
}
else if(nBestHeight <= 850000){ //F - 5
nSubsidy = nSubsidy * 335;
}
else if(nBestHeight <= 1050000){ //F - 6
nSubsidy = nSubsidy * 345;
}
else if(nBestHeight <= 1250000){ //F - 7
nSubsidy = nSubsidy * 355;
}
else if(nBestHeight <= 1500000) { //F - 8
nSubsidy = nSubsidy * 365;
}
else if(nBestHeight <= 200000) { //F - 9
nSubsidy = nSubsidy * 375;
}
else if(nBestHeight <= 3000000){ //F - 10
nSubsidy = nSubsidy * 385;
}
else if(nBestHeight <= 3050000){ //BB - Bonus Block
nSubsidy = nSubsidy * 600;
}
else if(nBestHeight <= 3200000){ //F - 10 B
nSubsidy = nSubsidy * 385;
}
else if(nBestHeight >= 3200001){ //END / INF
nSubsidy = nSubsidy * 200;
}

if (fDebug && GetBoolArg("-printcreation"))


printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRId64"\n",
FormatMoney(nSubsidy).c_str(), nCoinAge);

return nSubsidy + nFees;


}

Você também pode gostar