Bitcoin RPC from Python - UpCoder coding blog

Using python 3 with bitcoins json-rpc

This is my code. I'm running a bitcoin full node and I'm trying to get data from the mempool using the rpc. I have tried various ways of passing the command and required arguments with no success.
import json import requests def stuff(cmd): url = 'http://xxx:[email protected]:8332' headers = {'content-type': 'text/plain'} payload = { "method": str(cmd), "params": [], "jsonrpc": "1.0", } response = requests.post(url, data=json.dumps(payload), headers=headers).json() print(response) return (response["result"]) j = stuff('gettxout e8d4f067ee1ae55f63efd567865e74cbe99c704f50f6f8d4e0f4bc8f3cdf93f1 0') print(j) 
here gettxout is the method and e8d4... 0 are required parameters thanks for any help bitcoin rpc reference E: I have tried passing the params in a list in params as well
submitted by teemalph to learnpython [link] [comments]

Bitcoin mentioned around Reddit: Using python 3 with bitcoins json-rpc /r/learnpython

Bitcoin mentioned around Reddit: Using python 3 with bitcoins json-rpc /learnpython submitted by BitcoinAllBot to BitcoinAll [link] [comments]

Power of the Command Line (bitcoin-cli, hwi, electrum, trezorctl)

I think some of the console tools available with HW wallets today are greatly under utilized. Here's a quick write-up on how to create and sign a TXN very similar to 43d27...1fc06 found on the SLIP-14 wallet. I'll be using TrezorCTL, Electrum, and HWI for the signing. I won't go much into the setup or install, but feel free to ask if you have questions about it. Note, you don't have to use all three of these. Any one will produce a valid signed TXN for broadcast. I just showed how to do it three ways. Whats more some of the Electrum and HWI steps are interchangeable.
ColdCard also has a utility called ckcc that will do the sign operation instead of HWI, but in many ways they are interchangeable. KeepKey and Ledger both have libraries for scripted signing but no one-shot, one-line console apps that I know of. But HWI and Electrum of course work on all four.

TrezorCTL

This is the what most would think of to use to craft and sign TXNs, and is definitely very simple. The signing uses a script called build_tx.py to create a JSON file that is then used by the btc sign-tx command. The whole process is basically:
  1. tools/build_tx.py | trezorctl btc sign-tx -
This just means, take the output of build_tx and sign it. To copy 43d27...1fc06, I wrote a small script to feed build_tx, so my process looks like:
  1. ~/input.sh | tools/build_tx.py | trezorctl btc sign-tx -
But it's all very simple. Note... I used TrezorCTL v0.12.2 but build_tx.py version 0.13.0 1.

input.sh

```

!/bin/bash

secho() { sleep 1; echo $*}
secho "Testnet" # coin name secho "tbtc1.trezor.io" # blockbook server and outpoint (below) secho "e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00:0" secho "m/84'/1'/0'/0/0" # prev_out derivation to signing key secho "4294967293" # Sequence for RBF; hex(-3) secho "segwit" # Signature type on prev_out to use secho "" # NACK to progress to outs secho "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3" # out[0].addr secho "10000000" # out[1].amt secho "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu" # out[1].addr secho "20000000" # out[1].amt secho "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x" # out[2].addr secho "99999694" # out[2].amt secho "" # NACK to progress to change secho "" # NACK to skip change secho "2" # txn.version secho "0" # txn.locktime ```

Electrum

Electrum is one of the better GUI wallets available, but it also has a pretty good console interface. Like before you need your Trezor with the SLIP-14 wallet loaded and paired to Electrum. I'll assume Electrum is up and running with the Trezor wallet loaded to make things simple.
Like with TrezorCTL, Electrum feeds on a JSON file, but unlike TrezorCTL it needs that JSON squished into the command line. This is a simple sed command, but I won't bore you with the details, but just assume that's done. So the process in Electrum (v4.0.3) looks like:
  1. electrum serialize (create psbt to sign)
  2. electrum --wallet signtransaction (sign said psbt)
Still pretty simple right! Below is the JSON I smushed for #1

txn.json

{ "inputs": [{ "prevout_hash":"e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00", "prevout_n": 0, "value_sats": 129999867 }], "outputs": [{ "address": "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3", "value_sats": 10000000 },{ "address": "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu", "value_sats": 20000000 },{ "address": "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x", "value_sats": 99999694 }]}

HWI

HWI is an unsung hero in my book. It's a very small clean and simple interface between HW wallets and Bitcoin Core. It currently supports a good range of HW wallets. It keeps itself narrowly focused on TXN signing and offloads most everything else to Bitcoin Core. Again, I'll assume you've imported your Trezor keypool into Core and done the requisite IBD and rescan. And if you don't have the RPC enabled, you can always clone these commands into the QT-console.
To sign our TXN in HWI (v1.1.2), we will first need to craft (and finalize) it in Bitcoin Core (0.21.1). Like in Electrum, we will have to use simple sed to smush some JSON into command arguments, but I'll assume you have that covered. It will take an inputs.json and an outputs.json named separately.
  1. bitcoin-cli createpsbt (create psbt)
  2. bitcoin-cli -rpcwallet= walletprocesspsbt (process psbt)
  3. hwi -f signtx (sign psbt)
  4. bitcoin-cli -rpcwallet= finalizepsbt (get a signed TXN from psbt)
A little more involved, but still nothing too bad. Plus this gives you the full power of Bitcoin Core including integrations with LND (lightning).

inputs.json

[{ "txid": "e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00", "vout": 0 }]

outputs.json

[{ "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3": 0.10000000 },{ "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu": 0.20000000 },{ "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x": 0.99999694 }]

Conclusion

This may all seem like very low level coding, but is surprisingly simple once you get a knack for it. Whats more, all these platforms support testnet which allows you to practice with valueless coins until you get the hang of it. And, like many things in bitcoin, this is all (mostly) python, which is one of the easier languages to learn.
Enjoy
Footnotes
1 - https://github.com/trezotrezor-firmware/issues/1296
submitted by brianddk to Bitcoin [link] [comments]

Power of the Command Line (bitcoin-cli, hwi, electrum, trezorctl)

I think some of the console tools available with HW wallets today are greatly under utilized. Here's a quick write-up on how to create and sign a TXN very similar to 43d27...1fc06 found on the SLIP-14 wallet. I'll be using TrezorCTL, Electrum, and HWI for the signing. I won't go much into the setup or install, but feel free to ask if you have questions about it. Note, you don't have to use all three of these. Any one will produce a valid signed TXN for broadcast. I just showed how to do it three ways. Whats more some of the Electrum and HWI steps are interchangeable.

TrezorCTL

This is the what most would think of to use to craft and sign TXNs, and is definitely very simple. The signing uses a script called build_tx.py to create a JSON file that is then used by the btc sign-tx command. The whole process is basically:
  1. tools/build_tx.py | trezorctl btc sign-tx -
This just means, take the output of build_tx and sign it. To copy 43d27...1fc06, I wrote a small script to feed build_tx, so my process looks like:
  1. ~/input.sh | tools/build_tx.py | trezorctl btc sign-tx -
But it's all very simple. Note... I used TrezorCTL v0.12.2 but build_tx.py version 0.13.0 1.

input.sh

