Bitcoin Forum
April 24, 2024, 11:02:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 [59] 60 »
  Print  
Author Topic: Building headless Bitcoin and Bitcoin-qt on Windows  (Read 419323 times)
mmortal03
Legendary
*
Offline Offline

Activity: 1762
Merit: 1010


View Profile
March 14, 2017, 11:21:08 AM
 #1161

Here are my steps that work. I'm pretty sure that some of the following steps are unnecessary, but I know that it works.

If anyone can help cut out the stuff that's superfluous, that'd be great.

Steps to compile Bitcoin Core 64-bit using "Bash on Ubuntu on Windows":

//To run this on your system, change the user directory of "mmortal03" in the steps below to whatever your bash user name is.

sudo apt-get update
sudo apt-get upgrade
//restart bash to be safe

sudo apt-get install -y build-essential libtool autotools-dev autoconf automake curl
sudo apt-get install -y libqt5gui5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev
sudo apt-get install -y libqt5core5a pkg-config git libdb4.8-dev libdb4.8++-dev
sudo apt-get install -y g++-mingw-w64-i686 mingw-w64-i686-dev g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
//restart bash to be safe

git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin
git checkout v0.14.0
//or git checkout master
//or git checkout f8a709161f3710fe62e05988a9101933944489fb .

cd /home/mmortal03/bitcoin/depends
make HOST=x86_64-w64-mingw32 -j4

cd /home/mmortal03/bitcoin/src/secp256k1
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --prefix=$PWD/depends/x86_64-w64-mingw32
make HOST=x86_64-w64-mingw32 -j4

cd /home/mmortal03/bitcoin/src/univalue
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --prefix=$PWD/depends/x86_64-w64-mingw32
make HOST=x86_64-w64-mingw32 -j4

cd /home/mmortal03/bitcoin
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --prefix=$PWD/depends/x86_64-w64-mingw32 --with-gui=qt5 --enable-tests=no --disable-gui-tests --disable-bench
make -k HOST=x86_64-w64-mingw32 -j4
//ignore any invalid pointer errors here, as the clean in next step should fix it

make clean
make HOST=x86_64-w64-mingw32 -j4

You can browse to C:\Users\mmortal03\AppData\Local\lxss\home\mmortal03\bitcoin,
and search for *.exe to pull up the executables. Copy them elsewhere and you should be good to go.
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713956568
Hero Member
*
Offline Offline

Posts: 1713956568

View Profile Personal Message (Offline)

Ignore
1713956568
Reply with quote  #2

1713956568
Report to moderator
1713956568
Hero Member
*
Offline Offline

Posts: 1713956568

View Profile Personal Message (Offline)

Ignore
1713956568
Reply with quote  #2

1713956568
Report to moderator
nomadsena
Member
**
Offline Offline

Activity: 93
Merit: 10


View Profile
April 14, 2017, 01:42:56 PM
 #1162

hi
dose anyone here know how to compile windows qt wallet for altcoins or can someone point me a link to some guide. It would be a huge help. thanks
AdolfinWolf
Legendary
*
Offline Offline

Activity: 1946
Merit: 1427


View Profile
April 24, 2017, 12:10:31 PM
Last edit: April 24, 2017, 12:45:23 PM by AdolfinWolf
 #1163

Not sure what i am doing wrong, and if this an error i should care about, when i try to "make" berkeley, see


Quote
2.2 Berkeley DB: http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
We'll use version 4.8 to preserve binary wallet compatibility.
From a MinGW shell unpack the source archive, configure and make:








I get this error. Does anyone knows what i am doing wrong, and how i could resolve it?

I've set this

Quote
1.3. Ensure that mingw-builds bin folder is set in your PATH environment variable. On Windows 7 your path should look something like:
Code:

Code:
C:\mingw32\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\ 

As my path in environment variables, is that correct? Or?

It looks like this,



I've simply pasted it in there, i am not sure if that is the right thing to do?


ARTISTCOLONY
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
May 23, 2017, 06:44:49 PM
 #1164

DOGE===> is it easy to build? Cool lol
hexafraction
Sr. Member
****
Offline Offline

Activity: 392
Merit: 259

Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ


View Profile
May 23, 2017, 08:21:01 PM
 #1165

Is the DOGE client easy to build?

Not much of a difference; shouldn't be hard to build with similar steps and a proper toolchain. Also, I've revised your message (in my quote of it) to better convey your inquiry without useless fluff.

I have recently become active again after a long period of inactivity. Cryptographic proof that my account has not been compromised is available.
ARTISTCOLONY
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
May 23, 2017, 10:49:17 PM
 #1166

Is the DOGE client easy to build?

Not much of a difference; shouldn't be hard to build with similar steps and a proper toolchain. Also, I've revised your message (in my quote of it) to better convey your inquiry without useless fluff.

i was able to do bitcoin 9 and 10 using the op!! .... ETC ethereum i might give it a whirl sometime ~ visual studio i'm going to check out BTC way too<<<
Table8
Newbie
*
Offline Offline

Activity: 33
Merit: 0


View Profile
June 12, 2017, 02:56:50 PM
Last edit: June 20, 2017, 03:36:56 PM by Table8
 #1167

I'm having an issue compiling an alt qt. From what I can tell, this is an issue with building a static/shared dependency miniupnpc. For the life of me I can't get past this error though no matter what I try.

Things I've tried;
  • Compile shared and static miniupnpc with  mingw32-make makefile.mingw upnpc-shared/static
  • Tried disabling miniupnpc by qmake use_upnp=-
  • Tried grabbing an old version of miniupnpc and using that
  • Successfully built Bitcoind and Bitcoin-QT to make sure all deps were good

Here is the error.
Code:
./build\net.o:net.cpp:(.text+0x8673): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x86aa): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x86eb): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x8767): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x877a): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8867): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x897b): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x899a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89a9): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x20 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:311: recipe for target 'release\coin-qt.exe' failed
mingw32-make: *** [release\coin-qt.exe] Error 1

Any suggestions or guidance would be much appreciated.

Well my apologies. 5 minutes after posting this I figured it out. Based on this, I figured out that I needed to add this line to my Makefile.Release generated by qmake.

Code:
DEFINES       = -DMINIUPNP_STATICLIB

I am getting same error.
Tried adding line below to Make.Release file still same error.
Code:
DEFINES       = -DMINIUPNP_STATICLIB

Here's the error code.
Code:
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x892a): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x896b): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x89e7): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89fa): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8ae7): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x8b73): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x8bfb): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x8c1a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x8c29): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x960 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\mycoin-qt.exe' failed
mingw32-make: *** [release\mycoin-qt.exe] Error 1

C:\mycoin>

anything to fix in net.cpp?

Thanks in advance.

Update.
Solved....

Managed to compiled qt without UPNP.

Now the problem is I can not connect 2 wallet peering because UPNP is disabled and have not set up nodes yet on my vps.
Error 'connections timeout' continuously.

Tried adding private IPs of both client machines in both clients .conf files.

Any trick to connect 2 clients peering without UPNP.
Or trick to enable UPNP without re-compiling.

Thanks in advance.


Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

