Bitcoin Forum
November 08, 2024, 06:49:45 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 7 8 9 10 »  All
  Print  
Author Topic: Gocoin - totally different bitcoin client with deterministic cold wallet  (Read 38566 times)
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
May 08, 2013, 06:03:57 PM
Last edit: January 14, 2018, 01:56:03 AM by piotr_n
Merited by ABCbits (99), PawGo (5)
 #1

If anyone is interested in my original implementation of a full bitcoin client, feel invited to try Gocoin.
Having been disappointed with other alternative implementations of a full bitcoin node you maybe have seen, please be assured that this one actually works! Smiley

Pre-compiled binaries for Windows and Linux (amd64) can be downloaded here: https://sourceforge.net/projects/gocoin/files/?source=directory
They are usually not up to date as in general I provide no binaries, but building the client using Go compiler is quite easy and (unlike other bitcoin clients) this one builds in a second.

The project is open source and the code is available at GitHub: https://github.com/piotrnar/gocoin
To build the sources, just follow the instructions from README.md.
Ask if you'd get stuck, but it is pretty straight forward, so you probably won't.

You can find the official webpage of the project at: http://gocoin.pl/ - there is the User Manual and a lot of other info.

There is also a wiki article: https://en.bitcoin.it/wiki/Gocoin although it hasn't been updated for awhile (feel welcome to contribute to it)


Note: the info below refers to Gocoin version 1.8.0

General info
  • There are no known consensus incompatibilities. Gocoin's consensus lib passes all the recent transaction & script tests (from the core's repo). Gocoin's node passes all the blocks test from TheBlueMatt's test scripts. The node has (an optional) functionality to (cross-) check each new transaction with the core's consensus lib.
  • The solution is fully functional, but I like working on it, so please keep in mind that the HEAD is a work in progress and will probably always be. The source code gets tagged regularly, so if anything does not work for you with the latest version, try the previous tag. The database format is not supposed to change.
  • You do not need the client (node) in order to use the wallet. In such case use balio tool to fetch the balance of the addresses you own, in order to spend your coins (read more here).
  • Works with testnet, so you can start your gocoin adventure from it (use "-t" switch at the command line, for both client and wallet).

Client (the online bitcoin node)
  • Has a web interface (WebUI), by default available at http://localhost:8833/ (to access WebUI from a different host, you have to modify the config file first).
  • The entire UTXO database is kept in system memory, to maximise performance of verifying transactions and blocks.
  • From version 1.7.0 the node monitors balance on all P2SH and P2KH addresses allowing to check (or fetch for spending) the balance of any random address. The wallet's addresses aren't kept in the node's memory, but only in the user's browser.
  • The blocks on your disk are compressed, which saves 20-30% of space (comparing to bitcoin core). Additionally there is a tool called bdb that can purge old blocks from the database.

Wallet (secure your money offline)
  • It is a separate app meant to be used as a deterministic cold wallet (on an offline PC), though if you don't mind the risks nothing can stop you from using it on the online PC.
  • Is console only, does not have any graphical user interface. Any operations on the wallet are driven by command line switches. You can put some defaults in a config file.
  • Has very low system requirements (tested working on Raspberry Pi Model A).
  • The wallet's security does not rely on any random number source.
  • The wallet's private key pool is based on a seed-password, so as long as you remember it you don't need any backups (some people call it a brain-wallet).
  • Since the seed-password is basically a straight forward private key of your coins, make sure that it is complex enough and that nobody is able to peek at it.
  • If you don't trust your brain to make a password strong enough, use a randomly generated string (e.g. cat /dev/urandom | head -c 20 | xxd -p) as the seed-password.
  • By default the wallet works with a pool of 250 deterministic addresses (you can change this value, if you need more).
  • In addition to the deterministic key pool, you can import raw private keys generated elsewhere (they need to be in the base58 format).
  • Supports (partial) signing of multi-signature transactions.
  • Supports Litecoin (allowing spending of litecoins with balio tool).

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
May 09, 2013, 03:49:54 PM
Last edit: May 12, 2013, 05:49:59 PM by piotr_n
 #2

Hey guys, that's just not fair that today many bitcoin-focused media are screaming about a "bitcoin alternative made in Go", that is planed to be released "soon", by some Conformal (whoever they are), while my yesterday's announcement has been completely ignored.

What is wrong with you?  Smiley
You don't believe me, that my software actually works? It really does - feel free to see for yourself.