```

!/bin/bash

secho() { sleep 1; echo $*}
secho "Testnet" # coin name secho "tbtc1.trezor.io" # blockbook server and outpoint (below) secho "e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00:0" secho "m/84'/1'/0'/0/0" # prev_out derivation to signing key secho "4294967293" # Sequence for RBF; hex(-3) secho "segwit" # Signature type on prev_out to use secho "" # NACK to progress to outs secho "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3" # out[0].addr secho "10000000" # out[1].amt secho "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu" # out[1].addr secho "20000000" # out[1].amt secho "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x" # out[2].addr secho "99999694" # out[2].amt secho "" # NACK to progress to change secho "" # NACK to skip change secho "2" # txn.version secho "0" # txn.locktime ```

Electrum

Electrum is one of the better GUI wallets available, but it also has a pretty good console interface. Like before you need your Trezor with the SLIP-14 wallet loaded and paired to Electrum. I'll assume Electrum is up and running with the Trezor wallet loaded to make things simple.
Like with TrezorCTL, Electrum feeds on a JSON file, but unlike TrezorCTL it needs that JSON squished into the command line. This is a simple sed command, but I won't bore you with the details, but just assume that's done. So the process in Electrum (v4.0.3) looks like:
  1. electrum serialize (create psbt to sign)
  2. electrum --wallet signtransaction (sign said psbt)
Still pretty simple right! Below is the JSON I smushed for #1

txn.json

{ "inputs": [{ "prevout_hash":"e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00", "prevout_n": 0, "value_sats": 129999867 }], "outputs": [{ "address": "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3", "value_sats": 10000000 },{ "address": "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu", "value_sats": 20000000 },{ "address": "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x", "value_sats": 99999694 }]}

HWI

HWI is an unsung hero in my book. It's a very small clean and simple interface between HW wallets and Bitcoin Core. It currently supports a good range of HW wallets. It keeps itself narrowly focused on TXN signing and offloads most everything else to Bitcoin Core. Again, I'll assume you've imported your Trezor keypool into Core and done the requisite IBD and rescan. And if you don't have the RPC enabled, you can always clone these commands into the QT-console.
To sign our TXN in HWI (v1.1.2), we will first need to craft (and finalize) it in Bitcoin Core (0.21.1). Like in Electrum, we will have to use simple sed to smush some JSON into command arguments, but I'll assume you have that covered. It will take an inputs.json and an outputs.json named separately.
  1. bitcoin-cli createpsbt (create psbt)
  2. bitcoin-cli -rpcwallet= walletprocesspsbt (process psbt)
  3. hwi -f signtx (sign psbt)
  4. bitcoin-cli -rpcwallet= finalizepsbt (get a signed TXN from psbt)
A little more involved, but still nothing too bad. Plus this gives you the full power of Bitcoin Core including integrations with LND (lightning).

inputs.json

[{ "txid": "e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00", "vout": 0 }]

outputs.json

[{ "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3": 0.10000000 },{ "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu": 0.20000000 },{ "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x": 0.99999694 }]

Conclusion

This may all seem like very low level coding, but is surprisingly simple once you get a knack for it. Whats more, all these platforms support testnet which allows you to practice with valueless coins until you get the hang of it. And, like many things in bitcoin, this is all (mostly) python, which is one of the easier languages to learn.
Enjoy
Footnotes
1 - https://github.com/trezotrezor-firmware/issues/1296
submitted by brianddk to TREZOR [link] [comments]

What naming convention should I use for a JSON RPC client API designed for multiple languages?

This is the documentation with the original RPC client API specification. The naming convention in the specification is camel case.
Naming conventions might differ in subtle ways for different languages (camel case vs. pascal case), but for some conventions like snake case (Python) or Swift's Fluent Usage API changing the names in the original specification might increase the cognitive load when using the API for those already familiar with the specification.
When searching for different JSON RPC APIs on GitHub, some implementations seem to take advantage of reflection to intercept method calls and pass them to RPC request "as is" so method names for that language are the same as in the original spec. If reflection is not available the names are hardcoded and are mostly the same as the spec, changing only the capitalization of letters for some languages.
Some examples:
Not using Fluent Design in Swift
https://github.com/fanquake/CoreRPC/blob/masteSources/CoreRPC/Blockchain.swift https://github.com/brunophilipe/SwiftRPC/blob/masteSwiftRPC/SwiftRPC+Requests.swift
Not using snake case in Ruby
https://github.com/sinisterchipmunk/bitcoin-client/blob/mastelib/bitcoin-client/client.rb
Changing method names to pascal case in C#
https://github.com/cryptean/bitcoinlib/blob/mastesrc/BitcoinLib/Services/RpcServices/RpcService/RpcService.cs
submitted by rraallvv to learnprogramming [link] [comments]

[FOR HIRE] Python Software Engineer — 12 years of experience

Looking for a job: CTO, Team Lead, Developer. 12 years of professional experience in software development. Python, JavaScript. Available for remote work and relocation.
Experienced in planning the development of new projects, working on the architecture, preparing the requirements, writing specifications, and leading teams. I enjoy teaching people to code and doing code review. I ask other developers to write code of high quality and refactor it so the code is simple and readable.
Worked on 20 complex projects for companies from 5 countries, including an adaptive online learning platform for Bloomberg and The Economist used by students around the world for exam preparation.
I have experience with caching, task queues, unit tests, image processing, encoding, API, parsing, multithreaded and asynchronous applications.
When working on a project, I write detailed documentation that helps any new developers to quickly join the project.
[email protected]
submitted by aruseni to RemoteJobs [link] [comments]

[FOR HIRE] Python Software Engineer — 12 years of experience

Looking for a job: CTO, Team Lead, Developer. 12 years of professional experience in software development. Python, JavaScript. Available for remote work and relocation.
Experienced in planning the development of new projects, working on the architecture, preparing the requirements, writing specifications, and leading teams. I enjoy teaching people to code and doing code review. I ask other developers to write code of high quality and refactor it so the code is simple and readable.
Worked on 20 complex projects for companies from 5 countries, including an adaptive online learning platform for Bloomberg and The Economist used by students around the world for exam preparation.
I have experience with caching, task queues, unit tests, image processing, encoding, API, parsing, multithreaded and asynchronous applications.
When working on a project, I write detailed documentation that helps any new developers to quickly join the project.
[email protected]
submitted by aruseni to Jobs4Bitcoins [link] [comments]

[FOR HIRE] Python Software Engineer — 12 years of experience

Looking for a job: CTO, Team Lead, Developer. 12 years of professional experience in software development. Python, JavaScript. Available for remote work and relocation.
Experienced in planning the development of new projects, working on the architecture, preparing the requirements, writing specifications, and leading teams. I enjoy teaching people to code and doing code review. I ask other developers to write code of high quality and refactor it so the code is simple and readable.
Worked on 20 complex projects for companies from 5 countries, including an adaptive online learning platform for Bloomberg and The Economist used by students around the world for exam preparation.
I have experience with caching, task queues, unit tests, image processing, encoding, API, parsing, multithreaded and asynchronous applications.
When working on a project, I write detailed documentation that helps any new developers to quickly join the project.
[email protected]
submitted by aruseni to jobpostings [link] [comments]

Problems checking wallet, bitcoin core on another server

So my setup is that currently Bitcoin core is running on a Windows server, and joinmarket is a fresh install on debian. Bitcoin core is a full node, no pruning, fully synced. I had some problems opening up RPC but I think that part works now (no longer getting timeouts).
But instead this happens:
[email protected]:/home/johan/joinmarket-0.2.3# python wallet-tool.py wallet.json 2019-08-22 12:12:57,613 [MainThread ] [INFO ] hello joinmarket 2019-08-22 12:12:57,613 [MainThread ] [INFO ] Joinmarket directory is: /home/johan/joinmarket-0.2.3 Enter wallet decryption passphrase: 2019-08-22 12:13:07,323 [MainThread ] [INFO ] requesting detailed wallet history from Bitcoin Core client Traceback (most recent call last): File "wallet-tool.py", line 126, in  sync_wallet(wallet, fast=options.fastsync) File "/home/johan/joinmarket-0.2.3/joinmarket/blockchaininterface.py", line 79, in sync_wallet jm_single().bc_interface.sync_wallet(wallet) File "/home/johan/joinmarket-0.2.3/joinmarket/blockchaininterface.py", line 959, in sync_wallet super(BitcoinCoreInterface, self).sync_wallet(wallet) File "/home/johan/joinmarket-0.2.3/joinmarket/blockchaininterface.py", line 88, in sync_wallet self.sync_addresses(wallet) File "/home/johan/joinmarket-0.2.3/joinmarket/blockchaininterface.py", line 1065, in sync_addresses imported_addr_set = set(self.rpc('getaddressesbyaccount', [wallet_name])) File "/home/johan/joinmarket-0.2.3/joinmarket/blockchaininterface.py", line 935, in rpc res = self.jsonRpc.call(method, args) File "/home/johan/joinmarket-0.2.3/joinmarket/jsonrpc.py", line 117, in call raise JsonRpcError(response["error"]) joinmarket.jsonrpc.JsonRpcError [email protected]:/home/johan/joinmarket-0.2.3# 
Any idea what could be wrong? I am stuck....
submitted by hides_dirty_secrets to joinmarket [link] [comments]

What are the best Python libraries for dealing with Bitcoin?

What are the best Python libraries for dealing with Bitcoin? Things like checking wallet balances, making transactions, etc.
Also, do different clients such as Classic, XT, Unlimited, etc. use different APIs?
submitted by MentalRental to btc [link] [comments]

Noobie Q: Falling over at Mastering Bitcoin’s first Python example...

I’ve seen others have had something similar but for the life of me I’m still stuck...at the first step in Mastering Bitcoin’s first Python example..
My setup -
LND Raspberry PI connecting to it via Putty SSH (blockchain up to date and running fine, eg getblockchain info)
I’ve installed python with: sudo apt-get install libssl-dev
Process I followed -
Once connected through SSH/Putty, I change to my “bitcoin” user
Using nano, I create a “rpc_example.py” file following the code in the book
Then back at the cli I run it with:
“Python rpc_example.py”
And I get this error below which shows its fallen over at the first line - import from bitcoin.rpc import RawProxy
“No module named bitcoin.rpc”
Confusion: I’m not sure if this is an access issue cos of the way I’m connecting or if I’m mixed up between JSON-RPC vs Cli or I’m not following/running things from the right location.
Help please? or maybe I just need to first get a better grip on the fundamentals of Linux/python?
Edit 6/1/18: Success. This group rocks.
I wasn’t going to continue with Mastering Bitcoin if I didn’t get past that exercise - but thanks to you for all the timely advice and suggestions i now can. So much learning in the doing that’s for sure. You can see my finding-my-way-in-the-dark-experience (with the fantastic guidance by this group) in my comments below.
submitted by Haso_04 to Bitcoin [link] [comments]

How does blockchain.info analyze the block chain?

I am wanting to look at a handful of things on the block chain (primarily because I just finished finals and am bored and need a new project) but using blockchain.infos API isn't possible because I would go through the limit in like 2 minutes.
Since I have a copy of the blockchain, I was wondering if there is any public API to analyze it? Primarily current wallet balance, number of transactions made, last transaction made, and if they have made any transactions with a list of pre-determined addresses.
Any and all help is greatly appreciated!
submitted by bobert5696 to Bitcoin [link] [comments]

Technical community | LBTC tech community member develops a new blockbrowser ‘Thebes’

Technical community | LBTC tech community member develops a new blockbrowser ‘Thebes’
Recently, from the LBTC developer community ,a geek called Chen Jian helped LBTC develope a new block browser — “Thebes” : https://lbtc.me/lbtc/explorer .

https://preview.redd.it/lbfr0m0ev4031.png?width=1059&format=png&auto=webp&s=973796c43edbe3f095b82ad0b967ed31e20c831d
Thebes mainly USES python development language and flask development framework. In terms of database, high-performence MongoDB is selected to cooperate with Mysql. By using transaction id as the primary key of data storage, the speed of transaction information search is greatly improved. In other development respects, the Web server selects nginx, the process management tool selects supevisor and python(gevent), and the timing task tool selects crontab. Meanwhile, in the development process of Thebes, some js and CSS code fragments were optimized and compressed to speed up the page loading speed. In GTmetrix and Yellowlab’s global blockbrowser performance tests, the “Thebes” browser received the highest grade A in core metrics such as CSS snippet authoring, image loading, style & script optimization, linking server resources, and docking cache validators.
Click the link to see the full rating report:
https://gtmetrix.com/reports/lbtc.me/rsXxSwhI
https://yellowlab.tools/result/fcakefdwkk
Compared to existing LBTC blockbrowsers, Thebes has the following innovative features
Global Mining Node Full Information Statistics
In the node page of Thebes, the user can easily find information about all the mining nodes of LBTC. As of May 17, 2019, Beijing time, LBTC has 231 full nodes in operation, among which 17 nodes use the network client of /Satoshi: 0.14.2/70013 version. Of the 231 nodes, two have adopted IPv6’s sixth generation Internet communication scheme. In addition to this basic information, the user can see information for each specific node. For example, the node ranked 81 in votes :(cobo.com/lbtc.7), the address balance, transaction information, block history, voting information, proposal status and so on.

https://preview.redd.it/rw32iyqhv4031.png?width=1075&format=png&auto=webp&s=42c9322b6eeb891b1ff288e8375fe5e9d97fd287
The blockbrowser is also a network interface to JSON-RPC. In order to better count the mining nodes of the LBTC network around the world, the browser does this by continuously sending getaddr information to all accessible network nodes.
Real-time Update of Network Status
In a Bitcoin network, the value of a Bitcoin is proportional to the square of the number of people using the network, which is determined by two parameters: the number of addresses and the daily transaction volume. In the “Thebes” browser, the core parameters of the network, such as daily transaction volume, daily change in the number of newly added Lightning Bitcoin addresses, total number of Lightning Bitcoin holders, average transfer fee and average block volume, are all clearly displayed.

https://preview.redd.it/pukrf8hjv4031.png?width=1074&format=png&auto=webp&s=3e5989be9c95b4fc1bc2e578defddfdb48c4109e
About the Technical Community
The LBTC technology community was officially launched in early April 2019. The core developer of the technology community, W.H.H., announced on Twitter on April 15 that the LBTC foundation would invest more than $1 million in technology community incentives. The open rewards system gives developers from around the world a way to learn about blockchain development, try new ideas and contribute to projects. The technology community is still in its infancy, but it has brought together a group of passionate developers. By writing documents, developing blockbrowsers and wallets, and organizing offline seminars for the developer community, they have helped the community thrive and opened the door to LBTC for many investors and developers.
submitted by LightningBitcoin to LightningBTC [link] [comments]

The great Blockchain search

Alright now that we have fairly conclusive evidence that Julian is inside the Embassy I think it's time to discuss what we have found in our search of the blockchain. As many of you may know I spearheaded the search and contributed to enhanced versions of the jean.py scripts that work directly on the local blockchain but still retained https://blockchain.info/ calls for those who did not want to download the full blockchain. First I will post our github repo https://github.com/WikiLeaksFreedomForce and I will discuss the different code used and some of the things we've found through our testing and learning of the blockchain technology.
 
