Bitcoin full node and query server

November 2019

Archive of the libbitcoin Slack #general channel.

Sunday, November 3, 2019

L
Are the two files "libbitcoin.import..." inside https://github.com/libbitcoin/libbitcoin-build/tree/master/props/import still relevant? Or are they abandoned corpses that remained after the libbitcoin-system name changed?
pmienk23:29
unused in master, still used in version3
L
@pmienk I am talking about master. version3 has its own libbitcion-build branch. Isn't that true?
pmienk23:31
true
L
Ok, I will add PR for deletion in master soon.

Monday, November 4, 2019

BJ Miller16:20
good morning, is there any documentation or references one could point me to for cross-compiling libbitcoin as a static library for arm64 and x86_64, specifically for ios and android. we have been using make recipes, but with macOS Catalina, this solution has been producing one error after another.
BJ Miller18:31
Pre-built boost using a different script, it dumps its output to a dir with the structure listed above. I've tried setting --with-build-libdir equal to the .../prefix/lib dir toward the bottom of this snippet, but libbitcoin tells me that it cannot find any boost installation >= 1.62.0.
Untitled Plain Text · 3.7 KB
build/boost
├── 1.69.0
│   └── ios
│       └── release
│           ├── build
│           │   ├── arm64
│           │   │   ├── libboost.a
│           │   │   ├── libboost_atomic.a
│           │   │   ├── libboost_chrono.a
│           │   │   ├── libboost_date_time.a
│           │   │   ├── libboost_exception.a
│           │   │   ├── libboost_filesystem.a
│           │   │   ├── libboost_program_options.a
│           │   │   ├── libboost_random.a
│           │   │   ├── libboost_system.a
│           │   │   ├── libboost_thread.a
│           │   │   ├── libboost_unit_test_framework.a
│           │   │   └── obj
│           │   ├── universal
│           │   │   ├── libboost_atomic.a
│           │   │   ├── libboost_chrono.a
│           │   │   ├── libboost_date_time.a
│           │   │   ├── libboost_exception.a
│           │   │   ├── libboost_filesystem.a
│           │   │   ├── libboost_program_options.a
│           │   │   ├── libboost_random.a
│           │   │   ├── libboost_system.a
│           │   │   ├── libboost_thread.a
│           │   │   └── libboost_unit_test_framework.a
│           │   └── x86_64
│           │       ├── libboost.a
│           │       ├── libboost_atomic.a
│           │       ├── libboost_chrono.a
│           │       ├── libboost_date_time.a
│           │       ├── libboost_exception.a
│           │       ├── libboost_filesystem.a
│           │       ├── libboost_program_options.a
│           │       ├── libboost_random.a
│           │       ├── libboost_system.a
│           │       ├── libboost_thread.a
full file
evoskuil18:34
The search path is controlled by autotools and if you didn’t build boost using our build script we do not change the default search path.
BJ Miller19:12
I’m all about ditching this other way of building boost, not only as it is like you said controlled by autotools and part of the default search path, but it alleviates me from having to make extra accommodations when finding all the .a and .h files. The error boost was spitting out on a clean Catalina install was missing headers like sys/types.h, so i pointed the compiler flags to the new SDK places provided by Xcode, and then I get Architecture unsupported, although -arch arm64 and -arch x86_64 is passed at the respective right time.
(edited)
seems like it wasn’t defining either __arm64__ or __x86_64__ that is #if defined(__arm64__) etc in some header files
evoskuil19:15
I meant our scripts invokes they autotools builds which search for boost. It’s not looking where you have installed. You can control that be updating an environment var or by using go out build script to build boost, which does it internally.
I’m not sure about arm, we don’t have it on CI.
pmienk19:20
I believe it's --with-boost=<prefix path>
BJ Miller19:22
i can try that as opposed to --with-boost-libdir=<prefix path>
BJ Miller19:35
Untitled Plain Text · 496 B
checking for boostlib >= 1.62.0... configure: We could not detect the boost libraries (version 1.62 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
configure: error: Boost 1.62.0 or later is required but was not found.
@pmienk ^ that's what i get when using --with-boost=...
pmienk19:37
Looks like it didn't find an appropriate version at the path
BJ Miller19:38
is it just looking for the .a files?
pmienk19:40
That's an issue of the boost m4 operation. I'm unaware at present
BJ Miller19:40
hm, ok. i can look into that
pmienk20:04
If it's failing at the base lib, which I think is straight headers, then it wouldn't be looking for a .a.
Though I recall boost m4 commonly attributing failure one step (I thought after, but could've been before) the actual error
BJ Miller20:08
Interesting
I appreciate the help. I've been banging my head on this for almost a full week. I'm gonna have to come back to this
Things are piling up 😀
pmienk20:09
no problem

Wednesday, November 13, 2019

evoskuil13:19
Yup

Monday, November 18, 2019

N
narodnik12:52
libbitcoin-client]$ make 
  CXX      examples/console/console-client.o
In file included from ./include/bitcoin/client.hpp:21,
                 from examples/console/client.hpp:26,
                 from examples/console/client.cpp:19:
./include/bitcoin/client/obelisk_client.hpp:72:76: error: 'compact_filter' in namespace 'libbitcoin::system::message' does not name a type
   72 |     typedef std::function<void(const system::code&, const system::message::compact_filter&)> compact_filter_handler;
      |                                                                            ^~~~~~~~~~~~~~
./include/bitcoin/client/obelisk_client.hpp:73:76: error: 'compact_filter_checkpoint' in namespace 'libbitcoin::system::message' does not name a type
   73 |     typedef std::function<void(const system::code&, const system::message::compact_filter_checkpoint&)> compact_filter_checkpoint_handler;
      |                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/bitcoin/client.hpp:21,
                 from examples/console/client.hpp:26,
                 from examples/console/client.cpp:19:
./include/bitcoin/client/obelisk_client.hpp:74:76: error: 'compact_filter_headers' in namespace 'libbitcoin::system::message' does not name a type
   74 |     typedef std::function<void(const system::code&, const system::message::compact_filter_headers&)> compact_filter_headers_handler;
      |                                                                            ^~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:938: examples/console/console-client.o] Error 1
