Archive of the libbitcoin Slack #general channel.
bx fetch-tx e1b429277d53c6aec0850875ad37a93e4cf877826857d09c4deeb983c2770b71% echo 0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff | bx ec-to-public -u | bx base58check-encode
% bx fetch-balance 5sx9uBHxcA3ysfBVYQfQkYzKHxoT7hPyrKUS3Nk3WzxaJTVqqXunvZsJY1tv2sbySbRjkYJasPA7Bx91nwujF39MLwcQfcPF
bx ec-to-address == bx bitcoin160 | bx base58check-encode.
The P2PK exposes the public key on the blockchain once the output payment is mined. While a P2PKH expose the bitcoin160 hash ( bx bitcoin160 = bx sha256 | bx ripemd160 ) of the public key.% bx tx-encode -v 2 -i 9adfeea2ceec089c52c450b3f33147b45eedcfd27ca48c638a1191bbe9466196:0:4194319 -o 2N9e4AjRBiQyvuu3QMhCahQEDijjavfmET3:10000 | bx input-set -i 0 "[30440220256996a816448204d1bc2ca905fe7f9bbfec2bcc60b0d66956534bbb7881b61502207bd0d7268c979836fc34b8872377f6b096fe0c20078ac858f827b8f0ee14318701] [14e3826cfda3e5233e946a8abc52ddae7d704815f5ac]" | bx validate-tx
% bx tx-encode -v 2 -i 9adfeea2ceec089c52c450b3f33147b45eedcfd27ca48c638a1191bbe9466196:0:4194319 -o 2N9e4AjRBiQyvuu3QMhCahQEDijjavfmET3:5000 | bx input-set -i 0 "[3045022100859bf5813cc0b5ede7b96d6d4fe2354d6351357648e63ffb7b675da3dae122f502203a9f9cfb3fcce3cab537336bf27e671b75f4ec25084a6967702c377ab6e19a8b01] [02e18f47b78730f788b726c46459fdc29b57fd6d437b69587a1e59efa343c46a3b]" | bx validate-tx
(148 * #inputs + 34 * #outputs + 10) * byte_fee_satoshis, if I try that, however, the organizer complains my fee is insufficient -.-output. Which will always present as 'missing' when calculating the total_input_value() for a transaction, which means the fees() of the transaction are always 0 and never enough? But I don't seen any other way of getting a non-missing output_point ... this is becoming rather frustrating 😕fees() call correctly returns a value, given my current search through the code I can understand the behaviour though. I wonder if an extra method here could be valuable, something on a TX to check the current different between inputs and outputs that have been set (given there does not seem to be any way to get a valid output_point in a TX from the outside)fees() return 0 as all inputs are technically 'missing' due to them referencing a default constructed previous_output.validation struct.chain.fetch_transaction(...) and calling fees() on the tx pointer passed to the callbacktransaction tx
...
input in0;
in0.set_previous_output({old_tx_hash, 1});
...
tx.set_inputs(in0);
tx.set_outputs(....);
tx.fees() // this will return 0 (edited)insufficient fee when I ran it. When going through that code it calls if (tx->fees() < price(tx)) ... in transaction_organizer::handle_accept. This led me to believe I could check the fees on the tx by calling the fees() method.handle_accept, that one will have its metadata set 🙂organize that I received a message stating my fee was insufficient (while I myself thought I had enough, based on the info I had).u' modifier ignored since D' is the default (see `U')
CXX tools/curve_keygen.o
CXXLD tools/curve_keygen
/usr/bin/ld: src/.libs/libzmq.a(src_libzmq_la-tweetnacl.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:3368: recipe for target 'tools/curve_keygen' failed
make[1]: *** [tools/curve_keygen] Error 1
Makefile:4881: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
real 15m50.804s
user 5m31.317s
sys 0m58.737sCC=gcc CXX=g++ ./install.sh --prefix= ...history_compact::list, how do I get the actual outputs? Am I overlooking some method?database::spends() and database::history() just dereference the pointer without checking if the database is initialized? When calling fetch_history on a block_chain object obtained from a full_node this will cause a segmentation fault 0.o% bx fetch-tx 4c52f6c486b7e3372d0dc900aa041fcb0c390c89539a4af1ee9b55e9b78fd759
Child TX (appears to be in mempool) that is trying to spend UTXO index 1 (CSV-P2PKH) from parent appears to hang:
% bx fetch-tx 7fba79ad9511a0f27863b712d186c297843cb182569db0aded5d34ff1ca28809
Locktime associated with CSV had to be little-endian encoded. The nSequence of the transmitted child was not little-endian encoded.to_pay_script_hash_pattern() ?output destination1(amount, script{ to_pay_script_hash_pattern(ADDR.hash())});script and hash are heavily overloaded in bitcoin btw. I still should have realized what we were talking about sooner though ,,,libbitcoin-server stops publishing transactions/blocks when there are a high number of active client connections?--version 😄 I rebuilt the executable from the v3 branch in november, so I have those changes for sure.blockchain.fetch_last_height, blockchain.fetch_history3, transaction_pool.broadcast, etc. I’m not using subscriptions currently.12:30:01.804644 VERBOSE [server] Query transaction_pool.broadcast from [00e43c9a98] 12:30:01.805252 VERBOSE [network] Sent inv to [127.0.0.1:28333] (61 bytes) 12:30:01.836837 VERBOSE [network] Received getdata from [127.0.0.1:28333] (37 bytes) 12:30:01.836938 VERBOSE [network] Sent tx to [127.0.0.1:28333] (396 bytes)
12:30:30.276162 VERBOSE [network] Received headers from [127.0.0.1:28333] (82 bytes) 12:30:30.276299 VERBOSE [network] Sent getdata to [127.0.0.1:28333] (61 bytes) 12:30:30.288756 DEBUG [node] Connected block [09d703528c7975e78f2c4c26e369b9c90180f176339f5075b76879a9b53a86f3] at height [6575] from [127.0.0.1:28333] (16374, 4).
ulimit -n 4096. My v3 regtest server drops responses when there are more than ~200 concurrent requests, until I increase my fd limit from the default 256.