Archive of the libbitcoin Slack #general channel.
version3 branch. Can you confirm that?constants.h in libbitcoin should be made configurable à la settings.cpp in other libbitcoin libraries. Did you envision this change to go into V3 or V4?constants.h only after they are not in use in other repos any more (if any). That way the whole migration process can be split into multiple PRs which makes it more managable for everyone involved.version3 branch. Can you confirm that?
https://libbitcoin.slack.com/archives/C6LH74ACQ/p1527678724000139% echo cULrpoZGXiuC19Uhvykx7NugygA3k86b3hmdCeyvHYQZSxojGyXJ | bx base58-decode | cut -c 3-66 | bx ec-to-public | bx bitcoin160
38971f73930f6c141d977ac4fd4a727c854935b3% echo "0 [38971f73930f6c141d977ac4fd4a727c854935b3]" | bx script-to-address -v 196
2Mww8dCYPUpKHofjgcXcBCEGmniw9CoaiD2% echo 0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff | cut -c 1-32 | bx mnemonic-new
abandon above dust dust case often baby melt fever creek oven urban
The following mimics newer Trezor Bitcoin behaviors,
P2WPKH Address for M/49'/0'/0'/0/0:
% echo "abandon above dust dust case often baby melt fever creek oven urban" | bx mnemonic-to-seed | bx hd-new | bx hd-private -d -i 49 | bx hd-private -d -i 0 | bx hd-private -d -i 0 | bx hd-private -i 0 | bx hd-private -i 0 | bx hd-to-ec | bx ec-to-public | bx bitcoin160
9b4e7ab01095dc96f74676fd09bb44ec9857fb7e% echo "0 [9b4e7ab01095dc96f74676fd09bb44ec9857fb7e]" | bx script-to-address -v 5
3KN5WUE5KJNyn3usHkm4spWG33sUf2jWQCP2WPKH nested in BIP16 P2SH Trezor Address for M/49'/0'/0'/0/0:
bool ec_scalar::is_valid() const
{
return valid_;
}
ec_scalar::operator bool() const
{
return is_valid() && scalar_ != null_hash;
}
(edited)./install.sh --build-boost --build-zmq --prefix=/home/me/myprefix
# Libbitcoin Server configuration file [log] # The debug log file path, defaults to 'debug.log'. debug_file = debug.log # The error log file path, defaults to 'error.log'. error_file = error.log # The log archive directory, defaults to 'archive'. archive_directory = archive # The size at which a log is archived, defaults to 10000000 (0 disables). rotation_size = 10000000 # The minimum free space required in the archive directory, defaults to 0. minimum_free_space = 0 # The maximum combined size of archived logs, defaults to 0 (maximum). maximum_archive_size = 0 # The maximum number of logs to archive, defaults to 0 (maximum). maximum_archive_files = 0 # The address of the statistics collection server, defaults to none. statistics_server = 0.0.0.0:0 # Enable verbose logging, defaults to false. verbose = false [network] # The minimum number of threads in the network threadpool, defaults to 0 (physical cores). threads = 0 # The maximum network protocol version, defaults to 70013. protocol_maximum = 70013 # The minimum network protocol version, defaults to 31402. protocol_minimum = 31402 # The services exposed by network connections, defaults to 9 (full node, witness). services = 9 # The advertised services that cause a peer to be dropped, defaults to 176. invalid_services = 176 # The magic number for message headers, defaults to 3652501241 (use 118034699 for testnet). identifier = 3652501241 # Validate the checksum of network messages, defaults to false. validate_checksum = false # The port for incoming connections, defaults to 8333 (use 18333 for testnet). inbound_port = 8333 # The target number of incoming network connections, defaults to 0.full file
Interesting, a default install from libbitcoin-server on ubuntu 16.0.4 build without specifying static/shared and building boost/zmq, does in fact hang as described. I suspect it's a conflict with one of these files:
```
$ ldd bs | grep -v libbitcoin
linux-vdso.so.1 => (0x00007ffcbabe4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f90bd4b6000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f90bd134000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f90bcf1e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f90bcb54000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f90bbad3000)
/lib64/ld-linux-x86-64.so.2 (0x00007f90be7dc000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f90bb3be000)
```subscription_expiration_minutes also affect subscriptions to the block publish endpoint?@zoran@zoran-lenovo:/mnt/disk2/bitcoin-bs/archive$ tail -30 debug-00006.log 12:11:05.395516 INFO [blockchain] Block [213048] 1 txs 1 ins 0 wms 0 vms 29 vµs 11 rµs 11 cµs 3 pµs 1 aµs 1 sµs 38 dµs 0.000000 12:11:06.311027 DEBUG [node] Connected block [000000000000006896ca760505253e9d5f2b5cbf488df6339ca74118adab5a4c] at height [213049] from [64.233.245.39:8333] (1073741894*, 1). 12:11:06.311070 INFO [blockchain] Block [213049] 651 txs 1135 ins 3 wms 6 vms 5 vµs 3 rµs 2 cµs 0 pµs 0 aµs 0 sµs 798 dµs 0.000000 12:11:06.347606 DEBUG [node] Connected block [000000000000024ed8ea1d19212755f9da14ab0844a3aac29ff482676b384d94] at height [213050] from [64.233.245.39:8333] (1073741894*, 1). 12:11:06.347649 INFO [blockchain] Block [213050] 574 txs 1036 ins 3 wms 5 vms 5 vµs 3 rµs 2 cµs 0 pµs 0 aµs 0 sµs 26 dµs 0.000000 12:11:06.392395 INFO [server] Stop signal detected (code: 2). 12:11:06.392452 INFO [server] Please wait while the server is stopping... 12:11:06.414436 DEBUG [node] Connected block [00000000000001f82c9114666bb075bd982c25a2821cea5db90460fa665b155a] at height [213051] from [64.233.245.39:8333] (1073741894*, 1). 12:11:06.414478 INFO [blockchain] Block [213051] 889 txs 1866 ins 5 wms 9 vms 5 vµs 4 rµs 1 cµs 0 pµs 0 aµs 0 sµs 28 dµs 0.000000 12:11:07.243047 DEBUG [network] Outbound channel stopped [64.233.245.39:8333] success 12:11:07.243090 DEBUG [network] Suspended outbound connection. 12:11:07.243095 DEBUG [network] Outbound channel stopped [104.220.88.225:8333] success 12:11:07.243120 DEBUG [network] Suspended outbound connection. 12:11:07.243105 DEBUG [network] Stopped block_in protocol for [64.233.245.39:8333]. 12:11:07.243135 DEBUG [network] Stopped block_in protocol for [104.220.88.225:8333]. 12:11:07.243140 DEBUG [network] Stopped block_out protocol for [64.233.245.39:8333]. 12:11:07.243155 DEBUG [network] Stopped block_out protocol for [104.220.88.225:8333]. 12:11:07.243170 DEBUG [network] Stopped transaction_in protocol for [104.220.88.225:8333]. 12:11:07.243161 DEBUG [network] Stopped transaction_in protocol for [64.233.245.39:8333]. 12:11:07.243180 DEBUG [network] Stopped transaction_out protocol for [104.220.88.225:8333]. 12:11:07.243183 DEBUG [network] Stopped transaction_out protocol for [64.233.245.39:8333]. 12:14:39.770556 INFO [server] Stop signal detected (code: 2). 12:14:39.812481 DEBUG [database] Unmapped: "blockchain/block_table" [358060221, 508018479] 12:14:39.845849 DEBUG [database] Unmapped: "blockchain/block_index" [1704428, 2332542] 12:14:40.029370 DEBUG [database] Unmapped: "blockchain/transaction_table" [5858239036, 8574300862] 12:14:40.079426 DEBUG [database] Unmapped: "blockchain/spend_table" [2477306592, 2784866076] 12:14:40.121216 DEBUG [database] Unmapped: "blockchain/history_table" [684040128, 902976168] 12:14:40.171303 DEBUG [database] Unmapped: "blockchain/history_rows" [3265374556, 4276004149] 12:14:40.196371 DEBUG [database] Unmapped: "blockchain/stealth_rows" [4, 4] 12:14:40.210474 INFO [node] Server stopped successfully.
flush_lock
subscribe-block script and I'm not getting any blocks after 529761 (there also seems to be an off by one error?)(seq, height, block) tuple is like so (5214, 529760, CBlock(536870912, lx(0000000000000000000814ea61875b6e810c92ac7b0650705adbfb7c12efab61), lx(3f3a6b714764676f45f428de5b9889b36ea6f99c0abcee12093270a437de8bf5), 1530281897, 0x17376f56, 0x5b79bfc9))lx in that representation should be the previous block hashsocket.setsockopt(zmq.TCP_KEEPALIVE, 1) in my client now.[x tmp]$ cat main.cpp
#include <iostream>
#include <boost/coroutine2/all.hpp>
typedef boost::coroutines2::coroutine<int> coro_t;
int main()
{
coro_t::pull_type source(
[&](coro_t::push_type& sink)
{
int first = 1, second = 1;
sink(first);
sink(second);
for(int i = 0; i < 8; ++i)
{
int third = first + second;
first = second;
second = third;
sink(third);
}
});
for (auto i: source)
std::cout << i << " ";
std::cout << std::endl;
return 0;
}
[x tmp]$ g++ main.cpp -lboost_system -lboost_context -std=c++11
[x tmp]$ ./a.out
1 1 2 3 5 8 13 21 34 55
$ bs --settings Configuration Settings: [blockchain] # A hash:height checkpoint, multiple entries allowed. checkpoint = <value> # The number of cores dedicated to block validation, defaults to 0 (physical cores). cores = <value> # Use high thread priority for block validation, defaults to true. priority = <value> # The maximum reorganization depth, defaults to 256 (0 for unlimited). reorganization_limit = <value> # Use libconsensus for script validation if integrated, defaults to false. use_libconsensus = <value> [database] # Block hash table size, defaults to 650000. block_table_buckets = <value> # The maximum number of entries in the unspent outputs cache, defaults to 10000. cache_capacity = <value> # The blockchain database directory, defaults to 'blockchain'. directory = <value> # Full database files increase by this percentage, defaults to 50. file_growth_rate = <value> # Flush each write to disk, defaults to false. flush_writes = <value> # History hash table size, defaults to 107000000. history_table_buckets = <value> # Spend hash table size, defaults to 250000000. spend_table_buckets = <value> # Transaction hash table size, defaults to 110000000. transaction_table_buckets = <value> [fork] # Add pay-to-script-hash processing, defaults to true (soft fork). bip16 = <value> # Disallow collision of unspent transaction hashes, defaults to true (hard fork). bip30 = <value> # Coinbase input must include block height, defaults to true (soft fork).full file
$ bs --settings ?