Pages:
Author

Topic: [ANN] cbitcoin 2.0 - A Bitcoin Library in C - page 3. (Read 17219 times)

legendary
Activity: 1372
Merit: 1008
1davout
February 04, 2013, 02:30:25 PM
@MatthewLM
I think the work you're doing is awesome and I thank you for putting your skill and intelligence at work for the common good.
legendary
Activity: 1904
Merit: 1002
February 04, 2013, 02:27:36 PM
Hi GMD1987. Thanks for trying it out. I make all warnings into errors to help spot problems (warnings easily go unnoticed otherwise). I didn't get this since I'm using 64-bit. I'm assuming the correct way to suppress this would be to use "-Wno-pointer-to-int-cast" so I'll add this to the makefile now.

testCBNetworkCommunicator is sometimes problematic. I'm going to go through all the tests and run them with valgrind to detect any problems I've missed so far.

I don't think that code is doing what you think it is doing unless you are trying to do something very tricky.  If that is the case, you should document it with a few comments.

Do you really intend to convert the newly allocated pointer to an integer and then return it as a boolean?
legendary
Activity: 1190
Merit: 1004
February 04, 2013, 02:20:19 PM
Hi GMD1987. Thanks for trying it out. I make all warnings into errors to help spot problems (warnings easily go unnoticed otherwise). I didn't get this since I'm using 64-bit. I'm assuming the correct way to suppress this would be to use "-Wno-pointer-to-int-cast" so I'll add this to the makefile now.

testCBNetworkCommunicator is sometimes problematic. I'm going to go through all the tests and run them with valgrind to detect any problems I've missed so far.
newbie
Activity: 29
Merit: 0
February 04, 2013, 01:19:03 PM
MatthewLM,
On Linux crunchbang 3.2.0-0.bpo.4-686-pae #1 SMP Debian 3.2.35-2~bpo60+1 i686 GNU/Linux, cloned and ran ./configure && make test.  Error on openssl libs, apt-get installed libssl-dev zlib1g-dev, tried again but got the following for dependencies/random/CBRand.c
dependencies/random/CBRand.c: In function ‘CBNewSecureRandomGenerator’:
dependencies/random/CBRand.c:33: error: cast from pointer to integer of different size
dependencies/random/CBRand.c: In function ‘CBSecureRandomSeed’:
dependencies/random/CBRand.c:38: error: cast to pointer from integer of different size
dependencies/random/CBRand.c: In function ‘CBRandomSeed’:
dependencies/random/CBRand.c:41: error: cast to pointer from integer of different size
dependencies/random/CBRand.c:42: error: cast to pointer from integer of different size
dependencies/random/CBRand.c: In function ‘CBSecureRandomInteger’:
dependencies/random/CBRand.c:45: error: cast to pointer from integer of different size
dependencies/random/CBRand.c:45: error: cast to pointer from integer of different size
dependencies/random/CBRand.c:47: error: cast to pointer from integer of different size
dependencies/random/CBRand.c: In function ‘CBFreeSecureRandomGenerator’:
dependencies/random/CBRand.c:51: error: cast to pointer from integer of different size

Looking at the code, uint64_t was used (and designed for this sort of error, no?)
bool CBNewSecureRandomGenerator(uint64_t * gen){
        *gen = (uint64_t)malloc(32);
        return *gen;
}

