Bitcoin Forum
June 23, 2024, 10:40:00 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Mining (Altcoins) / BlockSubsidy reward on: October 04, 2021, 01:59:30 AM
Hi All

Alot of these altcoins have the GetBlockSubsidy method in regards to mining/rewards. In regards to rewards would be calculated as follows:

CAmount nSubsidy = 50 * COIN;


What stops someone from changing the above line of code to something ridiculous ie:

CAmount nSubsidy = 50000000 * COIN;

Wouldnt that cause the next block that is mined (against the above compiled line of code) to reward a ridiculious amount of coins?

Thanks
2  Alternate cryptocurrencies / Altcoin Discussion / Re: *** Complete Guide on How to Create a New Alt Coin – Update 2019 *** on: August 16, 2021, 06:57:55 AM
Hi

Was wondering if anyone has come across this error before when running the getblocktemplate method

error -10: bitcoin is downloading blocks...

I cant seem to get past this error. Has anyone ever experienced anything similar? Any suggestions welcomed.

Thanks

3  Alternate cryptocurrencies / Mining (Altcoins) / Re: Yiimp mining pool error on: August 12, 2021, 07:31:43 AM
ok i fixed the - 8 error by modding the php

Update /var/web/yaamp/modules/site/coin_results.php.
This is important for newer wallet versions. (we first noticed it in v0.18.1)
    if ($DCR || $DGB) {
    $account = '*';
} elseif ($ETH) {
    $account = $coin->master_wallet;
}
// Add your coin symbol here VVVVV
elseif ($coin->symbol == "RNG"||$coin->symbol == "TDC"||$coin->symbol == "OBTC") {
    $account = '*';
}

But still am getting the following on the yiimp server.

error -10: cerebralcoin is downloading blocks...

Anyone come across this before?
4  Alternate cryptocurrencies / Altcoin Discussion / Block rewards on: August 11, 2021, 06:59:16 AM
Hi All

Just creating an altcoin based of bitcoin. Was just wondering the following:

- In amount.h if i cahnge the maxmoney (for sanity check)

static const CAmount COIN = 100000000;

/** No amount larger than this (in satoshi) is valid.
 *
 * Note that this constant is *not* the total money supply, which in Cerebralcoin
 * currently happens to be less than 21,000,000 CEB for various reasons, but
 * rather a sanity check. As this sanity check is used by consensus-critical
 * validation code, the exact value of the MAX_MONEY constant is consensus
 * critical; in unusual circumstances like a(nother) overflow bug that allowed
 * for the creation of coins out of thin air modification could lead to a fork.
 * */
static const CAmount MAX_MONEY = 63000000000 * COIN;

That would imply the max money would be 63000000000 * 100000000.. that wont overflow will it?

- Also in regards to GetBlockSubsidy

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;

    CAmount nSubsidy = 150000 * COIN;
   
    nSubsidy >>= halvings;
    return nSubsidy;
}

I've change the nsubsidy to the above. So it should the above maths be right?
5  Alternate cryptocurrencies / Mining (Altcoins) / Re: Yiimp mining pool error on: August 11, 2021, 03:52:17 AM
Also when on the coin page (before I select coin properites) I have this displayed under the coin:

RPC Error: error -8: label argument must be a valid label name or "*".
6  Alternate cryptocurrencies / Mining (Altcoins) / Yiimp mining pool error on: August 11, 2021, 03:11:33 AM
Hi All

I created a new altcoin and tried to set up a yiimp mining pool. But I keep getting the following (In the coin properties):

error -10: cerebralcoin is downloading blocks...

I copied the sample config from the daemon tab. And put it on the same server (127.0.0.1). The coin is built on the same server and is running with the following parameters:

cerebralcoind  -deprecatedrpc=accounts -printtoconsole

Is there something I am missing?

Thanks
7  Alternate cryptocurrencies / Altcoin Discussion / Re: Altcoin error on: July 25, 2021, 09:04:53 AM
Yup changed it in there

static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
{
    const char* pszTimestamp = "BBC 2/Jul/2021 Italy beat England on penalties to win Euro 2020";
    const CScript genesisOutputScript = CScript() << ParseHex("040a5250da9b77dbc0055c01a8f0a5c65d84002267812548c0dc4d340a52ec3d1dcc748870a8ff4 12dee73a163ef33216f4f2e316cce85fe85d85f784a9cc08a42") << OP_CHECKSIG;
    return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
}

Tried again to create genesis block:
./genesis_generator 040a5250da9b77dbc0055c01a8f0a5c65d84002267812548c0dc4d340a52ec3d1dcc748870a8ff4 12dee73a163ef33216f4f2e316cce85fe85d85f784a9cc08a42 "BBC 2/Jul/2021 Italy beat England on penalties to win Euro 2020" 0x1e0ffff0

Coinbase: 010001043f42424320322f4a756c2f32303231204974616c79206265617420456e676c616e64206 f6e2070656e616c7469657320746f2077696e204575726f2032303230

PubkeyScript: 41040a5250da9b77dbc0055c01a8f0a5c65d84002267812548c0dc4d340a52ec3d1dcc748870a8f f412dee73a163ef33216f4f2e316cce85fe85d85f784a9cc08a42ac

Merkle Hash: 8aefb3a9fc1ca9746c3cbbbfc7a436a64c69d0dd829640e967576efaa70d2351
Byteswapped: 51230da7fa6e5767e9409682ddd0694ca636a4c7bfbb3c6c74a91cfca9b3ef8a
Generating block...
1680454 Hashes/s, Nonce 2841872302
Block found!
Hash: 00000000ff6b4a379aefb19c1d37825581c6735a43baea81f2695e4dea10103e
Nonce: 2843361029
Unix time: 1627201294



Using the values created:

genesis = CreateGenesisBlock(1627201294, 2843361029, 0x1e0ffff0, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x00000000ff6b4a379aefb19c1d37825581c6735a43baea81f2695e4dea10103e")); //seems to be wrong
assert(genesis.hashMerkleRoot == uint256S("0x51230da7fa6e5767e9409682ddd0694ca636a4c7bfbb3c6c74a91cfca9b3ef8a")); //using byteswapped

I cant seem to find what i have done wrong. I keep getting the following:
cerebralcoind: chainparams.cpp:190: CMainParams::CMainParams(): Assertion `consensus.hashGenesisBlock == uint256S("0x00000000ff6b4a379aefb19c1d37825581c6735a43baea81f2695e4dea10103e")' failed.
Aborted (core dumped)

8  Alternate cryptocurrencies / Altcoin Discussion / Re: Altcoin error on: July 24, 2021, 02:55:56 AM
./genesis_generator 040a5250da9b77dbc0055c01a8f0a5c65d84002267812548c0dc4d340a52ec3d1dcc748870a8ff4 12dee73a163ef33216f4f2e316cce85fe85d85f784a9cc08a42 "BBC 2/Jul/2021 Italy beat England on penalties to win Euro 2020" 0x1e0ffff0

Coinbase: 010001043f42424320322f4a756c2f32303231204974616c79206265617420456e676c616e64206 f6e2070656e616c7469657320746f2077696e204575726f2032303230

PubkeyScript: 41040a5250da9b77dbc0055c01a8f0a5c65d84002267812548c0dc4d340a52ec3d1dcc748870a8f f412dee73a163ef33216f4f2e316cce85fe85d85f784a9cc08a42ac

Merkle Hash: 8aefb3a9fc1ca9746c3cbbbfc7a436a64c69d0dd829640e967576efaa70d2351
Byteswapped: 51230da7fa6e5767e9409682ddd0694ca636a4c7bfbb3c6c74a91cfca9b3ef8a
Generating block...
1600507 Hashes/s, Nonce 171116727
Block found!
Hash: 0000000098024f2ee61aa77cf797ebaf6b96b0eca7106b554c086c2b87672d73
Nonce: 171975643
Unix time: 1627093404

I tried the script and got the above. so added the required lines:
    genesis = CreateGenesisBlock(1627093404, 171975643, 0x1e0ffff0, 1, 50 * COIN);
    consensus.hashGenesisBlock = genesis.GetHash();
    assert(consensus.hashGenesisBlock == uint256S("0x0000000098024f2ee61aa77cf797ebaf6b96b0eca7106b554c086c2b87672d73"));
    assert(genesis.hashMerkleRoot == uint256S("0x51230da7fa6e5767e9409682ddd0694ca636a4c7bfbb3c6c74a91cfca9b3ef8a"));

But go the following when i ran:

CMainParams::CMainParams(): Assertion `consensus.hashGenesisBlock == uint256S("0x0000000098024f2ee61aa77cf797ebaf6b96b0eca7106b554c086c2b87672d73")' failed.
Aborted (core dumped)

So seems like the genesisBlock isnt right maybe?

9  Alternate cryptocurrencies / Altcoin Discussion / Re: Altcoin error on: July 23, 2021, 06:46:39 AM
Additional info:

2021-07-23T06:43:24Z init message: Loading block index...
2021-07-23T06:43:24Z Opening LevelDB in /home/ubuntu/.cerebralcoin/blocks/index
2021-07-23T06:43:24Z Opened LevelDB successfully
2021-07-23T06:43:24Z Using obfuscation key for /home/ubuntu/.cerebralcoin/blocks/index: 0000000000000000
2021-07-23T06:43:24Z ERROR: LoadBlockIndexGuts: CheckProofOfWork failed: CBlockIndex(pprev=0, nHeight=0, merkle=c298c8e917156163387f87789bf0d933a4f1e9ef07d72250907af59b407f02ef, hashBlock=00000000f5cc3785e66f40b2ccfa9b44997b8c5d4df7c4af3f03d999b1582fe1)
2021-07-23T06:43:24Z : Error loading block database.
Please restart with -reindex or -reindex-chainstate to recover.
: Error loading block database.
Please restart with -reindex or -reindex-chainstate to recover.
2021-07-23T06:43:24Z Aborted block database rebuild. Exiting.
2021-07-23T06:43:24Z Shutdown: In progress...
2021-07-23T06:43:24Z scheduler thread interrupt
2021-07-23T06:43:24Z Shutdown: done


Also if i restart iwth the -reindex flag it just locks up
10  Alternate cryptocurrencies / Altcoin Discussion / Altcoin error on: July 23, 2021, 06:38:44 AM
Hi All

Just trying to create a altocoin but keep getting the following:

ERROR: LoadBlockIndexGuts: CheckProofOfWork failed: CBlockIndex(pprev=0, nHeight=0, merkle=c298c8e917156163387f87789bf0d933a4f1e9ef07d72250907af59b407f02ef, hashBlock=00000000f5cc3785e66f40b2ccfa9b44997b8c5d4df7c4af3f03d999b1582fe1)


I used the following method to mine my genesis block:
https://bitcointalk.org/index.php?topic=5134256.0

It seems like it got the right details for main and test net. If i put a random genesis block it fails with the following:

chainparams.cpp:257: CTestNetParams::CTestNetParams(): Assertion `consensus.hashGenesisBlock == uint256S("0x00000000f59f133f1c0b427081a348db846d8cfc919d478a4b0e3529dcb8aezz")' failed.
Aborted (core dumped)


Any help would be much appreciated.

Thanks

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!