<bitcoin-git>
[bitcoin] theStack opened pull request #26892: test: refactor: simplify p2p_permissions.py by using MiniWallet (master...202301-test-use_MiniWallet_in_p2p_permissions) https://github.com/bitcoin/bitcoin/pull/26892
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 264 seconds]
Norrin has joined #bitcoin-core-dev
AmunRa has quit [Ping timeout: 255 seconds]
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 264 seconds]
as2333 has quit [Ping timeout: 264 seconds]
as2333 has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 252 seconds]
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 264 seconds]
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 246 seconds]
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 264 seconds]
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 260 seconds]
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 264 seconds]
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 268 seconds]
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 272 seconds]
jon_atack has quit [Read error: Connection reset by peer]
jon_atack has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
MrFrancis has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 265 seconds]
<phantomcircuit>
theStack: can you clarify something about #25957 for me? it looks like this only works with descriptor wallets and is using the block filter indexes where the keys are based on the block_hash, is that right?
<gribble>
https://github.com/bitcoin/bitcoin/issues/25957 | wallet: fast rescan with BIP157 block filters for descriptor wallets by theStack · Pull Request #25957 · bitcoin/bitcoin · GitHub
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 246 seconds]
<theStack>
phantomcircuit: yes that's right. we lookup the filters by block_hash, internally they seem to be also indexed by height (for filters belonging to blocks of the active chain)
<phantomcircuit>
theStack: ok so this isn't using fixed key indexes
<phantomcircuit>
theStack: there's a huge performance improvement available by creating the GCSFilter::ElementSet and doing the hashing using fixed (per peer) keys
<phantomcircuit>
it's weird to benchmark because it only shows up when you have a lot of elements in the set
as2333 has quit [Quit: Ping timeout: 264 seconds]
as2333 has joined #bitcoin-core-dev
MrFrancis has quit [Ping timeout: 252 seconds]
brunoerg has joined #bitcoin-core-dev
<theStack>
phantomcircuit: not sure if i understand what you mean. would this be a proposal to speed up calculating the hashed set of filter elements (i.e. `GCSFilter::BuildHashedSet`)?
<theStack>
probably i got the second part of your question wrong, i assumed you meant "key" in a database sense
brunoerg has quit [Ping timeout: 268 seconds]
jarthur_ has joined #bitcoin-core-dev
jarthur has quit [Ping timeout: 260 seconds]
jarthur_ is now known as jarthur
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 265 seconds]
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 246 seconds]
cmirror has quit [Remote host closed the connection]
cmirror has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
weylin_ has quit [Remote host closed the connection]
brunoerg has quit [Ping timeout: 246 seconds]
weylin_ has joined #bitcoin-core-dev
weylin_ has quit [Ping timeout: 248 seconds]
codo has quit [Quit: reboot]
codo has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 272 seconds]
jrayhawk has quit [Ping timeout: 268 seconds]
jrayhawk has joined #bitcoin-core-dev
as2333 has quit [Quit: as2333]
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 246 seconds]
<phantomcircuit>
theStack: the BASIC gcsfilter is rekeyed for every block
<phantomcircuit>
the element set has to be rehashed with the new key for each block
bitdex has quit [Remote host closed the connection]
bitdex has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 256 seconds]
bitdex has quit [Remote host closed the connection]
bitdex has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 272 seconds]
Talkless has joined #bitcoin-core-dev
salvatoshi has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 264 seconds]
Norrin has quit [Ping timeout: 255 seconds]
Norrin has joined #bitcoin-core-dev
b_101 has quit [Ping timeout: 268 seconds]
kexkey has quit [Ping timeout: 260 seconds]
kexkey has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 265 seconds]
MrFrancis has joined #bitcoin-core-dev
b_101 has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 252 seconds]
AaronvanW has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
brunoerg has quit [Ping timeout: 256 seconds]
AaronvanW has quit [Remote host closed the connection]
MrFrancis has quit [Remote host closed the connection]
MrFrancis has joined #bitcoin-core-dev
weylin_ has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
b_101 has quit [Ping timeout: 252 seconds]
brunoerg has quit [Ping timeout: 252 seconds]
AaronvanW has joined #bitcoin-core-dev
brunoerg has joined #bitcoin-core-dev
bitdex has quit [Ping timeout: 255 seconds]
Norrin has quit [Remote host closed the connection]
bitdex has joined #bitcoin-core-dev
weylin_ has quit [Remote host closed the connection]
<bitcoin-git>
[bitcoin] mruddy closed pull request #26535: reindex: allow finalized blk files to use read-only permissions (master...issue_2039_readonly_finalized_blk_files) https://github.com/bitcoin/bitcoin/pull/26535
Guyver2 has joined #bitcoin-core-dev
Guyver2 has left #bitcoin-core-dev [Closing Window]
weylin_ has joined #bitcoin-core-dev
weylin_ has quit [Ping timeout: 255 seconds]
weylin_ has joined #bitcoin-core-dev
AaronvanW has quit [Remote host closed the connection]
sudoforge has joined #bitcoin-core-dev
AaronvanW has joined #bitcoin-core-dev
<theStack>
phantomcircuit: right. to quote bip 158: "The parameter k MUST be set to the first 16 bytes of the hash (in standard little-endian representation) of the block for which the filter is constructed. This ensures the key is deterministic while still varying from block to block."
<sipa>
theStack: phantomcircuit is suggesting not using bip158 filters for rescanning, but another filter type, where instead of the deterministic bip158 per-block-salted one, a static per-host one is used.
<sipa>
bip158's point is being able to provide bip157 filters over the network, which must be deterministic... and once you have those, you might as well use them for rescanning
<sipa>
but if your goal is just rescanning, a much more efficient approach is possible
<theStack>
sipa: oh, that would then be block filters that would _only_ be useful locally and never served to peers?
<sipa>
yes
<sipa>
(which also means there is much less need for standardization etc on them)
<theStack>
okay, interesting
jirigrill has joined #bitcoin-core-dev
AaronvanW has quit [Ping timeout: 272 seconds]
jirigrill has quit [Quit: Ping timeout (120 seconds)]
MrFrancis has quit [Ping timeout: 252 seconds]
jirigrill has joined #bitcoin-core-dev
<theStack>
phantomcircuit: "it's weird to benchmark because it only shows up when you have a lot of elements in the set" <- by default a freshly created descriptor wallet starts with a filter set of 8000 scriptPubKeys, increasing with every top-up... is that already in the ball-park of "a lot of elements" w.r.t. your benchmark results? :p
jirigrill has quit [Ping timeout: 260 seconds]
Norrin has joined #bitcoin-core-dev
Norrin has quit [Remote host closed the connection]
MrFrancis has joined #bitcoin-core-dev
Norrin has joined #bitcoin-core-dev
jirigrill has joined #bitcoin-core-dev
jirigrill has quit [Ping timeout: 260 seconds]
Norrin has quit [Remote host closed the connection]
Norrin has joined #bitcoin-core-dev
AaronvanW has joined #bitcoin-core-dev
MrFrancis has quit [Ping timeout: 248 seconds]
<Murch1>
From what I understand, the problem is that all 8k keys need to be resalted for every block that you look at. If you generated a second set of filters that were salted all the same way, you would skip the 8000×block count key resaltings
<sipa>
Exactly.
<sipa>
But you do need some salting, or attackers could construct a multitude of transactions designed to cause collisions in the filter's hash function.
<sipa>
So the one alternative is having a per-node salt, using a locally generated secret key, stored in the filter itself.
b_101 has joined #bitcoin-core-dev
b_101 has quit [Client Quit]
as2333 has joined #bitcoin-core-dev
b_101 has joined #bitcoin-core-dev
b_101 has quit [Ping timeout: 252 seconds]
<theStack>
sipa: to cause collisions, wouldn't an attacker need to know the exact set of scriptPubKeys that an user is scanning for?
<sipa>
theStack: Well, yes, but if everyone is using the same salt, it's predictable, and anything in the block may be interesting to someone.
<sipa>
Either because there are clients interested in everything, or because the attacker is involved in transactions with the victim.
MrFrancis has joined #bitcoin-core-dev
<ariard>
achow101: sure -- i'll add a note on the pr before next meeting