Skip to content

AssumeUTXO makes getblockfilter report a healthy index as corrupt #37050

Backlog

Description

@l0rinc

During background validation, the healthy block filter index follows the historical chain and is synced to its tip. Until background validation completes, a filter request for a block on the active snapshot chain is reported as unexpected index corruption instead of as still being indexed.

Reproducer
diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py
index 8727a9925ec..470e08ab99f 100755
--- a/test/functional/feature_assumeutxo.py
+++ b/test/functional/feature_assumeutxo.py
@@ -660,6 +660,13 @@ class AssumeutxoTest(BitcoinTestFramework):
         self.assert_only_network_limited_service(n1)
         dumb_sync_blocks(src=n0, dst=n1, height=PAUSE_HEIGHT)
 
+        assert_raises_rpc_error(
+            -32603,
+            "Filter not found. This error is unexpected and indicates index corruption.",
+            n1.getblockfilter,
+            n1.getblockhash(PAUSE_HEIGHT),
+        )
+
         self.log.info("Checking that blocks are segmented on disk")
         assert self.has_blockfile(n1, "00000"), "normal blockfile missing"
         assert self.has_blockfile(n1, "00001"), "assumed blockfile missing"

The direct fix would be to report such blocks as still being indexed (as #35837 proposes for scanblocks), but given that AssumeUTXO fixes haven't attracted much review, I'm proposing to remove AssumeUTXO entirely in #36598 instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions