Bitcoin Forum
November 15, 2018, 06:16:48 PM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 3 4 5 »
1  Bitcoin / Development & Technical Discussion / Re: bitcoin wallet master key on: October 05, 2018, 05:30:14 AM
the command `bitcoin-cli dumpwallet walletfilename` shows

Quote
# extended private masterkey: tprv8ZgxMBicQKsPdXHSRpLtX329KK4Phqx3T2dMkiKK427K7yCqUbfK1NtQYdyFSsCsdbv5Emce61p ZY7TFXc3jvxMtPFzChbwxH5g6XCm9e6m

cUGWMsLyd7MBffw6poDHEiDoWXv2aqrHi1RcLSQ7C4yhAQMBdcYs 1970-01-01T00:00:01Z label= # addr=mgYCPhE63MQsB8hd66ZZYEGDZTETf9WrqF
.....
cUPRHPYeTefm566zr4iA5v7uqvwyQg9VqXAQfGqkRC8bGvf3pxSR 2018-04-27T03:58:55Z reserve=1 # addr=mfXfTUL9XRF7jFtruu6z3nxH7oiX7APuQT hdkeypath=m/0'/0'/740'

which one is the xprv key ?
2  Bitcoin / Development & Technical Discussion / bitcoin wallet master key on: October 04, 2018, 05:44:08 AM
Using bitcoin core cli, the getwalletinfo command returns the master key, such as:

  "hdmasterkeyid": "cc4cb4e5b4bfcd3a44570392faba1c43390f2405"

The master key will generate the private key. When i want to back up the key, do i back up the master key or the private key?
3  Bitcoin / Development & Technical Discussion / Re: bitcoin transaction confirmation and mining on: August 28, 2018, 04:59:26 AM

Nope. The set of transaction is hashed and included as merkle root. The merkle root is included in the block header which is hashed again. If you add transactions, the merkle root will be changed and the whole block header will be changed. You can do it, but the block won't meet the target anymore and nodes won't accept it.

very clear reply. Thanks a lot.
4  Bitcoin / Development & Technical Discussion / Re: bitcoin transaction confirmation and mining on: August 28, 2018, 03:45:55 AM
The miner will decide which transaction they wish to include before they even start to mine and solve the block. When they get the block that corresponds to the target, they cannot change any variable in the block or the whole hash will be changed.

Does it mean once the block is mined with transactions, the same block cannot be mined to add new transactions to it ?

Thanks.
5  Bitcoin / Development & Technical Discussion / bitcoin transaction confirmation and mining on: August 28, 2018, 03:31:54 AM
one technical question:

when i send out a bitcoin to the recipient, the transaction is included in a block. The transaction is confirmed by miner.

Is the block fully utilized, as in is its capacity fully used ? For other transaction, is it included in the same block if the block is not full ?

how does miner check which block is the latest, if the same block is being mined to confirm new transactions ?

6  Bitcoin / Development & Technical Discussion / Re: scriptPubKey.size() > nMaxDatacarrierBytes on: August 10, 2018, 08:20:31 AM
the datacarriersize controls the OP_RETURN script size. the small size of 80 is to prevent arbitrary data from getting into blockchain.

in BCH, the size is increased to 220 bytes.
7  Bitcoin / Development & Technical Discussion / scriptPubKey.size() > nMaxDatacarrierBytes on: August 10, 2018, 03:17:47 AM
In bitcoin core v0.15.1 , policy,cpp, IsStandard() , the condition (scriptPubKey.size() > nMaxDatacarrierBytes) is met, and so it gives error of {"code"=>-26, "message"=>"64: scriptpubkey"}

What do we check the size of scriptPubKey against a number ?
8  Bitcoin / Development & Technical Discussion / Re: Change genesis block, regtest mining fail on: August 06, 2018, 01:14:38 PM
i generate the unix time, nonce from scratch, for regtest , now mining is working.

previously, i re-use the unix time, nonce that are generated for mainnet , in regtest. For that, mining wasn't working
9  Bitcoin / Development & Technical Discussion / Re: Change genesis block, regtest mining fail on: August 06, 2018, 08:58:58 AM
You could always compare your generated block with the actual genesis block:

Code:
0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f49ffff001d1dac2b7c0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000
May i know how to compare the generated block to actual genesis block? Comparing the hash of the block?

Quote
Or when looking for specific values in a human readable fornat:

Code:
{
  "hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
  "ver": 1,
  "prev_block": "0000000000000000000000000000000000000000000000000000000000000000",
  "mrkl_root": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
  "time": 1231006505,
  "bits": 486604799,
  "nonce": 2083236893,
  "n_tx": 1,
  "size": 285,
  "tx": [
    {
      "hash": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
      "ver": 1,
      "vin_sz": 1,
      "vout_sz": 1,
      "lock_time": 0,
      "size": 204,
      "in": [
        {
          "prev_out": {
            "hash": "0000000000000000000000000000000000000000000000000000000000000000",
            "n": 4294967295
          },
          "coinbase": "04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73"
        }
      ],
      "out": [
        {
          "value": "50.00000000",
          "scriptPubKey": "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f OP_CHECKSIG"
        }
      ],
      "nid": "c2151f94f6ca6cecbe5d17cd12aaa40e5b1571ca10da82f2f5bcdb6205dcad6a"
    }
  ],
  "mrkl_tree": [
    "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"
  ],
  "next_block": "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048"
}
what is the command to generate the info above?
10  Bitcoin / Development & Technical Discussion / Re: Change genesis block, regtest mining fail on: August 06, 2018, 05:39:41 AM
Because the genesis block actually has to be mined. It must have a valid proof of work, you cannot just make a genesis block that fails the consensus rules (except for the prevblock rule).

I used the program genesisgen to mine the genesis block , and put the information , such as, nBits, nonce , unix time , into CreateGenesisBlock() function.

May i know what is still missing ?
11  Bitcoin / Development & Technical Discussion / Change genesis block, regtest mining fail on: August 06, 2018, 02:22:22 AM
after i change genesis block in chainparams.cpp, i do mining in regtest mode.

Quote
$ bitcoin-cli -datadir=../datadir2/  generate 101
[
]
the return result is empty. However, i can see new blocks created in debug.log

Quote
CreateNewBlock(): block weight: 900 txs: 0 fees: 0 sigops 400
2018-08-02 08:15:24   nProofOfWorkLimit = 545259519  before bounds
2018-08-02 08:15:24   nProofOfWorkLimit = 545259519  before bounds
2018-08-02 08:15:24   nProofOfWorkLimit = 545259519  before bounds

i found out the reason , in regtest mode, after changing the genesis block, in bitcoin core mining.cpp, generateBlocks() call CheckProofOfWork(), the parameter passed to the function, includes hash value of block, so in CheckProofOfWork() , the line `if (UintToArith256(hash) > bnTarget)`   is fulfilled and returns false, so mining fails.

Why changing of genesis block causing mining to fail in regtest ?
12  Alternate cryptocurrencies / Altcoin Discussion / Regtest: change the genesis block , can only mine one block on: August 03, 2018, 03:10:41 AM
I use bitcoin core 0.15.1 , and change the new genesis block, [by changing the timestamp in createGenesisBlock function, and change the parameters passed to createGenesisBlock, such as CreateGenesisBlock(1231006508, 1170854509, 0x1d00ffff, 1, 50 * COIN) ]

After that , i call bitcoin-ci -regtest generate 1, it can only mine one block. Subsequently, the mining is not successful, as follows:

Quote
src/bitcoin-cli -regtest  generate 1
[
]


Does anyone experience the same problem?
13  Alternate cryptocurrencies / Altcoin Discussion / Re: *** Complete Guide on How to Create a New Alt Coin Update 2018 *** on: August 01, 2018, 07:32:14 AM
Hi... Im having a problem connecting the nodes.

Altcoin-cli getblocktemplate returns

error code: -28
error message:
Loading wallet...

Any Idea which parts of the code should I look in to?

do u change the bitcoin core to become an altcoin ? how many altcoin nodes are u running ?
14  Alternate cryptocurrencies / Altcoin Discussion / Re: *** Complete Guide on How to Create a New Alt Coin Update 2018 *** on: August 01, 2018, 07:18:24 AM
Quote
./minerd --user rpcuser --pass 111111 --url http://127.0.0.1:6332/ --threads 4 --coinbase-addr XQg3PmNxX9oEbxsymqtQHir6dkPpVPTJ6P --coinbase-sig "my test coins" -a sha256d -D

How to know The coinbase-addr ? i think it is any bitcoin address.
15  Bitcoin / Development & Technical Discussion / Re: cpuminer requires at least two bitcoin nodes to run on: June 25, 2018, 07:57:56 AM
thanks for pointing out getblocktemplate.

In src/rpc/mining.cpp , i comment out these two lines:

Code:
   //if (g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL) == 0)
    //    throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Bitcoin is not connected!");

and run one node only.

and getblocktemplate can work. and also cpuminer can work. So it is not necessary to have at least two nodes for mining.
16  Bitcoin / Development & Technical Discussion / cpuminer requires at least two bitcoin nodes to run on: June 25, 2018, 07:18:26 AM
i download this cpuminer on a cusmotmised blockchain that has different genesis block. i notice it requires at least two bitcoin nodes to run.

Is it due to the consensus algo ?

this is the cpuminer link  https://github.com/pooler/cpuminer
17  Alternate cryptocurrencies / Altcoin Discussion / Re: *** Complete Guide on How to Create a New Alt Coin Update 2018 *** on: June 25, 2018, 06:21:33 AM

Oh, sorry I forgot to mention, in order to mine, the node has to connect to at least one peer node. So you need to run another instance of bitcoind and let it connect to the first node, like:


what is the reason the node has to connect to at least one peer node, in order for miner to run?
18  Bitcoin / Bitcoin Technical Support / Re: dump public key from bitcoin-cli on: June 22, 2018, 07:31:36 AM
Code:
listaddressgroupings


this command does not show the public keys
19  Bitcoin / Bitcoin Technical Support / dump public key from bitcoin-cli on: June 22, 2018, 06:58:37 AM
in bitcoin-cli, there is function to dump private address.

Is there any function to dump public address?
20  Alternate cryptocurrencies / Altcoin Discussion / Re: *** Complete Guide on How to Create a New Alt Coin Update 2018 *** on: May 28, 2018, 02:37:39 AM
The default value of DEFAULT_MAX_TIP_AGE

Code:
src/validation.h:static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60;
which is equal to 86400.

I have set the value of nMaxTipAge to be multiplied by 4000.
 
Code:
src/validation.cpp:int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE * 4000;
Why it is not reflected in the bitcoind, it is still 86400, and must be set in command line with -maxtipage ?
Pages: [1] 2 3 4 5 »
Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!