main.h
/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 1000000;                      // 1000KB block hard limit
/** Obsolete: maximum size for mined blocks */
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/4;         // 250KB  block soft limit
/** Default for -blockmaxsize, maximum size for mined blocks **/
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 250000;
/** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 17000;
/** The maximum size for transactions we're willing to relay/mine */
static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 25;
/** The maximum size of a blk?Huh?.dat file (since 0.Cool */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?Huh?.dat files (since 0.Cool */
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
/** The pre-allocation chunk size for rev?Huh?.dat files (since 0.Cool */
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.Cool */
static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
/** Dust Soft Limit, allowed with additional fee per output */
static const int64 DUST_SOFT_LIMIT = 100000; // 0.001 MYCOIN
/** Dust Hard Limit, ignored as wallet inputs (mininput default) */
static const int64 DUST_HARD_LIMIT = 1000;   // 0.00001 MYCOIN mininput
/** No amount larger than this (in satoshi) is valid */
static const int64 MAX_MONEY = 10000000 * COIN;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 1;
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
/** Maximum number of script-checking threads allowed */
static const int MAX_SCRIPTCHECK_THREADS = 16;
#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
static const int fHaveUPnP = false;
#endif


main.cpp

    int64 nSubsidy = 10000000 * COIN;
static const int64 nTargetTimespan = 10 * 30; // MYCOIN: 5 minutes
static const int64 nTargetSpacing = 1 * 30; // MYCOIN: 30 seconds

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.
bushstar
Hero Member
*****
Offline Offline

Activity: 617
Merit: 531


View Profile
June 21, 2017, 07:03:48 PM
 #1168

Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.

You want to do the following in the GetBlockValue in main.cpp, this will generate 10 million a block until after 100 blocks making 1 billion total.

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 10000000 * COIN;

    if (nHeight > 100)
       nSubsidy = 0 * COIN;

    return nSubsidy + nFees;
}

For the UPNP issue try replacing the USE_UPNP line with this one, it is what gets rid of your error for me.

Code:
DEFINES += USE_UPNP=$$USE_UPNP MINIUPNP_STATICLIB

AIRCOINDEV O
Member
**
Offline Offline

Activity: 105
Merit: 10

Proteus?


View Profile WWW
June 22, 2017, 09:02:02 PM
 #1169

I'm having an issue compiling an alt qt. From what I can tell, this is an issue with building a static/shared dependency miniupnpc. For the life of me I can't get past this error though no matter what I try.

Things I've tried;
  • Compile shared and static miniupnpc with  mingw32-make makefile.mingw upnpc-shared/static
  • Tried disabling miniupnpc by qmake use_upnp=-
  • Tried grabbing an old version of miniupnpc and using that
  • Successfully built Bitcoind and Bitcoin-QT to make sure all deps were good

Here is the error.
Code:
./build\net.o:net.cpp:(.text+0x8673): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x86aa): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x86eb): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x8767): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x877a): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8867): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x897b): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x899a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89a9): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x20 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:311: recipe for target 'release\coin-qt.exe' failed
mingw32-make: *** [release\coin-qt.exe] Error 1

Any suggestions or guidance would be much appreciated.

Well my apologies. 5 minutes after posting this I figured it out. Based on this, I figured out that I needed to add this line to my Makefile.Release generated by qmake.

Code:
DEFINES       = -DMINIUPNP_STATICLIB

I am getting same error.
Tried adding line below to Make.Release file still same error.
Code:
DEFINES       = -DMINIUPNP_STATICLIB

Here's the error code.
Code:
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x892a): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x896b): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x89e7): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89fa): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8ae7): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x8b73): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x8bfb): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x8c1a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x8c29): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x960 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\mycoin-qt.exe' failed
mingw32-make: *** [release\mycoin-qt.exe] Error 1

C:\mycoin>

anything to fix in net.cpp?

Thanks in advance.

Update.
Solved....

Managed to compiled qt without UPNP.

Now the problem is I can not connect 2 wallet peering because UPNP is disabled and have not set up nodes yet on my vps.
Error 'connections timeout' continuously.

Tried adding private IPs of both client machines in both clients .conf files.

Any trick to connect 2 clients peering without UPNP.
Or trick to enable UPNP without re-compiling.

Thanks in advance.


Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

main.h
/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 1000000;                      // 1000KB block hard limit
/** Obsolete: maximum size for mined blocks */
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/4;         // 250KB  block soft limit
/** Default for -blockmaxsize, maximum size for mined blocks **/
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 250000;
/** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 17000;
/** The maximum size for transactions we're willing to relay/mine */
static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 25;
/** The maximum size of a blk?Huh?.dat file (since 0.Cool */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?Huh?.dat files (since 0.Cool */
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
/** The pre-allocation chunk size for rev?Huh?.dat files (since 0.Cool */
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.Cool */
static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
/** Dust Soft Limit, allowed with additional fee per output */
static const int64 DUST_SOFT_LIMIT = 100000; // 0.001 MYCOIN
/** Dust Hard Limit, ignored as wallet inputs (mininput default) */
static const int64 DUST_HARD_LIMIT = 1000;   // 0.00001 MYCOIN mininput
/** No amount larger than this (in satoshi) is valid */
static const int64 MAX_MONEY = 10000000 * COIN;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 1;
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
/** Maximum number of script-checking threads allowed */
static const int MAX_SCRIPTCHECK_THREADS = 16;
#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
static const int fHaveUPnP = false;
#endif


main.cpp

    int64 nSubsidy = 10000000 * COIN;
static const int64 nTargetTimespan = 10 * 30; // MYCOIN: 5 minutes
static const int64 nTargetSpacing = 1 * 30; // MYCOIN: 30 seconds

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.


How did you get past this? I'm still stuck.  Your post doesn't tell me how to solve it, specifically you compiled the qt w/ out UPNP

"Let's make money out of AIR,".  - an AIRcoin user
AIRCOINDEV O
Member
**
Offline Offline

Activity: 105
Merit: 10

Proteus?


View Profile WWW
June 22, 2017, 09:03:53 PM
 #1170

Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.

You want to do the following in the GetBlockValue in main.cpp, this will generate 10 million a block until after 100 blocks making 1 billion total.

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 10000000 * COIN;

    if (nHeight > 100)
       nSubsidy = 0 * COIN;

    return nSubsidy + nFees;
}

For the UPNP issue try replacing the USE_UPNP line with this one, it is what gets rid of your error for me.

Code:
DEFINES += USE_UPNP=$$USE_UPNP MINIUPNP_STATICLIB

Which UPNP line? The one in *coinqt.pro? I tried that and it didn't overcome the problem for me: I'm using Windows 8.1 to do this, on normal Windows CMD and mingw49, boost 1.55..., miniupnpc.1.9.2015... db.4.8.30.NC, openssl-1.0.1j, Qt version 4.8.6

"Let's make money out of AIR,".  - an AIRcoin user
AIRCOINDEV O
Member
**
Offline Offline

Activity: 105
Merit: 10

Proteus?


View Profile WWW
June 23, 2017, 02:56:02 AM
Last edit: June 23, 2017, 03:09:40 AM by AIRCOINDEV O
 #1171

Code:
include\QtGui" -I"..\Qt\4.8.6\include" -I"src" -I"src\json" -I"src\qt" -I"..\deps"
 -I"MINIUPNPC_LIB_PATH=C:\deps\miniupnpc" -I"src\leveldb\include" -I"src\leveldb
\helpers" -I"..\deps\boost_1_55_0" -I"..\deps\db-4.8.30.NC\build_unix" -I"..\dep
s\openssl-1.0.1j\include" -I"..\deps\qrencode-3.4.4" -I"..\Qt\4.8.6\include\Acti
veQt" -I"build" -I"build" -I"..\Qt\4.8.6\mkspecs\default" -o build\qrc_bitcoin.o
 release\qrc_bitcoin.cpp
g++ -Wl,--dynamicbase -Wl,--nxcompat -Wl,--large-address-aware -static -static-l
ibgcc -static-libstdc++ -Wl,-s -mthreads -Wl,-subsystem,windows -o release\clone
coin-qt.exe object_script.clonecoin-qt.Release  -L"c:\Qt\4.8.6\lib" -lmingwthrd
-lmingw32 -lqtmain build\bitcoin-qt_res.o -lqrencode -lminiupnpc -liphlpapi C:/C
lonecoin/src/leveldb/libleveldb.a C:/Clonecoin/src/leveldb/libmemenv.a -lshlwapi
 -LC:\deps\boost_1_55_0/stage/lib -LC:\deps\db-4.8.30.NC\build_unix -LC:\deps\op
