Title: Bitcoin client with I2P patch Post by: giv on March 09, 2013, 06:10:12 PM Update 08 Mar 2013
Release 0.1 Update 28 Mar 2013 Merged with 0.8.1 Update 04 Jul 2013 Release 0.2 Improved I2P related code. Some GUI indicators are added: number of I2P-connections, I2P/non-I2P mode, static/dynamic I2P-address An I2P options tab added. (Settings - Options... - I2P) Now you could generate a new I2P-address or could see your current I2P-address in GUI. Update 11 Jul 2013 Migrated to 0.8.3. Update 13 Sep 2013 Migrated to 0.8.5. Update 24 Dec 2013 Migrated to 0.8.6. References: Source files: https://github.com/VirtualDestructor/bitcoin-qt-i2p Binaries for Windows and Linux x64: https://sourceforge.net/projects/bitcoinqti2p Original theme in Russian subforum: https://bitcointalk.org/index.php?topic=138588.0 (Sorry for my bad English. If someone has a better translation of this post, please pm me) My project is a patch for Satoshi-client (aka bitcoin-qt/bitcoind). For the present it is more like a Proof-of-Concept than finished application. On the other hand the vanilla bitcoin-client is still beta and nobody worries about that. My client can work in i2p-net using SAM bridge without any third-party libraries. Blocks database is compatible with vanilla client, so you may copy the database from your usual client instead of downloading whole database again. https://a.fsdn.com/con/app/proj/bitcoinqti2p/screenshots/linux.png Installation on Linux (on Ubuntu 12.04 for example): 1) add ppa for i2p and bitcoin Code: sudo apt-add-repository ppa:i2p-maintainers/i2p 2) update Code: sudo apt-get update 3) install packages (java will be installed by dependencies) Code: sudo apt-get install i2p bitcoin-qt 4) edit this file /etc/default/i2p under root Code: RUN_DAEMON="true" <- set to true 5) now run i2p Code: sudo service i2p start Installation on Windows: 1) download an i2p distribution kit from official site only: http://www.i2p2.de/download 2) i2p installer will notify you if Java is not installed on your system. If so you should download Java from official site too http://java.com/download/ 3) first install Java, then install I2P 4) go to Control Panel - Administrative tools - Services, find "I2P" and check it is running (if it isn't running you should run it) Running bitcoin in i2p (both Windows and Linux): 1) after I2P was running you should wait a few minutes while i2p is integrating in the network 2) in your browser open the page http://127.0.0.1:7657/configclients. If the page is unavailable that mean I2P was not running (maybe some errors were occured). If the page opens you should press "Start" button near "SAM application bridge" item and enable a checkbox in column "Run at Startup?" After that press "Save Client Configuration" button. 3) delete (or rename) file peers.dat, it's located at C:\Documents and Settings\<YourUserName>\Application data\Bitcoin (for Win XP) | C:\Users\<YourUserName>\Appdata\Roaming\Bitcoin (for Vista and 7) | ~/.bitcoin (for linux). You must to do this because serialization format of network addresses is incompatible between the vanilla client and my patch. You need to do this procedure only once before the first start of the patched client. The patched client will make his own peers.dat with required format. Warning! If you leave this file at his place it cause a deadlock of the patched client. 4) download the patched executable files or compile the executable files by yourself and run it Code: bitcoin-qt -onlynet=native_i2p Notes: If you want to help other bitcoin users in I2P you may send me or publish here your dest-hash or b32-address and I will add them to the sources as seed-node in a next release. But if you want this you should run your wallet with a permanent i2p-address (see section "Starting wallet with a permanent I2P-address" below) Changes in command line arguments: 1) New command line options are added: Code: -i2psessionname=<session name> - name of an I2P session. If it is not specified, value will be "Bitcoin-client" Code: native_i2p Compatibility: 1) All of the rest options (except of described above) is not changed and working as they did before 2) Database-file peers.dat is not compatible in both way, neither from vanilla client to my patch, not from my patch to vanilla client. This file must be deleted (or renamed) before using my patch and before going back to vanilla client. This file doesn't contain any important data, so you don't need to back up it. 3) all the rest of databases is compatible with vanilla client. 4) Full backward compatibility of the bitcoin-protocol! Patched client works fine with unpatched vanilla clients. Changes in the protocol are appeared only if both clients are patched. Starting wallet with a permanent I2P-address: By default if you don't specify -mydestination parameter the patched wallet generates random i2p-destination. It anonymizes your work with bitcoin even more than before. Especially if you use a new bitcoin-address for each transaction. But if you want to help network by publishing you i2p-address or you just like some i2p-address you have to run wallet with permanent i2p-address. You should specify a full destination in the "mydestination" option for that. Full destionation consists of base64 destionation (b32-address is not allowed here!) and your private tunnel key. Example: Run from command line: Code: bitcoin-qt -mydestination=SVAxpjZzKn~HjvuqpoX5Y948CQnrPpw~9Y9n7itkniijx3NbgTQGJVmZJoc1ERXE87CqcLeeaWtAwqIwhYXL5Y5XkvaUAlAA5BD-9afCmyP42rtEluQLBAprd70UuN20ujuVm0HPyKcIyezphMHsK~GbYMNFiyTz8ko~Kd2wHaeXKWQh6pXyjQJzT4Bwcv1Y9JtPC5b1P5VpwQaLlMJJvblRi8jbRAbimjsxxrMSG6YX8Ks99tsdnQ6YOHGzTPoGpHFgBiROSYwXtC~BbFSv0XfhmN17ZfG6ZCXTbp-xVs-4txSyS~hnS9dL9xHWIv9MNbJzZhI7YztxWgMR3ZNMwR-W2fUeHAcZusmvbm3r-NpIC0O0p9LDDcu7Vxszk~QD~qylFfIT3j8kwu4RDExgqyelVdXVVSlyriHWoIdt9BklqwI1dbAEoLAfG7IZ3921dP4-MH7~AS8Jn3foNe8CAUvu2baRNRIAu75GknCFV5gGIuRRJjFNnrt~vaZfIQP6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3HWfbGlqztnwMY3ChbVHkDwJv52n9ElA-cWCRJp8lquVU4H-l2kY5Me1QlpY~7qFy Or you may use your config-file (bitcoin.conf): Code: $ cat ~/.bitcoin/bitcoin.conf The first 516 symbols (SVAxp......~vaZfIQP6AAAA) are public key. This key is a base64 i2p-address (aka dest-hash). The rest symbols are private key. If you want to use some i2p-address you need to know its private key. If you publishes you private i2p-key anyone can use your i2p-address. So keep in secret your private key. This program don't send your private key, it uses your key only to open i2p-tunnel. A simplest way to generate your own I2P-address is running the patched client with option -generatei2pdestination. A generated address with a private key will be shown and you will can copy it to your config-file and publish it. Building from the sources on Linux: 0) Install all necessary libraries for bitcoin. No additional dependencies are needed. 1) Go to a root directory of the project and run 1.build-unix.sh Code: ./1.build-unix.sh Crosscompillation for Windows on Linux: 0) Install mingw32 Code: apt-get install mingw32 Code: ./1.env-setup.sh Code: ./2.build-deps.sh Code: ./3.build-linux-mingw.sh All builded binaries will be located at <directory with project>/release. I don't have native windows build scripts, because I use crosscompilation as shown above. This program is provided "as is" without any warranties. If you like my project support further developing 1JTtvgy5CzwnsRj3vtHACdyKWxgTnYn754 Title: Re: I2P & Bitcoin Post by: giv on March 09, 2013, 06:11:04 PM reserved
Title: Re: I2P & Bitcoin Post by: naima53 on March 12, 2013, 04:32:50 PM English-speaking community is not interested in such a substantial improvement of BTC-client (open source)? I'm shocked. :(
It seems that for him it was announced the bounty? Title: Re: I2P & Bitcoin Post by: Herbert on March 13, 2013, 02:01:46 PM Although personally I don't use I2P i think this is huge! Don't know why no one is interested :-)
Title: Re: Bitcoin client with I2P patch Post by: giv on March 28, 2013, 07:33:37 PM Update 28 Mar 2013
Merged with 0.8.1 Title: Re: Bitcoin client with I2P patch Post by: r.willis on March 28, 2013, 08:32:35 PM This is excellent. You did right thing.
Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on April 07, 2013, 08:25:23 PM What's a SAM bridge is it like an exit node/relay on Tor.
Title: Re: Bitcoin client with I2P patch Post by: giv on April 07, 2013, 08:48:28 PM No. It's a service inside i2p, that allows applications to interact with i2p using simple (berkley) socket.
www.i2p2.de/samv3.html (http://www.i2p2.de/samv3.html) Applications must be written with SAM support. You cannot run usual apps with SAM. Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on April 09, 2013, 09:21:07 AM No. It's a service inside i2p, that allows applications to interact with i2p using simple (berkley) socket. www.i2p2.de/samv3.html (http://www.i2p2.de/samv3.html) Applications must be written with SAM support. You cannot run usual apps with SAM. Thanks for the link so the SAM bridge enables the I2p wallet to interact with the public blockchain? As when you make a Tx it still needs to be stored on the public ledger. What IP address will Tx's on the I2p wallet show on the public blockchain. Sorry if that sounds stupid ??? Maybe - https://piratelinux.org/ - will start using your wallet. Pirate Linux comes with Bitcoin-Qt and I2p. Also just like the Tor browser package it'd be good if a wallet+I2p bundle was available. As I think the simplicity of the Tor Browser package is one of the major reasons (but not the only reason) that the Tor network of users is larger than that of I2p's (ATM). Congratulations on the bounty BTW ;D Title: Re: Bitcoin client with I2P patch Post by: giv on April 09, 2013, 12:55:30 PM With my patch you can run your wallet using i2p only ("-onlynet=native_i2p" option) or in a mixed mode. If you run the client in the mixed mode, your wallet will be like a gate between i2p bitcoin subnet and the rest net. If you run the client using i2p only, you have to communicate with the gates run in the mixed mode (maybe indirectly). Otherwise, your wallet will be separated from the rest net.
Let's say wallet1 and wallet3 running in i2p-only mode. And wallet2 running in mixed mode (gate). Code: |wallet1| <-----I2P-----> |wallet2| <---clear internet---> (others) As I know, blockchain shows IP-address of a node which first retranslate a transction. So I guess it will be an IP of a gate-node. Anyway no one can to know you real IP if you use "i2p only" mode. Moreover, you can firewall all your network connections except i2p-connections and your wallet will work. Title: Re: Bitcoin client with I2P patch Post by: wumpus on April 09, 2013, 03:41:17 PM Looks interesting.
How did you solve the address issue? From what I understood, I2P has a very large address space, that doesn't fit in the IPv6 address used in the network protocol. Title: Re: Bitcoin client with I2P patch Post by: giv on April 09, 2013, 04:37:36 PM It's true. I've been beating my brains out trying to solve the problem. And my solution is...
Instead of thousand words: Code: #ifdef USE_NATIVE_I2P I added a new service NODE_I2P to bitcoin protocol. And I added a new serialization flag SER_IPADDRONLY. By default my client serialize both of ip-address and i2p-address. But if my client interacts with a node which is not support NODE_I2P service (vanila clients), I do serialize an ip-address only. Code: IMPLEMENT_SERIALIZE So, if my client connected to a node with NODE_I2P service it will send and receive full ip and i2p-addresses. If my client connected to a standard client it will send and receive only IPs. It's fully backward compatible with standard clients, except of "peers.dat" file. Title: Re: Bitcoin client with I2P patch Post by: wumpus on April 09, 2013, 05:38:14 PM Good solution. Though I'd make it more general: I'd name the cap NODE_LONG_ADDRESS (or similar). That makes it usable if other protocols with long addresses turn up.
Title: Re: Bitcoin client with I2P patch Post by: giv on April 09, 2013, 06:02:47 PM Yes, I thought about making it more abstract.
In general case there must be a method to negotiate a length of address and type of net. Different nets may have equal length of address. Also current bitcoin code is hard to add new protocols. So adding general NODE_LONG_ADDRESS service is much more harder than add i2p protocol only. Probably adding a general long address support will cause a huge refactoring of the current bitcoin code. I considered a "boost::asio" library as a base for this refactoring, but it's just in my thoughts yet. Title: Re: Bitcoin client with I2P patch Post by: K1773R on April 09, 2013, 07:23:34 PM With my patch you can run your wallet using i2p only ("-onlynet=native_i2p" option) or in a mixed mode. If you run the client in the mixed mode, your wallet will be like a gate between i2p bitcoin subnet and the rest net. If you run the client using i2p only, you have to communicate with the gates run in the mixed mode (maybe indirectly). Otherwise, your wallet will be separated from the rest net. you can ban blockchain so you wont be the first guy to relay it and therefore wont show up!Let's say wallet1 and wallet3 running in i2p-only mode. And wallet2 running in mixed mode (gate). Code: |wallet1| <-----I2P-----> |wallet2| <---clear internet---> (others) As I know, blockchain shows IP-address of a node which first retranslate a transction. So I guess it will be an IP of a gate-node. Anyway no one can to know you real IP if you use "i2p only" mode. Moreover, you can firewall all your network connections except i2p-connections and your wallet will work. Title: Re: Bitcoin client with I2P patch Post by: wumpus on April 10, 2013, 05:31:35 AM I considered a "boost::asio" library as a base for this refactoring, but it's just in my thoughts yet. It's best to keep the changes as small and specific as possible, at least if the idea is to have this merged upstream at some point, which I think would be useful. Coupling it to refactoring and using different I/O libraries (which may be a good idea in itself) could become too complex and too much at once to review. Title: Re: Bitcoin client with I2P patch Post by: giv on April 10, 2013, 06:08:44 AM I considered a "boost::asio" library as a base for this refactoring, but it's just in my thoughts yet. It's best to keep the changes as small and specific as possible, at least if the idea is to have this merged upstream at some point, which I think would be useful. Coupling it to refactoring and using different I/O libraries (which may be a good idea in itself) could become too complex and too much at once to review. you can ban blockchain so you wont be the first guy to relay it and therefore wont show up! Sorry, I didn't understand you. What do you mean "ban blockchain"?Title: Re: Bitcoin client with I2P patch Post by: K1773R on April 10, 2013, 07:05:13 AM you can ban blockchain so you wont be the first guy to relay it and therefore wont show up! Sorry, I didn't understand you. What do you mean "ban blockchain"?Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on April 10, 2013, 09:33:21 PM With my patch you can run your wallet using i2p only ("-onlynet=native_i2p" option) or in a mixed mode. If you run the client in the mixed mode, your wallet will be like a gate between i2p bitcoin subnet and the rest net. If you run the client using i2p only, you have to communicate with the gates run in the mixed mode (maybe indirectly). Otherwise, your wallet will be separated from the rest net. Let's say wallet1 and wallet3 running in i2p-only mode. And wallet2 running in mixed mode (gate). Code: |wallet1| <-----I2P-----> |wallet2| <---clear internet---> (others) As I know, blockchain shows IP-address of a node which first retranslate a transction. So I guess it will be an IP of a gate-node. Anyway no one can to know you real IP if you use "i2p only" mode. Moreover, you can firewall all your network connections except i2p-connections and your wallet will work. Thanks for the simple explanation, so gateway nodes will always be needed to the clearnet blockchain. I think there's room for an alt-coin where its blockhain solely only exists inside the I2p network. It could still be used on clearnet sites that acted as I2p proxies. Title: Re: Bitcoin client with I2P patch Post by: justusranvier on May 26, 2013, 08:08:17 PM Is there any way to compile bitcoind using this patch instead of bitcoin-qt?
Title: Re: Bitcoin client with I2P patch Post by: giv on May 27, 2013, 02:36:31 PM Is there any way to compile bitcoind using this patch instead of bitcoin-qt? Yes, this patch is applicable for bitcoind. You may use my build scripts, in this case you will get bitcoin-qt and bitcoind binaries. Or you may try to build bitcoind by yourself with a make-file. See make files:for native linux (https://github.com/VirtualDestructor/bitcoin-qt-i2p/blob/master/bitcoin-qt/src/makefile.unix) for windows crosscompilation under linux (https://github.com/VirtualDestructor/bitcoin-qt-i2p/blob/master/bitcoin-qt/src/makefile.linux-mingw) Use USE_NATIVE_I2P=1 flag to activate I2P functionality. Example: Code: make -C bitcoin-qt/src -f makefile.unix USE_NATIVE_I2P=1 Title: Re: Bitcoin client with I2P patch Post by: Pieter Wuille on May 27, 2013, 03:07:03 PM I don't think there's a need to use a service flag for this. We could just bump the P2P protocol version number to support extended-length addresses (though we should do things like cjdns at the same time; I'd also like to see host keys in the protocol, but that's a far larger change).
Title: Re: Bitcoin client with I2P patch Post by: giv on May 27, 2013, 04:32:46 PM I don't think there's a need to use a service flag for this. We could just bump the P2P protocol version number to support extended-length addresses (though we should do things like cjdns at the same time; I'd also like to see host keys in the protocol, but that's a far larger change). If I understand correctly you talking about PROTOCOL_VERSION constant in version.h.My first thought was change version of protocol too, but I rejected this idea. At now protocol is 70001. Let's sasy we increased version of the protocol and our protocol is 70002. But the bitcoin developers release a new version of bitcoin with protocol version 80000. So I have to increase it again, or my client will send to a vanilla client too low version and the vanilla client may reject a connection from my client. At new version I'll have to increase again and again and again... Let's say we strongly increase version, for ex. 999000. At this case we don't need to increase it every time as the bitcoin developers release a new version. But there're potential vulnerability, if the bitcoin developers implement a new super feature in the protocol. For ex., they released following code Code: if (pfrom->nVersion > MIN_PROTO_SUPER_FEATURE_VERSION) In any cases I have to increase version of protocol or change my code if the bitcoin developers change version of the protocol. And if I will do that ASAP, users of my patch still may not be updated for a long time and be threatened. So I found the only way to be in safe and do not change proto version every time is a new service flag. In this case I can make automatic merging with main bitcoin tree, and don't afraid of any problems with protocol. Title: Re: Bitcoin client with I2P patch Post by: Pieter Wuille on May 27, 2013, 07:17:58 PM If I understand correctly you talking about PROTOCOL_VERSION constant in version.h. My first thought was change version of protocol too, but I rejected this idea. At now protocol is 70001. Let's sasy we increased version of the protocol and our protocol is 70002. But the bitcoin developers release a new version of bitcoin with protocol version 80000. So I have to increase it again, or my client will send to a vanilla client too low version and the vanilla client may reject a connection from my client. At new version I'll have to increase again and again and again... Obviously I mean getting a extended_address into mainline (that will need a BIP and maybe a bit of discussion on bitcoin-development, though), after a certain protocol number. That doesn't mean it actually needs support for any extended address, just support for the serialization in the addr packet. I've been wanting such an extension for a while, but never did any work that would make it useful. That would also mean you're not in a completely separate I2P island, as any nodes can (but not necessarily will) relay your I2P addresses across the rest of the network. Using the service bit doesn't actually help if you mean you can do it without coordinating with other node implementations, as there may be a point where your service bit gets used for something else. My point is that no matter what, it's better to coordinate a bit (and people aren't opposed to supporting new transport protocols, afaik), and you don't actually need a service bit for this, as it's trivially discoverable by being on a different network altogether already. Title: Re: Bitcoin client with I2P patch Post by: giv on May 27, 2013, 07:46:09 PM Of course, if the protocol will have needed field, there will no need the service anymore.
When I wrote this patch there was no way to do that, but if protocol will be changed I will change my code and will remove the service. Title: Re: Bitcoin client with I2P patch Post by: btc4ever on June 02, 2013, 04:43:21 AM This is pretty neat. Thanks for your work, and I hope to see it in mainline. So what are the next steps towards that goal? Sounds like writing up a BIP and discussion on dev list. Is that happening?
Title: Re: Bitcoin client with I2P patch Post by: justusranvier on June 04, 2013, 01:46:42 AM I have a bitcoind runnning at
Code: 7jdke2swvteso3yji3amkfidaa4ggvsngltmiucsiutmouyiphfa.b32.i2p Title: Re: Bitcoin client with I2P patch Post by: giv on June 04, 2013, 10:39:29 AM I have a bitcoind runnning at I have at least 3 i2p-connections at now. Are you sure that your i2p-router is running? What do you see in stdout and in a bitcoin log? Are you using any command line options?Code: 7jdke2swvteso3yji3amkfidaa4ggvsngltmiucsiutmouyiphfa.b32.i2p Title: Re: Bitcoin client with I2P patch Post by: justusranvier on June 04, 2013, 03:28:55 PM I have at least 3 i2p-connections at now. Are you sure that your i2p-router is running? What do you see in stdout and in a bitcoin log? Are you using any command line options? I was using an old Title: Re: Bitcoin client with I2P patch Post by: giv on June 04, 2013, 09:05:49 PM Using an old wallet.dat should be OK (if you're using the same BerkleyDB version). The problem is in a peers.dat, because I serialize ip+i2p addresses into it, but a standard client serializes ip only. That cause deadlock when the patched client trying to deserialize addresses from an old peers.dat database, and vice-versa.
Title: Re: Bitcoin client with I2P patch Post by: justusranvier on June 04, 2013, 09:17:10 PM Using an old wallet.dat should be OK (if you're using the same BerkleyDB version). The problem is in a peers.dat, because I serialize ip+i2p addresses into it, but a standard client serializes ip only. That cause deadlock when the patched client trying to deserialize addresses from an old peers.dat database, and vice-versa. That's what I meant.So far the node is only able to maintain 1-2 native_i2p connections. Is that only because there aren't many peers to connect to, or could the number of tunnels for the i2p connection need to be adjusted? Title: Re: Bitcoin client with I2P patch Post by: giv on June 04, 2013, 09:46:23 PM Tunnels are OK. There are too little peers in i2p. Sometimes there are 5-7 peers, sometimes 1-2.
Title: Re: Bitcoin client with I2P patch Post by: giv on June 04, 2013, 10:19:11 PM This is pretty neat. Thanks for your work, and I hope to see it in mainline. So what are the next steps towards that goal? Sounds like writing up a BIP and discussion on dev list. Is that happening? Thanks. I think my project is too raw to add to mainline. The next steps are further developing. I preparing a new release now. But it moves forward slower than I wish.Title: Re: Bitcoin client with I2P patch Post by: justusranvier on June 25, 2013, 06:58:06 PM Thanks. I think my project is too raw to add to mainline. The next steps are further developing. I preparing a new release now. But it moves forward slower than I wish. Can you at least update this patch to to 0.8.3?Title: Re: Bitcoin client with I2P patch Post by: giv on June 26, 2013, 01:58:03 PM Sure. I will update as soon as possible.
Title: Re: Bitcoin client with I2P patch Post by: fran2k on June 27, 2013, 07:48:21 AM Brilliant initiative, please keep this work on.
I'm also amazed this had s so little impact on the forum. Seems like no one is using i2p. Title: Re: Bitcoin client with I2P patch Post by: giv on July 04, 2013, 07:38:42 AM Update 04 Jul 2013
Release 0.2 Improved I2P related code. Some GUI indicators are added: number of I2P-connections, I2P/non-I2P mode, static/dynamic I2P-address An I2P options tab added. (Settings - Options... - I2P) Now you could generate a new I2P-address or could see your current I2P-address in GUI. Changes from 0.8.3 mainline will be added soon. Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on July 04, 2013, 06:58:51 PM Now that flattr accepting funding through bitcoin have you thought of setting up a flattr profile for the project. So that the project can receive regular funding. I'd be happy to set up a subscription.
Title: Re: Bitcoin client with I2P patch Post by: giv on July 11, 2013, 07:26:46 PM Now that flattr accepting funding through bitcoin have you thought of setting up a flattr profile for the project. So that the project can receive regular funding. I'd be happy to set up a subscription. I know a little about Flattr. Can I withdraw money from Flattr in bitcoins?Title: Re: Bitcoin client with I2P patch Post by: giv on July 11, 2013, 07:27:38 PM Update 11 Jul 2013
Migrated to 0.8.3. Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on July 11, 2013, 09:12:00 PM Now that flattr accepting funding through bitcoin have you thought of setting up a flattr profile for the project. So that the project can receive regular funding. I'd be happy to set up a subscription. I know a little about Flattr. Can I withdraw money from Flattr in bitcoins?I'm not sure if that's possible yet but its bitcoin friendly. Flattr is about micro-donations with subscriptions if chosen. The BTC0.0001 minimum transaction fee makes donations below BTC0.0050 pretty much pointless. So it could attract donations you'd otherwise miss out on. Title: Re: Bitcoin client with I2P patch Post by: intellivision on July 23, 2013, 03:59:12 AM Any chance of a binary for OSX being released in the future?
I'm willing to beta test this if you need someone. Title: Re: Bitcoin client with I2P patch Post by: giv on July 23, 2013, 01:31:42 PM Any chance of a binary for OSX being released in the future? Sorry, but it's very unlikely. I don't have any Apple devices.I'm willing to beta test this if you need someone. But you can try to build a binary from the source files. My patch doesn't add any additional dependencies, so if you can build an original client, you can build a patched client. Title: Re: Bitcoin client with I2P patch Post by: justusranvier on July 23, 2013, 03:16:38 PM Any chance of a binary for OSX being released in the future? Sorry, but it's very unlikely. I don't have any Apple devices.I'm willing to beta test this if you need someone. Title: Re: Bitcoin client with I2P patch Post by: intellivision on July 24, 2013, 12:34:41 AM Any chance of a binary for OSX being released in the future? Sorry, but it's very unlikely. I don't have any Apple devices.I'm willing to beta test this if you need someone. But you can try to build a binary from the source files. My patch doesn't add any additional dependencies, so if you can build an original client, you can build a patched client. Well, I can't compile anything myself since I messed up GCC some time ago on this install, but you could try building it on PureDarwin (http://www.puredarwin.org/) Also, would you consider working on a bundled Bitcoin-i2p bundle which includes both programs self contained, only uses the daemon for the wallet, and starts and stops the service when the wallet is open and closed? Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on August 17, 2013, 08:15:57 PM I followed your instructions for the (X)ubuntu install and I2p is running but I've had no I2p connections still after running it for over two hours now ???
Title: Re: Bitcoin client with I2P patch Post by: giv on August 17, 2013, 09:01:51 PM First of all, check that i2p is working, try to open any i2p-site. Then check that SAM is enabled and running. If it is ok, check the log at ~/.bitcoin/debug.log and check the output of bitcoind/bitcoin-qt. Which mode (i2p-only or mixed) do you use? Do you use any command-line options?
Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on August 18, 2013, 11:43:53 AM First of all, check that i2p is working, try to open any i2p-site. Then check that SAM is enabled and running. If it is ok, check the log at ~/.bitcoin/debug.log and check the output of bitcoind/bitcoin-qt. Which mode (i2p-only or mixed) do you use? Do you use any command-line options? I2p peers Active: 14 / 113 Fast: 12 High capacity: 73 Integrated: 42 Known: 136 And can login to Susimail. Sam bridges are running and set to start on start up. There's loads of data in - ~/.bitcoin/debug.log. Code: CTxMemPool::accept() : accepted 0bc9997a50f94788fe9a410a1bba53f6c59c0a2f65f0db787956384cbb16d48d (poolsz 1704) In mixed mode I can onnect to normal peers but not I2p ones. In I2p only mode can't connect to any nodes. I try running bitcoind from the command line but it says itys not installed even tho I've excuted bitcoind from your download and bitcoin-qt can connect to the normal network. Title: Re: Bitcoin client with I2P patch Post by: giv on August 18, 2013, 03:57:55 PM ok, i2p is working. Run the patched bitcoin-qt/bitcoind in console and post output (to this thread or to PM).
I try running bitcoind from the command line but it says itys not installed even tho I've excuted bitcoind from your download and bitcoin-qt can connect to the normal network. Seems like you trying to run default bitcoind. Try to run the patched bitcoind explicitly, smth like /path/to/the/patched/client/bitcond. It should work.If you run the patched client in mixed mode, most probably it will use only ip-addresses for outgoing connections. That's why. The bitcoin-client has a pool of known addresses. Selecting of address is a pseudorandom process. At now there are hundreds (at first start) and thousands (after syncing with other clients) known ip-addresses and only several I2P-addresses in the pool. By default only 8 outgoing connections are allowed. So probability of selecting an i2p-address is less than 1%. If you want to run the program in mixed mode, but want to connect with some i2p-nodes (for tests or other purposes) you have to add an i2p-node manually with "-addnode=<node>" option. Also you may publish your i2p-address or PM me and others can connect to your client. In such case you will see his connections as incoming. The client can accept incoming connections even it already has maximum of outgoing connections. If you have a permanent i2p-address and your wallet is running most time I can add your i2p-address to a source code as seed-node in the next releases if you want. Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on August 18, 2013, 06:45:42 PM Thanks now connected ;D with five I2p nodes tho it was up to six before. How many I2p nodes are they in total on average and how many nodes acting as gateways?
Title: Re: Bitcoin client with I2P patch Post by: giv on August 19, 2013, 05:59:20 AM Usually there are 5-7 i2p-nodes. At least 3 of them are running in mixed mode (working as gateways).
Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on August 19, 2013, 11:57:36 AM When I set bitcoin-qt to auto-start in settings it starts the wrong version and I get no I2p connections but the I2p settings are there in the wallet like before? I have to start bitcoin-qt from your executable on each boot.
Title: Re: Bitcoin client with I2P patch Post by: giv on August 19, 2013, 04:07:19 PM What do you mean "the wrong version"?
Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on August 19, 2013, 05:32:29 PM What do you mean "the wrong version"? The default bitcoind you suggested I was running when I couldn't connect to any I2p peers. Also all today I've only been connected to one I2p peer? Title: Re: Bitcoin client with I2P patch Post by: giv on August 19, 2013, 07:05:23 PM For auto-starting the patched client try to delete the ~/.config/autostart/bitcoin.desktop file or open it in any text editor and fix a path to your client. If you will run the vanilla client after that it will rewrite this file again.
I need output of bitcoind/bitcoin-qt to determine why you have only one connection. I have 4-6 peers for today in my wallet. Even if you connect to one node it should give addresses of other nodes to you. Oh, I see you have a few i2p-peers (Active: 14 / 113). Most probably your ports are closed. In this case I2P works very slow and unstable. You can see the port number at http://127.0.0.1:7657/confignet (http://127.0.0.1:7657/confignet). Try to open the i2p-port in your firewall or router. Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on August 22, 2013, 11:11:36 AM All day yesterday and so far today I've been connected to four peers in I2p only mode. Here are my I2p stats
Code: Peers Is four connections right or are my I2p stats low. I mostly use a VPN to connect to the internet so not sure if I can forward any ports? Edit: Its gone to and stayed at three peers now. Here are my I2p connection stats - Code: Peers 2nd edit: Four nodes now. Title: Re: Bitcoin client with I2P patch Post by: giv on August 22, 2013, 03:05:36 PM Four nodes it is ok. Today I have only 4-5 nodes too. Of course the more peers the better, but 3-5 peers are enough to send/receive a transaction to the rest net with admissible speed.
Judging by I2P stats your ports are still closed. If you open the ports you'll see smth like this: Code: Peers If your wallet is always running with a static i2p-address you can send your public i2p-address to me and I'll add it as seed-node in my code if you want. Title: Re: Bitcoin client with I2P patch Post by: giv on September 13, 2013, 01:12:32 PM Update 13 Sep 2013
Migrated to 0.8.5. Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on September 15, 2013, 01:16:05 AM Update 13 Sep 2013 Migrated to 0.8.5. I downloaded your two new (linux) executables and ran them but I can't seem to get any peers any more. Is there a method to updating? Title: Re: Bitcoin client with I2P patch Post by: giv on September 15, 2013, 08:40:04 AM This update does not influence to connections. But last few days I has only 1-2 connections. I don't know what happened with other nodes, but my nodes are working fine.
Try to rerun you client. If it doesn't help, try to manually add nodes by the 'addnode' command with the following addresses: Code: bhqfvosghsfdbi3qubnk3ro6juklz5w7b6l3x6mibkxzzk3mob5a.b32.i2p Title: Re: I2P Bitcoin client Post by: giv on September 15, 2013, 05:02:15 PM If you get one of these messages:
"... coin database inconsistencies found" and/or "Do you want to rebuild the block database now?", please DO NOT redownload/reindex the blocks (it will just waste your time, especially via i2p). It is known issue and it's resolved in the 0.8.5 release. So just update your wallet to 0.8.5, if you still didn't do that More info here: https://bitcointalk.org/index.php?topic=293307.0 (https://bitcointalk.org/index.php?topic=293307.0) https://bitcointalk.org/index.php?topic=290922.0 (https://bitcointalk.org/index.php?topic=290922.0) Title: Re: Bitcoin client with I2P patch Post by: justusranvier on September 16, 2013, 07:20:45 AM I've noticed that I frequently check my peer list and find no i2p peers unless I use -onlynet-native_i2p, but I'd like to also use other peer types.
Title: Re: Bitcoin client with I2P patch Post by: giv on September 16, 2013, 05:53:49 PM I've noticed that I frequently check my peer list and find no i2p peers unless I use -onlynet-native_i2p, but I'd like to also use other peer types. If you run the patched client in mixed mode, most probably it will use only ip-addresses for outgoing connections. That's why. The bitcoin-client has a pool of known addresses. Selecting of address is a pseudorandom process. At now there are hundreds (at first start) and thousands (after syncing with other clients) known ip-addresses and only several I2P-addresses in the pool. By default only 8 outgoing connections are allowed. So probability of selecting an i2p-address is less than 1%. Of course, if your i2p-address changes you should publish the new address again. Obviously, it's inconveniently, so I suggest to use a static i2p-address in this case.If you want to run the program in mixed mode, but want to connect with some i2p-nodes (for tests or other purposes) you have to add an i2p-node manually with "-addnode=<node>" option. Also you may publish your i2p-address or PM me and others can connect to your client. In such case you will see his connections as incoming. Also if you use the '-tor'/'proxy' options (or appropriate settings in gui) you should use the '-listen' option if you want to accept incoming i2p-connections, because the '-tor'/'proxy' options disable the '-listen' option by default. Title: Re: Bitcoin client with I2P patch Post by: justusranvier on September 16, 2013, 08:32:44 PM I'm seeing this problem with listen=1 and maxconnections=256 set in bitcoin.conf
My node will end up with 3-4 peers, none of them I2P, and it will drop the SAM connection so that the I2P node no longer creates the tunnels, which prevents incoming I2P connections. The only way I can get any native I2P connections at all is to run the node with onlynet=native_i2p Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on September 16, 2013, 10:17:47 PM This update does not influence to connections. But last few days I has only 1-2 connections. I don't know what happened with other nodes, but my nodes are working fine. Try to rerun you client. If it doesn't help, try to manually add nodes by the 'addnode' command with the following addresses: Code: bhqfvosghsfdbi3qubnk3ro6juklz5w7b6l3x6mibkxzzk3mob5a.b32.i2p After the update manger on Xubuntu downloaded the official updates then I ran your exe's it works OK. Just got three I2p peers within five minutes. Edit: Soon up to four peers. Title: Re: Bitcoin client with I2P patch Post by: K1773R on September 17, 2013, 08:14:09 AM This update does not influence to connections. But last few days I has only 1-2 connections. I don't know what happened with other nodes, but my nodes are working fine. Try to rerun you client. If it doesn't help, try to manually add nodes by the 'addnode' command with the following addresses: Code: bhqfvosghsfdbi3qubnk3ro6juklz5w7b6l3x6mibkxzzk3mob5a.b32.i2p After the update manger on Xubuntu downloaded the official updates then I ran your exe's it works OK. Just got three I2p peers within five minutes. Edit: Soon up to four peers. Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on September 17, 2013, 09:08:53 AM This update does not influence to connections. But last few days I has only 1-2 connections. I don't know what happened with other nodes, but my nodes are working fine. Try to rerun you client. If it doesn't help, try to manually add nodes by the 'addnode' command with the following addresses: Code: bhqfvosghsfdbi3qubnk3ro6juklz5w7b6l3x6mibkxzzk3mob5a.b32.i2p After the update manger on Xubuntu downloaded the official updates then I ran your exe's it works OK. Just got three I2p peers within five minutes. Edit: Soon up to four peers. OK patches that run as executables. Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on October 19, 2013, 06:36:22 AM I think you need to work on making the wallet easier to install for newbies to attract more users. Like a single Windows .exe or .deb for the whole wallet maybe with I2p combined too.
Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on October 24, 2013, 02:29:15 PM I don't if it that I needed to restart the patched wallet a few times after a fresh install. Or if I had to start the bitcoind patch first before starting the bitcoin-qt patch and getting it to connect to I2p peers only for the first time. Or did I miss that in the OP instructions?
Title: Re: Bitcoin client with I2P patch Post by: giv on October 25, 2013, 03:41:41 PM I don't if it that I needed to restart the patched wallet a few times after a fresh install. Or if I had to start the bitcoind patch first before starting the bitcoin-qt patch and getting it to connect to I2p peers only for the first time. Or did I miss that in the OP instructions? Sorry I don't quite understand. Please reword you message.When you have just installed/run i2p, it may discard new connections while it's integrating in the network. If you have troubles, please describe step-by-step how can I reproduce it. Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on October 25, 2013, 03:46:53 PM I don't if it that I needed to restart the patched wallet a few times after a fresh install. Or if I had to start the bitcoind patch first before starting the bitcoin-qt patch and getting it to connect to I2p peers only for the first time. Or did I miss that in the OP instructions? Sorry I don't quite understand. Please reword you message.When you have just installed/run i2p, it may discard new connections while it's integrating in the network. If you have troubles, please describe step-by-step how can I reproduce it. Sorry - I don't know if it that I needed to restart the patched wallet a few times after a fresh install. Or if I had to start the bitcoind patch first before starting the bitcoin-qt patch and getting it to connect to I2p peers only for the first time. Or did I miss that in the OP instructions? - it is working now but I don't know if that it just needed restarting a few times or if I needed to to run the bitcoind patch first before starting the bitcoin-qt patch and getting it to to connect to only I2p peers for the first time. Title: Re: Bitcoin client with I2P patch Post by: giv on October 25, 2013, 08:48:41 PM You do not need to run patched bitcoind before bitcoin-qt. Bitcoin-qt should work immediately, if it doesn't then probably there is a bug. Under which OS do you have this problem?
Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on October 27, 2013, 07:18:35 AM You do not need to run patched bitcoind before bitcoin-qt. Bitcoin-qt should work immediately, if it doesn't then probably there is a bug. Under which OS do you have this problem? Xubuntu, it does work maybe I didn't follow the OP's instructions correctly? Title: Re: Bitcoin client with I2P patch Post by: giv on December 24, 2013, 06:04:54 PM Update 24 Dec 2013
Migrated to 0.8.6. Title: Re: Bitcoin client with I2P patch Post by: K1773R on December 24, 2013, 09:50:44 PM You do not need to run patched bitcoind before bitcoin-qt. Bitcoin-qt should work immediately, if it doesn't then probably there is a bug. Under which OS do you have this problem? Xubuntu, it does work maybe I didn't follow the OP's instructions correctly? Title: Re: Bitcoin client with I2P patch Post by: justusranvier on December 24, 2013, 11:08:08 PM Is there any plan to move this patch into the main repository any time soon?
Maybe start incrementally by moving the peers.dat format changes first? Title: Re: Bitcoin client with I2P patch Post by: isbe on January 04, 2014, 01:39:45 PM Is there any plan to move this patch into the main repository any time soon? Maybe start incrementally by moving the peers.dat format changes first? That would be terrific.. Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on March 08, 2014, 02:06:11 PM Have Anoncoin copied this patch?
What/Howto I2P Here are some parameters: Code: -i2psessionname=<session name> - name of an I2P session. If it is not specified, value will be "Anoncoin-client" Your client will act as a gateway between I2P and clearnet if you don't add -onlynet=i2p If you have used your Anoncoin client on clearnet before, you might need to delete peers.dat if you don't get any connections. To use the wallet on I2P do the following: 1. Download and install I2P ( www.geti2p.net ), then start it. (It will run as a daemon, so don't expect any window) 2. Wait a minute or two, then navigate to http://127.0.0.1:7657/configclients 3. Make sure to start the "SAM application bridge" (Tip: After starting it, check it for autostart and save configuration) 4. In run (enter the start menu and type run on windows Vista/7) type %appdata% 5. Open or create the Anoncoin folder 6. Create/edit the anoncoin.conf file 7. make sure to set the following options: rpcuser, rpcpassword and onlynet=i2p 8. (Optional) you can set i2p=1 instead of onlynet=i2p Example: rpcuser=someone rpcpassword=super_secret_password onlynet=i2p Note: The I2P router uses a little time to integrate into the I2P network, so you might not get a connection before I2P have runned for about 5-10minutes. https://bitcointalk.org/index.php?topic=309716.msg3324938#msg3324938 If so how difficult would it be to port to other coins? Title: Re: Bitcoin client with I2P patch Post by: meeh on March 09, 2014, 04:58:56 PM Have Anoncoin copied this patch? Yes our implementation originates from this patch. You can also see giv's copyright in the i2psam library at the source code for example. Title: Re: Bitcoin client with I2P patch Post by: Paperweight on March 10, 2014, 07:27:34 AM Thank you for this!
Title: Re: Bitcoin client with I2P patch Post by: vertoe on January 28, 2015, 10:34:53 AM Hi, I wonder why you dont submit this patch to bitcoin core? Did you try that or recommended I2P integration?
Title: Re: Bitcoin client with I2P patch Post by: fsb4000 on January 30, 2015, 04:49:10 PM Hi, I wonder why you dont submit this patch to bitcoin core? Did you try that or recommended I2P integration? He didn't try...Quote from: laanwj There is a bitcoin fork that works on I2P, I am not sure what the status of it is, and he has never tried to get the changes upstream: https://github.com/bitcoin/bitcoin/issues/2091#issuecomment-42650077https://bitcointalk.org/index.php?topic=151181.0 Title: Re: Bitcoin client with I2P patch Post by: matthewh3 on January 30, 2015, 05:02:39 PM I believe Anoncoin forked the patch and are now working on a C++ I2p router with the Monero team - https://geti2p.net/en/blog/post/2014/08/15/The-privacy-solutions-project
Title: Re: Bitcoin client with I2P patch Post by: justusranvier on January 30, 2015, 06:21:27 PM For this to really happen the network protocol needs to allow for 256 bit peer addresses.
Title: Re: Bitcoin client with I2P patch Post by: donschoe on February 11, 2015, 08:57:35 AM For this to really happen the network protocol needs to allow for 256 bit peer addresses. Is this an issue? |