Add prune_rocksdb_state to VM for pruning historic storage entries#3231
Draft
Copilot wants to merge 2 commits into
Draft
Add prune_rocksdb_state to VM for pruning historic storage entries#3231Copilot wants to merge 2 commits into
prune_rocksdb_state to VM for pruning historic storage entries#3231Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/ProvableHQ/snarkVM/sessions/247b5f8d-64a9-4153-ae6f-42fb581c547d Co-authored-by: vicsn <24724627+vicsn@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add prune_rocksdb_state method for historic state pruning
Add Apr 23, 2026
prune_rocksdb_state to VM for pruning historic storage entries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a mechanism to prune historic state from storage maps (e.g. authority signatures, batch certificates) via the VM's sequential operation queue, preventing concurrent storage conflicts during pruning.
Changes
SequentialOperation/SequentialOperationResult— newPruneRocksDBStatevariant; dispatched instart_sequential_queueVM::prune_rocksdb_state<S, T, V>— public method accepting anyMap-implementing store and a key iterator; executes deletion sequentiallyBlockStore— exposesauthority_map()andcertificate_map()as public getters so callers can obtain the map handle to pass toprune_rocksdb_stateUsage
The method works with any
Mapimplementation (MemoryMap,DataMap/RocksDB), so it is not restricted to the rocks feature. Two tests are included: a lightweight unit test usingMemoryMap(no parameter download required), and a feature-gated integration test that verifies authority data is pruned while transactions remain intact.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
parameters.provable.com/home/REDACTED/work/snarkVM/snarkVM/target/debug/deps/snarkvm_synthesizer-c7cf0b1472ec429a /home/REDACTED/work/snarkVM/snarkVM/target/debug/deps/snarkvm_synthesizer-c7cf0b1472ec429a test_prune_authority_data_while_keeping_transactions /home/REDACTED/work/snarkVM/snarkVM/target/debug/build/aws-lc-sys-760136680ef973d9/home/REDACTED/work/snarkVM/snarkVM/target/debug/deps/test_vm_execute_and_finalize-731149e23e4aca95.0r6uwswaj5420asqwgxy5tdpd.1tkhv7x.rcgu.o /home/REDACTED/work/snarkVM/snarkVM/target/debug/build/aws-lc-sys-760136680ef973d9/home/REDACTED/work/snarkVM/snarkVM/target/debug/deps/test_vm_execute_and_finalize-731149e23e4aca95.0ufm2ybsg680p6u5zd5qpg8ep.1tkhv7x.rcgu.o /out�� /out/bc1b343226bc6a17-a_time.o 5bf43a734a4.03ri36zu42y8m2ofyaj9ap8uz.0xdcyd3.rcgu.o 5bf43a734a4.050o7lam6z1ii3dkxh3jihpoj.0xdcyd3.rcgu.o 5bf43a734a4.0erw4iwbl0tmyq4cpa7rjvac0.0xdcyd3.rcgu.o 5bf43a734a4.0h4efwsrb6bfnuqyot1uvwk5v.0xdcyd3.rcgu.o 5bf43a734a4.0hsmfv16r3iv276eyd3p5cubz.0xdcyd3.rcgu.o 5bf43a734a4.0mqjbxjuz9c73sk863cg9tr7y.0xdcyd3.rcgu.o 5bf43a734a4.0z4c86aggvwf9548dl10jjlin.0xdcyd3.rcgu.o 5bf43a734a4.14xavcn359fkm0m3qmat7oi6s.0xdcyd3.rcgu.o 5bf43a734a4.1tb7tl3penownsx0bzl3zgb14.0xdcyd3.rcgu.o 5bf43a734a4.1vxye9boby2wz6v0rql1zrcxv.0xdcyd3.rcgu.o 5bf43a734a4.1ysvw0xf5af2qcahvrsqhdghz.0xdcyd3.rcgu.o 5bf43a734a4.22aukhyhbsluwo0p2v22js2mn.0xdcyd3.rcgu.o 5bf43a734a4.2abhtsldh8cdvhp6sq1zqjpq2.0xdcyd3.rcgu.o 5bf43a734a4.2gvcqf3c89mu75fjuqnhe2c8l.0xdcyd3.rcgu.o(dns block)s3.us-west-1.amazonaws.com/home/REDACTED/work/snarkVM/snarkVM/target/debug/deps/snarkvm_synthesizer-c7cf0b1472ec429a /home/REDACTED/work/snarkVM/snarkVM/target/debug/deps/snarkvm_synthesizer-c7cf0b1472ec429a test_prune_authority_data_while_keeping_transactions /home/REDACTED/work/snarkVM/snarkVM/target/debug/build/aws-lc-sys-760136680ef973d9/home/REDACTED/work/snarkVM/snarkVM/target/debug/deps/test_vm_execute_and_finalize-731149e23e4aca95.0r6uwswaj5420asqwgxy5tdpd.1tkhv7x.rcgu.o /home/REDACTED/work/snarkVM/snarkVM/target/debug/build/aws-lc-sys-760136680ef973d9/home/REDACTED/work/snarkVM/snarkVM/target/debug/deps/test_vm_execute_and_finalize-731149e23e4aca95.0ufm2ybsg680p6u5zd5qpg8ep.1tkhv7x.rcgu.o /out�� /out/bc1b343226bc6a17-a_time.o 5bf43a734a4.03ri36zu42y8m2ofyaj9ap8uz.0xdcyd3.rcgu.o 5bf43a734a4.050o7lam6z1ii3dkxh3jihpoj.0xdcyd3.rcgu.o 5bf43a734a4.0erw4iwbl0tmyq4cpa7rjvac0.0xdcyd3.rcgu.o 5bf43a734a4.0h4efwsrb6bfnuqyot1uvwk5v.0xdcyd3.rcgu.o 5bf43a734a4.0hsmfv16r3iv276eyd3p5cubz.0xdcyd3.rcgu.o 5bf43a734a4.0mqjbxjuz9c73sk863cg9tr7y.0xdcyd3.rcgu.o 5bf43a734a4.0z4c86aggvwf9548dl10jjlin.0xdcyd3.rcgu.o 5bf43a734a4.14xavcn359fkm0m3qmat7oi6s.0xdcyd3.rcgu.o 5bf43a734a4.1tb7tl3penownsx0bzl3zgb14.0xdcyd3.rcgu.o 5bf43a734a4.1vxye9boby2wz6v0rql1zrcxv.0xdcyd3.rcgu.o 5bf43a734a4.1ysvw0xf5af2qcahvrsqhdghz.0xdcyd3.rcgu.o 5bf43a734a4.22aukhyhbsluwo0p2v22js2mn.0xdcyd3.rcgu.o 5bf43a734a4.2abhtsldh8cdvhp6sq1zqjpq2.0xdcyd3.rcgu.o 5bf43a734a4.2gvcqf3c89mu75fjuqnhe2c8l.0xdcyd3.rcgu.o(dns block)If you need me to access, download, or install something from one of these locations, you can either: