HomePhabricator

[Chronik] Don't index OP_RETURN scripts anymore

Description

[Chronik] Don't index OP_RETURN scripts anymore

Summary:
This was accidentally introduced in D15545, so we remove it again.

Removing it solves a few problems:

  • OP_RETURN can't be spent, so having them in the UTXO DB is incorrect.
  • These scripts can't be compressed very well, increasing the DB size disproportionally.
  • The scripthash -> script index (for ElectrumX) is already tens of gigabytes; removing OP_RETURNs contributes to reducing this index.

If users want OP_RETURNs to be indexed, it is probably a Chronik plugin they want (which can color OP_RETURNs, and even parse the OP_RETURN), and since plugins are strictly more powerful than a simple OP_RETURN index, there's no actual need to have this indexed.

Test Plan: ./test/functional/test_runner.py chronik_script_utxos chronik_script_history

Reviewers: Fabien, #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D16917

Details

Provenance
tobias_ruckAuthored on Oct 16 2024, 08:59
tobias_ruckPushed on Oct 19 2024, 11:22
Reviewer
Restricted Project
Differential Revision
D16917: [Chronik] Don't index OP_RETURN scripts anymore
Parents
rABCf1c48b59e493: [avalanche] Add a way to check if a proof is a remote proof
Branches
Unknown
Tags
Unknown