Pages:
Author

Topic: Gocoin - totally different bitcoin client with deterministic cold wallet - page 5. (Read 38686 times)

sr. member
Activity: 467
Merit: 267
These test scripts would have exposed all the problems you mentioned. They focus on block validation and reorganization.  You don't have to be a Java expert because the tool acts as a peer to which your node connects.
I have briefly looked at your code and noticed a few odd things but I didn't do a throughout review.
legendary
Activity: 2053
Merit: 1356
aka tonikt
Hi, out of curiosity, did you check your node against the bitcoin regression tests?

https://github.com/TheBlueMatt/test-scripts

--h


I would not know how to use that tool as I'm not a very big fan of java, but I can say that Gocoin is being checked against the official core's test vectors for transaction and scripts - both valid and invalid:
https://github.com/bitcoin/bitcoin/tree/master/src/test/data
https://github.com/piotrnar/gocoin/tree/master/lib/test

And recently I added a functionality that is (optionally) using the consensus lib (which came with core 0.12.0) to cross-check every transaction.
I have been using it ever since and there have been no mismatches observed so far.

The biggest potential risk of an incompatibility is in verifying of entire blocks - checks that are only executed on a block level.
Like recently I found that I wasn't checking for the maximum number of sigops - which bitcoin core limits to 20000/block.
Some other time I found that I wasn't checking for the coinbase transactions to be "mature" while verifying blocks that spend them.
Then there was no check of the timestamp against the median time of the last 11 blocks.
Few other things, some of them I don't even remember...

The odds are that there are still some check on the new blocks that bitcoin core does, which gocoin doesn't (yet), but I am unaware of any specific cases.

If anyone finds such, please report.
sr. member
Activity: 467
Merit: 267
Hi, out of curiosity, did you check your node against the bitcoin regression tests?

https://github.com/TheBlueMatt/test-scripts

--h
legendary
Activity: 2053
Merit: 1356
aka tonikt
I'm about to release 1.6.0 that has got some cool new features, which you can briefly read about int the changelog.

Upgrade is highway recommended as all the versions up to (including) 1.5.0 have had a serious security issue, which I prefer to not talk about because it's just embarrassing. Smiley

As for the new features.

There is a basic RPC API, implementing functionality required for mining. It is compatible with bitcoind's API and so far has been tested successfully on testnet3 with ckpool mining software.

The Home, Network and Transaction pages of WebUI shows nice graphs: http://imgur.com/a/eq1AH

The node counts sigops inside transactions and blocks.

The new tool bdb allows to play (extract/add blocks, check integrity) with the block's database. Also allows to defragment the db without a need to have the double space on the disk.

UTXO database can now work in a "volatile mode" where it only writes changes to disk when exiting. Use -v switch for either client or downloader to trigger it. The qdb enginie has also changed a bit and now it writes any pending changes on disk much faster.

You can also start the client with "-undo " switch, which will cause the node to undo the last n blocks (on the UTXO db) and exit.

The most recently added is the feature that looks for "libbitcoinconsensus.so" or "libbitcoinconsensus-0.dll" (depending on host OS) and if found uses the function from it to cross-verify each transaction.
So far it hasn't found any mismatches. Use TextUI command cons to see the stats of the cross-checking.


I would also like to mention that the recent versions of Gocoin have no external dependencies and should build out-of-the-box.
Just make sure to have 64 bit OS and at least 6GB of RAM (it's swapping too much slow less memory). In peaks (especially when rebuilding the UTXO db) it may even need more memory. But normal node, working on a synchronized chain, should never use more than 4GB.

I also strongly advise to use downloader to sync up the block chain - it's really fast as it doesn't verify transactions.  
Theoretically it is less secure, but there is no way to exploit it, if you only check the hash of the last block it assumed trusted.
legendary
Activity: 2053
Merit: 1356
aka tonikt
Sorry, I forgot to add that I added the Browser Wallets feature.
It does not require a wallet file to be stored within the node's file system anymore.
I use it with nodes which I run remotely, on VPS.

It takes a few seconds to load a web wallet for the first time, so expect some lags launching WebUI having had a browser wallet selected.

It is actually a pretty cool thing.

The setup I use myself is the node running on some ~20EUR/month VPS.
I connect there via ssh, tunneling the WebUI's port number (8833) through it.
Then I just the webui via http://127.0.0.1:8833

So the node is running on some external server and the wallet is in my house.
Well, actually the wallet app is in my house and the actual wallet (the seed password) is only in my head Smiley
legendary
Activity: 2053
Merit: 1356
aka tonikt
So back to work and currently I'm busy testing 1.5.0 before tagging it.
There have been loads of changes.
Among them headers-first syncing with support for BIP-130.

I also added plenty of stuff related to the memory pool monitoring and calculation of proper fees - it's becoming more and more useful/needed.

So now you can e.g. see stats like this:


From the wallet's side, new transactions are by default created with a non-final sequence number (by default it's current unix time value), so their fee can be increased later (see BIP125)

I have not implemented BIP125 in at the node's memory pool yet.
I haven't seen many RBF transactions in the network, so I will just do it somewhere later, having more live stuff to test it against.

Same with Segregated Witness - I will wait for it to come live on the network and then add it to Gocoin.
legendary
Activity: 2053
Merit: 1356
aka tonikt
BTW, sorry for neglecting the development recently, but I've been traveling for awhile, mostly into places with shitty internet.

I'll be back home soon and I plan to work on headers-first syncing and segregated witness functionality, among others.

I've been also thinking on changing we web interface in a way that I can have the client node running on some VPS server while my wallet files would be fed to it from the browser (connecting there via sshd tunnel) whenever I need to check/fetch the balance.
During my travels I found it very inconvenient to re-synchronize the blockchain at my laptop's client, each time I was arriving at a new hotel (usually after a couple of days of no wifi access).
So I want to have a node running somewhere 24/7 but without the wallet files being stored there, as I don't like an idea that some Amazon or other company would be able to lurk at this data.

So stay tuned - Gocoin is not dead Wink
legendary
Activity: 2053
Merit: 1356
aka tonikt
Hi, do you have any idea how many running nodes currently live?
No idea.

But at least mine.
newbie
Activity: 1
Merit: 0
Despite of no update in this topic for almost a year, I want to assure that gocoin project is doing fine; being maintained and updated.

The last tagged version (1.2.0) already supports BIP66. Everything else is in the changelog file.
It's been my only bitcoin node for a long time so I can guarantee that it's fully functional and pretty cool. Smiley

Hi, do you have any idea how many running nodes currently live?
legendary
Activity: 2053
Merit: 1356
aka tonikt
Despite of no update in this topic for almost a year, I want to assure that gocoin project is doing fine; being maintained and updated.

The last tagged version (1.2.0) already supports BIP66. Everything else is in the changelog file.
It's been my only bitcoin node for a long time so I can guarantee that it's fully functional and pretty cool. Smiley
legendary
Activity: 2053
Merit: 1356
aka tonikt
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.

I have the wallet's type in the config file (so far only 1,2 and 3 are used) and I can add other algos easily.
I wouldn't mind adding new types (compatible with armory, electrum, or anything else), but the main problem is that none of it seems to be documented and there isn't really one established standard for it.
The HD wallets might be a good way to go on with a standard, though they don't seem to cover the calculation of the initial vectors from the seed password.

So it is an open topic and I think the software will eventually evolve to support other types of deterministic wallets, but I just don't want to add any new types without some strong user cases, because it would only create more mess.

But the code is open and fairly simple, so if anyone wants to put in his own method, just play with the function make_wallet(), in file gocoin/wallet/wallet.go
It is a dangerous place to play with, so feel free to post your changes here for an audit.
hero member
Activity: 504
Merit: 500
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  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.
legendary
Activity: 2053
Merit: 1356
aka tonikt
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  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.
hero member
Activity: 504
Merit: 500
Just a question.
The password-seeding uses a known algorithm like that from elektrum or armory or it is an own schema ?
Thanks.
newbie
Activity: 23
Merit: 0
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
legendary
Activity: 2053
Merit: 1356
aka tonikt
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.
newbie
Activity: 23
Merit: 0
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
legendary
Activity: 2053
Merit: 1356
aka tonikt
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.
legendary
Activity: 2053
Merit: 1356
aka tonikt
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
newbie
Activity: 23
Merit: 0
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)
Pages:
Jump to: