-
m-relay
<jeffro256:monero.social> I hadn't considered that the slots let you guarantee that you bound to chain IDs once
-
m-relay
<jeffro256:monero.social> In log(N) size
-
m-relay
<jeffro256:monero.social> Is there any code in the core repo which actually verifies branch proofs ?
-
m-relay
<jeffro256:monero.social> Or can create them even?
-
m-relay
<jeffro256:monero.social> src/crypto/tree-hash.c looks like it contains that code
-
sech1
Proof verification is done by the aux chain
-
sech1
That code is not used in monerod, as far as I know. But I'm working on adding it to p2pool
-
andrey8ezkaro
Hello everybody, i'm using monero-ts to interact with my wallet. How to subscribe on output received, for example? Does it work?
-
selsta
can someone explain why it's not possible to simply "cut" the LMDB file?
monero-project/monero #9081
-
Lyza
he's not wrong though, it would be a really nice feature that like, BTC etc all do. Idk if that would mean using a whole new database or what, but it's hella inconvenient having one fat file
-
selsta
or just set --db-sync-mode safe if you prefer safety over speed
-
Lyza
is your opinion it's "not possible" or that it doesn't matter if it's one file
-
Lyza
I'm not saying it's worth whatever it would take just, other blockchains do it, so it seems possible, and idk, from my perspective nicer
-
selsta
can you show me where bitcoin devs recommend "cutting" the blockchain file?
-
Lyza
I can show you the blockchain directory of my bitcoin node and how it's full of hundreds of files
-
selsta
that doesn't mean that you can delete the last file and resolve corruption
-
selsta
unless the bitcoin devs claim this? I would be curious to see this
-
Lyza
I've never had a reason to mess with the files manually so I couldn't tell you to be honest, it may very well not work that way
-
moneromooo
It's trivially possible but you might not like the side effects :)
-
moneromooo
A brute force append only file that gets rotated every N bytes would do. But you'd carry all the history, and it would grow in size at an amazing speed.
-
moneromooo
It would also be very slow to look up into.
-
moneromooo
But it's easy to see it would work.
-
m-relay
<rucknium:monero.social> AFAIK `bitcoind` doesn't even have a `pop_blocks` command.
-
moneromooo
You could then delete the L last files and restart syncing. The software would have to re-sync to know exactly how many "lost" butes are in the last file (or maybe more than one last file) but doable, if low.
-
m-relay
<kayabanerve:matrix.org> It has invalidateblock
-
m-relay
<kayabanerve:matrix.org> So yes, you can enforce a reorg to a specific point.
-
Lyza
It looks like bitcoin core used to use Berkeley DB and now uses or is moving to SQLite
-
Lyza
if that tells anyone anything
-
m-relay
<kayabanerve:matrix.org> You can also the re-check that block to resync iirc
-
selsta
from what I can see they recommend restoring from backup, resync or using -reindex / -reindex-chainstate
-
selsta
just deleting some files like isn't a good idea
-
selsta
Berkeley DB and now SQLite is for the wallet database, they use leveldb for the blockchain itself
-
Lyza
gotcha
-
moneromooo
Technically, monero stores block and tx blobs, so it could be made to dump most indexed tables, but not the blob tables. Then resync from that.
-
moneromooo
It's not a "drop the last N" but you'd save the download, if that's what annoy people for some reason.
-
Lyza
"for some reason" hehehe
-
moneromooo
Of course it doesn't help you if the blob tables are what's corrupted.
-
moneromooo
Well, the download typically isn't the bottleneck is it ?
-
moneromooo
Except maybe for people who just want to trust some random internet peer.
-
Lyza
Depends on the machine and internet connection I guess but it's often not, people just think it is because their system monitor doens't show disk iops
-
moneromooo
Actually... if you'd already verified up to height H, and you dump indexed tables, you can just reindex without verifiying up to H...
-
moneromooo
Again, assuming the blobs didn't get shot.
-
moneromooo
They do take up a lot of the db though, so they're likely to be shot if corruption happens.
-
Lyza
I definitely don't know enough to have much opinion, but if there were more options for DB recovery that didn't involve wiping everything that would be pretty nice
-
moneromooo
However, I suppose you can re-download a tx and accept whatever matches its known txid.
-
moneromooo
It gets a bit more fiddly though, if you start second guessing what's shot and what's not.
-
moneromooo
(ie, if what got shot is the txid keys for a tble)
-
moneromooo
Still, I reckon there's a bug in monerod's db txn code that makes something non atomic when it should be.
-
moneromooo
Not going to look for it anymore though.
-
selsta
the person in the issue seems to have had a power outage + external hdd
-
selsta
likely not a monerod bug in this case
-
Lyza
I can see why that's a setup someone would *want* to work, but ew