Archive of the libbitcoin Slack #general channel.
bx watch-address <some addres>) I get back notifications containing a transaction hash. That transaction hash I can look up again. That contains address_hashs. How can I relate a bitcoin address to the transaction?watch-address call works. But bx doesn't have that, it merely has a payment address. And going from one hash to the other is not possible. Or so I thought.I don't agree, static linkage is fine for many uses and generally more secure than shared libraries (in that you can't load code that was replaced on you). Also performance is better without the load
other than if you're rolling hand crafted code made for stack smashing ;-)
I know the recommendation to use install.sh must get old, but there's really a lot going on that the script simplifies which can be done manually, but it's very difficult to get right/consistently
it ended liket his: libtool: link: /usr/local/bin/eg++ -shared -fPIC -DPIC src/.libs/src_libbitcoin_la-error.o src/chain/.libs/src_libbitcoin_la-block.o src/chain/.libs/src_libbitcoin_la-chain_state.o src/chain/.libs/src_libbitcoin_la-compact.o src/chain/.libs/src_libbitcoin_la-header.o src/chain/.libs/src_libbitcoin_la-input.o src/chain/.libs/src_libbitcoin_la-output.o src/chain/.libs/src_libbitcoin_la-output_point.o src/chain/.libs/src_libbitcoin_la-point.o src/chain/.libs/src_libbitcoin_la-point_iterator.o src/chain/.libs/src_libbitcoin_la-point_value.o src/chain/.libs/src_libbitcoin_la-points_value.o src/chain/.libs/src_libbitcoin_la-script.o src/chain/.libs/src_libbitcoin_la-transaction.o src/chain/.libs/src_libbitcoin_la-witness.o src/config/.libs/src_libbitcoin_la-authority.o src/config/.libs/src_libbitcoin_la-base16.o src/config/.libs/src_libbitcoin_la-base2.o src/config/.libs/src_libbitcoin_la-base58.o src/config/.libs/src_libbitcoin_la-base64.o src/config/.libs/src_libbitcoin_la-checkpoint.o src/config/.libs/src_libbitcoin_la-directory.o src/config/.libs/src_libbitcoin_la-endpoint.o src/config/.libs/src_libbitcoin_la-hash160.o src/config/.libs/src_libbitcoin_la-hash256.o src/config/.libs/src_libbitcoin_la-parameter.o src/config/.libs/src_libbitcoin_la-parser.o src/config/.libs/src_libbitcoin_la-printer.o src/config/.libs/src_libbitcoin_la-sodium.o src/formats/.libs/src_libbitcoin_la-base_10.o src/formats/.libs/src_libbitcoin_la-base_16.o src/formats/.libs/src_libbitcoin_la-base_58.o src/formats/.libs/src_libbitcoin_la-base_64.o src/formats/.libs/src_libbitcoin_la-base_85.o src/log/.libs/src_libbitcoin_la-file_collector.o src/log/.libs/src_libbitcoin_la-file_collector_repository.o src/log/.libs/src_libbitcoin_la-file_counter_formatter.o src/log/.libs/src_libbitcoin_la-sink.o src/log/.libs/src_libbitcoin_la-statsd_sink.o src/log/.libs/src_libbitcoin_la-udp_client_sink.o src/machine/.libs/src_libbitcoin_la-interpreter.o src/machine/.libs/src_libbitcoin_la-number.o src/machine/.libs/src_libbitcoin_la-opcode.o src/machine/.libs/src_libbitcoin_la-operation.o src/machine/.libs/src_libbitcoin_la-program.o src/math/.libs/src_libbitcoin_la-checksum.o src/math/.libs/src_libbitcoin_la-crypto.o src/math/.libs/src_libbitcoin_la-elliptic_curve.o src/math/.libs/src_libbitcoin_la-hash.o src/math/.libs/src_libbitcoin_la-secp256k1_initializer.o src/math/.libs/src_libbitcoin_la-stealth.o src/math/external/.libs/src_libbitcoin_la-aes256.o src/math/external/.libs/src_libbitcoin_la-crypto_scrypt.o src/math/external/.libs/src_libbitcoin_la-hmac_sha256.o src/math/external/.libs/src_libbitcoin_la-hmac_sha512.o src/math/external/.libs/src_libbitcoin_la-lax_der_parsing.o src/math/external/.libs/src_libbitcoin_la-pbkdf2_sha256.o src/math/external/.libs/src_libbitcoin_la-pkcs5_pbkdf2.o src/math/external/.libs/src_libbitcoin_la-ripemd160.o src/math/external/.libs/src_libbitcoin_la-sha1.o src/math/external/.libs/src_libbitcoin_la-sha256.o src/math/external/.libs/src_libbitcoin_la-sha512.o src/math/external/.libs/src_libbitcoin_la-zeroize.o src/message/.libs/src_libbitcoin_la-address.o src/message/.libs/src_libbitcoin_la-alert.o src/message/.libs/src_libbitcoin_la-alert_payload.o src/message/.libs/src_libbitcoin_la-block.o src/message/.libs/src_libbitcoin_la-block_transactions.o src/message/.libs/src_libbitcoin_la-compact_block.o src/message/.libs/src_libbitcoin_la-fee_filter.o src/message/.libs/src_libbitcoin_la-filter_add.o src/message/.libs/src_libbitcoin_la-filter_clear.o src/message/.libs/src_libbitcoin_la-filter_load.o src/message/.libs/src_libbitcoin_la-get_address.o src/message/.libs/src_libbitcoin_la-get_block_transactions.o src/message/.libs/src_libbitcoin_la-get_blocks.o src/message/.libs/src_libbitcoin_la-get_data.o src/message/.libs/src_libbitcoin_la-get_headers.o src/message/.libs/src_libbitcoin_la-header.o src/message/.libs/src_libbitcoin_la-headers.o src/message/.libs/src_libbitcoin_la-heading.o src/message/.libs/src_libbitcoin_la-inventory.o src/message/.libs/src_libbitcoin_la-inventory_vector.o src/message/.libs/src_libbitcoin_la-memory_pool.o src/message/.libs/src_libbitcoin_la-merkle_block.o src/message/.libs/src_libbitcoin_la-messages.o src/message/.libs/src_libbitcoin_la-network_address.o src/message/.libs/src_libbitcoin_la-not_found.o src/message/.libs/src_libbitcoin_la-ping.o src/message/.libs/src_libbitcoin_la-pong.o src/message/.libs/src_libbitcoin_la-prefilled_transaction.o src/message/.libs/src_libbitcoin_la-reject.o src/message/.libs/src_libbitcoin_la-send_compact.o src/message/.libs/src_libbitcoin_la-send_headers.o src/message/.libs/src_libbitcoin_la-transaction.o src/message/.libs/src_libbitcoin_la-verack.o src/message/.libs/src_libbitcoin_la-version.o src/unicode/.libs/src_libbitcoin_la-console_streambuf.o src/unicode/.libs/src_libbitcoin_la-ifstream.o src/unicode/.libs/src_libbitcoin_la-ofstream.o src/unicode/.libs/src_libbitcoin_la-unicode.o src/unicode/.libs/src_libbitcoin_la-unicode_istream.o src/unicode/.libs/src_libbitcoin_la-unicode_ostream.o src/unicode/.libs/src_libbitcoin_la-unicode_streambuf.o src/utility/.libs/src_libbitcoin_la-binary.o src/utility/.libs/src_libbitcoin_la-conditional_lock.o src/utility/.libs/src_libbitcoin_la-deadline.o src/utility/.libs/src_libbitcoin_la-dispatcher.o src/utility/.libs/src_libbitcoin_la-flush_lock.o src/utility/.libs/src_libbitcoin_la-interprocess_lock.o src/utility/.libs/src_libbitcoin_la-istream_reader.o src/utility/.libs/src_libbitcoin_la-monitor.o src/utility/.libs/src_libbitcoin_la-ostream_writer.o src/utility/.libs/src_libbitcoin_la-png.o src/utility/.libs/src_libbitcoin_la-prioritized_mutex.o src/utility/.libs/src_libbitcoin_la-random.o src/utility/.libs/src_libbitcoin_la-scope_lock.o src/utility/.libs/src_libbitcoin_la-sequencer.o src/utility/.libs/src_libbitcoin_la-sequential_lock.o src/utility/.libs/src_libbitcoin_la-socket.o src/utility/.libs/src_libbitcoin_la-string.o src/utility/.libs/src_libbitcoin_la-thread.o src/utility/.libs/src_libbitcoin_la-threadpool.o src/utility/.libs/src_libbitcoin_la-work.o src/wallet/.libs/src_libbitcoin_la-bitcoin_uri.o src/wallet/.libs/src_libbitcoin_la-dictionary.o src/wallet/.libs/src_libbitcoin_la-ec_private.o src/wallet/.libs/src_libbitcoin_la-ec_public.o src/wallet/.libs/src_libbitcoin_la-ek_private.o src/wallet/.libs/src_libbitcoin_la-ek_public.o src/wallet/.libs/src_libbitcoin_la-ek_token.o src/wallet/.libs/src_libbitcoin_la-encrypted_keys.o src/wallet/.libs/src_libbitcoin_la-hd_private.o src/wallet/.libs/src_libbitcoin_la-hd_public.o src/wallet/.libs/src_libbitcoin_la-message.o src/wallet/.libs/src_libbitcoin_la-mini_keys.o src/wallet/.libs/src_libbitcoin_la-mnemonic.o src/wallet/.libs/src_libbitcoin_la-payment_address.o src/wallet/.libs/src_libbitcoin_la-qrcode.o src/wallet/.libs/src_libbitcoin_la-select_outputs.o src/wallet/.libs/src_libbitcoin_la-stealth_address.o src/wallet/.libs/src_libbitcoin_la-stealth_receiver.o src/wallet/.libs/src_libbitcoin_la-stealth_sender.o src/wallet/.libs/src_libbitcoin_la-uri.o src/wallet/parse_encrypted_keys/.libs/src_libbitcoin_la-parse_encrypted_private.o src/wallet/parse_encrypted_keys/.libs/src_libbitcoin_la-parse_encrypted_public.o src/wallet/parse_encrypted_keys/.libs/src_libbitcoin_la-parse_encrypted_token.o -L/home/phil/base/build/lib -lboost_chrono-mt -lboost_date_time-mt -lboost_filesystem -lboost_iostreams-mt -lboost_locale-mt -lboost_log-mt -lboost_program_options-mt -lboost_regex-mt -lboost_system -lboost_thread-mt -lpthread -L/usr/local/lib -licui18n -licuuc -licudata -lpng -lm -lz -lqrencode -L/home/phil/libbitcoin/build/lib -lsecp256k1 -lgmp -Og -pthread -pthread -o src/.libs/libbitcoin.so.0.0 mv -f examples/.deps/examples_libbitcoin_examples-main.Tpo examples/.deps/examples_libbitcoin_examples-main.Po /usr/bin/ld: /home/phil/base/build/lib/libboost_filesystem.a(operations.o): relocation R_X86_64_PC32 against `_ZN5boost10filesystem6detail13dir_itr_closeERPvS3_' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status gmake: *** [Makefile:2154: src/libbitcoin.la] Error 1
install.sh quite extensively. Based upon the chatter here, I’m guessing it is getting to be time for me to give libbitcoin a try again after recent updates.So no, until that manual step is done, we're not tracking upstream
I didn't realize that was the case for that repo. I'm still learning too 😉
libbitcoin
$ gmake V=1 check
gmake test/libbitcoin_test
gmake[1]: Entering directory '/home/phil/libbitcoin/src/libbitcoin'
/usr/local/bin/eg++ -DPACKAGE_NAME=\"libbitcoin\" -DPACKAGE_TARNAME=\"libbitcoin\" -DPACKAGE_VERSION=\"3.4.0\" -DPACKAGE_STRING=\"libbitcoin\ 3.4.0\" -DPACKAGE_BUGREPORT=\"eric@voskuil.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libbitcoin\" -DVERSION=\"3.4.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_CXX11=1 -DBOOST_HAS_ICU=1 -DNDEBUG=1 -DBOOST_ALL_DYN_LINK=1 -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_CHRONO=/\*\*/ -DHAVE_BOOST_DATE_TIME=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_LOCALE=/\*\*/ -DHAVE_BOOST_LOG=/\*\*/ -DHAVE_BOOST_PROGRAM_OPTIONS=/\*\*/ -DHAVE_BOOST_REGEX=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_THREAD=/\*\*/ -DHAVE_BOOST_UNIT_TEST_FRAMEWORK=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -I. -I./include -DWITH_ICU -DWITH_PNG -DWITH_QRENCODE -I/home/phil/base/build/include -I/usr/local/include -I/usr/local/include/libpng16 -I/usr/local/include -I/home/phil/libbitcoin/build/include -std=c++11 -Og -g -fstack-protector-all -std=c++11 -Wno-deprecated-declarations -Wno-missing-braces -fvisibility-inlines-hidden -fno-var-tracking-assignments -MT test/utility/test_libbitcoin_test-data.o -MD -MP -MF test/utility/.deps/test_libbitcoin_test-data.Tpo -c -o test/utility/test_libbitcoin_test-data.o `test -f 'test/utility/data.cpp' || echo './'`test/utility/data.cpp
test/utility/data.cpp: In member function 'void data_tests::data__splice_two__two_bytes_each__expected::test_method()':
test/utility/data.cpp:253:27: error: reference to 'splice' is ambiguous
const auto combined = splice(left, right);
^
In file included from /home/phil/base/build/include/boost/asio/detail/socket_types.hpp:77:0,
from /home/phil/base/build/include/boost/asio/detail/impl/pipe_select_interrupter.ipp:31,
from /home/phil/base/build/include/boost/asio/detail/pipe_select_interrupter.hpp:82,
from /home/phil/base/build/include/boost/asio/detail/select_interrupter.hpp:27,
from /home/phil/base/build/include/boost/asio/detail/kqueue_reactor.hpp:32,
from /home/phil/base/build/include/boost/asio/detail/reactor.hpp:23,
from /home/phil/base/build/include/boost/asio/detail/impl/scheduler.ipp:23,
from /home/phil/base/build/include/boost/asio/detail/scheduler.hpp:212,
from /home/phil/base/build/include/boost/asio/system_context.hpp:19,
from /home/phil/base/build/include/boost/asio/impl/system_executor.hpp:22,
from /home/phil/base/build/include/boost/asio/system_executor.hpp:129,
from /home/phil/base/build/include/boost/asio/associated_executor.hpp:21,
from /home/phil/base/build/include/boost/asio.hpp:21,
from ./include/bitcoin/bitcoin/utility/asio.hpp:24,
from ./include/bitcoin/bitcoin/chain/block.hpp:35,
from ./include/bitcoin/bitcoin.hpp:24,
from test/utility/data.cpp:24:
/usr/include/sys/socket.h:138:8: note: candidates are: struct splice
struct splice {
^
In file included from ./include/bitcoin/bitcoin/utility/data.hpp:156:0,
from ./include/bitcoin/bitcoin/math/hash.hpp:29,
from ./include/bitcoin/bitcoin/formats/base_16.hpp:24,
from ./include/bitcoin/bitcoin/config/checkpoint.hpp:27,
from ./include/bitcoin/bitcoin/constants.hpp:25,
from ./include/bitcoin/bitcoin.hpp:19,
from test/utility/data.cpp:24:
./include/bitcoin/bitcoin/impl/utility/data.ipp:100:35: note: template<long unsigned int Left, long unsigned int Middle, long unsigned int Right> libbitcoin::byte_array<((Left + Middle) + Right)> libbitcoin::splice(const std byte_array<Left + Middle + Right> splice(const std::array<uint8_t, Left>& left,
^full fileError seeding host addresses: unresponsive peer may be throttling. Unsuccessfully tried so far: increasing timeouts, outbound connections.11:31:50.962798 INFO [server] ================= startup ================== 11:31:50.962855 WARNING [server] ================= startup ================== 11:31:50.963075 ERROR [server] ================= startup ================== 11:31:50.963202 FATAL [server] ================= startup ================== 11:31:50.963322 INFO [server] Using config file: "/usr/local/Cellar/libbitcoin-server/3.5.0_1/etc/libbitcoin/bs.cfg" 11:31:50.963374 INFO [server] Please wait while the server is starting... 11:31:50.964720 INFO [network] Starting manual session. 11:31:50.964880 INFO [network] Contacting seed [testnet-seed.bitcoin.jonasschnelli.ch:18333] 11:31:50.964999 INFO [network] Contacting seed [seed.tbtc.petertodd.org:18333] 11:31:50.965052 INFO [network] Contacting seed [testnet-seed.bluematt.me:18333] 11:31:50.965104 INFO [network] Contacting seed [testnet-seed.bitcoin.schildbach.de:18333] 11:31:50.965156 INFO [network] Contacting seed [testnet-seed.voskuil.org:18333] 11:31:50.996627 INFO [network] Connected seed [testnet-seed.bitcoin.jonasschnelli.ch:18333] as 5.9.121.164:18333 11:31:55.176124 INFO [network] Failure contacting seed [seed.tbtc.petertodd.org:18333] resolving hostname failed 11:31:55.399541 INFO [network] Connected seed [testnet-seed.bluematt.me:18333] as 198.251.83.19:18333 11:31:55.433578 INFO [network] Failure contacting seed [testnet-seed.voskuil.org:18333] operation failed 11:32:05.298594 INFO [network] Failure contacting seed [testnet-seed.bitcoin.schildbach.de:18333] connection timed out 11:32:05.298851 ERROR [network] Error seeding host addresses: unresponsive peer may be throttling 11:32:05.299366 ERROR [server] Server failed to start with error, unresponsive peer may be throttling. 11:32:05.299830 INFO [server] Please wait while the server is stopping... 11:33:10.714301 INFO [node] Server stopped successfully.
subscribe.address Query Service endpoint? The request call returns a 0 error code indicating everything is fine. But not Notifications appear on the socket (but they do appear on bx).python-libbitcoin but I suspect they are using some old message format: https://github.com/libbitcoin/python-libbitcoin/blob/master/libbitcoin/server/client.py#L384-L388[---command----] [--identifier--] [---payload----]
// Use on client for both set_public_key and set_private_key from a cert.
// If CURVE is not required by server, call set_certificate({ null_hash })
// to generate an arbitrary client certificate for a secure socket.get_merkle query (http://docs.electrum.org/en/latest/protocol.html#blockchain-transaction-get-merkle)[network] # The time limit for connection establishment, defaults to 5. connect_timeout_seconds = 30 peer=127.0.0.1:18333 identifier=118034699 inbound_port=18333 inbound_connections=0 outbound_connections = 8 # Testnet seed nodes. seed = testnet-seed.bitcoin.jonasschnelli.ch:18333 seed = seed.tbtc.petertodd.org:18333 seed = testnet-seed.bluematt.me:18333 seed = testnet-seed.bitcoin.schildbach.de:18333 seed = testnet-seed.voskuil.org:18333 [database] # The blockchain database directory, defaults to 'blockchain'. directory = blockchain-testnet [blockchain] # The number of cores dedicated to block validation, defaults to 0 (physical cores). cores = 1 # Use high thread priority for block validation, defaults to true. priority = false
k[0] = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 k[1] = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 k[2] = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 sec[0] = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 sec[1] = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 sec[2] = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 s_(0, 0) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 s_(0, 1) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 s_(0, 2) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 s_(0, 3) = 63 7b 93 e2 9a 73 fd 9e 26 d5 4b 8a 6e ab b2 3 ad b9 d 8d 62 49 36 cf 42 94 4 f1 5b cb 7a c7 s_(0, 4) = 82 e2 52 2a e8 d1 51 e1 6e ff 61 8f 98 19 88 fd a1 77 e8 97 a6 fa f8 55 3f 82 ca 2c 5e 69 ef c7 s_(0, 5) = b5 1d 16 23 b6 90 73 a8 62 28 bd b3 e4 a5 c4 36 b4 e1 86 3a 4c af 62 a9 93 11 e4 67 b7 6c 88 f9 s_(1, 0) = f0 93 dd 8d c0 b7 5c 43 10 a3 f6 0 4a e 61 b3 10 4e af 2f fd b9 40 d7 8a 39 d4 8c 62 b3 56 99 s_(1, 1) = c5 bc b9 a5 e7 25 2c ba 34 68 7d a3 9e c0 35 ba 32 a2 46 30 b2 5d 52 6d ce 7f 49 1f cc 48 6a bd s_(1, 2) = 6f e0 6d 1d f4 ef 69 b2 27 86 ea a9 6d 4 9 81 b6 a3 2f 7b c7 9e af 8a 95 30 fa c1 e2 2 85 f6 s_(1, 3) = 38 56 a2 8f 64 6b 24 ab 68 93 5f ca 10 d3 9d 7 20 36 b0 bd 40 93 5 94 96 c4 f6 9b d8 d9 6b d1 s_(1, 4) = 6d fa a8 9f 58 2c 6 a5 60 42 d0 53 20 16 9c ba 76 9a 6d 6e ef 88 42 ac 75 cb bd 95 27 8c 9d 35 s_(2, 0) = a5 4 cc 6e f4 f8 4e 3f 91 a a8 fd 87 98 12 99 c5 76 22 7c 32 b0 38 89 7d 15 6d 8e c0 a0 a4 36 s_(2, 1) = 5e 81 60 34 86 14 af 88 21 f2 24 3b 8f 12 fe 84 a9 e2 69 76 12 12 87 6 c2 11 b7 9f ef 60 c4 6e s_(2, 2) = b9 24 76 fc fe 75 22 9b 2 2e c0 10 2c 8c eb 5a 7 54 33 27 93 4a ab 1 73 3f ee 7 c4 9e e7 c
src/math/elliptic_curve.cpp:24:10: fatal error: secp256k1_recovery.h: No such file or directory #include <secp256k1_recovery.h>
Large tasks bypass the queue and are executed sequentially.
But small tasks can still fill the buffer.
the reason you have that pre-lookup from [address] -> [index] is because you don't want to store every new row with the full address key again of 20 bytes. That's inefficient.
each service has a threadpool, and distributes its work evenly across the threadpool through boost::asio threadpool pool(4); // threadpool with 4 threads blockchain chain(pool);
every time you or some code calls an operation on blockchain, it will immediately return, and put the work on the stack. The proactor loop (in boost::asio) will take the work off, call it then call the completion handler you passed when you first called the method.
the address is stored on disk as [address] -> [index] [index] -> linked_list(address rows) ...
i don't know, but if you search network and node for references to hosts.hpp from -network I assume you'll find it
wait just FYR, some feedback from some C++ coders on https://github.com/libbitcoin/libbitcoin/blob/version3/include/bitcoin/bitcoin/utility/atomic.hpp , they think it could be written in a better way 1) "The use of std forward does the right thing but is not idiomatic. It should use std::move" 2) <SlashLife> atomic(Type&& instance): instance_(std::forward<Type>(instance)) // <-- Better question: What's the point of the std::forward? <SlashLife> imo: This (code) is BS. <SlashLife> The use of std::decay in it is, and a bunch of the other templating stuff as well. <Oxyd> That forward almost makes sense. Shame that Type isn't a forwarding reference. <Oxyd> It's like someone read a C++ tutorial and almost understood it. <SlashLife> Oxyd: It doesn't make sense the way it is used there. <SlashLife> Type is determined by the struct, not by the ctor. <SlashLife> Instead they should restrict the Type they take to non-refs (and potentially to non-cv as well) <SlashLife> Jmabsd: That last line was for you again. <SlashLife> Where they go wrong: They didn't think about what kind of types they'd want to allow, ending up with contradicting usage concepts, therefore incorrecly applying template programming concepts. <Oxyd> Well, one major thing is that it always uses a mutex. The point of std::atomic is to get a lock-free access (at least sometimes). <SlashLife> That std::forward should instead have been an std::move; almost all uses of Type within that struct should be replaced with decayed_type <SlashLife> Unless of course Type is a reference. <SlashLife> But then you have an atomic<int&>, which doesn't even store a reference to int, but is just the same as an int. <SlashLife> Except that it won't have move operations, but instead copy operations for both const and non-const refs. <SlashLife> So being able to pass T& to it makes you believe it could store a reference. But it doesn't. Instead it disables move semantics if T has them. <SlashLife> So if you pass T&, it is actively misleading in what it does. <SlashLife> Now you could say that maybe this is not intended to pass T&, and they just didn't add code to catch that - sure, that could be. But they did add a bunch of other code (including those std::forward) which specifically suggest graceful handling of reference types. <SlashLife> If your T is not a T&, then std::forward<T> means std::move
The bc::atomic class serves the same purpose as std::atomic but is not limited to integral types. It is lock-free, the commenter misinterprets the term. Lock free does not mean mutex free. The purpose is the same as std::atomic, to provide atomicity. Implantation in both is opaque.
inital hash: ffffffffffffffffffffffff01234567aaaaaaaaffffffffffffffffffffffff last 20 bytes: 01234567aaaaaaaaffffffffffffffffffffffff flipped last 20: 0xffffffffffffffffffffffffaaaaaaaa67452301 masked last 20: 0xaaaaaaaa67450000 index: 0x89abcdef masked index: 0x4def(edited)
from_little_endian_unsafe is hard for me to understand.bx input-sign-partial and bx sign-threshold. When data is put into INTERMEDIATES_PUB to be passed to other key share holders, that data must be signed to prevent tampering. This means these two functions also need to know a private key for the caller and a public key for each of the other key share holders. I will think about how to get these parameters in and make a suggestion later.bx function. By corollary, verification of signed data in INTERMEDIATES_PUBLIC would occur in another bx function also. We are going to pursue this path, seeking to implement bx input-prepare and bx sign-threshold first. If there is no demand, we may simply leave the signing of data in INTERMEDIATES_PUBLIC as a feature request.libbitcoin::database::block_database from being populated or if that's current behaviour on master.