Bitcoin Forum
November 17, 2024, 01:10:40 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: null  (Read 711 times)
urfl241 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
April 30, 2014, 10:40:19 PM
Last edit: August 16, 2014, 07:46:46 PM by urfl241
 #1

null
PereguineBerty
Member
**
Offline Offline

Activity: 109
Merit: 35


View Profile
May 03, 2014, 06:02:29 PM
 #2

You mentioned the Qt crashing.

You would be best to run things from the daemon at this stage as Qt wallets do have a habit of crashing when running RPC commands if the compiler flags aren't spot-on. This seems most prevalent in Windows but can happen in Linux. Just compile the daemon only and try to see what happens when you mine with that.
bee7
Hero Member
*****
Offline Offline

Activity: 574
Merit: 523


View Profile
May 04, 2014, 02:49:57 AM
 #3

Try to issue the getblocktemplate command without setting setgenerate:

Code:
litecoind getblocktemplate
or
Code:
litecoind getblocktemplate '{"mode":"template"}'
if the first variant doesn't work.

What happens?
bee7
Hero Member
*****
Offline Offline

Activity: 574
Merit: 523


View Profile
May 04, 2014, 02:57:21 AM
 #4

Try to issue the getblocktemplate command without setting setgenerate:

Code:
litecoind getblocktemplate
or
Code:
litecoind getblocktemplate '{"mode":"template"}'
if the first variant doesn't work.

What happens?

QT: Litecoin is downloading blocks... (code -10)
Daemon: hi@UbuntuVM1:~/Desktop/lz/src$ error:{"code":-10,"message":"Litecoin is downloading blocks..."}

Connect it with the other daemon and retry the command, please
bee7
Hero Member
*****
Offline Offline

Activity: 574
Merit: 523


View Profile
May 04, 2014, 02:33:04 PM
 #5

Connect it with the other daemon and retry the command, please

Ok, I now have 2 Ubuntu Linux machines running a freshly compiled daemon. One is a virtual machine, the other is a laptop.

The laptop is running ./litecoind &
The virtual machine is running ./litecoind -connect=192.168.40.3 &


Both daemon's give this:

Code:
hi@UbuntuVM1:~/Desktop/lz/src$ ./litecoind getblocktemplate '{"mode":"template"}'
error: {"code":-10,"message":"Litecoin is downloading blocks..."}
hi@UbuntuVM1:~/Desktop/lz/src$

Then recreate the genesis block with the updated creation time, so its time within the same 24h period as current time.
Then retry getblocktemplate call and setgenerate in this order.
If getblocktemplate succeeds but the setgenerate fails then try to find a block with external miner like minerd or cgminer.
If both methods (setgenerate and mining with external mining) fails then most likely some parameters that control the new difficulty calculation are improperly selected.


bee7
Hero Member
*****
Offline Offline

Activity: 574
Merit: 523


View Profile
May 04, 2014, 04:55:41 PM
 #6


I changed some of the difficulty parameters around (like you said) and got it mining. Subsidy was = to 0 and not 1.

However now my custom difficulty algorithm isn't the same. I'm trying to have the block reward reduced by 0.00005 every block. But this code obviously didn't work.

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 50 * COIN - (nHeight * COIN / 20000);

    // Subsidy is reduced by 0.00005 every block
    nSubsidy >>= (nHeight / 0);

    return nSubsidy + nFees;
}

Quote
nSubsidy >>= (nHeight / 0);

what is the result of division by zero? Wink
bee7
Hero Member
*****
Offline Offline

Activity: 574
Merit: 523


View Profile
May 04, 2014, 07:04:53 PM
 #7


I changed some of the difficulty parameters around (like you said) and got it mining. Subsidy was = to 0 and not 1.

However now my custom difficulty algorithm isn't the same. I'm trying to have the block reward reduced by 0.00005 every block. But this code obviously didn't work.

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 50 * COIN - (nHeight * COIN / 20000);

    // Subsidy is reduced by 0.00005 every block
    nSubsidy >>= (nHeight / 0);

    return nSubsidy + nFees;
}

Quote
nSubsidy >>= (nHeight / 0);

what is the result of division by zero? Wink

I was hoping that subsidy would never half. So the payout decreases by 0.00005 consistently until it reaches 0 after 1,000,001 blocks. Thus removing the need for a halving rate.

The division by zero has undefined result in mathematics and causes exception or abnormal termination in most implementations of computer languages. The hope is a thing for soul and faith.
If you like to remove halving then you need to remove the complete statement, not just set the divisor to zero.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!