How to implement a green address in Bitcoind?

1

It is now possible to determine the list of addresses that sent a transaction using the raw transaction JSON-RPC API calls that were released with bitcoind and bitcoin-qt version 0.7. The pseudo-code to accomplish this is:

txid = addresses = [] raw_tx = decoderawtransaction(getrawtransaction(txid)) for(input in raw_tx['vin']) { input_raw_tx = decoderawtransaction(getrawtransaction(input['txid'])) addresses.push(input_raw_tx['vout'][input['vout']]['scriptPubKey']['addresses'][0]) }

Once you have the list of sending addresses stored in the addresses array, you can compare these addresses to a list of pre-approved green addresses. In most cases, you should expect there to only be a single unique address in the addresses array.

In order to get a list of suitable green addresses, you could hard-code it into your application, or you could use a dynamic source, such as Deepbit's JSON feed. This feed however, is notably missing Mt. Gox's Green...

0 0
2

Check getaccount : "Returns the account associated with the given address." You give it a bitcoin address, receive the corresponding account, and can then use that account to sendfrom.

However, for security reasons, I advise against sending payments directly from PHP running on a web server. You may want to introduce at least one additional layer of validation before actual payment, and that layer is probably running on a separate machine. For example, have PHP write the payment orders to the database for another application elsewhere to poll and process. Both applications will have access to the database, but no direct link between them; and the PHP side will not (have to) be authorized to access the BTC wallet at all. Also consider using hot and cold...

0 0
3

Bitcoin Core is programmed to decide which block chain contains valid transactions. The users of Bitcoin Core only accept transactions for that block chain, making it the Bitcoin block chain that everyone else wants to use

It is these users who keep Bitcoin decentralized. They individually run their own Bitcoin Core full nodes, and each of those full nodes separately follows the exact same rules to decide which block chain is valid.

There’s no voting or other corruptible process involved: there’s just individual software following identical rules—”math”—to evaluate identical blocks and coming to identical conclusions about which block chain is valid.

This shared agreement (called consensus) allows people like you to only accept valid bitcoins, enforcing Bitcoin’s rules against even the most powerful miners.

In addition to improving Bitcoin’s decentralization, Bitcoin Core users get better security for their bitcoins, privacy features not...

0 0
4

Bitcoind is a utility for mining bitcoins

Installation

~ # emerge -av net-p2p/bitcoind [ebuild N ] dev-util/boost-build-1.49.0 USE="-examples -python" 47,364 kB [ebuild N ] dev-libs/boost-1.49.0-r2 USE="-debug -doc -icu -mpi python -static-libs -tools" 0 kB [ebuild N ] net-p2p/bitcoind-0.6.3 USE="eligius -examples -logrotate -upnp" 1,333 kB

Configuration

First update the /etc/bitcoin/bitcoin.conf to contain the username and password for your bitcoin RPC. These values are generated by you for use on your system.

rpcuser=myrpcuser rpcpassword=myrpcpass1234

Mining

To mine you simply run bitcoind. You'll be better off if you join a mining pool.

/etc/init.d/bitcoind start

Monitoring

bitcoind getbalance bitcoind getinfo bitcoind getmininginfo bitcoind getwork

See...

0 0
5

General

My question isn't answered in this FAQ. How can I contact you?

The primary method of requesting support is our support email address info@greenaddress.it.

If you have found a bug or wish to request a feature in our software, you can also report it as an issue against the appropriate GitHub repository.

You can also post questions on our subreddit. In some cases fellow GreenAddress users may be able to respond to your query before we are able to.

What is your support policy?

Support is offered on a best-effort basis. We prioritize addressing security problems and bugs in the software providing the service.

If your question is answered in this FAQ, and in particular, if it pertains to lost credentials, it may be some time before we respond to you.

Unfortunately we receive a large volume of spurious email and we cannot always respond instantly. We are working to improve our email response time and will update this FAQ...

0 0
6

Hello and welcome back to my blog!

This article talks about the technical implementation details of building a watch only wallet on top of bitcoind - it’s aimed at bitcoin / altcoin business owners/developers rather than individuals.

Watch only

Watch only wallets do not contain the private keys for the addresses they’re watching, which makes them extremely secure. An attacker who gained access to your watch-only wallet would not be able to withdraw any coins. You cannot spend coins from a watch only wallet directly, but you can get the balance of an address, or export a transaction to be signed externally. This makes them fall into the category of cold storage.

The reference bitcoin client, bitcoind currently does not support watch only wallets, which is a great shame. However, it does expose a nice JSON RPC API which we can use to help us.

Sacrifices

Before we get started it is necessary to explore the sacrifices we make going...

0 0
7

2017 Addy Yeow (PGP) 17vWico7jLKQoXtfWHpvEhHzzremZqQnNM

About Bitnodes

Bitnodes is currently being developed to estimate the size of the Bitcoin network by finding all the reachable nodes in the network. The current methodology involves sending getaddr messages recursively to find all the reachable nodes in the network, starting from a set of seed nodes. Bitnodes uses Bitcoin protocol version 70001 (i.e. >= /Satoshi:0.8.x/), so nodes running an older protocol version will be skipped. The crawler implementation in Python is available from GitHub (ayeowch/bitnodes) and the crawler deployment is documented in Provisioning Bitcoin Network Crawler.

The crawler maintained by Bitnodes connects from these IP addresses: 136.243.139.96, 136.243.139.120, 2a01:4f8:212:3b1f::2

Bitnodes API v1.0·Live Map·Network Map·New Transactions·Leaderboard·Bitcoin Client Status

Bitnodes API v1.0

Live Map

Network Map

New Transactions

...

0 0
8
def transact(fromAddress, toAddress, amount, txfee): #Get all the transactions to fromAddress that haven't been spent yet. unspentTransactions = listunspent(0, 9999999, [fromAddress]) print (unspentTransactions) #go through the list of unspentTransactions until we have enough transactions to pay the amount and its txfee toSpendTotal = Decimal('0') toSpendTransactions = [] for transaction in unspentTransactions: #to keep the list of unspent transactions short, each time we will use all the unspent transactions and converge them into one change output. toSpendTotal += transaction["amount"] spendTransaction = {"txid":transaction["txid"],"vout":transaction["vout"]} toSpendTransactions.append(spendTransaction) print ("toSpendTransactions:", toSpendTransactions) #all the unspentTransactions have been gone through, we either have enough or we don't, check it. if (toSpendTotal>=(amount+txfee)): print ("toSpendTotal:",toSpendTotal) else: ...
0 0
9

you have to implement IConvertable on the object because Covert.ChangeType() expects IConvertable object. So Convert object knows how to convert given object to the type that you need - even it is the same type. you may want to research into

Polymorphism in object-oriented programming

for a better understanding of why the structure of method require IConvertable.

The main idea is that your object may have multiple forms of interpretation. For example, if you have and Apple object, the apple object can interpreted as a fruit (IFruit), eatable (IEatable), and round-shape(IShape). These identifications define your apple object in different way, though it is the same object. Now when a grocery store look at your apple, they will place in the fruit aisle (not caring which shape it would be). This is same when an graphic design look at the apple, they would only care how would render the shape of the apple.

So when you use Convert object. It does not really care what...

0 0
10

A bitcoind docker image.

Supported tags and respective Dockerfile links

What is bitcoind?

from bitcoinwiki

bitcoind is a program that implements the Bitcoin protocol for remote procedure call (RPC) use. It is also the second Bitcoin client in the network's history.

Usage

How to use this image

This image contains the main binaries from the Bitcoin Core project - bitcoind, bitcoin-cli and bitcoin-tx. It behaves like a binary, so you can pass any arguments to the image and they will be forwarded to the bitcoind binary:

$ docker run --rm -it seegno/bitcoind \ -printtoconsole \ -regtest=1 \ -rpcallowip=172.17.0.0/16 \ -rpcpassword=bar \ -rpcuser=foo

By default, bitcoind will run as as user bitcoin for security reasons and with its default data dir (~/.bitcoin). If you'd like to customize where bitcoind stores its data, you must use the BITCOIN_DATA environment variable. The directory will be automatically...

0 0
11

After all this bitcoin hype lately and the fact that most clients are made for Linux, no wonder that i have seen several requests on how to run a bitcoin generator under FreeBSD. I’m still not convinced that bitcoins are more than a pyramid scheme, but i decided to check things out and it actually nowdays is quite easy to get a miner running on FreeBSD.

Well get a basic bitcoin generator and wallet running is quite easy:

First upgrade ports (The bitcoind port was recently updated), and then install bitcoind.

# portsnap fetch update

# cd /usr/port/net-p2p/bitcoind

# make install

When the config screen you have a option to enable the GUI or not. Since the port only installs bitcion (The command with GUI) or bitcoind (The command without GUI) you will have to decide which is best for you. I clearly prefer the version without GUI so it can be started in /etc/rc.local and run in the background.

When the install is done you have a bitcoin...

0 0
12

Instead of being outdoors I geeked out indoors this weekend and amongst other things installed a Bitcoin daemon on a public facing server so I could have a play with the API/RPC features.