Of course my implementation is not a "bitcoind alternative", but only because I am not a kind of person that would be spending his time trying to re-invent a wheel.
I mean: why would I need a bitcoind alternative, if I already have bitcoind?

So my implementation has not much to do with bitcoind, but instead it is focused on fulfilling my own personal needs, which might (by a chance) be similar with your needs - think about it.

And that is, for instance, why my node does not relay transactions.
I know that it is bad for the network, but I am very sorry for having only 1000kbps of upstream at my DSL, and so I am not going to waste 50% of it, plus lots of my CPU, just to relay your satoshidice bets. So I don't - and what can you do about it? Wink

Another feature that I needed, and implemented it into Gocoin, was a cold deterministic wallet, that is based on a password-seed and thus does not require any backups.
My implementation is designed for such a wallet(s), which is of course an opposite of how it is made in bitcoind.

Moreover, Gocoin has an option to limit the bandwidth usage, which was also very important for me.
I do not know if you were checking the actual bandwidth that your bitcoin client takes, but all I can tell you is that my browser stops loading pages, when I have it running and you guys have just mined a new block. So for me a bandwidth limit is not a minor feature.

To wrap it up. I really don't understand why a news about an implementation of bitcoind in Go, that is supposed to be released in some undefined feature, happens to be so much more of a headline than a news about a Go implementation of a bitcoin node with some unique features, that can already be tried. I guess it's because I just don't know the right people in the theater... Smiley

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
ab8989
Full Member
***
Offline Offline

Activity: 209
Merit: 101


FUTURE OF CRYPTO IS HERE!


View Profile WWW
May 09, 2013, 06:27:43 PM
Last edit: May 09, 2013, 06:45:34 PM by ab8989
 #3

Do you think that all projects written in Go should have equal amount of interest or is it that everything that is somehow related to bitcoin clients should have equal amount of coverage or what?

I will tell you a secret, and the name of it is MARKETING.

The other group start their marketing message:
"btcd is an alternative full-node implementation of the bitcoin protocol written in Go and is currently under active development"
Sounds very interesting, doesn't it, and you have to read much deeper into the message to realize that it actually is really really far from fulfilling the expectations set in the first sentence. But see how that tactic works.

On the other hand you start your marketing message with:
"If anyone is interested in yet another bitcoin client, you are welcome to try my recent work"
You express you don't believe anybody is interested in something yet another. Okay, got the message.

"At this stage the solution is meant for developers who know what Go is, and rather only for testing"
Okay it is only for the 10 people that are both developers and do it in Go, and not only that but actually only for those ones that are interested in jumping to test somebody else's random work turning the number of people that feel interested pretty close to zero. Most of the others have closed the browser tab already by now.

Then what follows is a long post that is basically tl:dr with a lot of incoherent random deep-inside detail issues from here and there and you are wondering why the masses of people are not jumping up and down.
gweedo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
May 09, 2013, 06:32:18 PM
 #4

Of course my implementation is not a "bitcoind alternative", but only because I am not a kind of person that would be spending his time trying to re-invent a wheel.
I mean: why would I need a bitcoind alternative, if I already have bitcoind?

Scale, read about it, plus if you had a bitcoind in the language you use most often, you can customize it more to your uses.
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
May 09, 2013, 08:05:20 PM
 #5

Do you think that all projects written in Go should have equal amount of interest or is it that everything that is somehow related to bitcoin clients should have equal amount of coverage or what?

I will tell you a secret, and the name of it is MARKETING.
Yeah,  MARKETING – whatever, man.

Both; for the mankind, and for me, marketing is even more useless than re-inventing wheels, so let me just stay away from it, OK?

In the meantime, if you had any questions, or a feedback, about an actually working first bitcoin client written in Go, you know where to find me. Smiley

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
LightRider
Legendary
*
Offline Offline

Activity: 1500
Merit: 1022


I advocate the Zeitgeist Movement & Venus Project.


View Profile WWW
May 10, 2013, 05:13:39 AM
 #6

Show them your work. Maybe you can get a consultancy gig.

Bitcoin combines money, the wrongest thing in the world, with software, the easiest thing in the world to get wrong.
Visit www.thevenusproject.com and www.theZeitgeistMovement.com.
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
May 10, 2013, 10:37:38 AM
 #7

Show them your work. Maybe you can get a consultancy gig.
Thanks for an advise, but I am doing well, not working for a corp that cuts a large part of my work's fruits, to pay for their stupid marketing, just so stupid people could be jumping up an down... Smiley

Just a "thanks, I like your client and I actually use it" from a random person - that's all I need as an incentive for my work.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
meowmeowbrowncow
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250



View Profile
May 10, 2013, 12:25:25 PM
 #8



Awesome.  Thanks for bringing Go to Bitcoin.


Re: Go's special channel interfaces.  Any benefit for a Bitcoin client?

"Bitcoin has been an amazing ride, but the most fascinating part to me is the seemingly universal tendency of libertarians to immediately become authoritarians the very moment they are given any measure of power to silence the dissent of others."  - The Bible
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
May 10, 2013, 12:31:05 PM
 #9

Re: Go's special channel interfaces.  Any benefit for a Bitcoin client?
Of course - it would be a huge waste to not use such a great feature, and also go routines...
Though not really so much of it, at least at this stage.

If you grep the sources for "chan" or "go", you can find the places.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
meowmeowbrowncow
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250



View Profile
May 10, 2013, 12:34:44 PM
 #10

Re: Go's special channel interfaces.  Any benefit for a Bitcoin client?
Of course - it would be a huge waste to not use such a great feature, and also go routines...
Though not really so much of it, at least at this stage.

If you grep the sources for "chan" or "go", you can find the places.



Sweet.  I'll take a look.


It would be interesting to see how Go's special benefits could be proven in a bitcoin client.

"Bitcoin has been an amazing ride, but the most fascinating part to me is the seemingly universal tendency of libertarians to immediately become authoritarians the very moment they are given any measure of power to silence the dissent of others."  - The Bible
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
May 10, 2013, 12:38:31 PM
 #11

Sweet.  I'll take a look.

It would be interesting to see how Go's special benefits could be proven in a bitcoin client.
They were. Another thing that I found very useful were maps.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
LightRider
Legendary
*
Offline Offline

Activity: 1500
Merit: 1022


I advocate the Zeitgeist Movement & Venus Project.


View Profile WWW
May 11, 2013, 06:20:54 AM
 #12

Show them your work. Maybe you can get a consultancy gig.
Thanks for an advise, but I am doing well, not working for a corp that cuts a large part of my work's fruits, to pay for their stupid marketing, just so stupid people could be jumping up an down... Smiley

Just a "thanks, I like your client and I actually use it" from a random person - that's all I need as an incentive for my work.

This is a reasonable, rational and admirable stance.

Bitcoin combines money, the wrongest thing in the world, with software, the easiest thing in the world to get wrong.
Visit www.thevenusproject.com and www.theZeitgeistMovement.com.
kokjo
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000

You are WRONG!


View Profile
May 13, 2013, 08:21:24 PM
 #13

is it live in the network?

"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
May 13, 2013, 08:21:54 PM
 #14

at least one Smiley

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
cryptograd
Member
**
Offline Offline

Activity: 112
Merit: 10



View Profile
June 01, 2013, 03:46:26 AM
 #15

GO is awesome

great job

Liked something I said ->17ry6rrknqmQ2S1NRArzdrNMmG2Zk449AE
Most important bitcointalk post in history
https://bitcointalk.org/index.php?topic=120184.msg1381739#msg1381739
ennio.morricone
Newbie
*
Offline Offline

Activity: 8
Merit: 0



View Profile
August 13, 2013, 11:51:59 AM
 #16

this seems a very good ideia. i really like your feature set.
i'm gonna to some more reading and digging around. Hopefully i'm going to try it out soon.

Thanks
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
August 25, 2013, 07:39:00 PM
 #17

Thanks.
I've actually made a huge progress ever since I published this topic - lots to talk about, most things I don't remember, though I try to keep the changelog up to date.

From the know issues part, it still uses lots of system memory, which I could probably address by moving the UTXO db to leveldb, but since I have 12GB of RAM on my PC, I just don't care about these 4GB. And knowing that the leveldb would make fetching a balance of a random address extremely slow (comparing to what I have now), it discourages me even more from optimizing the mem usage.

And there is still this EC_Verify that works very slowly while using the standard go libs, so one of the cgo wrappers should be used, but building it, especially on windows, is a bit of a hassle.

Besides that, I'm quite satisfied with this project - these days Gocoin is the only bitcoin client I use and whoever has not tried it can only regret Wink

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
September 21, 2013, 03:54:15 PM
Last edit: September 21, 2013, 04:27:16 PM by piotr_n
 #18

A quick update for people interested in this project, if such even exist Smiley

Wallet
Considering the Android's RNG incident and the rumors that other systems might also be "NSA friendly", I modified the wallet app in a way that its security does not rely on random number source anymore. Note that it never had for private key calculation (since it uses deterministic wallet driven by a password-seed), but it did for signing, and now it doesn't even for signing.

Client
I ported sipa's secp256k1 lib (the 10x26 option) to Go. It is now a default option for ECDSA signature checks, so there is no need to struggle with C compilers anymore to get a decent performance.
It performs better than the openssl wrapper (so also better than your current satoshi client), though is still like 3-5 times slower from the cgo wrapper using an original secp256k1 lib.
The openssl wrapper is still there, if you prefer to use it (having a security concerns). Same applies for the native ECDSA lib, though this one is still deadly slow.

There were also some fixes around accessing maps from different threads that were not properly protected, which was causing memory leaks - this should be fixed now.

Plus plenty of other things, not really worth mentioning, like a new command to purge orphaned blocks from the database, or replaced block's gzip compression with snappy (performs much better).

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2055
Merit: 1359


aka tonikt


View Profile WWW
October 26, 2013, 11:29:40 AM
Last edit: March 29, 2014, 05:52:44 PM by piotr_n
 #19

This month's update: changes up to version 0.8.0

Wallet
It does not show characters on screen while a user is entering the seed-password.
The solution is unfortunately platform dependent and requires MinGW in case of Windows.
If you cannot compile the wallet anymore, you can switch this feature off - just delete "wallet/hidepass_*.go"

Client
From the things that only devels care about, the structure of the code in the "client/" folder has been hugely reworked.
It isn't all-in-one anymore, but contains sub-packages.

As for the useful features, starting from version 0.7.6 there is a new tab on WebUI: MakeTx.
MakeTx allows the user to select (in a GUI-like matter) the specific outputs that he wants to spend and produces the exact command line that shall be executed.
It creates the "balance/" folder for the wallet, along with "pay_cmd.txt" file containing the command to be executed at the wallet's PC in order to sign the requested tx.
An example screenshot of how the new feature looks in your browser: http://imgur.com/JyIRZJl

FetchBalance
Recently I have also created quite a useful tool that can fetch a balance of your wallet from the popular block explorers.
I tried to use only one of them, but could not find a fully satisfying API and ended up needing both; blockchain.info & blockexplorer.com
Not every transaction can be recovered this way, but most of them should work. If any transaction cannot be fetched and decoded properly, it will inform you.

I will try to add a proxy support for it later, so you could easily fetch your wallet's balance using Tor.

Using this tool you do not need an online node anymore; only the small wallet app, and you have a fully functional and secure bitcoin brain/deterministic/cold wallet solution.
It is a single file tools/fetchbal.go - compile it to an executable, or use "go run" on the source.

Not having the client, you can just use blockchain.info/pushtx to broadcast the signed transactions coming from the wallet.


If anyone would like to try any of the pieces, but does not want to play with building the s/w himself, I can provide binaries for Windows or Linux.
Also, if you built and tried it on Mac, please let me know whether it works - I am curious to know, but have no apples here.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
orz.dk
Newbie
*
Offline Offline

Activity: 30
Merit: 0



View Profile WWW
November 02, 2013, 08:20:48 PM
 #20

Hi Piotr

Thank you for your work on this. I am trying it out, but getting an error on block 00000000000000560719da7088be587ea9c3018cfbbfae2dd2540682185c034b (#233046). It says:

.....
7474.8MB of data processed. We are at height 234765. Processing speed 10.507MB/sec, recent: 12853.3KB/s
7582.1MB of data processed. We are at height 235421. Processing speed 10.510MB/sec, recent: 10967.8KB/s
7710.2MB of data processed. We are at height 236155. Processing speed 10.541MB/sec, recent: 13109.1KB/s
7850.1MB of data processed. We are at height 236949. Processing speed 10.588MB/sec, recent: 14325.8KB/s
7958.2MB of data processed. We are at height 237625. Processing speed 10.586MB/sec, recent: 10700.6KB/s
8087.1MB of data processed. We are at height 238516. Processing speed 10.616MB/sec, recent: 13185.7KB/s
CheckBlock failed: CheckBlock: Block 00000000000000560719da7088be587ea9c3018cfbbfae2dd2540682185c034b hooks too deep into the chain: 233046/238760 000
00000000000e76cddac91bfdbf51a73f31ec740e07d651fba24f381289965

Do you maybe know what could be wrong. Im on windows 8, 64bit golang. I chose not to verify scripts.

Thanks ! : )
Pages: [1] 2 3 4 5 6 7 8 9 10 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!