Getting these errors compiling libbitcoin-client
jungly12:54
all that filters stuff is from neutrino filters.. were added recently to system, blockchain and database. did you already recently pull in the latest from master for client and missed the others?
N
narodnik13:01
ok will update all repos then and recompile
good idea
N
narodnik13:22
ok you're right, it works now.
👍🏾 1
N
narodnik14:04
how to call fetch_history4 with a classic old address?
$ ./examples/console/console 
Type "help" for supported instructions
> connect tcp://mainnet.libbitcoin.net:9091
Connecting to tcp://mainnet.libbitcoin.net:9091
> history 1F2CaWdxuVH7yLEVgzGrqWAGPYJPH5DsHN
Failed to retrieve history: object does not exist
> ^C
neillm14:07
bx address-to-key 1F2CaWdxuVH7yLEVgzGrqWAGPYJPH5DsHN
a0f4387b2985f7dcad93e4851110d5d1198c4054be11dbc24410aa785230684e
(edited)
But mainnet1/2 are still v3 btw
(edited)
There's a v4 testnet node running on testnet2.libbitcoin.net, ports 29091/29092/29093/29094 if it helps
[ query/heartbeat/block/tx ]
$ BX_CONFIG=data/bx.cfg.testnet2 console/bx fetch-balance 1abf6c34c4370673aee3ce1c1e6c16de549cc6baa065ff3e4b23414b1dc2eca7
balance
{
    key 1abf6c34c4370673aee3ce1c1e6c16de549cc6baa065ff3e4b23414b1dc2eca7
    received 66930771
    spent 0
}
$ BX_CONFIG=data/bx.cfg.testnet2 console/bx fetch-balance $(console/bx address-to-key n3GNqMveyvaPvUbH469vDRadqpJMPc84JA)
balance
{
    key 1abf6c34c4370673aee3ce1c1e6c16de549cc6baa065ff3e4b23414b1dc2eca7
    received 66930771
    spent 0
}
neillm14:20
Try it here:
$ examples/console/console
Type "help" for supported instructions
> connect tcp://testnet2.libbitcoin.net:29091
Connecting to tcp://testnet2.libbitcoin.net:29091
Not sure if testnet is useful for you though.
neillm16:51
Medium
TL;DR: Mimblewimble’s privacy is fundamentally flawed. Using only $60/week of AWS spend, I was able to uncover the exact addresses of…
N
narodnik17:00
Exactly, thanks for the link
👍 1
evoskuil23:31
You in Spain?
Last night I pulled schnorrsig from the Elements Project into the libbitcoin fork of libsecp256k1 (schnorrsig branch).
I'm going to start now on implementing BIP-tapscript. I'll pull this into master with a configurable fork, off by default.
👍 2
Our code is well-factored for this, and I'm guessing we'll have the first full implementation.
I've joined a group of about 160 people working on various aspects of getting the three related BIPs (BIP-schorr, BIP-taproot, BIP-tapscript) vetted, implemented and adopted.
I've prioritized this over finishing the v4 blockchain optimizations due to the group's timing.
👍 2
It would be helpful if someone would build libbitcoin/secp256k1/schnorrsig and execute the tests on OSX and Debian.
This requires setting the --schnorrsig option on the build.
skaht23:40
Very subtle…
😀 1

