Bitcoin Forum
May 14, 2024, 05:58:42 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 [3] 4 5 6 »
41  Bitcoin / Development & Technical Discussion / Re: Bitcoin Script tutorial on: May 25, 2018, 03:28:50 AM
a good tutorial on bitcoin script

https://blockgeeks.com/guides/bitcoin-script-guide-part-2/
42  Bitcoin / Development & Technical Discussion / Re: start bitcoin core private blockchain on: May 24, 2018, 08:58:46 AM
when i run the bitcoin-cli, i got the error

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

In the protocol.h, the error meaning is:

RPC_IN_WARMUP                   = -28, //!< Client still warming up
43  Bitcoin / Development & Technical Discussion / Re: start bitcoin core private blockchain on: May 24, 2018, 07:53:29 AM
i only changed the timestamp, when starting bitcoind, i got the error in debug.log

2018-05-24 07:50:44 mapAddressBook.size() = 1
2018-05-24 07:50:44 ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8)
2018-05-24 07:50:44 *** Failed to read block
2018-05-24 07:50:44 Error: Error: A fatal internal error occurred, see debug.log for details

It is solved by running bitcoind with -reindex
44  Bitcoin / Development & Technical Discussion / Re: start bitcoin core private blockchain on: May 24, 2018, 07:40:27 AM

Quote
No it's not enough.
Read some guide, for example this one:
Complete Guide on How to Create a New Alt Coin

I read it.
45  Bitcoin / Development & Technical Discussion / Re: start bitcoin core private blockchain on: May 24, 2018, 07:28:42 AM
i found a good link
https://bitcoin.stackexchange.com/questions/13122/scriptsig-coinbase-structure-of-the-genesis-block

i tried to print out the value in chainparams.cpp before assert in line 125. But value is printed out as 0x0,  and 0x103?

Quote
fprintf(stdout,"0x%x\n",consensus.hashGenesisBlock);
fprintf(stdout,"0x%x\n",genesis.hashMerkleRoot);

the warning is : format specifies type 'unsigned int' but the argument has type 'uint256'

Update: use this to print uint256. They are string.
Quote
fprintf(stdout,"%s\n", consensus.hashGenesisBlock.ToString().c_str());
fprintf(stdout,"%s\n",genesis.hashMerkleRoot.ToString().c_str());
46  Bitcoin / Development & Technical Discussion / Re: start bitcoin core private blockchain on: May 24, 2018, 06:07:14 AM
what do you mean by private bitcoin core chain?
1) bitcoin core it's just a client, so use bitcoin blockchain term.
2) do you want to fork bitcoin codebase? In this case you have to change more parameters than genesis block: port number, magic message number ect.
3) But if you just want to run private bitcoin blockchain for your own testing or something similar, you don't have to change anything Smiley just start daemon with -regtest option.

Thank you. I would like to fork bitcoin code base.

In src/chainparams.cpp
Quote
    const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
    const CScript genesisOutputScript = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3 8c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;

Can i just change the timestamp and genesis output script, to create a customised bitcoin ?
47  Bitcoin / Development & Technical Discussion / start bitcoin core private blockchain on: May 24, 2018, 05:36:06 AM
To start a customised private bitcoin core blockchain, all i need to do is:

1) change the genesis block
2) change the timestamp of genesis block

is there anything else?
48  Bitcoin / Development & Technical Discussion / Re: send bitcoin from BTC network to BCH network on: April 23, 2018, 01:07:06 AM
For example, my BTC address 1MocACiWLM8bYn8pCrYjy6uHq4U3CkxLaa is BCH address qrjr9lakau9au6t272w2z0wn0syzffqgyv89sgzct3 (eventough, the "legacy" address format is still valid for BCH)

i see, the BCH address format has changed.

i kind of think that if i have privates keys on both BTC and BCH, then can replay protection stops me from mining the same transaction twice?
49  Bitcoin / Development & Technical Discussion / Re: send bitcoin from BTC network to BCH network on: April 20, 2018, 07:54:23 AM
It is not possible to send BTC to BCH and vice versa. They are two completely separate coins with their own networks and blockchains. BTC and BCH are completely incompatible.

Thank you. Got the point.
50  Bitcoin / Development & Technical Discussion / send bitcoin from BTC network to BCH network on: April 20, 2018, 03:09:59 AM
I read this https://bitcoin.stackexchange.com/questions/57419/what-would-happen-if-you-send-bitcoin-btc-to-a-bitcoin-cash-bch-aka-bcc-add

I am not sure about the below:

After the implementation of reply protection, is it not possible to send bitcoin from BTC to BCH network , and vice versa?
51  Bitcoin / Development & Technical Discussion / Re: Bitcoin transaction and Open Asset Protocol on: March 30, 2018, 09:55:19 AM
Please take a look at the Open assets spec. You have all headers & footer fields described. Also, please note that the asset quantity list is a LEB128 encoded field. LEB128 is a compression algorithm to store a large number of small integers.

Please also note the OP_RETURN now accepts up to 83 bytes: https://github.com/bitcoin/bitcoin/blob/master/src/script/standard.h#L34.

Now OP_RETURN accepts up to 83 bytes, thank you very much for the link.

I refer to  Open assets spec.

OAP marker is 2 bytes,
version number is 2 bytes,
Asset quantity count (varint) minimum 1 byte.