First off I started working with the original Jean.py scripts. They didn't work for me originally and I had to modify them a bit to get them to work. Once I did that I set out to make it much easier to use. On the chans there was talk of using a program called trid which is used to determine a file type of an unknown set of data. It's fairly advanced and has an ever growing database of known file types so it would often give false positives. We figured we could just get a list of known file headers to search for inside the data and limit the scope to fewer false positives. So within my first week of starting we already had code that worked pretty well at finding things. The main goal at first was to be able to successfully download the cablegate archive that Wikileaks uploaded themselves to the blockchain which was relatively simple with the full list of transactions that they themselves uploaded right after.
 
Moving forward from Jean.py I needed a faster way of communicating with the data from the blockchain and I found the JSON RPC commands built into the bitcoin client. The first couple weeks I had some issues with the fact the latest versions of bitcoin core don't keep a database of transaction ID's stored by default. Fortunately on my second attempt to getting it I enabled txindex=1 inside the bitcoin conf file. This had to rebuild the full index of each transaction and took several days.
 
Shortly after I did this work the first "great blockchain" post was made here and we gained a lot of support from other programmers willing to help out. We had one user build a Go program that does the same thing and avoids the issue of txindex=1, we had another user help us build a framework for parsing the blocks directly in c#, and we had another user more experienced in Python to help out with the original script. With the new help we were able to prototype new techniques for searching relatively quickly as well as improve readability and usage of the code. There are still plans to continue improving the code and make it easier to use but desire to keep working on it has come to a halt since most people are confident that Julian is safe in the Embassy and his Dead Man Switch was not released.
 
The blockchain is rather interesting as it's a ledger of information. Each transaction has a series of data that it uses to transmit and store information. I'm not fully aware of every aspect but I have learned a lot in the great search. We've found that most information stored as human readable content is inside the scripts. Each transaction has an input and output script. These are stored as binary data inside the blockchain .dat files and displayed as hex data through RPC and on https://blockchain.info/. The hex data tends to make it easier to see the data whereas often times unicode translations will make it look like gibberish.
 
Our code was designed around the principals of the original Satoshi Upload script as well as the download script. This used a unique line of code that ensured the correct data was uploaded and can be downloaded. This line encoded the length and a checksum of the data for the transaction inside each transaction. So when applying the Satoshi Downloader you can search for the first 8 bytes of data for a length value and checksum for data that follows that length after the first 8 bytes. Websites like http://www.cryptograffiti.info/ do not use this length and checksum. Right now our code can download everything inside a transaction that we know about. There are ways of improving speed by only flagging a transaction that contains significant information such as known file headers or follows the length and checksum from Satoshi. This has lead to a few interesting finds. Including but not limited to Peter Todd's lucifer linux burn in utility. I still plan to add a plaintext search at some point but there are websites devoted to finding those.
 
One thing that I couldn't get to work right was finding Wikileaks file hashes inside the blockchain. The information on how they do it is limited and I was only able to find the one cabelgate hash stored following the same idea as OpenTimeStamps. Searching for hashes takes a long time though and I have a simple python parser made that takes a dictionary of all the hashes and searches for them. The dictionaries I have as well as the python script are all on the girhub repo.
 
Some things we have found include: Cablegate, This is dog meme, unknown gpg acceptable files, plaintext messages, and a 7z with a message from Julian Assange(Don't get too excited I uploaded it myself to prove a point that we can't verify who sends a transaction). We haven't found anything really that hasn't already been documented or is available on other sites.
 
I would like to thank everyone who was involved on the Discord server working with me on this search it was great working with everyone and learning as a group!
 
Please feel free to comment and ask questions and I will try to answer them as best I can.
 
Edit: I am also free to discuss some of the stories and strange things that have occurred during the search. I tried to keep the main article about what we did do not what we were told to do or how.
submitted by TrustyJAID to WhereIsAssange [link] [comments]

BitN00B: Help with Python/JSON call : getNewAddress(account) - fail

When making a JSON call, RPC to bitcoind, what is "account" parameter in getNewAddress(account).
Does anyone have actual code to demo this? This is frustrating given how much time I have spent ( a day ),
trying to get this to work in code, trying different things, googling all over, following things to a dead end.

In my Bitcoin QT, I see no reference to "account", I don't know what to put there as a parameter.

Reference:
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list#Full_list

If I leave it blank, or I make up something to put there, I get a socket timeout.
I can successfully call: getblockchaininfo() (no params), and a few others with no socket timeout, but not getNewAddress. Anything and everything requiring a parameter fails.
--
Also if anyone can help, I please need a clear concise example of sending a transaction. I can find no good code examples on how to create a raw transaction and send with any Python/RPC/Bitcoind library out there. None. It should not take more than a few lines of code to send a transaction.
  1. set variables in a data structure
  2. make a call to send the transaction (that's it). The library will take params from the data structure, construct a raw transaction, convert that raw transaction to the format it needs when sending over http (json/rpc), as it does and I understand it to work that way.
    I would like to have the raw transaction printed out to debug, both raw transaction and the actual hex code that is sent.
    Thank You,
    JC
submitted by ThisCryptoFail to Bitcoin [link] [comments]

Nice Article About How HPB Perform Vs EOS (and so ETH)

HPB: Unique Blockchain Infrastructure
Now most public chains will mention that the problem of tps development is the problem of the blockchain. This is also because the traditional blockchain has the problem of poor performance. In order to reach consensus, the efficiency is sacrificed. But if you want to build an ecosystem of countless DAPPs based on the public chain, there is no guarantee of performance that is almost impossible.
The dream of building a DAPP ecosystem is that Bitcoin has not been completed and it is not necessary to complete it. Bitcoin is only a digital currency and it has initially fulfilled its historical mission. It has become a value storer, and it has opened the world of the blockchain. .
Ethereum started with the goal of building a world-wide computer that provided the infrastructure for building decentralized applications, but so far it has only succeeded in the crowdfunding field. Due to performance, cost, scalability, and other issues, it is not yet possible to become a DAPP infrastructure. By the end of 2017, a simple encrypted cat game would have caused Ethereum to jam. Ethereum tried to get rid of the predicament through techniques such as fragmentation, Plasma, and PoS consensus.
Newcomers, such as EOS, are highlighting their high performance, emphasizing the possibility of reaching mega-level tps. Then, in the future, an infrastructure is needed to build a prosperous DAPP ecosystem on this decentralized infrastructure to meet the user or business needs of different scenarios.
What kind of program is a better choice? This is what blue fox has been paying attention to. Blue Fox focuses on an HPB blockchain project that uses a completely different search path than other public chains or infrastructure. This path is worth paying attention to all the buddies who pay attention to the blockchain.
This path is a combination of hardware and software. It is more demanding and the practice is more difficult. However, if it is truly grounded, it may be a good path.
HPB to become a high-performance blockchain infrastructure
Whether HPB or EOS have the same goals, they must provide a high-performance infrastructure for the decentralized ecosystem. why? Mainly from the blockchain to the mainstream business scene point of view. The current blockchain has achieved some success in security and decentralization, but there are natural constraints in terms of efficiency. This hinders its application scenario to the mainstream.
This is also a direction that Blockchain 3.0 has been exploring. Through higher performance, lower costs, and better scalability to meet the needs of more decentralized application scenarios.
The current bitcoin and Ethereum's throughput are both worrying. Bitcoin supports about 7 transactions per second on average, and Ethereum has about 15 throughputs. If you make the block bigger, you can also increase the throughput, but it will cause the problem of block bloat. Last year, an encrypted cat game made everyone see the blockchain congestion problem. From a performance point of view, it takes a long time for blockchains to reach the mainstream.
In addition to the lack of tps performance, the transaction cost of the blockchain is high. Both ordinary users and developers cannot afford gas costs that are too high. For example, before Ethereum's crypto-games became hot, there were even transaction fees compared to encrypted cats. It is also expensive.
The HPB and EOS goals are similar, but their paths are completely different. HPB uses a combination of hardware and software, has its own dedicated chip hardware server, which makes it theoretically have higher performance.
HPB is also trying to create an operating system architecture that can build applications. This architecture includes accounts, identity and authorization management, policy management, databases, asynchronous communications, program scheduling on CPUs, FPGAs, or clusters, and hardware accelerated technology. Realizes low delay and high concurrency and realizes mega-level tps to meet the needs of commercial scenarios.
It is different from EOS. Its architecture, in addition to its software architecture and its hardware architecture, is a combination of hardware and software blockchain architecture that combines high-performance computing and cloud computing concepts. The hardware system includes a distributed core node composed of high performance computing hardware, a general communication network, and a cloud terminal supported by high performance computing hardware.
The core node supports a standard blockchain software architecture, including consensus algorithms, network communications, and task processing. It also introduces a hardware acceleration engine. It works with software to achieve high-performance tps through BOE technology (Blockchain Offload Engine) and consensus algorithm acceleration, data compression, and data encryption.
BOE makes HPB unique
In the HPB's overall architecture, compared with other blockchain infrastructures, there are obvious differences. One of the important points is its BOE technology.
BOE mentioned above, is the blockchain offload engine. The BOE engine includes BOE hardware, BOE firmware, and matching software systems. It is a heterogeneous processing system that achieves high performance and high concurrent computational acceleration by combining CPU serial capabilities with the parallel processing capabilities of the FPGA/ASIC chip.
In the process of parsing TCP packets and UDP packets, the BOE module does not need to participate in the CPU, which can save CPU resources. The BOE module performs integrity checking, signature verification, and account balance verification on received messages such as transactions and blocks, performs fragment processing on large data to be transmitted, and encapsulates the fragments to ensure the integrity of received data. At the same time, statistics work will be performed according to the received traffic of the TCP connection, and corresponding incentives will be provided according to the system contribution.
BOE has played its own role in signature verification speed, encryption channel security, data transmission speed, network performance, and concurrent connections.
The BOE acceleration engine embeds the ECDSA module. The main purpose of this module is to improve the speed of signature verification. ECDSA is also an elliptic curve digital signature algorithm. Although it is a mature algorithm that is widely used at present, the pure software method can only be performed thousands of times per second and cannot meet the high performance requirements. So the combination of BOE and ECDSA is a good attempt.
In the process of data transmission between different nodes, BOE needs to establish an encrypted channel. In this process, it uses a hardware random number generator to implement the security of the encrypted channel, because the seed of the random number of the key exchange becomes unpredictable.
The BOE acceleration engine also uses block data fragmentation broadcasting technology. Block fragmentation includes a complete block header, which facilitates the broadcast of newly generated blocks to all nodes. With block data fragmentation, network data can be quickly transmitted between different nodes.
The BOE technology can perform traffic statistics of node connections based on hardware, and can calculate network bandwidth data provided by different nodes. Only providing network bandwidth to the system will have the opportunity to become a high contribution value node. In this way, incentives for the contribution of the nodes are provided.
In terms of concurrency, BOE is expected to maintain more than 10,000 TCP sessions and handle 10,000 concurrent sessions through an acceleration engine. BOE's dedicated parallel processing hardware replaces the traditional software serial processing functions such as transaction data broadcasting, unverified blockwide network broadcasting, transaction confirmation broadcasting, and the like.
According to HPB estimates, through the BOE acceleration engine, the session response speed and the number of session maintenance can reach more than 100 times the processing power of the common computing platform node. If the actual environment can be achieved, it is a very significant performance improvement.
Consensus algorithm for internal and external bi-level elections
HPB not only significantly improves performance through BOE, but also adopts a dual-layer internal and external voting mechanism in consensus algorithms. It attempts to achieve more efficient consensus efficiency on the premise of ensuring security and privacy.
Outer election refers to the selection of high-contribution-value node members from many candidate nodes, and the election will use node contribution value evaluation indicators. Inner-layer election refers to an anonymous voting mechanism based on a hash queue. When a block is generated, it calculates which high-contribution value node preferentially generates a block. Nodes with high priority have the right to generate blocks preferentially.
So, how to choose high contribution value node? Here is the first indicator to evaluate the contribution value. The indicators include whether a BOE acceleration engine is configured, network bandwidth contribution (data throughput over a fixed period of time), reputation, and total node token holding time. Among them, the creditworthiness of the node is obtained through the analysis of participating transactions and data analysis such as packaged blocks and transaction forwarding. The total holding time of the node token can be obtained by real-time statistics on the account information.
The outer election adopts an adaptive and consistent election plan. That is, by maintaining the consistency of “books” to ensure the consistency of outer elections, this can reduce network synchronization, and can also use the data of each node on the chain. The first is to put the above-mentioned four evaluation indicators into the block. By keeping the account books consistent, you can calculate the current ranking of all the participating candidate nodes. The higher-ranking high-contribution value nodes will become the official high contribution in the next round. Value node.
With the formal high contribution value node, the goal of the inner election is to find the high contribution value node corresponding to each block as soon as possible. The entire process is divided into three phases: nominations, statistics, and calculations. These three phases combine security, privacy, and performance.
The first is the nomination. At the beginning of the voting period, the BOE acceleration engine generates a random Commit. The high contribution value node submits its Commit, and the Commit synchronizes with the chain generated by the high-performance node. After the voting period is over, the Commit in the blockchain is started and the ticket pool is created. The last is the calculation. The calculation is mainly based on the weight algorithm to calculate the node's generation priority in the block. Generate the highest-priority high-contribution value node and obtain the block package right.
Other nodes can verify the random number and address signature according to the principle of verifiable random function, which not only guarantees security, but also guarantees the unpredictability and privacy of high contribution value nodes.
In general, HPB's consensus algorithm combines security, privacy, and speed through a combination of hardware and software. Using the BOE acceleration engine to generate random numbers, contribution value evaluation indicators, coherence ledgers, anonymous voting mechanisms, weight algorithms, signature verification, etc., privacy, reliability, security, and high efficiency are achieved.
Universal virtual machine design: support for different blockchains
The HPB virtual machine adopts a plug-in design mechanism and can support multiple virtual machines. It can implement the combination of the underlying virtual machine and upper level program language translation and support, and support the basic application of virtual machines. In addition, the external interface of the virtual machine can be realized through customized API operations, which can interact with the account data and external data.
The advantage of this mechanism is that it can realize the high performance of native code execution when the smart contract runs, and it can also implement the common virtual machine mechanism supporting different blockchains. For example, it can support Ethereum virtual machine EVM. The smart contract on EVM can also be used on HPB.
Neo's virtual machine NeoVM can also be used on HPB. When high-performance scenarios are needed, users of both EVM and NeoVM need only a few adaptations to interact with other HPB applications.
The HPB smart contract has also made some improvements, such as the management of the life cycle, auditing and forming a common template. No progress can realize the full lifecycle management of smart contracts, such as the complete and controllable process management and integration rights management mechanism for intelligent contract submission, deployment, use, and logout.
In smart contract auditing, HPB conducts a protective audit that combines automated tool auditing with professional code design. In terms of templates, HPB gradually formed a generic smart contract template to support the flexible configuration of various common business scenarios.
Incentives for a positive cycle of token economy
When the high-contribution value node generates a block, it will receive a token reward from the system. From the design of the HPB, the system will issue a token of no more than 6% per year, and the additional token will be proportional to the total number of high-contribution nodes and candidate nodes.
In order to obtain the token reward from the system, it must first become a high contribution value node, and only the high contribution value node has the right to generate a block.
In order to obtain the right to generate a block, it is necessary to contribute, including holding a certain number of HPB tokens, having a BOE hardware acceleration engine, and contributing network bandwidth to the system.
From its mechanism, we can see that HPB's token economic system design is considered from the formation of a positive incentive system. It maintains the overall HPB system by holding the HPB token, having a BOE hardware acceleration engine, and contributing network bandwidth to the system. safe operation.
HPB landing: supports a variety of high-frequency scenes
In essence, HPB is a high-performance blockchain platform and is an infrastructure where various blockchain applications can be explored. Including blockchain finance, blockchain games, blockchain entertainment, blockchain big data, blockchain anti-fake tracking, blockchain energy and many other fields.
In terms of finance, decentralized lending, decentralized asset management, etc. can all be built on the HPB platform to meet high-frequency lending and transaction scenarios.
In terms of games, although all game operations are not practical, the up-chaining and trading of assets such as game props are important scenes. Once the realization of the game product chain, you can ensure that the game assets are transparent, unique, can not be tampered with, never disappeared, etc., providing great convenience for the transaction between the game products.
Compared with traditional centralized service providers, there are many advantages. For example, there is no need to worry about the loss, confiscation, or change of virtual game products. The transaction process is also simple and convenient. Since HPB has a high-performance blockchain, it is expected to support millions of concurrents, and many high-frequency scenarios can also be satisfied.
For blockchain entertainment, it can support the securitization of star assets, such as star-related token assets. In terms of blockchain big data, it can support the data right, ensure that the data owner controls the data ownership, ensure the authenticity of the data, traceability, can not be modified, and finally realize data transactions according to the needs of different entities. , to ensure personal privacy and data security.
Based on HPB's blockchain infrastructure, based on its high performance, blockchain applications can be built in multiple scenarios. The HPB design provides a blockchain application program interface and application development package. In the HPB blockchain base layer, it provides blockchain data access and interactive interfaces, and supports various applications and development languages ​​using JSON-RPC and RESTful APIs. It also supports multi-dimensional blockchain data query and transaction submission, and the interactive access interface can be integrated with the privilege control system.
The application development package includes comprehensive functional service packages that operate on blockchains based on different development languages. For example, it provides functional interfaces such as encryption, data signature, and transaction generation, and can seamlessly support integration and function expansion of various language service systems. , supports multiple language SDKs such as Java, JavaScript, Ruby, Python, and .NET.
Conclusion
If the future blockchain wants to enter the mainstream population, it must have high-performance public-chain or infrastructure support to form a true application ecosystem. Ethereum's dream to build a decentralized ecosystem cannot be achieved on an existing basis. Ethereum is trying to improve performance and expand scalability through fragmentation, plasma, and pos consensus mechanisms.
At the same time, the current status quo has also spawned other public-linked efforts, including eos, HPB, etc. Among them, HPB has adopted a unique combination of hardware and software, dedicated BOE hardware acceleration, signature verification speed, encryption channel security, data transmission Speed, network performance, and high concurrent support all have their own advantages over simple software solutions.
In the software architecture, consensus algorithms for internal and external elections, flexible virtual machine design, application program interfaces, and development packages are also used to provide infrastructure for the development of blockchain application scenarios.
From the overall design of HPB, its goal is to provide high-performance infrastructure for the entire blockchain to mainstream people. With a high-performance infrastructure, blockchains can only be implemented in many high-frequency scenarios to create more application ecosystems and have the opportunity to reach mainstream people.
The HPB team focused on the technical background, including the founder Wang Xiaoming who was an early evangelist in the blockchain and once participated in the establishment of UnionPay Big Data, Beltal, and Beltal CTO. Co-founder CTO Xu Li has more than 10 years of experience in chip industry R&D and management. He was responsible for the logic design, R&D, and FPGA chip marketing of the core products of the world's top qualified equipment suppliers and the world's largest component distributor. Technical VP Shu Shanlin once worked for Inspur, a well-known Chinese server manufacturer, as an embedded chief engineer, and has extensive R&D experience in embedded software and underlying software. Another co-founder, Li Jinxin, is a former blockchain analyst of Guotai Junan and has extensive experience in digital asset investment.
The background of the team members is in line with the HPB's soft and hard path. According to the latest monthly report, the basic PCB layout design of the BOE board, the overall architecture design of the BOE, and the ECC acceleration scheme have also been completed. At the same time, several tests have been completed for the BOE hardware acceleration engine.
It is hoped that HPB will develop rapidly and will embark on a path with its own characteristics in the future of blockchain infrastructure competition. It will provide support for more decentralized applications and eventually build a prosperous ecosystem.
Risk Warning: All Blue Fox articles do not constitute investment recommendations, investment risks, it is recommended to conduct in-depth inspection of the project, and carefully make their own investment decisions.
Source: https://mp.weixin.qq.com/s/RSuz6R6MTotEL_U__Al_Wg
submitted by azerbajian to HPBtrader [link] [comments]

Development roundup, 11th Jan 2015

Happy new year everyone!
So; personal update first, I'm leaving my current job and moving to a new position a few hundred miles south. It's not cryptocurrency-related, before everyone asks, but it is a very positive career step, and I'm thrilled to have this opportunity. Being closer to London also means I can get to events in London a lot more easily, so hopefully can attend more conferences both to catch up on what others are doing, and talk about Dogecoin!
Talking of conferences, I'll be at http://bitcoinexpo2015.com/ later this month. I don't have a schedule yet, but I'm told there will be a Dogecoin panel, and I'll be happy to handle technical questions there.
Onwards with development stuff; we've been spreading out into related tools a bit more recently. So, langer_hans has been working on the new Android wallet, while I've been pushing forward with Cate - Cross-chain Atomic Trading Engine. Dogecoin Core 1.9 work has started, based on Bitcoin Core 0.10, however as there's no immediate issue demanding it, it makes more sense to work on other tools right now. The Android client update is based on an updated dogecoinj from the latest bitcoinj, which lays some of the groundwork for Multidoge HD (yes, software dependencies do look like a spider's web after a while). I'll leave langer_hans to talk more about that in time.
I'm really excited by Cate (that's "cat" with an e on the end if you were wondering where it came from), as it's the first proof of concept for cross-chain trades, and enables entirely decentralised trading between cryptocurrency pairs. In light of issues with numerous exchanges being hacked or outright failing, hopefully the advantage of trustless direct trades is clear. Key points:
For more detail, please see the README which is also kept up to date with day to day changes.
There's a couple of similar projects out there that are noteworthy as well, Bitsquare for fiat/crypto exchanges, and Swapbill as a sidechain based alternative. 2015 looks really exciting for decentralised exchanges.
CATE depends on python-bitcoinlib to handle a number of data types (blocks, transactions, transaction inputs/outputs, etc.), and as that library does not support altcoin chains, I've created a library which extends it, python-altcoinlib. That's current a work in progress, and I'd love some more attention on either project.
I'll post updates on these projects to /dogecoindev as they hit milestones, or follow along on Github. Next general update would normally be the 25th of this month, however I'll be in London (or flying back from London), so it will likely be the 1st instead.
TLDR; new Android wallet, very wow, better tools for trading cryptocurrencies, much awesome. New shinies to make it easier to build tools.
Stay wow!
Ross
submitted by rnicoll to dogecoin [link] [comments]