Tuesday, November 19, 2019

evoskuil00:44
yes
skaht00:45
./autogen.sh generates output with no squaks.
skaht00:55
After trying ./configure --prefix=OSX_BUILD --schnorrsig --enable-tests, not seeing any --schnorrsig flag with the resulting ./autogen.sh created ./configure file.
(edited)
--enable-module-schnorrsig
(edited)
skaht01:17
Forgot to perform git checkout schnorrsig after the associated git clone.
skaht01:35
Steps performed: 1. git clone https://github.com/libbitcoin/secp256k1.git 2. cd secp256k1/ 3. git checkout schnorrsig 4. ./configure --prefix=/Users/Scott/Projects/LibBitcoin/secp256k1/OSX_BUILD --enable-module-schnorrsig --enable-tests --enable-experimental 5. make -j4 6. make install 7. find OSX_BUILD -type f -print ** OSX_BUILD/include/secp256k1_schnorrsig.h OSX_BUILD/include/secp256k1_preallocated.h OSX_BUILD/include/secp256k1.h OSX_BUILD/lib/libsecp256k1.a OSX_BUILD/lib/pkgconfig/libsecp256k1.pc OSX_BUILD/lib/libsecp256k1.la OSX_BUILD/lib/libsecp256k1.0.dylib **
evoskuil01:36
--enable-experimental should not be required.
skaht01:37
Will try again, but the configure stopped and left the recommendation for me to explicitly set that option.
evoskuil01:38
OK, if it's required I'll remove it.
It looks like I missed removing it from configure.ac, but it's not used in the build.
skaht01:40
punch the next version into the branch, and I’ll try it again to confirm the quick fix.
evoskuil01:41
Actually I'll just leave it, just a configure annoyance but no other effect.
(edited)
It just results in the "experimental" warning on compile, which is fine:
AC_MSG_NOTICE([WARNING: experimental build]) AC_MSG_NOTICE([Experimental features do not have stable APIs or properties, and may not be safe for production use.])
(edited)
I made as few changes as possible to the existing impl.
skaht01:43
Will confirm that dropping --enable-experimental flag is not a OSX build stopper.
evoskuil01:43
It will block the build, just include it.
All it causes is the warning, which is fine.
skaht01:46
Is the a Makefile option for performing standalone tests? (make test)
evoskuil01:46
should be
skaht01:48
% make tests make: `tests’ is up to date.
very quiet
build_triplet = x86_64-apple-darwin18.7.0
evoskuil01:59
all tests passing then?
skaht02:04
Unclear what if anything is happening when I execute make tests. It returns immediately with the message above.
evoskuil02:05
There should be a message.
pmienk02:05
make check
skaht02:06
Running…
pmienk02:06
tests may be a target, check executes tests
skaht02:07
% make check /Applications/Xcode.app/Contents/Developer/usr/bin/make check-TESTS PASS: tests PASS: exhaustive_tests ============================================================================ Testsuite summary for libsecp256k1 0.1 ============================================================================ # TOTAL: 2 # PASS: 2 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================
neillm02:08
Tests pass on debian here
skaht02:09
Forgot to add step 3.5 to the 7 enumerated commands above. 3.5 ./autogen.sh
Good for OSX too…
neillm02:13
--enable-experimental appears required:
configure: error: schnorrsig module is experimental. Use --enable-experimental to allow.
evoskuil02:22
As I said :)
neillm02:23
I just skimmed the messages, was catching up 😉
👍 1
D
Dominik18:57
Hi everyone, random question: If I understood correctly, libbitcoin doesn't implement the rules of BIP125 as to when accept RBF transactions (tx needs to pay higher fee, pay for bandwidth, etc.). Why doesn't that make a libbitcoin node susceptible to a DoS attack if I can spam it with transactions that are all valid, but at most one of them is going to end up being confirmed?
evoskuil19:05
Libbitcoin node has limited DoS protection in general. V4 will implement a required fee increment for conflicting unconfirmed txs, not constrained by the arbitrary design of BIP125. The other essential DoS feature is a resource usage limitation by channel. There won’t be any banning (tracking of peer state). If a peer violates protocol or exceeds resource limits it is immediately dropped.
(edited)
D
Dominik19:16
Great, thanks for the prompt answer!
evoskuil19:21
👍

Wednesday, November 20, 2019

D
Dominik13:47
Another question regarding the transactions that are returned from the query service via ZMQ: I have seen that libbitcoin maintains input::address() and output::address() for the inputs and outputs of a transaction, even though they are not part of the serialized object. Is there a way to get these fields via the query service (e.g. blockchain.fetch_transaction)?
evoskuil14:41
These are not fields, they are dynamically derived from deserialized transaction scripts.
So fetch the transaction and you will have them.
D
Dominik15:41
Ok, awesome. I assume it is exactly those that bx-explorer hashes and puts into address_hash on inputs and outputs?

Thursday, November 21, 2019

evoskuil08:33
Yes, if they are present.

Saturday, November 23, 2019

N
narodnik13:16
@evoskuil yep I'm in spain. I'm still working on the anonymizing techniques for bitcoin and also running over nym
N
narodnik15:25
I just installed latest libbitcoin-server. The config file it installs is not working. I get the message:
$ bs --initchain
Error: unrecognised option 'bitcoin.subsidy_interval_blocks'
N
narodnik18:29
renaming the value to subsidy_interval works
evoskuil18:30
K, please create issue.
N
narodnik18:50
ok but now node is not syncing
not sure of the issue
I also get this in the output:
18:50:52.043565 ERROR [network] Error starting listener: success
But the code shows nothing strange and apart from that, the node isn't syncing
verbose logging shows nothing in debug.log, just server started and then the heartbeat
evoskuil19:50
I haven’t run it in a while. All latest repos? @neillm ?
neillm20:09
Strange, I just rebuilt from all latest repos and started a new v4 sync last night. I had an existing config, so I didn't run into the recent change/error reported.
(edited)
N
narodnik20:26
ok just did a pull and blockchain had some updates... retrying build and run
👍 1

Sunday, November 24, 2019

N
narodnik02:36
ok yes pulled and built... still getting subsidy message
and sync doesn't start for me
neillm02:37
I think the config issue is a real bug, but I didn't see it because my configs were not using the newly installed one. The sync not starting is odd though, I had no issue there. I do sync with 0 outbound/inbound peers and a single specified peer on a local subnet. I don't know if that would make the difference though.
N
narodnik02:41
wait I'm stupid
I had liquid which runs bitcoind running on the same machine
ok now it's working
👍 1
evoskuil07:54
No info in the log though in connection failure due to port open? We should be able to capture that.
Any update on libbitcoin.org?
N
narodnik14:50
I didn't manage to see my friend yet. He just had his baby, but honestly I'm very sick due to nonstop travelling. I need some time to recover.
1 reply · evoskuil · last Nov 24, 2019
evoskuil15:41
It’s been down for almost two years. The baby will be in college before we have it back up. Could you please ask him to transfer the DNS name if he doesn’t have time to keep it up?
N
narodnik14:51
btw does anyone have this problem of the server not closing?
N
narodnik15:03
13:35:36.808260 INFO [node] Header #605219 [0000000000000000000d29ace1a2e2692eaa6c3fa5035496b1f00748b6e6ffb6] 167.86.100.11:8333 32767
13:36:50.635847 INFO [network] Connected outbound channel [62.210.103.45:8333] (1)
^C13:38:26.887613 INFO [server] Stop signal detected (code: 2).
13:38:26.887700 INFO [server] Please wait while the server is stopping...
^C15:02:00.389663 INFO [server] Stop signal detected (code: 2).
^C15:02:00.762374 INFO [server] Stop signal detected (code: 2).
Since 1 hour just stuck on that (latest master branch)
evoskuil15:38
If you synced the entire chain in one run and have large ram it can take a long time to flush, but otherwise there’s a deadlock.
neillm16:14
Hrm, my sync is still running, haven't tried stopping. I'll try to stop it now and see if it does successfully in a reasonable amount of time.
I got lucky I guess:
15:58:34.025820 INFO [node] Header #605233 [00000000000000000015379b28f1255afe6cc65f2bc1401ac6e382e2a38310fa] 10.1.10.200:8333 32767
16:02:27.185895 INFO [node] Block  #465800 [0000000000000000007f4f0dbc933198ef0fe6bfba1f33ab651948c3db206bd9] 2928 txs 4425 ins   4 des   0 chk 990 dep (00) 139433
16:02:29.904059 INFO [node] Valid  #465800 [0000000000000000007f4f0dbc933198ef0fe6bfba1f33ab651948c3db206bd9] 2928 txs 4425 ins   5 des  82 pop   0 acc   0 scr 516 can  12 con 0.000000
16:08:33.957971 INFO [network] Connected manual channel [10.1.10.200:8333] as [10.1.10.200:8333] (1)
16:09:00.449851 INFO [node] Block  #465900 [000000000000000001b75b6efd5aaa81d2f7bd5265756a86a7375896d0336154] 1704 txs 4369 ins   3 des   0 chk 735 dep (00) 139333
16:09:02.600256 INFO [node] Valid  #465900 [000000000000000001b75b6efd5aaa81d2f7bd5265756a86a7375896d0336154] 1704 txs 4369 ins   3 des  50 pop   0 acc   0 scr 430 can   9 con 0.000000
^C16:14:30.622986 INFO [server] Stop signal detected (code: 2).
16:14:30.625098 INFO [server] Please wait while the server is stopping...
16:14:37.996370 INFO [node] Server stopped successfully.

real    2196m14.487s
user    3184m29.758s
sys     2930m25.746s
May have something to do with the 0 outbound/inbound peers though. Perhaps tearing down the connections takes some time?
Which distro, and is the server build statically linked? I'm recalling an unresolved ubuntu issue that had a crash inside of a dynamically loaded system boost version and resulted in a hang.
Debian/static here.
I say crash because gdb was able to trap it at a random spot in boost code, but without gdb, it was just a never ending hang.
evoskuil16:48
When the memory consumption drops way down it’s done flushing, after that it’s a deadlock (or maybe odd crash like you are describing). I haven’t finished the work in blockchain, and it’s possible I’ve left a deadlock. There’s only one place that can happen, which is unavoidable, so need to be careful with certain handlers.
N
narodnik17:28
ok well downgraded to v3 and starting/stopping working good
evoskuil18:48
Yeah, it’s very different and much more mature.
Did you use an off the shelf font for the Libbitcoin fist logo?

Monday, November 25, 2019

N
narodnik12:49
I can't remember. Maybe Roboto or something
version3 server was syncing all night but stopped ~250k blocks. I've stopped it an hour ago and it still hasn't finished.
N
narodnik19:29
@neillm mainnet.libbitcoin.net giving me timed out here when running version3 libbitcoin-client/example/get_height/get_height binary
N
narodnik19:43
$ ./examples/get_height/get_height tcp://mainnet.libbitcoin.net:9091
error: connection timed out
neillm21:10
Strange, all the nodes are up. I'll give them all a restart (mainnet1/mainnet2/testnet1/testnet2)
Everything restarted
N
narodnik21:23
ok it's working now thanks
neillm21:24
np, thanks for notifying.

Tuesday, November 26, 2019

N
narodnik00:14
In the doc for history chain data type, it says if no output then it will be null:max ... how is it possible for a history list to have an item where the output is null but there is a spend? Isn't that nonsensical for bitcoin?
evoskuil00:19
Can you send a link, traveling.
I think it’s the case when indexing doesn’t start at genesis.
(edited)
N
narodnik00:33
OK right that makes sense
Anyone have any idea why this code works for a single address, but for multiple addresses, I get errors.
For empty addresses, I get the error code:
error: connection timed out
which doesn't make sense
ok fixed it like this:
    while (poller.wait(1000).contains(socket.id()))
        stream.read(proxy);
1 reply · evoskuil · last Nov 26, 2019
evoskuil00:46
👍

Wednesday, November 27, 2019

N
narodnik16:11
testnet servers 3 and 4 are down
2 replies · neillm · last Dec 01, 2019
neillm01:01
testnet3/4 were never operated by me
neillm01:01
mainnet3/4 as well
evoskuil23:54
@neillm

Thursday, November 28, 2019

N
narodnik07:54
@evoskuil coindesk are trying to reach you. I forwarded you the email
👍 2

Friday, November 29, 2019

N
narodnik17:36
How can I create an input script given endorsement and public key? Or how do I create the script with the push data operations?
evoskuil17:37
what's the script?
N
narodnik17:37
[endorsement] [public key]
for (auto i = 0; i < unspent->size(); ++i)
    {
        const auto& [previous_output, key] = unspent->at(i);

        const auto address = convert_key_to_address(key);

        bcs::chain::script prevout_script =
            bcs::chain::script::to_pay_key_hash_pattern(address.hash());

        bcs::endorsement endorsement;
        auto rc = bcs::chain::script::create_endorsement(endorsement,
            key, prevout_script, tx, i, bcs::machine::sighash_algorithm::all);
    }
Do I need to make the operations myself manually? If so, how do I construct the operation such that it selects the correct code value?
evoskuil17:38
script foo({ {endorsement}, {key} });
N
narodnik17:38
oh ok, great
foo.from_operations({ {endorsement}, {key} });
N
narodnik17:39
yes just wasn't sure whether operations can auto-choose the right opcode
thanks a lot
evoskuil17:40
yeah, it defaults to minimal push
N
narodnik17:40
ok great
evoskuil17:40
you can explicitly create the operation elements in order to specify the opcode.
script foo(operation::list{ operation{ opcode::foo, endorsement }, operation{ opcode::bar, key } });
(edited)
N
narodnik17:41
not neccessary, this is great
evoskuil17:41
cool
There are also static template-based constructions for input scripts.
N
narodnik17:45
thats for output scripts not input
evoskuil17:45
y, right
N
narodnik17:48
bcs::chain::script input_script;
        input_script.from_operations(bcs::machine::operation::list({
            bcs::machine::operation({ endorsement }),
            bcs::machine::operation({ public_key.point() })
        }));
this doesn't work. compiler giving errors, not sure if I'm doing it right
public_key is type ec_public
evoskuil17:49
hold on, lemee check
The inner brackets are redundant (extra copy passed to copy constructor).
but that's not the issue
operation accepts data_chunk, not data_slice.
point() is an array
that's because it feeds into a stream construction... could prob make it work but currently you need to convert to chunk
N
narodnik17:56
ok got it
evoskuil17:56
input_script.from_operations(bc::system::machine::operation::list( { bc::system::machine::operation(endorsement), bc::system::machine::operation({ public_key.point().begin(), public_key.point().end() }) }));
N
narodnik17:57
yes it works
nice
evoskuil17:57
I'll loot at converting to data_slice
N
narodnik17:59
bcs::chain::script input_script({
            { endorsement },
            bcs::machine::operation({
                public_key.point().begin(), public_key.point().end() })
        });
final version
a factory for script to make input scripts of this type would be useful
also any reason why bc::system::chain::script::to_string(fork) why fork doesn't default to all_rules?
evoskuil18:39
Because the opcodes change under different rules.
(edited)
I've got a note to add some operations templates for input scripts, but since the standard scripts are pretty basic, and generally data there hasn't been much internal necessity.
bcs::chain::script input_script({
    { endorsement },
    { public_key.point().begin(), public_key.point().end() }});
should work on the initializer syntax alone
I looked at the factories. The use of data_chunk vs. data_slice is a performance optimization, as eventually the data_slice needs to be copied to a data_chunk eventually.
We could probably add less-performing overloads, but the signature conflicts, so gets complicated.
N
narodnik19:06
No worries, this is a minor thing anyway
evoskuil20:38
It could be changed, we had it that way initially. But it tends to get missed, like when you stream script in bx, since stream operators implementations don’t take parameters. So the codes come out wrong. Just figured being explicit in this case was safer.