Bitcoin Forum
May 26, 2024, 11:49:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 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 61 62 63 64 65 66 67 68 69 70 71 ... 162 »
401  Bitcoin / Bitcoin Discussion / Re: [ANN] Bitcoin blockchain data torrent on: August 01, 2013, 02:10:54 PM

bootstrap.dat goes into the data directory.  The same directory as debug.log and peers.dat are located.

402  Bitcoin / Development & Technical Discussion / Re: Discovery of nodes that support custom services on: August 01, 2013, 02:04:34 PM
It would be nice to have an "addr_v2" message, which supports a list of services.  Or some non-propagated way of enumerating services, like a "list_services" P2P message.  I've proposed such myself.

The main issues are thinking about how this gets propagated around the network properly, getting this info from various seeding mechanisms (if possible), and trying to avoid DoS issues.

Also, we have nowhere near 64 services, so there are plenty of bits available for use right now, with zero protocol modifications.

403  Bitcoin / Development & Technical Discussion / Re: Wiki clarification on headers payload on: July 31, 2013, 08:49:43 PM
Based on what you're saying, it sounds like the wiki should indicate that the transaction count is a single byte then, not a varint?

It is a varint.  The varint for zero is a single 0 byte.

When the header is part of the block, it gives the transaction count.

Based on Mike's reply and in the context of the headers message, though, it sounds like there shouldn't be a varint here, just a single zero byte. For zero that comes out to the same thing but I'm trying to understand the correct parsing behavior. If I ever see a non-zero byte in that position what would the correct behavior be? Consider the entire message invalid? Alternatively, if I ignore the difference I'd need to know if I should read just that last byte or if I should try to read it as a varint.

/sigh

You should endeavor to follow Postel's law.  In this case, that means (using RFC2119 notation):

If you are creating a "headers" packet, you must include a properly coded varint representing the number of transactions that are included in the packet.  The number of transactions included must be zero.  (The only valid encoding for zero is a single octet: 0x00.  0x05 is right out.)

If you are reading a "headers" packet, you must parse that field as a varint.  You should reject any packets that include a non-zero number of transactions.  You may disconnect the peer that sent it, and attempt to publicly shame the authors of that implementation.

Sadly this is one of those cases where it can be easy to get it wrong.  It does seem worth investigating whether there was any breakage or behavior changes since 0.3.x days.  We have changed CBlock to CBlockHeader and it is entirely conceivable that one might have output the "number of transactions" variable, and another did not.  Worth checking.

404  Bitcoin / Development & Technical Discussion / Re: Version field in the getheaders message on: July 31, 2013, 06:43:50 PM
Where do you see a version field in the "getheaders" message?

"getheaders" has two parameters, locator and hashStop.

It says there is a version field in the protocol spec.

However, I should have read it more closely, version means the protocol version, so nevermind.

No, it is the version of the block-locator object.

The wiki is unclear.  "getheaders" receives two parameters, a block-locator object and a hashStop.  Inside the block-locator object, there is a version for that locator data structure only.  The version applies to the locator object, not getheaders message as a whole or hashStop parameter.

405  Bitcoin / Development & Technical Discussion / Re: Version field in the getheaders message on: July 31, 2013, 10:49:59 AM
What is the purpose of this field?  Was it intended to only get headers of a particular version?

Where do you see a version field in the "getheaders" message?

"getheaders" has two parameters, locator and hashStop.

Of course, each block header has the block header version.

406  Bitcoin / Press / Re: 2013-07-26 Bitcoin activists propose hard fork to Bitcoin to keep it anonymous a on: July 30, 2013, 01:53:58 PM
They should be slammed about labelling it bitcoin 2 - it sounds like an attempt to hijack bitcoin, newcomers might buy in assuming it's the original.

"They are attempting to ride the coattails of the Bitcoin brand"

407  Bitcoin / Development & Technical Discussion / Re: bitcoind: Your decentralized block explorer (HTTP REST API) on: July 28, 2013, 03:39:43 PM
The suggestion on github to permit selection of output format by file extension is interesting.  e.g.

GET /rest/tx/TX-HASH.json (JSON-format expanded tx)

GET /rest/tx/TX-HASH.txt (binary serialized tx, hex encoding)

etc.

408  Bitcoin / Project Development / Re: [WIP] My opensource Node.js Stratum server and client + RPC interface on: July 28, 2013, 03:38:25 PM
I've learned a lot from reading the bitcoinjs-server source, but couldn't make it work on Windows, unfortunately.

Hopefully node-libcoin will be a full replacement for bitcoinjs-server... Smiley

409  Bitcoin / Project Development / Re: [WIP] My opensource Node.js Stratum server and client + RPC interface on: July 28, 2013, 01:34:19 PM
Nice to see some further node.js work!  Good show.

Check these out,
https://github.com/gasteve/node-base58  ('base58-native' in npm)
https://github.com/gasteve/node-libcoin

We are cleaning up bitcoinjs-server into a nice library, and fixing many bugs found (including buffer overflows and memory leaks).

And watch
https://github.com/jgarzik/txtool
https://github.com/jgarzik/wally

for other node.js work.

410  Bitcoin / Development & Technical Discussion / Re: bitcoin protocol magic numbers and reason on: July 28, 2013, 01:28:30 PM
While 8 decimal places could be considered a magic number, it is one we may expand later, without impacting the total money supply.
411  Bitcoin / Development & Technical Discussion / Re: multi-signature transactions in javascript on: July 24, 2013, 12:38:05 AM
Hello,
Does any example of generating (from inputs + privates keys) a multi-signature transactions exist in any language? What about Javascript?

txtool is a command line tool written in JavaScript, that helps you build and sign multi-sig transactions.

https://bitcointalk.org/index.php?topic=249205.0
https://github.com/jgarzik/txtool
412  Bitcoin / Development & Technical Discussion / Re: bitcoind: Your decentralized block explorer (HTTP REST API) on: July 23, 2013, 02:56:10 PM
Updated OP and pull request to remove non-standard "Bitcoin-Format" header, and instead use github-style "clean" URLs.
413  Bitcoin / Development & Technical Discussion / Re: Risk of anyone-can-take output on: July 23, 2013, 02:06:59 PM
Yeah, OP_TRUE and the like are the same as a widely-known private key. I don't see what advantage you get from treating them different at the protocol level, though I suppose a smart client could attempt to inform the user if a payment they received was more likely to be attempted to get double-spent than average, but I'm not sure the user would or should do anything different in that case anyway.

No current client will tell the user "hey, I found an anyone-can-spend" nor list that in their balance.

Clients pattern-match output scripts, and only "see" ones with scripts they recognize.

All other transactions are simply invisible without special software to find them and spend them.

414  Bitcoin / Development & Technical Discussion / Re: What is up with this SIGHASH_SINGLE and nOut out of range? on: July 23, 2013, 02:04:59 PM
Live with it ok, but we need to know what is the good behavior!
Doesn't this look like a crazy hack/bug?
Thus my question.

For me it seems like someone has overlooked it at some point; "return 1" was supposed to indicate an error, but it was somehow overlooked and now it implicitly gets cast to (uint256)1 which is a pretty valid hash value, so C++ compiler does not complain and so nobody has noticed..

Don't you have the same problem in Armory?
I cannot imagine reproducing the same behavior in python, just by repeating such a mistake.

This was noticed a long time ago.  It is just now being re-noticed by others Smiley

I discovered this over a year ago while rewriting everything into python:

https://github.com/jgarzik/python-bitcoinlib/
https://github.com/jgarzik/python-bitcoinlib/blob/master/bitcoin/scripteval.py

Can you spot the problem?  Smiley

415  Bitcoin / Development & Technical Discussion / Re: bitcoind: Your decentralized block explorer (HTTP REST API) on: July 23, 2013, 02:00:47 PM
Are there plans for a call that returns a tx's merkle branch?

What is the use case?  That data falls into the category of "public blockchain data", so it is OK to add that sort of data, if there is a use.

Note that the JSON format of a TX outputs its confirmed block-hash, which enables discovery of a TX's merkle branch.

416  Bitcoin / Development & Technical Discussion / Re: bitcoind: Your decentralized block explorer (HTTP REST API) on: July 23, 2013, 04:47:22 AM
Would it work on the port exposed by the JSON-RPC interface set in the bitcoin.conf? So for example: localhost:8332/rest/tx/TX-HASH?

Yes.

Quote
Would you have to set tx-index=1 to get transactions with all spent outputs? The same way the getrawtransaction works at the moment?

Yes.

417  Bitcoin / Development & Technical Discussion / Re: Bitcoind SLOOOOW on: July 23, 2013, 01:34:15 AM
So?? This means that the actual act of getbalance() is taking a long time or something?

They are doing the same thing under the hood: making a TCP connection to bitcoind, sending/receiving JSON-RPC data.

418  Bitcoin / Development & Technical Discussion / Re: Bitcoind SLOOOOW on: July 22, 2013, 08:38:51 PM
A bit more information: Bitcoind is nowhere near as slow when doing it through shell? WTF?

Not sure I understand what this means.

as I understand it, "bitcoind getbalance" is just calling the daemon with jsonrpc.  It shouldn't be significantly different from your php script calling it with jsonrpc.

That is correct.  "bitcoind getbalance" executes a new copy of bitcoind, which connects via TCP to an existing bitcoind, sends and receives JSON-RPC, then disconnects and exits.  Not much different than using PHP or cURL to make JSON-RPC calls.

419  Bitcoin / Bitcoin Technical Support / Re: Pushpool - Tech Support on: July 22, 2013, 07:50:03 PM
Does anyone know something about stratum support by pushpool?

I would be happy to merge litecoin and stratum support into the pushpool repo, if someone created a pull request.

420  Bitcoin / Development & Technical Discussion / bitcoind: Your decentralized block explorer (HTTP REST API) on: July 22, 2013, 07:48:45 PM
URL: https://github.com/bitcoin/bitcoin/pull/2844

Adding an HTTP REST API for bitcoind has been occasionally tossed about as a useful thing.  Such an API would essentially provide a decentralized block explorer capability, enabling easy external access to transaction/address/block indices that we maintain.

The first two implemented API calls are simple, returning a block or TX given a simple query string based on block hash, e.g.

Code:
     GET /rest/tx/TX-HASH
Code:
     GET /rest/block/BLOCK-HASH

This can be easily accessed via command line cURL/wget utilities. Output formats -- binary, hex or json -- may be selected by append a "/json" or "/hex" suffix to the URL, e.g.
Code:
     GET /rest/tx/TX-HASH/json

The general goal of the HTTP REST interface is to access unauthenticated, public blockchain information.  There is no plan to add wallet interfacing/manipulation via this API.
Pages: « 1 2 3 4 5 6 7 8 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 61 62 63 64 65 66 67 68 69 70 71 ... 162 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!