Below I document the steps I followed as it turned out to be slightly more taxing than the usual apt-get install bitcoind

Step 1) Get server

This is obviously optional depending on where it’s going but as I wanted it on a public facing machine and I’ve got a few projects where I need to using it soon I installed a new Debian image on the Rackspace cloud.

The newest version of Debian is ‘squeeze’ so I chose that and as for now this is for testing I chose the cheapest instance, 256MB RAM/10GB space for 24p a day (!) but can change this later if I need more grunt.

Step 2) apt-get install fail

It turns out that bitcoind isn’t in the standard package list for squeeze so you need to install it via back-ports. To do so add the following to your...

0 0
13
...
0 0
14

The green address is a third party trust trick and can help resolve most problems related to the need to wait for confirmations (slow transactions).

To make it very simple :

Service A publishes its green address, service B decides to trust service A.

When someone send bitcoins from service A to service B, he will send from the service A green address.

The service B knows he can trust the service A, he knows A won't double spend, so B can credit the sent bitcoins immediately, without waiting for confirmations ( or waiting for just one confirmation, which is probably wiser ).

This is mostly useful for transferring bitcoins b2b (business to business), typically it would help making arbitrage easier and faster between 2 bitcoin exchanges, if both decide to trust each other's green address.

This can also be useful to allow for POS (Point of sales) with instant transactions if the POS can trust the green address of your bitcoin bank (or online...

0 0
15

One of the reasons Bitcoin has experienced a degree of success over other digital currencies is its ability to overcome what is known as the double-spend problem. Double spending, for many years, had been a vexing issue for any sort of e-currency: how to avoid someone from having the ability to send money to one party while simultaneously sending it to another.

Double spending is not a problem that exists in physical fiat-based currencies. This is due to the fact that one can duplicate files that make up a digital system much more easily than the time and effort it takes to counterfeit something like paper money. For digital currencies, a host of problems can result from double spending as it can easily destroy confidence and has been one of the reasons why money that is not backed by a government has struggled to take off – until now.

Bitcoin solves the double spending issue by utilizing proof of work, requiring that a mathematical problem set be solved in order for...

0 0
16

mSIGNA

Control over your money

This wallet gives you full control over your bitcoins. This means no third party can freeze or lose your funds. You are however still responsible for securing and backing up your wallet.

Full validation

This wallet requires you to install full node software that validates and relays transactions on the Bitcoin network. This means no trust in a third party is required when verifying payments. Full nodes provide the highest level of security and are essential to protecting the network. However, they require more space (over 100GB), bandwidth, and a longer initial synchronization time.

Basic transparency

The developers of this wallet publish the source code for the client. This means any developer in the world can audit the code. However, you still need to trust developers of this wallet when installing or updating the final software because it was not built deterministically like Bitcoin...

0 0
17

Some projects using bitcoinj

bitcoinj is a library for working with the Bitcoin protocol. It can maintain a wallet, send/receive transactions without needing a local copy of Bitcoin Core and has many other advanced features. It's implemented in Java but can be used from any JVM compatible language: examples in Python and JavaScript are included.

It comes with full documentation and many large, well known Bitcoin apps and services are built on it.

Features

Highly optimised lightweight simplified payment verification (SPV) mode. In this mode, only a small part of the block chain is downloaded, making bitcoinj suitable for usage on constrained devices like smartphones or cheap virtual private servers. Experimental full verification mode, which does the same verification work as Bitcoin Core. In this mode, the unspent transaction output set (UTXO set) is calculated and, thanks to a PostgreSQL store, can be indexed into a database allowing for fast...
0 0
18

Blockstream announced the acquisition of Bitcoin wallet provider GreenAddress on Wednesday. In a post on the company’s official blog, Blockstream President Adam Back noted, “GreenAddress has a demonstrated track record of delivering an industry-leading product that prioritizes security, privacy and convenience.”

GreenAddress has been quick to implement new Bitcoin features, such as fee estimation and replace-by-fee, into its own wallet. Also, GreenAddress developer Lawrence Nahum is a supporter of the Bitcoin Core scalability roadmap and says he’s excited about the improvements that are coming to Bitcoin in the near future.

Bitcoin Magazine reached out to Nahum to get the details on what GreenAddress will be working on now that it is under the Blockstream umbrella of Bitcoin products and services.

Implementing CHECKSEQUENCEVERIFY

Nahum was quick to bring up the upcoming implementation of OP_CHECKSEQUENCYVERIFY (CSV) to improve the refund process on their...

0 0