Recommend Bitcoin REST API for .NET programmer / BlockExplorer API

Hi Bitcoin experts,
I need some advice. What's the best way for a Windows/.NET developer like me to access blockchain information via a REST/RPC API ?
The server app I'm building does the following on a fairly regular basis:
(1) Looks up all transactions involving a specified Bitcoin address and takes action based on the results, and...
(2) Executes outbound transactions, where the transaction bytes are supplied as a preconfigured hex-formatted byte stream.
Here's what I'm doing now:
There's a web API called Insight. It's used by Block Explorer and documented here at https://blockexplorer.com/api-ref. This is where I'm currently pointing my app. It works really well and seems to handle everything I throw at it but I'm concerned that as my load increases (e.g. peaking at 100 queries/minute or more), at some point the site operator will cut me off.
I've tried to mitigate the problem by finding other sites that support the same API. https://insight.bitpay.com is one. https://chain.localbitcoins.com is another. I put these sites in a text file and my app calls into the API on each site in a round robin fashion.
This works. Still though, I'm now encountering errors from the sites' respective CDNs that sit in front of some of the sites -- presumably because I'm running too many queries.
What's a more scalable solution for me?
I have no problem paying a few hundred bucks per month for an AWS server to run a service on my own -- one that only I would use. I'm not exactly sure how to do this though. The Insight API I'm using now, like much of the Bitcoin world, seems geared toward the Linux/Python crowd -- not old farts like me in the Windows/.NET world. I wouldn't even know how to install it.
I also ran across the RPC API located here at https://en.bitcoin.it/wiki/API_reference_(JSON-RPC). Does anyone have any feedback on it's viability? Would I basically be running my own "node" at that point? I wouldn't mind doing that if it runs on Windows 2016. My needs are simple. I'm not mining or anything like that; Just running tons of queries (max 100/min) and executing transactions (max 10/hr).
Any advice is appreciated.
Best,
Festus
submitted by festus_wingbam to Bitcoin [link] [comments]