Do you know what's going on here?  I'm pretty sure the cast it's referring to is in the assignment.  I think this was initially a warning converted to an error and just turning off pedantic would solve it but would be antithetical to a make test  Cheesy
legendary
Activity: 1190
Merit: 1004
February 04, 2013, 10:43:56 AM
cbitcoin now builds fully (In it's current state) on OSX and Linux Mint (tested).

To build yourself and run the tests do this:

Code:
git clone https://github.com/MatthewLM/cbitcoin.git
cd cbitcoin
./configure
make test
legendary
Activity: 1190
Merit: 1004
Props on your progress Matthew, and I applaud your listening ear. I've been keeping an eye on this project Smiley

Thanks. I've been ill over the last few days so I haven't made any progress in that time and I've got a lot of other work to do, but I'll try my best to continue at a reasonable pace from here onwards.
legendary
Activity: 1120
Merit: 1152
OK, since you aren't the only one to complain, I've changed the title.

Thanks, it's a much better title!
sr. member
Activity: 336
Merit: 250
Props on your progress Matthew, and I applaud your listening ear. I've been keeping an eye on this project Smiley
legendary
Activity: 1190
Merit: 1004
OK, since you aren't the only one to complain, I've changed the title.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
Matthew - although I am a big supporter of your project (and you are welcome to set up a Project on http://ciyam.org/open for your venture - and if you do so I will personally donate 1 BTC towards it) I think that to get better "cred" you should consider changing the title of this thread (perhaps get rid of the "Route to Bitcoin's Future part") as I think this could really hinder your otherwise very admirable idea.
legendary
Activity: 1190
Merit: 1004
If anyone wishes to help, the best thing that can be done presently is to test the validation code. I already have many tests which pass, but much scrutinisation is needed for the block-chain validation code: https://github.com/MatthewLM/cbitcoin/blob/master/test/testCBFullValidator.c
legendary
Activity: 1190
Merit: 1004
The hamming codes for storage are working. The problem is that they slow down the IO quite considerably. A storage system not using the hamming codes should be used instead for speed. Servers shouldn't need the hamming codes since server hardware is supposed to be highly resistant to data corruption.

Now I just need to test the full validator properly. I do not have the mined test blocks so I'll have to modify the code to allow for disabling the proof of work check.

There were some people that requested I gave them an option to donate using a crowd-funding website, since they did not want to donate in bitcoin. I set up a page because of that but only two people have donated. Do not forget that you can donate via debit/credit card here: http://www.rockethub.com/projects/11976-cbitcoin-developing-bitcoin-s-future and as a reward you can have your name or your business listed on the cbitcoin website.

Thanks.
legendary
Activity: 1190
Merit: 1004
December 19, 2012, 05:39:22 PM
#92
Good news everyone! http://www.youtube.com/watch?v=1D1cap6yETA

I have now got the basic unit tests working for the full validator. This does not yet test various parts of the validator such as output spending, but it shows that the database system is working nicely. Next stop is to implement the full range of tests for the full validator. The CBNetworkCommunicator is still not working... I'll get to that eventually but first a lot of the old code needs to be updated to incorporate some new features.
member
Activity: 66
Merit: 10
December 04, 2012, 01:36:29 PM
#91
Thank you for the quick reply, I understand more what was your intent now.
legendary
Activity: 1190
Merit: 1004
December 04, 2012, 01:32:10 PM
#90
Hello. cbitcoin will at first be designed to work with the bitcoin production and test chains. If someone made a separate chain it would be incompatible with other chains. In the future I may support more customisability for technologies based upon bitcoin, which could use their own chain. That is not a priority right now.
member
Activity: 66
Merit: 10
December 04, 2012, 01:22:08 PM
#89
Your project seems like it could improve some aspects of the bitcoin client/network.  I may not understand it completely, but I see a lot of potential.  In reference to using multiple block chains, if this client software supports that, couldn't we see potential competition between different chains then on the network.  Like coins from block A are more then block B or would it still be the same essentially?  Would one who has these coins have them combined or would they be split across the two chains when conducting transactions and not able to send them from A to B?
legendary
Activity: 1596
Merit: 1100
November 29, 2012, 08:57:18 PM
#88
Take a look at strcpy(), it includes a termination character when copying.

Edit: correct.

legendary
Activity: 1190
Merit: 1004
November 29, 2012, 08:32:52 PM
#87
Take a look at strcpy(), it includes a termination character when copying.
legendary
Activity: 1190
Merit: 1004
November 29, 2012, 07:23:00 PM
#86
I have completed the storage component for cbitcoin: https://github.com/MatthewLM/cbitcoin/tree/master/dependencies/storage

I will now complete the full validator, before I have no choice but to finally fix the CBNetworkCommunicator: https://github.com/MatthewLM/cbitcoin/issues/9

Building on Linux Mint 13 with the makefile still fails. If someone can get the build system to work for linux please submit a fix: https://github.com/MatthewLM/cbitcoin/issues/13
legendary
Activity: 1190
Merit: 1004
November 25, 2012, 07:13:34 AM
#85
is this big and little endian compatible?

Yes it is, or at least that is the way it is designed to be. It's only been tested on a little-endian machine so feel free to try it out on a big-endian machine.
Pages:
Jump to: