Giter Site home page Giter Site logo

bitc's Issues

Problem with lastHashStore

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

disable stack-protector on powerpc

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.

Static build

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

using too much ram :)

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?

Errors during startup

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:

  • block headers: ~/.bitc/headers.dat -- ~ 20 MB
  • peer IP addresses: ~/.bitc/peers.dat -- ~ 2 MB
  • transaction database: ~/.bitc/txdb -- < 1 MB
  • wallet keys: ~/.bitc/wallet.cfg -- < 1 KB
  • main config file: ~/.bitc/main.cfg -- < 1 KB
  • a contacts file: ~/.bitc/contacts.cfg -- < 1 KB
  • a tx-label file: ~/.bitc/tx-labels.cfg -- < 1 KB

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.

Create a brew install formula

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.

brew formula cookbook

clang: not found

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)

Problem with compilation - unused function 'bitc_openssl_lock_fun'

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

building on os x fails after recent changes

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

testnet address generation and handling

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.

Fixes to compile for Raspbian (Pi)

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.

error: comparison of constant -1 with expression of type 'char' is always true

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!

build issue on amd64 (debian testing)

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

Dependency issue in OSX Yosemite

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

split the core of

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).

"Blocks" tab uses doesn't show year in date

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.

Can't find libstdc++

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/

KDF iteration count far to low to be meaningful.

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)

RPC interface

An optional RPC interface would be awesome, so i can use this on my server.

regards,
bitwave

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.