Ubuntu cannot generate wallet

I have a brand new fresh install of Ubuntu with bitcoin core. Joinmarket installed as per instructions. Bitcoin.conf file copied over from a windows machine and placed in .bitcoin folder. Joinmarket.cfg also copied over and placed in joinmarket-0.1.4 folder. I confirmed that both usernames and passwords match. These config files were working well on the windows machine. Going through TOR. After bitcoin core was up to date, I tried to generate a new wallet. Here is what I get.
[email protected]:~/joinmarket-0.1.4$ python wallet-tool.py generate 2016-06-12 18:33:25,452 [MainThread ] [DEBUG] hello joinmarket Traceback (most recent call last): File "wallet-tool.py", line 81, in  load_program_config() File "/home/jg/joinmarket-0.1.4/joinmarket/configure.py", line 236, in load_program_config global_singleton.config) File "/home/jg/joinmarket-0.1.4/joinmarket/configure.py", line 260, in get_blockchain_interface_instance rpc_password = _config.get("BLOCKCHAIN", "rpc_password") File "/uslib/python2.7/ConfigParser.py", line 623, in get return self._interpolate(section, option, value, d) File "/uslib/python2.7/ConfigParser.py", line 691, in _interpolate self._interpolate_some(option, L, rawval, section, vars, 1) File "/uslib/python2.7/ConfigParser.py", line 732, in _interpolate_some "'%%' must be followed by '%%' or '(', found: %r" % (rest,)) ConfigParser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%]{8hjkDsa' 
I feel like something simple is wrong.
I was able to make a wallet by first deleting the joinmarket.cfg file. After that, I could not get it to connect to bitcoin core. It can connect to blockr but I don't want to do that. Here is the updated error I get when I try to see the wallet addresses.
[email protected]:~/joinmarket-0.1.4$ python wallet-tool.py wallet.json 2016-06-12 21:32:58,736 [MainThread ] [DEBUG] hello joinmarket Traceback (most recent call last): File "wallet-tool.py", line 81, in  load_program_config() File "/home/jg/joinmarket-0.1.4/joinmarket/configure.py", line 236, in load_program_config global_singleton.config) File "/home/jg/joinmarket-0.1.4/joinmarket/configure.py", line 262, in get_blockchain_interface_instance bc_interface = BitcoinCoreInterface(rpc, network) File "/home/jg/joinmarket-0.1.4/joinmarket/blockchaininterface.py", line 536, in __init__ blockchainInfo = self.jsonRpc.call("getblockchaininfo", []) File "/home/jg/joinmarket-0.1.4/joinmarket/jsonrpc.py", line 111, in call response = self.queryHTTP(request) File "/home/jg/joinmarket-0.1.4/joinmarket/jsonrpc.py", line 97, in queryHTTP raise exc joinmarket.jsonrpc.JsonRpcConnectionError: authentication for JSON-RPC failed 
submitted by dancanthe to joinmarket [link] [comments]

[Hiring] UNIX Systems & Security Admin at Institutional Bitcoin Exchange

One of the oldest and most successful bitcoin exchanges in the US and Canada is growing its technology and business teams. We are seeking a full-time systems administrator with strong UNIX and security expertise. This is a very exciting opportunity to work at the forefront of software technology, developing the next-generation of software and services. Bitcoin is going to revolutionize vast areas of technology and industry, providing new products and services to businesses and consumers. Bitcoin will have the same scale of impact across society as the internet and mobile phones. This is also an excellent opportunity to work with a team of seasoned, successful entrepreneurs and highly skilled engineers.
You will have the opportunity to perform mission-critical tasks that require comprehensive UNIX administration knowledge and expertise, while ensuring security across all aspects of company operations. You will be responsible for overseeing production and non-production server environments, staff laptops and hardware, as well as various company systems and services. You will also be responsible for improving and ensuring security policies company-wide.
We are open to contractors (1099, W-2 or corp to corp) but strongly a prefer full-time/permanent hire for this position. Contract-to-perm is also an option.
Salary & Benefits Offered:
General Requirements:
Skill-Sets:
Additional Desired Skills:
Education:
B.S. and/or M.S. in Computer Science, Math, Engineering highly preferred.
UNIX Certification Strongly Preferred.
IMPORTANT NOTES:
Please, no recruiters.
PM me for contact info
submitted by BitcoinRecruiter to sysadminjobs [link] [comments]

Is this normal behavior?

