Bitcoin Forum
May 24, 2024, 12:28:38 PM *
News: Latest Bitcoin Core release: 27.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 38500 times)
Tovadnok
Newbie
*
Offline Offline

Activity: 44
Merit: 0


View Profile
May 17, 2014, 05:02:42 PM
 #81

Well, you can put any kind of scripts into the wallet's code, but without a specific application (a user case), I don't see how I could add anything more.
So far gocoin supports the following output scripts:
* P2KH address (a regular bitcoin address)
* P2SH address (that's for multisig)
* NULL output describing the next one's encrypted constant (for stealth payments)
* NULL output with an arbitrary data (e.g. to attach text messages to transactions)
Adding other kind of output scripts is not really a challenge, but I need a specific application for it, before I can put it in.

As from the node's side.
Gocoin node (unlike bitcoin-qt) does not split transactions into "standard" and "non-standard".
As long as the fee per byte is efficient, it will get routed, despite of a content of the script.

The most basic application is to make the transaction not redeemable for a given number of blocks. While it's clearly not a feature that will be currently used by many users, there are applications being built on top of the bitcoin blockchain that can take advantage of such features.

In any case, it's good to know that the wallet can be easily modified to support different output scripts.
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
May 17, 2014, 05:10:45 PM
 #82

Oh, you mean the lock time.
Yeah, sure that should be easy to add.

FAIK, it's just setting the LockTime to a value other than zero.
You can do it yourself, if you like playing with source code.

Look inside wallet/signtx.go, function make_signed_tx() and change:
Code:
tx.Lock_time = 0
... to whatever you need. (like a value read from a command line).

I really encourage people to play with the code - if you are a programmer, especially if you did a lot of C, Go is a really cool language to code in.
I've been coding C all my life, but writing in Go is just so much more pleasant. And it compiles so quickly that at the beginning you cannot even believe it Smiley

Of course, there is a testnet switch -t and make sure to use it while you are having fun, to not be sorry at the end.


EDIT:
As for the lock time, I read that in order for it to work, you would also need to set this:
Code:
tin.Sequence = 0xffffffff
... to a different value.

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
Tovadnok
Newbie
*
Offline Offline

Activity: 44
Merit: 0


View Profile
May 19, 2014, 12:28:26 AM
 #83

Oh, you mean the lock time.
Yeah, sure that should be easy to add.

FAIK, it's just setting the LockTime to a value other than zero.
You can do it yourself, if you like playing with source code.

Look inside wallet/signtx.go, function make_signed_tx() and change:
Code:
tx.Lock_time = 0
... to whatever you need. (like a value read from a command line).

I really encourage people to play with the code - if you are a programmer, especially if you did a lot of C, Go is a really cool language to code in.
I've been coding C all my life, but writing in Go is just so much more pleasant. And it compiles so quickly that at the beginning you cannot even believe it Smiley

Of course, there is a testnet switch -t and make sure to use it while you are having fun, to not be sorry at the end.


EDIT:
As for the lock time, I read that in order for it to work, you would also need to set this:
Code:
tin.Sequence = 0xffffffff
... to a different value.

Thanks Piotr_n. That's very helpful!
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
May 31, 2014, 08:19:00 PM
Last edit: May 31, 2014, 08:47:08 PM by piotr_n
 #84

wallet -raw tx2sign.txt -hashes

wallet -sign <addrN> -hash <hashN>
Sorry I don't know what that message means, but recently I removed support for the "-hashes" and "-hash -sign.." commands.

This signing method wasn't adding any security and required a lot of hassle (e.g. playing with tool/txaddsig).
Moreover, it was not compatible with multisig, after I eventually added support for it at some point.

So I decided to remove this code from the source, because I find it important for the wallet code to be clean, readable and as simple as possible.
Maybe one day I will add it back, but for now it will stay disabled, because each new option complicates the testing.

But if you need these commands, just checkout some previous tag (between 0.9.2 and 0.9.14) and build the wallet executable from it.

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: 2053
Merit: 1354


aka tonikt


View Profile WWW
May 31, 2014, 08:27:26 PM
Last edit: May 31, 2014, 08:49:19 PM by piotr_n
 #85

BTW, the latest version of wallet also supports Litecoin (add -ltc switch)
The client node does not, but you can fetch balance of your Litecoin addresses from http://ltc.blockr.io using tool/balio
Then broadcast a signed transaction to Litecoin network using this page: http://ltc.blockr.io/tx/push (or the official litecoin's client sendrawtransaction RPC).


From other useful changes in the wallet, now you can just do:
Code:
wallet -raw rawtx.txt
.. to sign all the multisig inputs that the current wallet knows keys for. (previously you had to specify a specific signing address with "-msign")

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: 2053
Merit: 1354


aka tonikt


View Profile WWW
May 31, 2014, 09:19:36 PM
 #86

I just said: this feature was pretty useless.
It wasn't adding any security and was a hell lot a hassle to use it.

I don't see why anyone would want to extract hashes, just to sign numbers instead of the actual transaction file.
And then, to make it even more convoluted, use another tool to put the signatures + pubkeys into the unsigned transaction, before broadcasting.
The wallet can do all this things together, in much more secured way, where you can actually check what you are signing, instead of just signing a meaningless number.
This feature just didn't make any sense to me.

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: 2053
Merit: 1354


aka tonikt


View Profile WWW
June 15, 2014, 03:29:40 PM
Last edit: June 18, 2014, 07:29:02 AM by piotr_n
 #87

Update on the development.

I had said to myself that after I would have the current code running without any changes for like 2 weeks, then I would tag it as 1.0
And the problem is that I apparently don't have a patience for it - 2 weeks is just too long for me to not touch a code Smiley
So now I am already on 1.0.0-RC8, and again the code was hugely remade.

In rc8 I changed the format of UTXO database. Now it is kept in "gocoin/btcnet/unspent4/", while the old one was in unspent3.
The new format allowed me to further simplify the architecture, but also performs significantly better (e.g. the node starts faster).
But the most important thing is that it decreased memory consumption, from far over 2GB to slightly over 1GB. But it still does not work on 32-bit arch (too little memory space for Go framework, I guess).
Additionally the size of unspent4 folder is significantly lower, comparing to its predecessor.

I developed this version on a branch, because the new database format means that the node needs to rebuild the UTXO at the first launch.
It may take up to an hour, so I did not want to annoy anyone, especially when it wasn't all complete and stable yet.

But the current version seems to have all the old full functionality already.
If anyone would like to try it before I get to merge it with the master, to checkout the branch:
Code:
git checkout unspent4
...and then rebuild your binaries.

Any feedback welcome.

Oh, and there were plenty of changes since my last announcement on 0.9.13, though mostly of architecture / performance matter.
Not much visible on a user interface level, but really plenty of good stuff. As usually you can find a more detailed list in changelog.txt

Also, if you run it for the first time and have no fresh bitcoind to import your blocks from, make sure to try the downloader.
On my few yrs old i5 desktop PC, with 50Mb downlink, it fetches the current block chain (while building UTXO database) in about 90 minutes.
For comparison: on the same PC, bitcoin-qt needs like 6 hours to just re-index the chainstate (having the blocks on disk already).

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
aamarket
Sr. Member
****
Offline Offline

Activity: 259
Merit: 250


View Profile WWW
June 15, 2014, 05:43:22 PM
 #88

sounds promising, I am interested in having gocoin running on a small 32 bit ARM hardware.
it was possible with original client, I gladly help with 32 bit experiments x86 / ARM.
free time shortage, but hopefully try something during the week.
best regards !

IMPORTANT:http://bitcointalk.org/index.php?topic=177133.0,Tips welcome BTC:1AAMARKETmJvfjDwEFmhyYYwfre7ZFVseP  RIC:RGnX6LcJrsVEuYeySDDxkmH7AjRqoprcKt
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
June 15, 2014, 05:50:14 PM
Last edit: June 15, 2014, 06:22:32 PM by piotr_n
 #89

sounds promising, I am interested in having gocoin running on a small 32 bit ARM hardware.
it was possible with original client, I gladly help with 32 bit experiments x86 / ARM.
free time shortage, but hopefully try something during the week.
best regards !
sure - it's always worth trying.
let me know if you needed any help.
and also how it went.

all I can say about 32-bit "incompatibility" is that when I build the node with 32-bit compiler and run it on my 64 bit windows, it crashes after awhile complaining something about memory allocation error.
but it does not seem to take more than 2GB of the system memory at any time, so that's kind of weird.
it may be only happening on windows - worth trying at a different OS.

also, in the testnet mode, it should work just fine on 32 bit OS.
the database isn't so big yet.
but who needs testnet mode for anything except testing.

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: 2053
Merit: 1354


aka tonikt


View Profile WWW
June 18, 2014, 02:12:31 PM
 #90

The new code seems quite stable already and soon I am going to merge unspent4 branch into the master.
It means that when you get it, it will have to rebuild your UTXO database, which may take up to one hour.

I could have put in a converter to speed up this process pretty much, but that will add an unnecessary code to the client, so I prefer not to.
The rebuilding of UTXO db is a one time operation and I just do not think it would be worth it.

This message is just a notice of my intent, and if you have any objections against what I am going to do, there is still time to raise them.
If you don't have any objections, just expect that at some time in a future (after you pull the most recent sources), your node may take up to an hour to launch for the first time.

Or if you prefer to get it over with now, checkout the unspent4 branch and build it - then starting the node will make then conversion for you already.
It doesn't remove unspent3 database, so after the conversion is done, you can still use the old gocoin node (tag 1.0.0rc7 or lower).

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: 2053
Merit: 1354


aka tonikt


View Profile WWW
August 12, 2014, 11:11:23 AM
 #91

FYI, few days ago, after a longer period of testing, I released Gocoin version 1.0.0.

I have built binaries of this release for Windows and Linux. You can download them from here: https://sourceforge.net/projects/gocoin/files/?source=directory
Inside each archive there is a file with SHA-256 sums, signed with my bitcoin-otc PGP key.

The Linux execs require 64 bit OS.
Windows binaries require 64-bit platform for downloader in client, but the wallet and balio apps will also work on 32 bit systems.
If you need a binary for any other platform (OSX, FreeBSD, Linux i386, Linux ARM), let me know - I can build it for you.

When launching the client make sure to have the www/ folder in the place (it contains the WebUI app).

For the wallet there is an example config file (with all the config parameters are commented out).

Don't hesitate to give me a shout, if you'd experience any issues: tonikt@assets-otc.com

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
luckcolors
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
August 21, 2014, 10:03:16 AM
 #92

hello piotr_n! Smiley
i've tried your gocoin client and works perfectly well.
i'm asking if you can add to the downloader an function to select a different type of database.
because i need to download the blockchian in the normal bitcoin format for creating  my bootstrap.dat files (also my normal bitcoin client is so slow , it does like a block per minute) also go coin i think is the only bitcoin client that have an downloader for the blockchian that i've found on the webs.
i'll really appreciate if you add this function to the downloader or creating a tool for that. Smiley
Thanks In Advance Cheesy
(sorry for my mispelling errors i'm not english)
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
August 21, 2014, 10:33:10 AM
 #93

i'm asking if you can add to the downloader an function to select a different type of database.
sure I can.
the problem is that testing this would be very time consuming, so I am not very keen to start working on it, considering that it'd take lot of my time giving me back nothing I need myself.

but I will keep your request in mind and see what I can do.
cheers

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: 2053
Merit: 1354


aka tonikt


View Profile WWW
August 23, 2014, 11:53:57 AM
 #94

as for the downloader producing the files for the bitcoin core.

what I can do quite easily is to add a command to write the current gocoin's block database as the bootstrap.dat file.
though, I don't know how much it would help you, since importing bootstrap.dat into bitcoin-qt is also quite painful.

playing with bitcoin-qt's chain/wallet state databases is just too much hassle for me - I won't do it, sorry.

anyway, if anyone would find such a feature (creating bootstrap.dat) useful, just let me know and I will add it.

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
luckcolors
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
August 23, 2014, 12:37:08 PM
 #95

I need the bootstrap.dat function for creating my personal blockchian backups i'll really appreciate if you add this function.
Anyway i think the downloader needs a tweak because it uses way to much ram in my machine windows 7 64bits 4gb ram it makes the pc slow when the ram usage comes to 90%/95% . anyway the cpu usage is fine it's just 10%. Smiley (And yes i've compiled using the gcc in go)
Thanks in Advance
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
August 23, 2014, 02:42:42 PM
 #96

Check out this tool: https://github.com/piotrnar/gocoin/blob/master/tools/bootdat_qt.go
Just tell it where is the gocoin's folder with the blockchain.dat + blockchain.new files and it will create the bootstrap.dat (in the current dir).

As for the memory consumption, I am aware of this issue. And that is why I have 12 GB on of RAM Tongue
I could try to tweak the garbage collector settings, but it will decrease performance in systems that have more memory.
You can actually play with the settings yourself - it is "-g" command line switch.
You can also try playing with "-m" and "-n".

Although, if you need the downloader only to produce the bootstrap.dat later, just start it with "-b" - that should help.

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
luckcolors
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
August 24, 2014, 11:17:31 AM
 #97

Ok thanks for helping me !
I'll checkout the tool and i let you know if there are problems.
i'll also check the ram settings.  Smiley
virtualmaster
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500



View Profile
August 31, 2014, 04:15:28 PM
 #98

Just a question.
The password-seeding uses a known algorithm like that from elektrum or armory or it is an own schema ?
Thanks.

Calendars for free to print: 2014 Calendar in JPG | 2014 Calendar in PDF Protect the Environment with Namecoin: 2014 Calendar in JPG | 2014 Calendar in PDF
Namecoinia.org  -  take the planet in your hands
BTC: 15KXVQv7UGtUoTe5VNWXT1bMz46MXuePba   |  NMC: NABFA31b3x7CvhKMxcipUqA3TnKsNfCC7S
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
August 31, 2014, 04:59:54 PM
Last edit: August 31, 2014, 05:21:49 PM by piotr_n
 #99

Just a question.
The password-seeding uses a known algorithm like that from elektrum or armory or it is an own schema ?
Thanks.

The default type 3 is my own schema. It goes like this:

Code:
seed_key = SHA256(SHA256(password)) /*the master seed*/
for n:=0; n<number_of_keys; n++ {
  priv_key[n] = SHA256(SHA256(seed_key))
  seed_key = append(seed_key, byte(n))
}

Type 1 and 2 are also my own schemas, though they use different algos.

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
virtualmaster
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500



View Profile
August 31, 2014, 06:40:14 PM
 #100

Just a question.
The password-seeding uses a known algorithm like that from elektrum or armory or it is an own schema ?
Thanks.

The default type 3 is my own schema. It goes like this:

Code:
seed_key = SHA256(SHA256(password)) /*the master seed*/
for n:=0; n<number_of_keys; n++ {
  priv_key[n] = SHA256(SHA256(seed_key))
  seed_key = append(seed_key, byte(n))
}

Type 1 and 2 are also my own schemas, though they use different algos.
Thanks for the answer.
Having compatibility with a known schema has the advantage having additional security if the wallet development abruptly disappears or some bugs appear making temporary unusable the software.
It is also more flexible if I could use for ex. elektrum and combining sometimes with gocoin just generating the seed containing my coins.
For example armory is a little bit heavy but I can generate a tree quickly from my seed with a brainwallet(for ex. brainwallet.org supports it), receive payments on the generated tree addresses and later I could import the seed in armory.
A different, new schema could have sense if presents some advantages which balances the lack of compatibility.

Calendars for free to print: 2014 Calendar in JPG | 2014 Calendar in PDF Protect the Environment with Namecoin: 2014 Calendar in JPG | 2014 Calendar in PDF
Namecoinia.org  -  take the planet in your hands
BTC: 15KXVQv7UGtUoTe5VNWXT1bMz46MXuePba   |  NMC: NABFA31b3x7CvhKMxcipUqA3TnKsNfCC7S
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!