enssl-1.0.1j -LC:\deps\qrencode-3.4.4\.libs -lssl -lcrypto -ldb_cxx -lshlwapi -l
mswsock -lboost_system-mgw49-mt-s-1_55 -lboost_filesystem-mgw49-mt-s-1_55 -lboos
t_program_options-mgw49-mt-s-1_55 -lboost_thread-mgw49-mt-s-1_55 -lboost_chrono-
mgw49-mt-s-1_55 -lQtGui -lQtNetwork -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinm
m -lwinspool -lmsimg32 -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -lu
ser32 -lkernel32
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -lminiupnpc
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\clonecoin-qt.exe' failed
mingw32-make: *** [release\clonecoin-qt.exe] Error 1

The above is the result when I compile in regular old Windows CMD with what you see below in my *coin-qt.pro file.

Code:
# Dependency library locations can be customized with:
#    BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
#    BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_55
BOOST_INCLUDE_PATH=C:\deps\boost_1_55_0
BOOST_LIB_PATH=C:\deps\boost_1_55_0\stage\lib
BDB_INCLUDE_PATH=C:\deps\db-4.8.30.NC\build_unix
BDB_LIB_PATH=C:\deps\db-4.8.30.NC\build_unix
OPENSSL_INCLUDE_PATH=C:\deps\openssl-1.0.1j\include
OPENSSL_LIB_PATH=C:\deps\openssl-1.0.1j
MINIUPNPC_INCLUDE_PATH=C:\deps\
MINIUPNPC_LIB_PATH=C:\deps\miniupnpc
QRENCODE_INCLUDE_PATH=C:\deps\qrencode-3.4.4
QRENCODE_LIB_PATH=C:\deps\qrencode-3.4.4\.libs
OBJECTS_DIR = build
MOC_DIR = build
UI_DIR = build



"Let's make money out of AIR,".  - an AIRcoin user
powerfull
Sr. Member
****
Offline Offline

Activity: 249
Merit: 250


View Profile
July 08, 2017, 09:26:53 AM
 #1172

windows7 -- with secp256k1  ,the error as follow , how to fix it , thanks


Code:
./build\key.o:key.cpp:(.text+0x79a): undefined reference to `secp256k1_context_d
estroy'
./build\key.o:key.cpp:(.text+0x8b8): undefined reference to `secp256k1_nonce_fun
ction_rfc6979'
./build\key.o:key.cpp:(.text+0x8f3): undefined reference to `secp256k1_ecdsa_sig
n_recoverable'
./build\key.o:key.cpp:(.text+0x919): undefined reference to `secp256k1_ecdsa_rec
overable_signature_serialize_compact'
./build\key.o:key.cpp:(.text+0x98a): undefined reference to `secp256k1_ecdsa_rec
overable_signature_serialize_compact'
./build\key.o:key.cpp:(.text+0xa75): undefined reference to `secp256k1_nonce_fun
ction_rfc6979'
./build\key.o:key.cpp:(.text+0xa9d): undefined reference to `secp256k1_ecdsa_sig
n'
./build\key.o:key.cpp:(.text+0xadc): undefined reference to `secp256k1_ecdsa_sig
nature_serialize_der'
./build\key.o:key.cpp:(.text+0xe89): undefined reference to `secp256k1_ec_pubkey
_create'
./build\key.o:key.cpp:(.text+0xf3c): undefined reference to `secp256k1_ec_pubkey
_serialize'
./build\key.o:key.cpp:(.text+0x11a8): undefined reference to `secp256k1_ec_privk
ey_tweak_add'
./build\key.o:key.cpp:(.text+0x144a): undefined reference to `secp256k1_ec_secke
y_verify'
./build\key.o:key.cpp:(.text+0x15b2): undefined reference to `secp256k1_context_
create'
./build\key.o:key.cpp:(.text+0x15e0): undefined reference to `secp256k1_context_
randomize'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\key.o: bad reloc address 0x1c in section `.text$_ZN21LockedPag
eManagerBaseI16MemoryPageLockerE11UnlockRangeEPvj[__ZN21LockedPageManagerBaseI16
MemoryPageLockerE11UnlockRangeEPvj]'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Nikoloz
Sr. Member
****
Offline Offline

Activity: 284
Merit: 252


View Profile
July 09, 2017, 03:27:39 AM
 #1173

Hi All ! where I can download  wallet qt ?
xgast
Newbie
*
Offline Offline

Activity: 35
Merit: 0


View Profile
July 09, 2017, 09:04:40 AM
 #1174

Hi All ! where I can download  wallet qt ?

Just to share.., the storage space of bitcoin wallet (bitcoin wallet) is divided into 2 types:
1. Online wallet (ewallet)
2. Wallet computer
Online wallet (ewallet) uses a website already provided by online wallet / wallet service providers. The computer wallet is installed on your computer. Both wallet / wallet above have their own weaknesses and advantages.

If you want to use bitcoin wallet immediately you can use online bitcoin storage service or called ewallet are:
1. Blockchain.info
2. Coinbase.com
3. Strongcoin.com
The above providers can be trusted.

Beside online wallet there are 2 ways to create a wallet computer:
1. Bitcoin.qt
2. Multibit

Bitcoin.qt is the original wallet that has a very complete function with excellent security. You can download the wallet here.. https://bitcoin.org/en/choose-your-wallet. It takes quite a long time to synchronize with the bitcoin network each time we use. File sizenya also very large reach up to tens of gigabite. While multibit is much different from bitcoin.qt. Multibit very light, speed and ease of use. The time required for synchronization in just minutes. I hope it’s help for some newbie.
freemanjackal
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250


View Profile
July 24, 2017, 01:12:14 PM
 #1175

i would like to compile the windows binaries in ubuntu, any useful guide??
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
July 24, 2017, 04:32:44 PM
 #1176

i would like to compile the windows binaries in ubuntu, any useful guide??
There are instructions for cross compiling here: https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md

luanptit
Full Member
***
Offline Offline

Activity: 278
Merit: 100


View Profile
July 25, 2017, 05:42:48 PM
 #1177

I'm having an issue compiling an alt qt. From what I can tell, this is an issue with building a static/shared dependency miniupnpc. For the life of me I can't get past this error though no matter what I try.

Things I've tried;
  • Compile shared and static miniupnpc with  mingw32-make makefile.mingw upnpc-shared/static
  • Tried disabling miniupnpc by qmake use_upnp=-
  • Tried grabbing an old version of miniupnpc and using that
  • Successfully built Bitcoind and Bitcoin-QT to make sure all deps were good

Here is the error.
Code:
./build\net.o:net.cpp:(.text+0x8673): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x86aa): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x86eb): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x8767): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x877a): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8867): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x897b): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x899a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89a9): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x20 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:311: recipe for target 'release\coin-qt.exe' failed
mingw32-make: *** [release\coin-qt.exe] Error 1

Any suggestions or guidance would be much appreciated.

Well my apologies. 5 minutes after posting this I figured it out. Based on this, I figured out that I needed to add this line to my Makefile.Release generated by qmake.

Code:
DEFINES       = -DMINIUPNP_STATICLIB

I am getting same error.
Tried adding line below to Make.Release file still same error.
Code:
DEFINES       = -DMINIUPNP_STATICLIB

Here's the error code.
Code:
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x892a): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x896b): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x89e7): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89fa): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8ae7): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x8b73): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x8bfb): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x8c1a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x8c29): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x960 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\mycoin-qt.exe' failed
mingw32-make: *** [release\mycoin-qt.exe] Error 1

C:\mycoin>

anything to fix in net.cpp?

Thanks in advance.

Update.
Solved....

Managed to compiled qt without UPNP.

Now the problem is I can not connect 2 wallet peering because UPNP is disabled and have not set up nodes yet on my vps.
Error 'connections timeout' continuously.

Tried adding private IPs of both client machines in both clients .conf files.

Any trick to connect 2 clients peering without UPNP.
Or trick to enable UPNP without re-compiling.

Thanks in advance.


Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

main.h
/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 1000000;                      // 1000KB block hard limit
/** Obsolete: maximum size for mined blocks */
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/4;         // 250KB  block soft limit
/** Default for -blockmaxsize, maximum size for mined blocks **/
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 250000;
/** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 17000;
/** The maximum size for transactions we're willing to relay/mine */
static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 25;
/** The maximum size of a blk?Huh?.dat file (since 0.Cool */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?Huh?.dat files (since 0.Cool */
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
/** The pre-allocation chunk size for rev?Huh?.dat files (since 0.Cool */
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.Cool */
static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
/** Dust Soft Limit, allowed with additional fee per output */
static const int64 DUST_SOFT_LIMIT = 100000; // 0.001 MYCOIN
/** Dust Hard Limit, ignored as wallet inputs (mininput default) */
static const int64 DUST_HARD_LIMIT = 1000;   // 0.00001 MYCOIN mininput
/** No amount larger than this (in satoshi) is valid */
static const int64 MAX_MONEY = 10000000 * COIN;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 1;
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
/** Maximum number of script-checking threads allowed */
static const int MAX_SCRIPTCHECK_THREADS = 16;
#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
static const int fHaveUPnP = false;
#endif


main.cpp

    int64 nSubsidy = 10000000 * COIN;
static const int64 nTargetTimespan = 10 * 30; // MYCOIN: 5 minutes
static const int64 nTargetSpacing = 1 * 30; // MYCOIN: 30 seconds

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.

Hi, how to solve this problem friend?
Code:
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x960 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\mycoin-qt.exe' failed
mingw32-make: *** [release\mycoin-qt.exe] Error 1
ermaxinc
Sr. Member
****
Offline Offline

Activity: 369
Merit: 252



View Profile
August 12, 2017, 09:33:44 PM
 #1178

Nice guide. Thank you.
Bit how its use for other protocol, example like x13?
How its use for altcoin?
JUNGWOO CHOI
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
August 16, 2017, 02:49:56 AM
 #1179

Hi~ This is jungwoo

I don't know this situation...

https://bitcointalk.org/index.php?topic=149479.0

2.7 Qt 5 libraries:

set INCLUDE=C:\deps\libpng-1.6.16;C:\deps\openssl-1.0.1l\include
set LIB=C:\deps\libpng-1.6.16\.libs;C:\deps\openssl-1.0.1l

what is this??
Where do you type this sentence?

I did this at the windows command prompt

set INCLUDE=C:\deps\libpng-1.6.16;C:\deps\openssl-1.0.1l\include
set LIB=C:\deps\libpng-1.6.16\.libs;C:\deps\openssl-1.0.1l

I entered these things.
But I do not think so.
Where on earth are those things entered?
Oh, and
Qt5.3.2 version is no longer available for download, so I received 5.6.2 instead of replacing it?
old c coder
Sr. Member
****
Offline Offline

Activity: 260
Merit: 250



View Profile WWW
August 16, 2017, 03:28:20 AM
 #1180

Hi~ This is jungwoo

I don't know this situation...

https://bitcointalk.org/index.php?topic=149479.0

2.7 Qt 5 libraries:

set INCLUDE=C:\deps\libpng-1.6.16;C:\deps\openssl-1.0.1l\include
set LIB=C:\deps\libpng-1.6.16\.libs;C:\deps\openssl-1.0.1l

what is this??
Where do you type this sentence?
too long to explain environment variables in various versions of Windows, see:
https://www.google.com/search?site=&source=hp&q=in+Windows%2C+where+do+you+enter+environment+variables
Quote

I did this at the windows command prompt

set INCLUDE=C:\deps\libpng-1.6.16;C:\deps\openssl-1.0.1l\include
set LIB=C:\deps\libpng-1.6.16\.libs;C:\deps\openssl-1.0.1l

I entered these things.
But I do not think so.
Where on earth are those things entered?
Oh, and
Qt5.3.2 version is no longer available for download, so I received 5.6.2 instead of replacing it?
Ron


LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf 
The day is coming when a single carrot, freshly observed, will set off a revolution.  Paul Cezanne
Pages: « 1 ... 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 [59] 60 »
  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!