It looks like we can fit 35 assets into one Open Asset transaction, it each asset quantity field takes up one byte. (for OP_RETURN limit of 40 bytes
52  Bitcoin / Development & Technical Discussion / Bitcoin transaction and Open Asset Protocol on: March 30, 2018, 09:15:06 AM
In Bitcoin transaction, it can have multiple vin and vout. In vout, it contains bitcoin script. In bitcoin script, the OP_RETURN contains payload, the payload is used to store Open Asset asset id and quantity (see https://en.bitcoin.it/wiki/Colored_Coins#Open_Assets). The encoding is based on LEB128.

OP_RETURN has 40 byte limit. There is a request to increase the size limit to 80 bytes.

"Previously, a single transaction could send assets to up to 34 distinct recipients. After the change, it will be able to send assets to up to 74 recipients". (see http://blog.coinprism.com/2015/02/11/80-bytes-op-return/)

Is the limit of 34 distinct recipient because the header of Open Asset is 6 bytes, so 40-6 = 34 ?

53  Bitcoin / Development & Technical Discussion / Re: Must all nodes run Bitcoin core on: March 29, 2018, 11:24:18 AM
Yes, there are other full node implementations to run. bcoin is one written in JavaScript, and btcd is another written in Go.

Thanks.
54  Bitcoin / Development & Technical Discussion / Must all nodes run Bitcoin core on: March 29, 2018, 10:55:14 AM
i have a simple question.

Bitcoin core is a reference implementation of bitcoin. Can we run other implementation of bitcoin , such as in Python, Java, or Ruby , as bitcoin node on mainnet ?

I suppose we can.
55  Alternate cryptocurrencies / Altcoin Discussion / Re: Smart contract with Ethereum ERC20 token on: March 26, 2018, 12:56:25 AM
I do not think blockchain smart contract can offer security, as all info is available in the public.
56  Alternate cryptocurrencies / Altcoin Discussion / Smart contract with Ethereum ERC20 token on: March 25, 2018, 06:52:50 AM
I often receive kind support from this forum.

In return, I write a simple tutorial on Smart contract with Ethereum ERC20 token. Please take a look and if there is any mistakes in it, you are welcome to criticize.

http://embedded-design-vic.blogspot.com/2018/03/smart-contract-with-ethereum-erc20-token.html
57  Bitcoin / Development & Technical Discussion / Re: connect two bitcoin core nodes on different machine, using regtest on: March 15, 2018, 06:08:49 AM
You have two programs that are trying to use the same port. You can't do that. One of your bitcoind instances will need to use a different rpcport (-rpcport) and normal p2p port (-port)

Thank you. The setup of bitcoin core regtest network  on two nodes on two  different machine, is working now. Have to add rpcport entry. The machine A bitcoin.conf

`regtest=1
server=1
port=18332
rpcport = 18333
rpcuser=bitcoinrpc
rpcpassword=password
rpcallowip=0.0.0.0/0`

and machine B bitcoin.conf
`regtest = 1
server = 1
port=18443
rpcport = 18444
connect = 11.0.0.110:18332
rpcuser=bitcoinrpc
rpcpassword=password`
58  Bitcoin / Development & Technical Discussion / Re: connect two bitcoin core nodes on different machine, using regtest on: March 15, 2018, 05:45:16 AM

You have two programs that are trying to use the same port. You can't do that. One of your bitcoind instances will need to use a different rpcport (-rpcport) and normal p2p port (-port)

The bitcoin.conf was setup already.  As below:

regtest = 1
server = 1
port=18443
connect = 12.0.0.111:18332
rpcuser=bitcoinrpc
rpcpassword=password

The port is set to 18443. Why is that bitcoind trying to bind to port 18332 ?

"2018-03-15 01:31:32 Binding RPC on address ::1 port 18332 failed.
2018-03-15 01:31:32 Binding RPC on address 127.0.0.1 port 18332 failed."
59  Bitcoin / Development & Technical Discussion / Re: connect two bitcoin core nodes on different machine, using regtest on: March 15, 2018, 02:14:45 AM
I can connect regtest on two nodes on the same machine.

However, i cannot connect regtest on two nodes on different machine.

I use bitcoin v0.15.1 , setup the bitcoind to connect to remote host in bitcoin.conf 
`connect = 11.0.0.110:18332`
as well as command line
 `-connect=11.0.0.110:18332`

The bitcoind is still trying to connect to
`2018-03-15 01:31:32 Binding RPC on address ::1 port 18332 failed.
2018-03-15 01:31:32 Binding RPC on address 127.0.0.1 port 18332 failed.`

Anyone knows why ?
60  Alternate cryptocurrencies / Altcoin Discussion / ganache-cli module is not found on: March 14, 2018, 11:50:20 AM
I want to run a test program on ethereum code. i have installed ganache-cli. However, i could not run the test. The error is shown as below.

viiic@ubuntu:~/Downloads/project/inbox$ sudo npm install -g ganache-cli
npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
/usr/bin/ganache-cli -> /usr/lib/node_modules/ganache-cli/build/cli.node.js
npm WARN webpack-cli@2.0.12 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.

+ ganache-cli@6.1.0
updated 2 packages in 10.897s

viiic@ubuntu:~/Downloads/project/inbox$ sudo npm run test

> inbox@1.0.0 test /home/vic/Downloads/project/inbox
> mocha

module.js:540
    throw err;
    ^

Error: Cannot find module 'ganache-cli'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/vic/Downloads/project/inbox/test/Inbox.test.js:2:18)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at /home/vic/Downloads/project/inbox/node_modules/mocha/lib/mocha.js:231:27
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (/home/vic/Downloads/project/inbox/node_modules/mocha/lib/mocha.js:228:14)
    at Mocha.run (/home/vic/Downloads/project/inbox/node_modules/mocha/lib/mocha.js:536:10)
    at Object.<anonymous> (/home/vic/Downloads/project/inbox/node_modules/mocha/bin/_mocha:582:18)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! inbox@1.0.0 test: `mocha`
npm ERR! Exit status 1
Pages: « 1 2 [3] 4 5 6 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!