freewil / bitcoin-testnet-box Goto Github PK
View Code? Open in Web Editor NEWCreate your own private bitcoin testnet
License: MIT License
Create your own private bitcoin testnet
License: MIT License
When sendingfrom1, it shows:
error code: -6
error message:
Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee.
Is it possible to mine with cgminer on the testnet. Or is the block generation just simulated?
This is possibly an issue for Bitcoin upstream itself, but it would be nice if there was instructions on being able to generate the generation block from scratch, without any existing files.
Also tied into #6, the difficulty is a bit high and it does take a while before you even end up with 50BTC to spend between these wallets; a from-scratch network basically wouldn't be any more work.
why does the docker file default to the user called "tester" how can you log in as root? what's the password for 'tester'?
this is a project for exporting the blockchain to a relational db:
https://github.com/bitcoin-abe/bitcoin-abe
what I'd like to do is attach that to this testnet data that I've created- is that possible?
there's also a docker container of it:
https://github.com/c0achmcguirk/docker-bitcoin-abe
but I don't know how to do this- has anyone attempted such a feat?
In the Makefile, i expected the bitcoind command for each node to point to its custom bitcoin.conf file. However the original only points to the data directory.
Original (only points to the data file location):
$(BITCOIND) $(B1) -daemon
$(BITCOIND) $(B2) -daemon
Expected (points each node to .conf file):
$(BITCOIND) $(B1) -conf=1/bitcoin.conf -daemon
$(BITCOIND) $(B2) -conf=2/bitcoin.conf -daemon
How does the original command know where the .conf file is located? I am trying the -conf method and i will post the results. Not really an issue, because i am still analyzing this repo for use. My apologies if i am posting this in the wrong location, i will move it to a better place or delete it if requested.
Thank you for this resource!
(UPDATE)
my getinfo looks exactly like the presented example, so the only conclusion i come to is that the -datadir flag also point the bitcoind to the bitcoin.conf file for the respective node. If anyone agrees i will close this issue. Thanks again.
{
"version": 129900,
"protocolversion": 70013,
"walletversion": 60000,
"balance": 0.00000000,
"blocks": 0,
"timeoffset": 0,
"connections": 1,
"proxy": "",
"difficulty": 4.656542373906925e-10,
"testnet": false,
"keypoololdest": 1464793025,
"keypoolsize": 100,
"paytxfee": 0.00000000,
"relayfee": 0.00001000,
"errors": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
}
{
"version": 129900,
"protocolversion": 70013,
"walletversion": 60000,
"balance": 0.00000000,
"blocks": 0,
"timeoffset": 0,
"connections": 1,
"proxy": "",
"difficulty": 4.656542373906925e-10,
"testnet": false,
"keypoololdest": 1464793673,
"keypoolsize": 100,
"paytxfee": 0.00000000,
"relayfee": 0.00001000,
"errors": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
}
test coins; hmm sounds stupid but how does one get some test coins;
I have been generating blocks for a while; no joy; my bitcoind version is 8.0; it would be cool if this test box came with a balance already to rock and roll; is it just a case of playing a waiting game until coins have been generated;
cheers
I am trying to make this with litecoin.
prompt$ make start
make: 'start' is up to date.
prompt$ ~/litecoin-testnet-box$ make getinfo
litecoind -datadir=1 getinfo
Error: Command line contains unexpected token 'getinfo', see litecoind -h for a list of options.
Makefile:18: recipe for target 'getinfo' failed
make: *** [getinfo] Error 1
Thank you
how can I link the bitcoind and bitcoin-cli database to Blockchain Explorer?
I understand everything!
and is this code always updated?
Is there a way to increase difficulty? Ideally i would like it to take somewhere between 30 seconds and 3 minutes when CPU mining on an average PC.
Hi, I'm trying to send from 1 to 2 and back, but this doesn't seem to be possible as there are no confirmations for the transaction? Please let me know if I did something wrong.
If not, could you update node 2 to have a few coins, I want to write tests for listaddressgroupings and maybe a few more that would need this. Or could I just launch more nodes on port 19000, do this by myself, and contribute a patch?
after [make generate ] command, error appears.
I will to simulate payment by bitcoin.
I start bitcoin-testnet-box, but I don't find bitcoin address from server 1 or 2.
How do i simulate payment by bitcoin?
tks ~
testnet in a box is supposed to come with a huge balance "out of the box"
https://bitcointalk.org/index.php?topic=104110.0
tester@37aa027ed53b:~/bitcoin-testnet-box$ make getinfo
bitcoin-cli -datadir=1 getinfo
error code: -32601
error message:
getinfo
thank you
so before any transactions are made what is the point of generating blocks? what are they processing?
After the last commits, I'm not able to reach the bitcoin daemons curling at http://admi1:123@localhost:19001/
anymore.
I'm running them with Docker and this happens both if I run a container using the image pulled from the hub or if I build it with the Dockerfile (using commands in the README).
If I checkout to the last merged PR it all works fine instead.
Can you add license for this project?
I ahem heavily borrowed it for https://github.com/mkinney/dash-testnet-box and want to ensure you don't have any issues with that.
Thanks
Hi,
So I'm running this docker* container to create a local testnet for purposes of doing a bit of bitcoin development, actually what I want to do is run abe on the local testnet so I can explore transaction in a database.
anyway, when I run the command make send ADDRESS=mxwPtt399zVrR62ebkTWL4zbnV1ASdZBQr AMOUNT=10
the bitcoins just disappear... I even minded new blocks to see if maybe the transactions weren't processed but that isn't it either.
I conjecture that this is because that address isn't associated with my node 2, so then my question is:
how can I determine the actual addresses of my nodes?
*Well actually I'm running the one of c0achmcguirk/bitcoin-dev-box which is a fork of this- but he doesn't have an issues tab- what's up with that?
Running the make generate
command fails. After trying to debug the Makefile I found a hyphen (-) missing before the generate
argument. Adding this hyphen fixes the issue. I've created a PR for this fix.
This is more of an FYI (Slowed down cloning):
shai ~/bitcoin-testnet-box [master] ± % du -sh .
45M .
shai ~/bitcoin-testnet-box [master] ± % du -sh .git/
45M .git/
shai ~/bitcoin-testnet-box [master] ± % du -sh **
12K 1
12K 2
4.0K Dockerfile
4.0K LICENSE
4.0K Makefile
4.0K README.md
shai ~/bitcoin-testnet-box [master] ± % du -sh .git/objects
45M .git/objects
Hello, git clone followed by make start (bitcoin 0.8 installed) gives me:
Error: Error initializing database environment /home/default/Desktop/testnet/bitcoin-testnet-box/2/testnet3! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.
I think the layers of the Docker image can be lessen.
Some steps can be merged in Dockerfile, and the user tester
is unnecessary.
So, in this issue, I want
What do you think?
请问怎么在容器外进行 RPC 请求呢?
在容器内执行 bitcoind 之后报错:
Binding RPC on address ::1 port 8332 failed
端口不应该是 19001 吗?请问还需要改动哪些配置吗?
Is it possible to actually mine with a miner and some gpu (with bfgminer as an example) would be usefull with examples and such.
username password
Specify which bitcoin-cli version to install in README.md:
You must have bitcoind and bitcoin-cli installed on your system and in the path unless running this within a Docker container (see below).
$sudo docker run -t -i -p 19001:19001 -p 19011:19011 freewil/bitcoin-testnet-box
when i run this ,
i come into this docker cmd,
so i want apt get install vim ,
but it tell me i need some root ?
so i use sudo ,but i dont know the tester user`s password.
How long will in normally take to generate some coins in the private test network?
Thanks for putting this together!
When I run make start
and then make generate
I get the following error:
$ make generate
bitcoin-cli -datadir=1 -generate 1
error code: -18
error message:
No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet. (Note: A default wallet is no longer automatically created)
I think the problem is with the 0.21.0 version of bitcoin-cli because that version hasn't got default wallet.
I think that is the issue with the #52.
Maybe downgrade the version to the correct one or update README and Dockerfile with the creation of the bitcoin wallet commands.
bitcoin-testnet-box/Dockerfile
Line 16 in 29944ca
Hi @freewil, great work with this project. I'm slowly getting my head around it.
I'd like to update the version of bitcoind that the Docker file loads and I note that you've created your own form of the Bitcoin project and created a custom 'easy-mining' branch. I've tried to look through the change logs to see what's special about it but nothing leaps out at me.
What should I look out for if trying to update my core to version 0.9.2 so my tests are as close as possible to being concurrent with my eventual production system? Or doesn't it matter?
Cheers
Dave
I installed and ran with generate-true and got some test coins. So far so good. Then I added an account 'test01' in the '1' instance. I used "sendfrom '' 3.0 1 'foo bar'" to send 3.0 from the account '' to the account 'test01'.
"listtransactions test01" shows the transaction and 'listaccounts' shows that the balance in the account '' fell by 3.0. But the transaction's 'confirmations' remains 0 and the balance of test01 remains 0.0.
Help?
how to build from source in linux?
Hi @freewil, I'm testing out the Docker capability of this to make my dev box a little cleaner. I'm getting the following error though:
~/s/i/testnet ❯❯❯ sudo docker pull freewil/bitcoin-testnet-box ⏎
Pulling repository freewil/bitcoin-testnet-box
0e8a6fc89c75: Error pulling image (latest) from freewil/bitcoin-testnet-box, Driver devicemapper failed to create image rootfs 1b12296cd1500bf3720682f52555ce9f65c3bc6056e5c40476d220ec3aedb51
9: hash 1b12296cd1500bf3720682f52555ce9f65c3bc6056e5c40476d220ec3aedb519 already exists 65c3bc6056e5c40476d220ec3aedb519 already exists
6170bb7b0ad1: Download complete
9cd978db300e: Download complete
b487e366b098: Download complete
71a819a5e457: Download complete
1b12296cd150: Error downloading dependent layers
2014/06/15 04:35:15 Could not find repository on any of the indexed registries.
Any ideas?
We should add rpcallowip
commands to the 2 bitcoin.conf files so we can access the JSON-RPC servers from outside docker container.
Hello, in the Makefile one can assign one node to generate a certain number of blocks. Also, it seems one can initiate more than two nodes. My question is, instead to explicitly assign which node to generate a new block, is it possible to have two or more nodes compete on a new block? Thanks!
你这个镜像 密码是多少啊 docker想要安装东西不允许
I've got your bitcoin-testnet-box running (nice one) and had to modify the bitcoin.conf files slightly to allow incoming RPC calls by adding rpcallowip=192.168.59.103
where 192.168.59.103
is the IP of my VM as seen from my Mac.
I'm trying a simple test from my Node.js
app to check that I have the connections right etc,
var bitcoin = require('bitcoin'),
client = new bitcoin.Client({
host: "192.168.59.103",
port: 49155,
user: "admin1",
pass: "123"
});
describe("Core Wallet Functions", function() {
it("can get the current bitcoin difficulty", function(done){
client.getDifficulty(function(err, difficulty){
console.log("got response", err, difficulty);
expect(err).to.equal(null);
expect(difficulty).to.equal(1);
done();
});
});
});
but I get an error response { [Error: Invalid params, response status code: 403] code: -32602 }
I've written this up over at StackOverflow - see http://stackoverflow.com/questions/25116608/how-to-connect-to-a-bitcoin-testnet-running-in-a-docker-container/
I'm hoping you can assist.
Thanks
Dave
When running make start-gui
I get this error /bin/sh: 1: bitcoin-qt: not found
.
Previous steps taken:
docker pull freewil/bitcoin-testnet-box
docker run -t -i -p 19001:19001 -p 19011:19011 freewil/bitcoin-testnet-box
and then I try to run start-gui right away.
I have Bitcoin-Qt installed locally, version 0.14.1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.