bit-c / bitc Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
you might have a look at bitcoinj
https://code.google.com/p/bitcoinj/wiki/SpeedingUpChainSync
Could someone who is building this on OS X create a homebrew install formula?
Would be really cool to be able to type brew install bitc
on my mac and have it be updated / rebuilt automatically when appropriate.
I'd do it, but I couldn't find several of the dependencies for OS X on a quick search and, being lazy, I'm hoping that someone who is already building could help the rest of us out.
Hi all,
I have been running bitc smoothly until I sent 0.001 btc to the default address assigned by bitc. Afterward, bitc quits automatically while trying to connect to peers showing the following message. Has anybody else seen a similar issue?
ASSERT failed at src/block-store.c:blockstore_get_highest:178
PANIC: Expression 'height1 > 0' not TRUE.
Aborted (core dumped)
I tried to find a relevant section in the code, and it seems like lastHashStore is the immediate cause of the problem. Since peerGroup determines lastHashStore, I suspect that peerGroup is not being set up properly.
peergroup_get_lastblk(btc->peerGroup, &lastHashStore);
blockstore_get_highest(bs, &walletHash, &lastHashStore, &startHash);
...
height0 = blockstore_get_block_height(bs, hash0);
height1 = blockstore_get_block_height(bs, hash1);
ASSERT(height0 > 0);// PANIC
When running the wallet I keep getting this error:
dyld: Library not loaded: /usr/local/lib/libleveldb.1.15.dylib
Referenced from: /Users/solocshaw/bitc/./bitc
Reason: image not found
Trace/BPT trap: 5
Hello,
I want to build statically the bitc binary
I ahve added the "static" flag to the Makefile but I have this error:
/usr/bin/ld: dynamic STT_GNU_IFUNC symbol strcmp' with pointer equality in
/usr/bin/../lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libc.a(strcmp.o)' can not be used when making an executable
What is the right way to compile it statically ?
Thanks
After make i obtained the following error:
CC apps/bitc-cli/main.c
apps/bitc-cli/main.c:363:1: error: unused function 'bitc_openssl_lock_fun'
[-Werror,-Wunused-function]
bitc_openssl_lock_fun(int mode,
^
apps/bitc-cli/main.c:387:1: error: unused function
'bitc_openssl_thread_id_fun' [-Werror,-Wunused-function]
bitc_openssl_thread_id_fun(void)
^
2 errors generated.
Makefile:117: recipe for target 'bld/apps/bitc-cli/main.o' failed
make: *** [bld/apps/bitc-cli/main.o] Error 1
Additional info
arch
x86_64
lsb_release -a | grep Description
Description: Ubuntu 16.04.3 LTS
Cf #7 (comment)
getting this error cant open wallet
bitc
ASSERT failed at core/serialize.c:deserialize_version:739
PANIC: Expression 'buff_space_left(buf) == 0' not TRUE.
Abort trap: 6 (core dumped)
compared to bitcoinj, the download-speed of the headers is slow.
Hi all,
I tried ./bitc -T and obtained a test address. I tried to acquire test bitcoins from a few faucet sites below, and all of them failed saying that the test address is not valid. I assume bitc accesses the original Testnet instead of the latest Testnet3. Is there a plan to address this problem?
http://testnet.bitcoin.peercoinfaucet.com/
http://faucet.xeno-genesis.com/
http://kuttler.eu/bitcoin/faucet/
Heya,
i'm just testing out clients for memory usage, and your SPV client peaks at 1GB virtual ram required O_o
why is it so much, are there ways to lower the demands easily?
After installing the required dependencies on Ubuntu 14.04 make
threw an error, unable to find libstdc++ until I added this to LIBS
: -L/usr/lib/gcc/x86_64-linux-gnu/4.8/
It seems to compile correctly but when running i get this:
./bitc
It looks like you're a new user. Welcome!
Note that bitc uses the directory: ~/.bitc to store:
Failed to add address to wallet.
Failed to add key to wallet: Operation not permitted
--- tthis is my logfile from temp
05:08:32.256371| UTIL: new log session: Thu Apr 28 05:08:32 2016
05:08:32.256501| UTIL: changing rlimit core-size: 0 -> ffffffffffffffff
05:08:32.256687| CONFIG: Loading config '/home/jacobbogers/.bitc/main.cfg'
05:08:32.256724| FILE: opening '/home/jacobbogers/.bitc/main.cfg' ro=1 unbuf=0
05:08:32.256893| CONFIG: Loading config '/home/jacobbogers/.bitc/contacts.cfg'
05:08:32.256928| FILE: opening '/home/jacobbogers/.bitc/contacts.cfg' ro=1 unbuf=0
05:08:32.257033| CONFIG: Loading config '/home/jacobbogers/.bitc/tx-labels.cfg'
05:08:32.257065| FILE: opening '/home/jacobbogers/.bitc/tx-labels.cfg' ro=1 unbuf=0
05:08:32.257212| BLCK: Using headers at '/home/jacobbogers/.bitc/headers.dat.
05:08:32.257391| BLCK: Genesis: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
05:08:32.257436| FILE: opening '/home/jacobbogers/.bitc/headers.dat' ro=0 unbuf=0
05:08:32.257494| BLCK: loaded blocks up to 0000000000000000000000000000000000000000000000000000000000000000
05:08:32.257513| BLCK: this took 1 usec
05:08:32.257526| BLCK: loaded 0 headers.
05:08:32.258037| WALLET: plain wallet: 0 key in file '/home/jacobbogers/.bitc/wallet.cfg'.
05:08:32.288588| TXDB: txdb_print_coins: no coins found
05:08:32.288625| TXDB: BALANCE = 0 -- 0.00000000 BTC
05:08:32.288680| BLOOM: filterSize=17 numHashFuncs=9 tweak=5
05:08:32.288734| KEY: EC_KEY_generate_key failed.
05:08:32.288753| Failed to add address to wallet.
The build is currently hardcoded to use clang. On linuxy platforms gcc is usually installed, it would be nice to have at least a Makefile option to override the C compiler.
(it compiles and works fine in gcc, btw)
An optional RPC interface would be awesome, so i can use this on my server.
regards,
bitwave
It would be useful for bitc to be able to generate and handle testnet addresses.
Currently, when running on the testnet (-T) the app loads mainnet addresses from the wallet.cfg file, and when generating an address with
$ ./bitc -T -a myTestnetAddr
a mainnet address is generated and added to wallet.cfg.
Not sure if this is on purpose or some locale-specific weirdness, but the dates in the "Blocks" tab don't show the year, which looks a bit strange for older blocks like the genesis block:
│ 2000 │ 27 Jan 09:58:35 │ 00000000dfd5d65c9d8561b4b8f60a63018fe3933ecb131fb37f905f87da951a
│ 0 │ 03 Jan 19:15:05 │ 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f │
If the reason for this is to conserve horizontal space, maybe show the times only for blocks received this year and the year instead.
Picked a file at random to look at.. got crypt.h
Your KDF iteration count is far too low to meaningfully slow attacks. A typical bitcoin-qt wallet uses over 100,000 iterations of SHA512, you're using about 1000. This should really be stored in your wallet and adapted to the users system to get the highest amount you can take with acceptable performance. (Bitcoin-qt uses 100ms worth, subject to a minimum of 25,000 iterations. Reasonable minds might differ on the timings, but I think 1337 iterations is way too little, it's even less than linux distros are using for login passwords)
I receive this error upon compiling:
LINK bitc
bld/addrbook.o: In function `addrbook_get_path':
/home/<redacted>/bitc/src/addrbook.c:155: undefined reference to `__stack_chk_guard'
/home/<redacted>/bitc/src/addrbook.c:155: undefined reference to `__stack_chk_guard'
/home/<redacted>/bitc/src/addrbook.c:163: undefined reference to `__stack_chk_guard'
bld/base58.o: In function `base58_encode':
/home/<redacted>/bitc/src/base58.c:238: undefined reference to `__stack_chk_guard'
/home/<redacted>/bitc/src/base58.c:238: undefined reference to `__stack_chk_guard'
bld/base58.o:/home/<redacted>/bitc/src/base58.c:296: more undefined references to `__stack_chk_guard' follow
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bitc] Error 1
Clang:
Debian clang version 3.3-16 (branches/release_33) (based on LLVM 3.3)
Target: powerpc-unknown-linux-gnu
Thread model: posix
Disabling fstack-protector allows it to compile but I have no idea what the implications are of doing that or how to go about fixing it properly.
recent source code doesnt compile on Mac OS X with clang anymore
...
CC src/main.c
src/main.c:388:11: error: incompatible pointer to integer conversion returning 'pthread_t' (aka 'struct _opaque_pthread_t ') from a function with result type 'unsigned long'
[-Werror,-Wint-conversion]
return pthread_self();
^~~~~~~~~~~~~~
1 error generated.
make: ** [bld/main.o] Error 1
...
error is new, bitc version from 6. februar compiled with clang without problems
fix:
use gcc instead of clang
I'd like to add support for bitc in BitcoinKit.framework so Hive and MacWallet could make use of bitc as the underlaying bitcoin stack.
This would preassume that bitc would keep the core separated from the ui/terminal stuff. Best would be to build a lib (libbtc) where the ui-level (bitc) would make use of that library.
(like libcurl and curl are connected).
I receive the following error when compiling 777029b:
CC src/main.c
src/main.c:1112:46: error: comparison of constant -1 with expression of type 'char' is always > true [-Werror,-Wtautological-constant-out-of-range-compare]
long_opts, NULL)) != EOF) {
~~~~~~~~~~~~~~~~~ ^ ~~~
1 error generated.
make: *** [bld/main.o] Error 1``
Clang:
Debian clang version 3.3-16 (branches/release_33) (based on LLVM 3.3)
Target: powerpc-unknown-linux-gnu
Thread model: posix
Compiles and works great on OS X though, so!
Built properly in the past, but updated and now see this error. Removed dir and did a clean checkout and got the same error.
CC apps/bitc-cli/ncui.c
apps/bitc-cli/ncui.c:1539:2311: error: array index 3 is past the end of the array (which contains 3 elements) [-Werror,-Warray-bounds]
if (extension ({ size_t **s1_len, __s2_len; (__builtin_constant_p (entry->country_code) && __builtin_constant_p ("US") && (__s1_len = __builtin_strlen (entry->country_code), __s2_len = __builtin_strlen ("US"), (!((size_t)(const void *)((entry->country_code) + 1) - (size_t)(const void *)(entry->country_code) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("US") + 1) - (size_t)(const void *)("US") == 1) || __s2_len >= 4)) ? __builtin_strcmp (entry->country_code, "US") : (__builtin_constant_p (entry->country_code) && ((size_t)(const void *)((entry->country_code) + 1) - (size_t)(const void *)(entry->country_code) == 1) && (__s1_len = __builtin_strlen (entry->country_code), __s1_len < 4) ? (__builtin_constant_p ("US") && ((size_t)(const void )(("US") + 1) - (size_t)(const void )("US") == 1) ? __builtin_strcmp (entry->country_code, "US") : (__extension ({ const unsigned char ***s2 = (const unsigned char *) (const char *) ("US"); int __result = (((const unsigned char *) (const char *) (entry->country_code))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (entry->country_code))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) (entry->country_code))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) (entry->country_code))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("US") && ((size_t)(const void *)(("US") + 1) - (size_t)(const void *)("US") == 1) && (__s2_len = __builtin_strlen ("US"), __s2_len < 4) ? (__builtin_constant_p (entry->country_code) && ((size_t)(const void )((entry->country_code) + 1) - (size_t)(const void )(entry->country_code) == 1) ? __builtin_strcmp (entry->country_code, "US") : (- (__extension ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (entry->country_code); int __result = (((const unsigned char *) (const char *) ("US"))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("US"))[1] - __s2[1]); if (__s2_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("US"))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("US"))[3] - __s2[3]); } } __result; })))) : __builtin_strcmp (entry->country_code, "US")))); }) == 0
Nice to have a non-java SPV client -- finally something that the Pi can handle!
I had to make the following additions in order to compile cleanly for Raspbian:
Added to Makefile to fix assembler messages (Rd and Rm should be different in mul)
CFLAGS += -Dlinux -ccc-host-triple armv6-unknown-eabi -march=armv6 -mfpu=vfp -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard
Added to block-store.c, txdb.c, and config.c for the PATH_MAX define
#include <linux/limits.h>
Added to hash.c, ncui.c, and txdb.c to fix "_undefined reference to `__isoc99_sscanf'" linker error
#define _GNU_SOURCE
I haven't forked and created a pull request as I don't know the proper way to include these changes so they don't break other platforms.
FYI: uname -m returns armv6l, and uname -i & uname -p both return unknown.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.