48

I know this question is old, but I stumbled upon it looking how to teach myself how multisig addresses work, and I imagine others will to. So I’m going to try to explain the typical flow for creating, adding bitcoins to, and eventually spending a multisig address. This explanation is aimed at beginners, so please excuse my lack of brevity. First off, some ...


14

(disclaimer: I work on Bitcoin Core) As Luca already mentioned, you have to distinguish wallet implementations and the fully verifying nodes on the network. Because of how Satoshi wrote his code (a node and a wallet in the same program), the two are often confused, but this is considered a bad idea now. They can perfectly function independently. The ...


12

The basic elliptic curve operation is addition of points. The operation of applying this addition repeatedly is called the scalar multiplication of a point by an integer. The private key is the 'scalar', the point being multiplied is the 'Generator' point, the result is the public key. Scalar multiplication is basically repeated addition. Multiplying the ...


12

The reference implementation, Bitcoin Core, is written primarily in C++, with various resource files and scripts in other languages. Another implementation, mainly used in lightweight clients like MultiBit and Bitcoin Wallet (Android), is bitcoinj. It is written in Java.


11

If scripts were Turing-complete, you could construct a fairly short script that took an extremely long time to run (a la the Busy Beaver) or contained an infinite loop. This would tend to result in a denial of service against everyone on the network, when they tried to verify the transaction. And there would be no general way to tell whether a script ...


11

To understand Bitcoin Core, the best resource is probably the source code itself: https://github.com/bitcoin/bitcoin To help understand what is going on in the code, try the developer documentation and the Princeton Bitcoin Book. Keep in mind that the code gets updated faster than the documentation, so the code should be your source of truth. Some ...


9

There is a Complete Guide on How to Create a New Alt Coin on Bitcoin Talk.


8

Creating a SatoshiDice-like game is rather easy. Below are the high level steps involved in making such a game. For each incoming transaction... Get the customer amount and payment address Call bitcoind getrawtransaction [The incoming transaction ID] 1. The 1 at the end will return the data in "verbose mode", which essentially the raw data in JSON ...


8

I was asked by Hasan Hasan, a junior developer, which of the following three books I'd recommend. Personally I think all three books are fantastic (I would recommend them all) but they do approach the topic from very different angles. Mastering Bitcoin (2nd edition, Andreas Antonopoulos) was the first technical Bitcoin book to be published. The 2nd edition ...


8

There are two Bitcoin softwares that should be differentiated: (i) the client software that everyone uses and (ii) the full Bitcoin node used by the miners. With regards to implementations, there are a variety of different clients. Just look at MultiBit, Electrum, Armory, Hive etc. Many are implemented using different programming languages and libraries. ...


8

In comparison to languages like Java or C++, Python has several advantages for coding bitcoin projects: Simplified rules of coding allows beginners and experienced alike to code and get results without getting bogged down in formatting etc Shell allows on the fly calculations Python code is easily read and as such can be edited to suit Python can be ...


8

I just published a book about it. It's called "Blockchain Programming in C#". If you're looking for tools written in C#, you should try NBitcoin. You can also find the project on GitHub. I've also written lots of articles about it: Intro: http://www.codeproject.com/Articles/768412/NBitcoin-The-most-complete-Bitcoin-port-Part-Crypt Stealth Payment, and ...


8

Tim S. pretty much covered it, but I wanted to 2 great resources which have been very helpful for myself and many others: Ken Shirriff's blog has a few Bitcoin mining related posts which use Python code to great effectiveness; whilst Bitcoin Mining The Hard Way is probably the most useful, there's also some novel use cases where Ken tries Bitcoin mining by ...


7

May be useful psp(python) example: <%psp import urllib2; import simplejson as json; j = json.loads(urllib2.urlopen("https://data.mtgox.com/api/2/BTCUSD/money/ticker").read()); %> <%=str(j["data"]["last"]["value"]) %> Or one command line: # /usr/bin/python -c 'import urllib2; import simplejson as json; j = json.loads(urllib2....


7

Here is a guide: How to Fork Bitcoin (create your own chain). I really think Bitcoin as a concept is unique and powerful, and the project is well maintained by very talented developers, so I wanted to write this not just to help make it easy to clone, but to help increase understanding of the concepts and how to fully utilize them in other projects. I would ...


7

A great way to start programming blockchain-based apps in C# is BitcoinLib, which also comes with a test console app that demonstrates how you can build a blockchain app in a few lines of code. Repo: https://github.com/GeorgeKimionis/BitcoinLib Some of its features are: Fully compatible and up-to-date with Bitcoin 0.9.3 RPC API. Design-by-contract, ...


7

I'm not sure that a guide as basic as you describe is even possible. It depends on what exactly you mean. Mining itself isn't too complicated to read and understand, but writing a start-to-end app that can be used for mining means writing a full node. That is very complicated. Writing a Bitcoin miner from start to end involves not only collecting ...


7

No, the number of full nodes is decoupled from capacity and fees. Transaction capacity is a function of transaction size and blocksize. Blocks occur roughly every 10 minutes and have a fixed size. Transactions also have a more or less fixed size, so capacity is currently not going to change unless either transactions get smaller (e.g. Schnorr signatures, ...


7

I think you are confusing some things here. A blockchain like Bitcoin, Ethereum, Ripple, or Hyperledger is a protocol in first place. And a protocol is agnostic to programming languages used. What you are relating to are reference implementations of the protocol. The Bitcoin protocol has the famous Bitcoin implementation (later Bitcoin Core) initially ...


6

Biggest problem facing spaceborne bitcoin is communications latency. Consider possible Mars colony. Light speed imposes delay, 4 to 24 minutes. Bad enough this is. If miners on both Earth and Mars, each comes up with new block, possibly extends blockchain twice more, before signal from other crosses distance. Means very long transaction confirmation ...


6

Well, lets look at the outcomes for the user: your user burns hundreds of times their normal power usage mining, thousands of dollars of their money goes into their power bill your user potentially ruins their hardware (Mac hardware will die, there's no question of that) your users computer becomes sluggish and unresponsive their virus protection removes ...


6

The format is base58check, with 0x80 as version byte (for Bitcoin mainnet, at least), and an optional suffix 0x01 byte to indicate that the corresponding public key is compressed. So combined: base58(0x80 | 32-byte big-endian secret parameter | checksum) for uncompressed public keys base58(0x80 | 32-byte big-endian secret parameter | 0x01 | checksum) for ...


6

yes, UINT64 is sufficient, which is in fact how the Bitcoin protocol works internally. The conversion factor from UINT64 to BTC is 1.0e8. Not using floating point numbers is a very good idea indeed.


6

Searching the http://patents.stackexchange.com site, I found a question that linked here: http://ask.metafilter.com/216885/What-happens-if-an-opensource-app-intentionally-violates-a-software-patent#3129948 An open source program can infringe a patent just the same as a commercial one. There is no requirement that the infringement be for profit, since ...


6

With vanilla Bitcoin Core, there is no efficient way to do this. I see two options: a) Slow and very inefficient RPC loop (not recommended) Get the genesis block hash (RPC getblockhash 0) Get the block with all transaction (RPC getblock <hash> 2, 2 stands for verbosity with transaction) Loop through all transactions and all its outputs, call ...


6

Bitcoin Has SegWit and it's benefits and costs: Code complexity (of acceptable amount) Witness data is discounted in SegWit transactions, somewhat rectifying the fact that outputs are cheaper to create than to spend. 3rd person malleability fix for SegWit transactions RBF transactions (optional, destroys 0-conf) Compact Blocks Ability to soft-forks to ...


5

The process is not formalized precisely because only really non-controversial changes are supposed to make it in at all. This hasn't always been the case, but is becoming more true in the last year. Right now the process goes like this: Start by thinking of some feature/improvement. Convince the dev team(s) of the relevant parts (core consensus, wallets, ...


5

Try looking at these pages: First, a "Complete Guide on How to Create a New Alt Coin" which, as the name says is a fairly step-by-step guide on how to create a new alt-coin. Secondly, another thread started by someone who asked essentially the same question as yours: "How do you create an altcoin?" The discussion which follows is a bunch of people ...


Only top voted, non community-wiki answers of a minimum length are eligible