When trying to use tumbler.py or sendpayment.py I get an error message and then a hang. I was keyboard interrupting at this point on previous tests, but one sendpayment.py I've let it sit and I got another privmsg echo about 5 minutes later. Since then it's been about 20 minutes of no action.
This is the error I get on python sendpayment.py wallet.json :
Exception in thread Thread-2: Traceback (most recent call last): File "/uslib/python2.7/threading.py", line 552, in __bootstrap_inner self.run() File "sendpayment.py", line 60, in run orders, total_cj_fee = choose_order(self.taker.db, self.taker.amount, self.taker.makercount, chooseOrdersBy) File "/path/to/bitcoin/joinmarket/lib/common.py", line 417, in choose_order chosen_order = chooseOrdersBy(orders, n, lambda k: k[2]) File "/path/to/joinmarket/lib/common.py", line 372, in weighted_order_choose chosen_order_index = np.random.choice(len(orders), p=weight) AttributeError: 'module' object has no attribute 'choice' 
Edit: The above error comes after randomly choosing orders with weighting and then listing some nicks.
Got another error when trying to route over tor:
File "sendpayment.py", line 146, in main irc.run() File "/home/usebitcoin/joinmarket/lib/irc.py", line 464, in run self.sock.connect(self.serverport) File "/home/usebitcoin/joinmarket/lib/socks.py", line 369, in connect self.__negotiatesocks5(destpair[0],destpair[1]) File "/home/usebitcoin/joinmarket/lib/socks.py", line 236, in __negotiatesocks5 raise Socks5Error(ord(resp[1]),_generalerrors[ord(resp[1])]) TypeError: __init__() takes exactly 2 arguments (3 given) 
Here is my .cfg:
[BLOCKCHAIN] blockchain_source = json-rpc #options: blockr, json-rpc, regtest #before using json-rpc read https://github.com/chris-belchejoinmarket/wiki/Running$ network = mainnet bitcoin_cli_cmd = bitcoin-cli [MESSAGING] #host = irc.cyberguerrilla.org channel = joinmarket-pit #port = 6697 #usessl = true #socks5 = false socks5_host = localhost socks5_port = 9050 #for tor host = 6dvj6v5imhny3anf.onion port = 6667 usessl = false socks5 = true 
submitted by teQui9veevei1ma to joinmarket [link] [comments]

JSON-RPC connection failed when blockchain on USB – Please Help!

Hi,
Please be gentle.
2 weeks ago I had only ever used windows, the tor browser bundle and an electrum bitcoin wallet. Id heard of tails but never used it and knew nothing at all of coinjoin and joinmarket. I read a few things on reddit and thought id give it a try. After a lot more reading I decided on the following set up:
1.Tails with persistant on USB
2.Veracrypt install with hidden partition volume
3.bitcoin core over tor with blockchain stored on USB drive
4.joinmarket using the blockchain on my USB
5.joinmarket using the tor based irc channel
as you can imagine for a complete noob it has been a very steep learngin curve!
I was very pleased with myself today when I thought I had finnally managed to get it all set up without having to ask for help (I enjoy the intelectual challenge of working it ouy for myself) but when I tested it using python wallet-tool.py wallet.json
I get the following error:
2016-03-15 16:08:47,033 [MainThread ] [DEBUG] hello joinmarket
Traceback (most recent call last):
File "wallet-tool.py", line 89, in
load_program_config()
File "/home/amnesia/Persistent/joinmarket/joinmarket/configure.py", line 223, in load_program_config
global_singleton.config)
File "/home/amnesia/Persistent/joinmarket/joinmarket/configure.py", line 242, in get_blockchain_interface_instance
bc_interface = BitcoinCoreInterface(rpc, network)
File "/home/amnesia/Persistent/joinmarket/joinmarket/blockchaininterface.py", line 492, in init
blockchainInfo = self.jsonRpc.call("getblockchaininfo", [])
File "/home/amnesia/Persistent/joinmarket/joinmarket/jsonrpc.py", line 111, in call
response = self.queryHTTP(request)
File "/home/amnesia/Persistent/joinmarket/joinmarket/jsonrpc.py", line 100, in queryHTTP
repr(exc))
joinmarket.jsonrpc.JsonRpcConnectionError: JSON-RPC connection failed. Err:error(111, 'Connection refused')
so close yet still so far!!!!! I havent been able to find an answer to this anywhere and simply have no idea what it means or how to fix it. so am posting here in the hope someone can help or point me in the right direction. my bitcoin and joinmarket settings are as follows:
/home/amnesia/Persistent/bitcoin-0.11.2/bin/bitcoin.conf
rpcuser=bitcoin
rpcpassword=password
daemon=1
proxyrandomize=1
proxy=127.0.0.1:9050
listen=0
server=1
For JoinMarket
walletnotify=curl -sI --connect-timeout 1 http://localhost:62602/walletnotify?%s
alertnotify=curl -sI --connect-timeout 1 http://localhost:62602/alertnotify?%s
User must uncomment and input path to blockchain files
datadir=/media/amnesia/590C-2CF0/bitcoin
/home/amnesia/Persistent/joinmarket/joinmarket.cfg
[BLOCKCHAIN]
blockchain_source = bitcoin-rpc
network = mainnet
rpc_host = localhost
rpc_port = 8332
rpc_user = bitcoin
rpc_password = password
[MESSAGING]
host = 6dvj6v5imhny3anf.onion
channel = joinmarket-pit
port = 6698
usessl = true
socks5 = true
socks5_host = localhost
socks5_port = 9050
maker_timeout_sec = 30
and can anyone confirm I am right in thinking that to run bitcoin core over tor I just choose socks5 and port 9050 in the settings, there's nothing else I need to change? Told you I was a noob!
Thanks in advance for any help and please forgive me if I dont understand your answer at first.
i also have no idea how to sort out the formatting of that post, sorry!!!!
submitted by smokingskills1 to joinmarket [link] [comments]

Bitcoin JSON-RPC Tutorial 7 - Wallet Notify Bitcoin JSON-RPC Tutorial 5 - Your First Calls - YouTube Bitcoin JSON-RPC Tutorial 3 - bitcoin.conf - YouTube Bitcoin JSON-RPC Tutorial 1 Bitcoin JSON-RPC Tutorial 6 - JSON Parameters and Errors

This is what i am doing RPC_USER = username RPC_PASS = pasword rpc_id = ID ... : local variable 'response' referenced before assignment 17302/python-request-module-for-bitcoin-json-rpc Toggle navigation Running Bitcoin with the -server argument (or running bitcoind) tells it to function as a HTTP JSON-RPC server, but Basic access authentication must be used when communicating with it, and, for security, by default, the server only accepts connections from other processes on the same machine. If your HTTP or JSON library requires you to specify which 'realm' is authenticated, use 'jsonrpc'. Friendly Bitcoin JSON-RPC API binding for Python Skip to main content Switch to mobile version Join the official 2020 Python Developers Survey : Start the survey! Bitcoin RPC from Python. The reference bitcoin client includes a powerful API and RPC interface. In this post I show you how to call into this from Python (which is something that turns out to be almost trivially easy to set up). Python can work well as a kind of (overpowered) scripting language for automating complicated tasks through the bitcoin reference client, but this is also a great way ... Python interface to bitcoin's JSON-RPC API LGPL-2.1 License 519 stars 263 forks Star Watch Code; Issues 18; Pull requests 10; Actions; Projects 0; Security; Insights; Dismiss Join GitHub today. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Sign up. master. 2 branches 2 tags. Go to file Code Clone HTTPS ...

[index] [27183] [49472] [41296] [7089] [11698] [35691] [6260] [3696] [3902] [11604]

Bitcoin JSON-RPC Tutorial 7 - Wallet Notify

In this video I revisit an old topic where several things have changed since 2015 in regards to using the JSON-RPC to communicate with your node with an apache server with PHP. https://www.amazon ... Bitcoin JSON-RPC tutorial. Getting started with the bitcoin command line interface. My Book: https://www.amazon.com/Building-Bitcoin-Websites-Beginners-Devel... Bitcoin JSON-RPC Tutorial 5 - Your First Calls - Duration: 10:06. m1xolyd1an 11,838 views. 10:06 . Building a Blockchain in Under 15 Minutes - Programmer explains - Duration: 14:28. Ivan on Tech ... Bitcoin JSON-RPC tutorial. How to set up bitcoind on a VPS. BTC: 1NPrfWgJfkANmd1jt88A141PjhiarT8d9U Bitcoin JSON-RPC tutorial. Making your first bitcoin JSON-RPC calls in PHP. My Book: https://www.amazon.com/Building-Bitcoin-Websites-Beginners-Development/d...

#