From fdab44dfcbb60a301415536317beebac3faae000 Mon Sep 17 00:00:00 2001 From: Marek Date: Thu, 16 Jun 2022 20:18:45 +0200 Subject: [PATCH 1/9] Rename `block_by_height` to `block_header_by_height` in fin state --- book/src/dev/rfcs/0005-state-updates.md | 10 ++++++---- .../src/service/finalized_state/disk_db.rs | 3 +-- ...k_header_by_height_raw_data@mainnet_0.snap | 11 +++++++++++ ...k_header_by_height_raw_data@mainnet_1.snap | 15 +++++++++++++++ ...k_header_by_height_raw_data@mainnet_2.snap | 19 +++++++++++++++++++ ...k_header_by_height_raw_data@testnet_0.snap | 11 +++++++++++ ...k_header_by_height_raw_data@testnet_1.snap | 15 +++++++++++++++ ...k_header_by_height_raw_data@testnet_2.snap | 19 +++++++++++++++++++ .../tests/snapshots/column_family_names.snap | 3 ++- .../empty_column_families@no_blocks.snap | 3 ++- .../service/finalized_state/zebra_db/block.rs | 4 ++-- 11 files changed, 103 insertions(+), 10 deletions(-) create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_0.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_1.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_2.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_0.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_1.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_2.snap diff --git a/book/src/dev/rfcs/0005-state-updates.md b/book/src/dev/rfcs/0005-state-updates.md index 4f4e065d354..fcd4100f180 100644 --- a/book/src/dev/rfcs/0005-state-updates.md +++ b/book/src/dev/rfcs/0005-state-updates.md @@ -1107,8 +1107,9 @@ Implemented by querying: block that chain's `blocks` (to get the block containing the transaction data) - (finalized) the `tx_by_hash` tree (to get the block that contains the - transaction) and then `block_by_height` tree (to get the block containing - the transaction data), if the transaction is not in any non-finalized chain + transaction) and then `block_header_by_height` tree (to get the block + containing the transaction data), if the transaction is not in any + non-finalized chain ### `Request::Block(block::Hash)` [request-block]: #request-block @@ -1125,8 +1126,9 @@ Implemented by querying: - (non-finalized) the `height_by_hash` of each chain starting with the best chain, then find block that chain's `blocks` (to get the block data) -- (finalized) the `height_by_hash` tree (to get the block height) and then - the `block_by_height` tree (to get the block data), if the block is not in any non-finalized chain +- (finalized) the `height_by_hash` tree (to get the block height) and then the + `block_header_by_height` tree (to get the block data), if the block is not in + any non-finalized chain ### `Request::AwaitSpendableUtxo { outpoint: OutPoint, spend_height: Height, spend_restriction: SpendRestriction }` diff --git a/zebra-state/src/service/finalized_state/disk_db.rs b/zebra-state/src/service/finalized_state/disk_db.rs index 5bee586fa90..d349b812477 100644 --- a/zebra-state/src/service/finalized_state/disk_db.rs +++ b/zebra-state/src/service/finalized_state/disk_db.rs @@ -368,8 +368,7 @@ impl DiskDb { let column_families = vec![ // Blocks - // TODO: rename to block_header_by_height (#3151) - rocksdb::ColumnFamilyDescriptor::new("block_by_height", db_options.clone()), + rocksdb::ColumnFamilyDescriptor::new("block_header_by_height", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new("hash_by_height", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new("height_by_hash", db_options.clone()), // Transactions diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_0.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_0.snap new file mode 100644 index 00000000000..c1c123e5b82 --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_0.snap @@ -0,0 +1,11 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "000000", + v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4000000000000000000000000000000000000000000000000000000000000000090041358ffff071f5712000000000000000000000000000000000000000000000000000000000000fd4005000a889f00854b8665cd555f4656f68179d31ccadc1b1f7fb0952726313b16941da348284d67add4686121d4e3d930160c1348d8191c25f12b267a6a9c131b5031cbf8af1f79c9d513076a216ec87ed045fa966e01214ed83ca02dc1797270a454720d3206ac7d931a0a680c5c5e099057592570ca9bdf6058343958b31901fce1a15a4f38fd347750912e14004c73dfe588b903b6c03166582eeaf30529b14072a7b3079e3a684601b9b3024054201f7440b0ee9eb1a7120ff43f713735494aa27b1f8bab60d7f398bca14f6abb2adbf29b04099121438a7974b078a11635b594e9170f1086140b4173822dd697894483e1c6b4e8b8dcd5cb12ca4903bc61e108871d4d915a9093c18ac9b02b6716ce1013ca2c1174e319c1a570215bc9ab5f7564765f7be20524dc3fdf8aa356fd94d445e05ab165ad8bb4a0db096c097618c81098f91443c719416d39837af6de85015dca0de89462b1d8386758b2cf8a99e00953b308032ae44c35e05eb71842922eb69797f68813b59caf266cb6c213569ae3280505421a7e3a0a37fdf8e2ea354fc5422816655394a9454bac542a9298f176e211020d63dee6852c40de02267e2fc9d5e1ff2ad9309506f02a1a71a0501b16d0d36f70cdfd8de78116c0c506ee0b8ddfdeb561acadf31746b5a9dd32c21930884397fb1682164cb565cc14e089d66635a32618f7eb05fe05082b8a3fae620571660a6b89886eac53dec109d7cbb6930ca698a168f301a950be152da1be2b9e07516995e20baceebecb5579d7cdbc16d09f3a50cb3c7dffe33f26686d4ff3f8946ee6475e98cf7b3cf9062b6966e838f865ff3de5fb064a37a21da7bb8dfd2501a29e184f207caaba364f36f2329a77515dcb710e29ffbf73e2bbd773fab1f9a6b005567affff605c132e4e4dd69f36bd201005458cfbd2c658701eb2a700251cefd886b1e674ae816d3f719bac64be649c172ba27a4fd55947d95d53ba4cbc73de97b8af5ed4840b659370c556e7376457f51e5ebb66018849923db82c1c9a819f173cccdb8f3324b239609a300018d0fb094adf5bd7cbb3834c69e6d0b3798065c525b20f040e965e1a161af78ff7561cd874f5f1b75aa0bc77f720589e1b810f831eac5073e6dd46d00a2793f70f7427f0f798f2f53a67e615e65d356e66fe40609a958a05edb4c175bcc383ea0530e67ddbe479a898943c6e3074c6fcc252d6014de3a3d292b03f0d88d312fe221be7be7e3c59d07fa0f2f4029e364f1f355c5d01fa53770d0cd76d82bf7e60f6903bc1beb772e6fde4a70be51d9c7e03c8d6d8dfb361a234ba47c470fe630820bbd920715621b9fbedb49fcee165ead0875e6c2b1af16f50b5d6140cc981122fcbcf7c5a4e3772b3661b628e08380abc545957e59f634705b1bbde2f0b4e055a5ec5676d859be77e20962b645e051a880fddb0180b4555789e1f9344a436a84dc5579e2553f1e5fb0a599c137be36cabbed0319831fea3fddf94ddc7971e4bcf02cdc93294a9aab3e3b13e3b058235b4f4ec06ba4ceaa49d675b4ba80716f3bc6976b1fbf9c8bf1f3e3a4dc1cd83ef9cf816667fb94f1e923ff63fef072e6a19321e4812f96cb0ffa864da50ad74deb76917a336f31dce03ed5f0303aad5e6a83634f9fcc371096f8288b8f02ddded5ff1bb9d49331e4a84dbe1543164438fde9ad71dab024779dcdde0b6602b5ae0a6265c14b94edd83b37403f4b78fcd2ed555b596402c28ee81d87a909c4e8722b30c71ecdd861b05f61f8b1231795c76adba2fdefa451b283a5d527955b9f3de1b9828e7b2e74123dd47062ddcc09b05e7fa13cb2212a6fdbc65d7e852cec463ec6fd929f5b8483cf3052113b13dac91b69f49d1b7d1aec01c4a68e41ce157", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_1.snap new file mode 100644 index 00000000000..9535970d135 --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_1.snap @@ -0,0 +1,15 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "000000", + v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4000000000000000000000000000000000000000000000000000000000000000090041358ffff071f5712000000000000000000000000000000000000000000000000000000000000fd4005000a889f00854b8665cd555f4656f68179d31ccadc1b1f7fb0952726313b16941da348284d67add4686121d4e3d930160c1348d8191c25f12b267a6a9c131b5031cbf8af1f79c9d513076a216ec87ed045fa966e01214ed83ca02dc1797270a454720d3206ac7d931a0a680c5c5e099057592570ca9bdf6058343958b31901fce1a15a4f38fd347750912e14004c73dfe588b903b6c03166582eeaf30529b14072a7b3079e3a684601b9b3024054201f7440b0ee9eb1a7120ff43f713735494aa27b1f8bab60d7f398bca14f6abb2adbf29b04099121438a7974b078a11635b594e9170f1086140b4173822dd697894483e1c6b4e8b8dcd5cb12ca4903bc61e108871d4d915a9093c18ac9b02b6716ce1013ca2c1174e319c1a570215bc9ab5f7564765f7be20524dc3fdf8aa356fd94d445e05ab165ad8bb4a0db096c097618c81098f91443c719416d39837af6de85015dca0de89462b1d8386758b2cf8a99e00953b308032ae44c35e05eb71842922eb69797f68813b59caf266cb6c213569ae3280505421a7e3a0a37fdf8e2ea354fc5422816655394a9454bac542a9298f176e211020d63dee6852c40de02267e2fc9d5e1ff2ad9309506f02a1a71a0501b16d0d36f70cdfd8de78116c0c506ee0b8ddfdeb561acadf31746b5a9dd32c21930884397fb1682164cb565cc14e089d66635a32618f7eb05fe05082b8a3fae620571660a6b89886eac53dec109d7cbb6930ca698a168f301a950be152da1be2b9e07516995e20baceebecb5579d7cdbc16d09f3a50cb3c7dffe33f26686d4ff3f8946ee6475e98cf7b3cf9062b6966e838f865ff3de5fb064a37a21da7bb8dfd2501a29e184f207caaba364f36f2329a77515dcb710e29ffbf73e2bbd773fab1f9a6b005567affff605c132e4e4dd69f36bd201005458cfbd2c658701eb2a700251cefd886b1e674ae816d3f719bac64be649c172ba27a4fd55947d95d53ba4cbc73de97b8af5ed4840b659370c556e7376457f51e5ebb66018849923db82c1c9a819f173cccdb8f3324b239609a300018d0fb094adf5bd7cbb3834c69e6d0b3798065c525b20f040e965e1a161af78ff7561cd874f5f1b75aa0bc77f720589e1b810f831eac5073e6dd46d00a2793f70f7427f0f798f2f53a67e615e65d356e66fe40609a958a05edb4c175bcc383ea0530e67ddbe479a898943c6e3074c6fcc252d6014de3a3d292b03f0d88d312fe221be7be7e3c59d07fa0f2f4029e364f1f355c5d01fa53770d0cd76d82bf7e60f6903bc1beb772e6fde4a70be51d9c7e03c8d6d8dfb361a234ba47c470fe630820bbd920715621b9fbedb49fcee165ead0875e6c2b1af16f50b5d6140cc981122fcbcf7c5a4e3772b3661b628e08380abc545957e59f634705b1bbde2f0b4e055a5ec5676d859be77e20962b645e051a880fddb0180b4555789e1f9344a436a84dc5579e2553f1e5fb0a599c137be36cabbed0319831fea3fddf94ddc7971e4bcf02cdc93294a9aab3e3b13e3b058235b4f4ec06ba4ceaa49d675b4ba80716f3bc6976b1fbf9c8bf1f3e3a4dc1cd83ef9cf816667fb94f1e923ff63fef072e6a19321e4812f96cb0ffa864da50ad74deb76917a336f31dce03ed5f0303aad5e6a83634f9fcc371096f8288b8f02ddded5ff1bb9d49331e4a84dbe1543164438fde9ad71dab024779dcdde0b6602b5ae0a6265c14b94edd83b37403f4b78fcd2ed555b596402c28ee81d87a909c4e8722b30c71ecdd861b05f61f8b1231795c76adba2fdefa451b283a5d527955b9f3de1b9828e7b2e74123dd47062ddcc09b05e7fa13cb2212a6fdbc65d7e852cec463ec6fd929f5b8483cf3052113b13dac91b69f49d1b7d1aec01c4a68e41ce157", + ), + KV( + k: "000001", + v: "0400000008ce3d9731b000c08338455c8a4a6bd05da16e26b11daa1b917184ece80f04000946edb9c083c9942d92305444527765fad789c438c717783276a9f7fbf61b850000000000000000000000000000000000000000000000000000000000000000ac7a1358ffff071f7534e8cf161ff2e49d54bdb3bfbcde8cdbf2fc5963c9ec7d86aed4a67e975790fd4005002b2ee0d2f5d0c1ebf5a265b6f5b428f2fdc9aaea07078a6c5cab4f1bbfcd56489863deae6ea3fd8d3d0762e8e5295ff2670c9e90d8e8c68a54a40927e82a65e1d44ced20d835818e172d7b7f5ffe0245d0c3860a3f11af5658d68b6a7253b4684ffef5242fefa77a0bfc3437e8d94df9dc57510f5a128e676dd9ddf23f0ef75b460090f507499585541ab53a470c547ea02723d3a979930941157792c4362e42d3b9faca342a5c05a56909b046b5e92e2870fca7c932ae2c2fdd97d75b6e0ecb501701c1250246093c73efc5ec2838aeb80b59577741aa5ccdf4a631b79f70fc419e28714fa22108d991c29052b2f5f72294c355b57504369313470ecdd8e0ae97fc48e243a38c2ee7315bb05b7de9602047e97449c81e46746513221738dc729d7077a1771cea858865d85261e71e82003ccfbba2416358f023251206d6ef4c5596bc35b2b5bce3e9351798aa2c9904723034e5815c7512d260cc957df5db6adf9ed7272483312d1e68c60955a944e713355089876a704aef06359238f6de5a618f7bd0b4552ba72d05a6165e582f62d55ff2e1b76991971689ba3bee16a520fd85380a6e5a31de4dd4654d561101ce0ca390862d5774921eae2c284008692e9e08562144e8aa1f399a9d3fab0c4559c1f12bc945e626f7a89668613e8829767f4116ee9a4f832cf7c3ade3a7aba8cb04de39edd94d0d05093ed642adf9fbd9d373a80832ffd1c62034e4341546b3515f0e42e6d8570393c6754be5cdb7753b4709527d3f164aebf3d315934f7b3736a1b31052f6cc5699758950331163b3df05b9772e9bf99c8c77f8960e10a15edb06200106f45742d740c422c86b7e4f5a52d3732aa79ee54cfc92f76e03c268ae226477c19924e733caf95b8f350233a5312f4ed349d3ad76f032358f83a6d0d6f83b2a456742aad7f3e615fa72286300f0ea1c9793831ef3a5a4ae08640a6e32f53d1cba0be284b25e923d0d110ba227e54725632efcbbe17c05a9cde976504f6aece0c461b562cfae1b85d5f6782ee27b3e332ac0775f681682ce524b32889f1dc4231226f1aada0703beaf8d41732c9647a0a940a86f8a1be7f239c44fcaa7ed7a055506bdbe1df848f9e047226bee1b6d788a03f6e352eead99b419cfc41741942dbeb7a5c55788d5a3e636d8aab7b36b4db71d16700373bbc1cdeba8f9b1db10bf39a621bc737ea4f4e333698d6e09b51ac7a97fb6fd117ccad1d6b6b3a7451699d5bfe448650396d7b58867b3b0872be13ad0b43da267df0ad77025155f04e20c56d6a9befb3e9c7d23b82cbf3a534295ebda540682cc81be9273781b92519c858f9c25294fbacf75c3b3c15bda6d36de1c83336f93e96910dbdcb190d6ef123c98565ff6df1e903f57d4e4df167ba6b829d6d9713eb2126b0cf869940204137babcc6a1b7cb2f0b94318a7460e5d1a605c249bd2e72123ebad332332c18adcb285ed8874dbde084ebcd4f744465350d57110f037fffed1569d642c258749e65b0d13e117eaa37014a769b5ab479b7c77178880e77099f999abe712e543dbbf626ca9bcfddc42ff2f109d21c8bd464894e55ae504fdf81e1a7694180225da7dac8879abd1036cf26bb50532b8cf138b337a1a1bd1a43f8dd70b7399e2690c8e7a5a1fe099026b8f2a6f65fc0dbedda15ba65e0abd66c7176fb426980549892b4817de78e345a7aeab05744c3def4a2f283b4255b02c91c1af7354a368c67a11703c642a385c7453131ce3a78b24c5e22ab7e136a38498ce82082181884418cb4d6c2920f258a3ad20cfbe7104af1c6c6cb5e58bf29a9901721ad19c0a260cd09a3a772443a45aea4a5c439a95834ef5dc2e26343278947b7b796f796ae9bcadb29e2899a1d7313e6f7bfb6f8b", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_2.snap new file mode 100644 index 00000000000..fdf84d8bfa1 --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@mainnet_2.snap @@ -0,0 +1,19 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "000000", + v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4000000000000000000000000000000000000000000000000000000000000000090041358ffff071f5712000000000000000000000000000000000000000000000000000000000000fd4005000a889f00854b8665cd555f4656f68179d31ccadc1b1f7fb0952726313b16941da348284d67add4686121d4e3d930160c1348d8191c25f12b267a6a9c131b5031cbf8af1f79c9d513076a216ec87ed045fa966e01214ed83ca02dc1797270a454720d3206ac7d931a0a680c5c5e099057592570ca9bdf6058343958b31901fce1a15a4f38fd347750912e14004c73dfe588b903b6c03166582eeaf30529b14072a7b3079e3a684601b9b3024054201f7440b0ee9eb1a7120ff43f713735494aa27b1f8bab60d7f398bca14f6abb2adbf29b04099121438a7974b078a11635b594e9170f1086140b4173822dd697894483e1c6b4e8b8dcd5cb12ca4903bc61e108871d4d915a9093c18ac9b02b6716ce1013ca2c1174e319c1a570215bc9ab5f7564765f7be20524dc3fdf8aa356fd94d445e05ab165ad8bb4a0db096c097618c81098f91443c719416d39837af6de85015dca0de89462b1d8386758b2cf8a99e00953b308032ae44c35e05eb71842922eb69797f68813b59caf266cb6c213569ae3280505421a7e3a0a37fdf8e2ea354fc5422816655394a9454bac542a9298f176e211020d63dee6852c40de02267e2fc9d5e1ff2ad9309506f02a1a71a0501b16d0d36f70cdfd8de78116c0c506ee0b8ddfdeb561acadf31746b5a9dd32c21930884397fb1682164cb565cc14e089d66635a32618f7eb05fe05082b8a3fae620571660a6b89886eac53dec109d7cbb6930ca698a168f301a950be152da1be2b9e07516995e20baceebecb5579d7cdbc16d09f3a50cb3c7dffe33f26686d4ff3f8946ee6475e98cf7b3cf9062b6966e838f865ff3de5fb064a37a21da7bb8dfd2501a29e184f207caaba364f36f2329a77515dcb710e29ffbf73e2bbd773fab1f9a6b005567affff605c132e4e4dd69f36bd201005458cfbd2c658701eb2a700251cefd886b1e674ae816d3f719bac64be649c172ba27a4fd55947d95d53ba4cbc73de97b8af5ed4840b659370c556e7376457f51e5ebb66018849923db82c1c9a819f173cccdb8f3324b239609a300018d0fb094adf5bd7cbb3834c69e6d0b3798065c525b20f040e965e1a161af78ff7561cd874f5f1b75aa0bc77f720589e1b810f831eac5073e6dd46d00a2793f70f7427f0f798f2f53a67e615e65d356e66fe40609a958a05edb4c175bcc383ea0530e67ddbe479a898943c6e3074c6fcc252d6014de3a3d292b03f0d88d312fe221be7be7e3c59d07fa0f2f4029e364f1f355c5d01fa53770d0cd76d82bf7e60f6903bc1beb772e6fde4a70be51d9c7e03c8d6d8dfb361a234ba47c470fe630820bbd920715621b9fbedb49fcee165ead0875e6c2b1af16f50b5d6140cc981122fcbcf7c5a4e3772b3661b628e08380abc545957e59f634705b1bbde2f0b4e055a5ec5676d859be77e20962b645e051a880fddb0180b4555789e1f9344a436a84dc5579e2553f1e5fb0a599c137be36cabbed0319831fea3fddf94ddc7971e4bcf02cdc93294a9aab3e3b13e3b058235b4f4ec06ba4ceaa49d675b4ba80716f3bc6976b1fbf9c8bf1f3e3a4dc1cd83ef9cf816667fb94f1e923ff63fef072e6a19321e4812f96cb0ffa864da50ad74deb76917a336f31dce03ed5f0303aad5e6a83634f9fcc371096f8288b8f02ddded5ff1bb9d49331e4a84dbe1543164438fde9ad71dab024779dcdde0b6602b5ae0a6265c14b94edd83b37403f4b78fcd2ed555b596402c28ee81d87a909c4e8722b30c71ecdd861b05f61f8b1231795c76adba2fdefa451b283a5d527955b9f3de1b9828e7b2e74123dd47062ddcc09b05e7fa13cb2212a6fdbc65d7e852cec463ec6fd929f5b8483cf3052113b13dac91b69f49d1b7d1aec01c4a68e41ce157", + ), + KV( + k: "000001", + v: "0400000008ce3d9731b000c08338455c8a4a6bd05da16e26b11daa1b917184ece80f04000946edb9c083c9942d92305444527765fad789c438c717783276a9f7fbf61b850000000000000000000000000000000000000000000000000000000000000000ac7a1358ffff071f7534e8cf161ff2e49d54bdb3bfbcde8cdbf2fc5963c9ec7d86aed4a67e975790fd4005002b2ee0d2f5d0c1ebf5a265b6f5b428f2fdc9aaea07078a6c5cab4f1bbfcd56489863deae6ea3fd8d3d0762e8e5295ff2670c9e90d8e8c68a54a40927e82a65e1d44ced20d835818e172d7b7f5ffe0245d0c3860a3f11af5658d68b6a7253b4684ffef5242fefa77a0bfc3437e8d94df9dc57510f5a128e676dd9ddf23f0ef75b460090f507499585541ab53a470c547ea02723d3a979930941157792c4362e42d3b9faca342a5c05a56909b046b5e92e2870fca7c932ae2c2fdd97d75b6e0ecb501701c1250246093c73efc5ec2838aeb80b59577741aa5ccdf4a631b79f70fc419e28714fa22108d991c29052b2f5f72294c355b57504369313470ecdd8e0ae97fc48e243a38c2ee7315bb05b7de9602047e97449c81e46746513221738dc729d7077a1771cea858865d85261e71e82003ccfbba2416358f023251206d6ef4c5596bc35b2b5bce3e9351798aa2c9904723034e5815c7512d260cc957df5db6adf9ed7272483312d1e68c60955a944e713355089876a704aef06359238f6de5a618f7bd0b4552ba72d05a6165e582f62d55ff2e1b76991971689ba3bee16a520fd85380a6e5a31de4dd4654d561101ce0ca390862d5774921eae2c284008692e9e08562144e8aa1f399a9d3fab0c4559c1f12bc945e626f7a89668613e8829767f4116ee9a4f832cf7c3ade3a7aba8cb04de39edd94d0d05093ed642adf9fbd9d373a80832ffd1c62034e4341546b3515f0e42e6d8570393c6754be5cdb7753b4709527d3f164aebf3d315934f7b3736a1b31052f6cc5699758950331163b3df05b9772e9bf99c8c77f8960e10a15edb06200106f45742d740c422c86b7e4f5a52d3732aa79ee54cfc92f76e03c268ae226477c19924e733caf95b8f350233a5312f4ed349d3ad76f032358f83a6d0d6f83b2a456742aad7f3e615fa72286300f0ea1c9793831ef3a5a4ae08640a6e32f53d1cba0be284b25e923d0d110ba227e54725632efcbbe17c05a9cde976504f6aece0c461b562cfae1b85d5f6782ee27b3e332ac0775f681682ce524b32889f1dc4231226f1aada0703beaf8d41732c9647a0a940a86f8a1be7f239c44fcaa7ed7a055506bdbe1df848f9e047226bee1b6d788a03f6e352eead99b419cfc41741942dbeb7a5c55788d5a3e636d8aab7b36b4db71d16700373bbc1cdeba8f9b1db10bf39a621bc737ea4f4e333698d6e09b51ac7a97fb6fd117ccad1d6b6b3a7451699d5bfe448650396d7b58867b3b0872be13ad0b43da267df0ad77025155f04e20c56d6a9befb3e9c7d23b82cbf3a534295ebda540682cc81be9273781b92519c858f9c25294fbacf75c3b3c15bda6d36de1c83336f93e96910dbdcb190d6ef123c98565ff6df1e903f57d4e4df167ba6b829d6d9713eb2126b0cf869940204137babcc6a1b7cb2f0b94318a7460e5d1a605c249bd2e72123ebad332332c18adcb285ed8874dbde084ebcd4f744465350d57110f037fffed1569d642c258749e65b0d13e117eaa37014a769b5ab479b7c77178880e77099f999abe712e543dbbf626ca9bcfddc42ff2f109d21c8bd464894e55ae504fdf81e1a7694180225da7dac8879abd1036cf26bb50532b8cf138b337a1a1bd1a43f8dd70b7399e2690c8e7a5a1fe099026b8f2a6f65fc0dbedda15ba65e0abd66c7176fb426980549892b4817de78e345a7aeab05744c3def4a2f283b4255b02c91c1af7354a368c67a11703c642a385c7453131ce3a78b24c5e22ab7e136a38498ce82082181884418cb4d6c2920f258a3ad20cfbe7104af1c6c6cb5e58bf29a9901721ad19c0a260cd09a3a772443a45aea4a5c439a95834ef5dc2e26343278947b7b796f796ae9bcadb29e2899a1d7313e6f7bfb6f8b", + ), + KV( + k: "000002", + v: "040000008392336da29773c56b1649ab555156ceb7e700ad7c230ea7a4571c7e22bc0700f4b084a7c2fc5a5aa2985f2bcb1d4a9a65562a589d628b0d869c5f1c8dd074890000000000000000000000000000000000000000000000000000000000000000ca7a1358ffff071fa5556cd346010000000000000000000000000000000000000000000000000002fd4005005605e4490c2e7fc1acf199d7401e18ab8d2be4c843103a7ebdd34046d5514559e6ecbe29c00b9adf6f1aa49f1d63b9c20fd9bca4d9bbb381cb82f59cee9f387deb34ec4fd6b1e12f656a554bc21db88bd1560a033e64099c0bef439cdd6055aaa4f79c360ad37d1f1df1fbd35214e17fc5a0b3c0d272b1e693d6ba9e5e0ae71c6ff58545776838c18b756bf98a83a6b9739b4dec356117b2b227f6f6ea3f04fd854aadf27b40b302d3fa50719aa02f99c2003b51eab8c64cfd145117054dcadb604ba65a8854a095bd9f02884a65225baf0547a7ee44882b11343d40b1a6511cbc4db1d2fd840a8cd63610d29c47bd5c920fe13c349d1044185cd40854f8e60a212d59e1fe281e8bd1343a682e95f3ea23fb5ca83f9913bbcb11232ffd7165ea4a475273df1f3bb53cb721548b28f772acf56060da5d26fab50c4f8b87781bf28843bea805340531a61f002b5aad9a0427b597af1a08659f1a7b4b6d69d53b13191cf35512bc3521359dda47911112d06ae5410281d918bf53049f8295f067f2b3794a90cc15358e294c6cbd7896108d7c897e4bf61aa72451a280cfce72e0515b8dc510a52743b7615b25ba2f13419d562f6148fa36132622953c0fb74ea0b4870f86ccc1ece9661b29516a2226ea16b7100dbeb718a674eedbbe9d23ab02fe1c634234f3c1275ae9d7f74c754c66dec0af7331fc1407075a06cba62098a9be09d24889e7d0a6cf77d875131fe1278e6fdea2bfd9423903e1cb4502edcef971c60b064d4d8a9703ff324574e3d0535a59ab091355185499545be1baffddf6c2b654e5c30e7e1291763fd70896217d91d876a9be914a8472fa292ea3cfdc4be84f4c645f62d8ccff990ac4f5c84e0775b147d1532e2d4f3a8fb92fda899280a3e42f2b927dbef872ec6058254eb20e2770efde7c57905e7741321e833533e0006344a4c6deb9a78e8496de1ae1464ef8367ae97714700e76658e2390cb9702d1413b333d7f04fb89dd09cefeb34e0ead616cd5d352a2f348758e0f5fc4220c6a0693acc90b8dcd7a372ecb688d86356c151d9703576af8e904adea9941d1a6296774ba62b4dae7bf0a078f740af040c584f0245ed2ffa351f0b550c8b80e192ba1a75eb40fc42d67b722ea04ea947ed53e831fe057153a8bd6897ddcd43cb558d2766fb05640ed0c1d14eae0739b11ec07e34f3ea6acbd9f807b9ea6476bda5964a9fca1819c854680f75857e57fbf3fc50e3f5b0d25cadadcd9b3428b85b70b95080c9423a836e9e9e2cbd485075a29452d65acf3d5762111d70a0fd389ac7214b96b11eb14ae48ff1e4930ea50d8261472fd8d04877af717b4d463c0d9a6cf397b5b91fb1a898b329c4b46b8c350e3c0122e186bc393fe6d361e117963d38e44e0ccf1c45f33440aaebd8f99ad7b019c6411bb070178fb6b76e085e3bdae4c883f1f4112e7db91c519c48769fe96f56350cc8687679747730f0aad3bc58b78f87d162104beee449e55eab45558241f32cb5a0f30fea0f38632adfc8a2b7292ff89641581bb6e0111af26dad9199596ce8d432e6f7d0a7415aacc473acfb8af68c9c6ef8b60c535da095cd3a02598fd82fe20481dc87bf6ed25fb95633dc7ff8bcf3f81c323546084170e567536b5c4ce9392ae1dc1f201d732134597e3c9353416fa40ff8f2628815e9b980f27a9c05adefa779ef1a35fdfe6423e9f671677311971bd91d9aeb6adf4c45769d07df7a24955f4082730fb0d3f6467472f75add86b827a7b664005931130029553fdb62ad9ffdb64b44701c0d94e7c5f5ba2340e641d9e34737e29b47e619659f458a161648c9fb81dddbcc73f1eebc92fd7f7b70356635f0de19912d82c9a978c2750aacbfbeee3ab62e96f7df7ce918fa3", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_0.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_0.snap new file mode 100644 index 00000000000..6d6c5c44e4f --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_0.snap @@ -0,0 +1,11 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "000000", + v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac40000000000000000000000000000000000000000000000000000000000000000a11e1358ffff07200600000000000000000000000000000000000000000000000000000000000000fd400500a6a51259c3f6732481e2d035197218b7a69504461d04335503cd69759b2d02bd2b53a9653f42cb33c608511c953673fa9da76170958115fe92157ad3bb5720d927f18e09459bf5c6072973e143e20f9bdf0584058c96b7c2234c7565f100d5eea083ba5d3dbaff9f0681799a113e7beff4a611d2b49590563109962baa149b628aae869af791f2f70bb041bd7ebfa658570917f6654a142b05e7ec0289a4f46470be7be5f693b90173eaaa6e84907170f32602204f1f4e1c04b1830116ffd0c54f0b1caa9a5698357bd8aa1f5ac8fc93b405265d824ba0e49f69dab5446653927298e6b7bdc61ee86ff31c07bde86331b4e500d42e4e50417e285502684b7966184505b885b42819a88469d1e9cf55072d7f3510f85580db689302eab377e4e11b14a91fdd0df7627efc048934f0aff8e7eb77eb17b3a95de13678004f2512293891d8baf8dde0ef69be520a58bbd6038ce899c9594cf3e30b8c3d9c7ecc832d4c19a6212747b50724e6f70f6451f78fd27b58ce43ca33b1641304a916186cfbe7dbca224f55d08530ba851e4df22baf7ab7078e9cbea46c0798b35a750f54103b0cdd08c81a6505c4932f6bfbd492a9fced31d54e98b6370d4c96600552fcf5b37780ed18c8787d03200963600db297a8f05dfa551321d17b9917edadcda51e274830749d133ad226f8bb6b94f13b4f77e67b35b71f52112ce9ba5da706ad9573584a2570a4ff25d29ab9761a06bdcf2c33638bf9baf2054825037881c14adf3816ba0cbd0fca689aad3ce16f2fe362c98f48134a9221765d939f0b49677d1c2447e56b46859f1810e2cf23e82a53e0d44f34dae932581b3b7f49eaec59af872cf9de757a964f7b33d143a36c270189508fcafe19398e4d2966948164d40556b05b7ff532f66f5d1edc41334ef742f78221dfe0c7ae2275bb3f24c89ae35f00afeea4e6ed187b866b209dc6e83b660593fce7c40e143beb07ac86c56f39e895385924667efe3a3f031938753c7764a2dbeb0a643fd359c46e614873fd0424e435fa7fac083b9a41a9d6bf7e284eee537ea7c50dd239f359941a43dc982745184bf3ee31a8dc850316aa9c6b66d6985acee814373be3458550659e1a06287c3b3b76a185c5cb93e38c1eebcf34ff072894b6430aed8d34122dafd925c46a515cca79b0269c92b301890ca6b0dc8b679cdac0f23318c105de73d7a46d16d2dad988d49c22e9963c117960bdc70ef0db6b091cf09445a516176b7f6d58ec29539166cc8a38bbff387acefffab2ea5faad0e8bb70625716ef0edf61940733c25993ea3de9f0be23d36e7cb8da10505f9dc426cd0e6e5b173ab4fff8c37e1f1fb56d1ea372013d075e0934c6919393cfc21395eea20718fad03542a4162a9ded66c814ad8320b2d7c2da3ecaf206da34c502db2096d1c46699a91dd1c432f019ad434e2c1ce507f91104f66f491fed37b225b8e0b2888c37276cfa0468fc13b8d593fd9a2675f0f5b20b8a15f8fa7558176a530d6865738ddb25d3426dab905221681cf9da0e0200eea5b2eba3ad3a5237d2a391f9074bf1779a2005cee43eec2b058511532635e0fea61664f531ac2b356f40db5c5d275a4cf5c82d468976455af4e3362cc8f71aa95e71d394aff3ead6f7101279f95bcd8a0fedce1d21cb3c9f6dd3b182fce0db5d6712981b651f29178a24119968b14783cafa713bc5f2a65205a42e4ce9dc7ba462bdb1f3e4553afc15f5f39998fdb53e7e231e3e520a46943734a007c2daa1eda9f495791657eefcac5c32833936e568d06187857ed04d7b97167ae207c5c5ae54e528c36016a984235e9c5b2f0718d7b3aa93c7822ccc772580b6599671b3c02ece8a21399abd33cfd3028790133167d0a97e7de53dc8ff", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_1.snap new file mode 100644 index 00000000000..1c427513a60 --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_1.snap @@ -0,0 +1,15 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "000000", + v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac40000000000000000000000000000000000000000000000000000000000000000a11e1358ffff07200600000000000000000000000000000000000000000000000000000000000000fd400500a6a51259c3f6732481e2d035197218b7a69504461d04335503cd69759b2d02bd2b53a9653f42cb33c608511c953673fa9da76170958115fe92157ad3bb5720d927f18e09459bf5c6072973e143e20f9bdf0584058c96b7c2234c7565f100d5eea083ba5d3dbaff9f0681799a113e7beff4a611d2b49590563109962baa149b628aae869af791f2f70bb041bd7ebfa658570917f6654a142b05e7ec0289a4f46470be7be5f693b90173eaaa6e84907170f32602204f1f4e1c04b1830116ffd0c54f0b1caa9a5698357bd8aa1f5ac8fc93b405265d824ba0e49f69dab5446653927298e6b7bdc61ee86ff31c07bde86331b4e500d42e4e50417e285502684b7966184505b885b42819a88469d1e9cf55072d7f3510f85580db689302eab377e4e11b14a91fdd0df7627efc048934f0aff8e7eb77eb17b3a95de13678004f2512293891d8baf8dde0ef69be520a58bbd6038ce899c9594cf3e30b8c3d9c7ecc832d4c19a6212747b50724e6f70f6451f78fd27b58ce43ca33b1641304a916186cfbe7dbca224f55d08530ba851e4df22baf7ab7078e9cbea46c0798b35a750f54103b0cdd08c81a6505c4932f6bfbd492a9fced31d54e98b6370d4c96600552fcf5b37780ed18c8787d03200963600db297a8f05dfa551321d17b9917edadcda51e274830749d133ad226f8bb6b94f13b4f77e67b35b71f52112ce9ba5da706ad9573584a2570a4ff25d29ab9761a06bdcf2c33638bf9baf2054825037881c14adf3816ba0cbd0fca689aad3ce16f2fe362c98f48134a9221765d939f0b49677d1c2447e56b46859f1810e2cf23e82a53e0d44f34dae932581b3b7f49eaec59af872cf9de757a964f7b33d143a36c270189508fcafe19398e4d2966948164d40556b05b7ff532f66f5d1edc41334ef742f78221dfe0c7ae2275bb3f24c89ae35f00afeea4e6ed187b866b209dc6e83b660593fce7c40e143beb07ac86c56f39e895385924667efe3a3f031938753c7764a2dbeb0a643fd359c46e614873fd0424e435fa7fac083b9a41a9d6bf7e284eee537ea7c50dd239f359941a43dc982745184bf3ee31a8dc850316aa9c6b66d6985acee814373be3458550659e1a06287c3b3b76a185c5cb93e38c1eebcf34ff072894b6430aed8d34122dafd925c46a515cca79b0269c92b301890ca6b0dc8b679cdac0f23318c105de73d7a46d16d2dad988d49c22e9963c117960bdc70ef0db6b091cf09445a516176b7f6d58ec29539166cc8a38bbff387acefffab2ea5faad0e8bb70625716ef0edf61940733c25993ea3de9f0be23d36e7cb8da10505f9dc426cd0e6e5b173ab4fff8c37e1f1fb56d1ea372013d075e0934c6919393cfc21395eea20718fad03542a4162a9ded66c814ad8320b2d7c2da3ecaf206da34c502db2096d1c46699a91dd1c432f019ad434e2c1ce507f91104f66f491fed37b225b8e0b2888c37276cfa0468fc13b8d593fd9a2675f0f5b20b8a15f8fa7558176a530d6865738ddb25d3426dab905221681cf9da0e0200eea5b2eba3ad3a5237d2a391f9074bf1779a2005cee43eec2b058511532635e0fea61664f531ac2b356f40db5c5d275a4cf5c82d468976455af4e3362cc8f71aa95e71d394aff3ead6f7101279f95bcd8a0fedce1d21cb3c9f6dd3b182fce0db5d6712981b651f29178a24119968b14783cafa713bc5f2a65205a42e4ce9dc7ba462bdb1f3e4553afc15f5f39998fdb53e7e231e3e520a46943734a007c2daa1eda9f495791657eefcac5c32833936e568d06187857ed04d7b97167ae207c5c5ae54e528c36016a984235e9c5b2f0718d7b3aa93c7822ccc772580b6599671b3c02ece8a21399abd33cfd3028790133167d0a97e7de53dc8ff", + ), + KV( + k: "000001", + v: "04000000382c4a332661c7ed0671f32a34d724619f086c61873bce7c99859dd9920aa605755f7c7d27a811596e9fae6dd30ca45be86e901d499909de35b6ff1f699f7ef30000000000000000000000000000000000000000000000000000000000000000e9851358ffff0720000056c2264c31261d597c6fcea7c5e00160cf6be1cd89ca96a0389473e50000fd40050053f4438864bc5d6dfc009d4bba545ac5e5feaaf46f9455b975b02115f842a966e26517ce678f1c074d09cc8d0049a190859eb505af5f3e760312fbbe54da115db2bc03c96408f39b679891790b539d2d9d17a801dc6af9af14ca3f6ba060edce2a1dd45aa45f11fe37dbaf1eb2647ae7c393f6680c3d5d7e53687e34530f48edf58924a04d3e0231c150b1c8218998f674bc171edd222bcb4ac4ba4ea52d7baa86399f371d5284043e1e166f9069dd0f2904ff94c7922a70fa7c660e0553cc40a20d9ee08eb3f47278485801ddae9c270411360773f0b74e03db2d92c50952c9bd4924bbca2a260e1235e99df51fe71e75744232f2d641ef94f394110a5ad05f51a057e4cb515b92c16cb1404a8cdcc43d4a4bb2caa54ca35dccf41aa7d832da65123b7029223c46ed2a13387d598d445435d3cb32fdad9e27672903864c90d86353b162033078327b5b7aaffc89b40096ae004f2d5c6bd2c99188574348518db66e9b6020f93f12ee1c06f7b00fe346fefceaffb1da9e3cdf08285057f549733eb10825737fcd1431bfdfb155f323f24e95a869212baacf445b30f2670206645779110e6547d5da90a5f2fe5151da911d5ecd5a833023661d1356b6c395d85968947678d53efd4db7b06f23b21125e74492644277ea0c1131b80d6a4e3e8093b82332556fbb3255a55ac3f0b7e4844c0e12bf577c37fd02323ae5ef4781772ed501d63b568032a3d31576c5104a48c01ac54f715286932351a8adc8cf2467a84a0572e99f366ee00f82c3735545fd4bb941d591ce70070425a81304272db89887949bc7dd8236bb7e82190f9815da938cd6e8fec7660e91354326a7a9bfe38120e97997fca3c289d54513ed00286c2b825fbe84f91a39528f335674b5e957425a6edfdd00f2feb2c2df575616197998c1e964e069875d4d934f419a9b02b100848d023b76d47bd4e284c3895ef9227a40d8ea8826e86c7155d6aa95b8f9175812523a32cd611efc700688e03f7c245c5bff01718281b5d75cefe8318b2c08962236b14a0bf79534c203df735fd9cced97cbae07c2b4ee9cda8c9993f3f6277ff3fec261fb94d3961c4befe4b0893dcf67b312c7d8d6ff7adc8539cb2b1d3534fccf109efddd07a9f1e77b94ab1e505b164221dca1c34621b1e9d234c31a032a401267d95f65b800d579a2482638dfeade804149c81e95d7ef5510ac0b6212231506b1c635a2e1d2f0c9712989f9f246762fadb4c55c20f707dcc0e510a33e9465fc5d5bdbfa524dab0d7a1c6a1baaa36869cf542aa2257c5c44ef07547a570343442c6091e13bc04d559dc0e6db5b001861914bf956816edce2a86b274bd97f27e2dbb08608c16a3e5d8595952faa91fb162d7fa6a7a47e849a1ad8fab3ba620ee3295a04fe13e5fb655ac92ae60d01020b8999526af8d56b28733e69c9ffb285de27c61edc0bf62261ac0787eff347d0fcd62257301ede9603106ea41650a3e3119bd5c4e86a7f6a3f00934f3a545f7f21d41699f3e35d38cf925a8bdaf2bf7eedea11c31c3d8bf6c527c77c6378281cdf02211a58fa5e46d28d7e7c5fb79d69b31703fd752395da115845952cf99aaeb2155c2ab951a69f67d938f223185567e52cfa3e57b62c790bf78674c4b02c12b7d3225fe8f705b408ba11c24245b3924482e2f3480994461b550641a88cd941d371139f3498afacdcba1249631402b20695760eaada5376e68df0e45139c410700effc9420dc3726515e7fcb3f349320f30511451964bd9b6530682efec65910ceb548aa2ab05ac3309e803161697213631ae8e13cc7d223ac28446c1bf94a19a8782ac16ff57df7ee4f10fb6e488c02c68d6b6dee6987f6d2c39227da366c59f54ff67e312ca530e7c467c3dc8", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_2.snap new file mode 100644 index 00000000000..208ac7a236f --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_header_by_height_raw_data@testnet_2.snap @@ -0,0 +1,19 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "000000", + v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac40000000000000000000000000000000000000000000000000000000000000000a11e1358ffff07200600000000000000000000000000000000000000000000000000000000000000fd400500a6a51259c3f6732481e2d035197218b7a69504461d04335503cd69759b2d02bd2b53a9653f42cb33c608511c953673fa9da76170958115fe92157ad3bb5720d927f18e09459bf5c6072973e143e20f9bdf0584058c96b7c2234c7565f100d5eea083ba5d3dbaff9f0681799a113e7beff4a611d2b49590563109962baa149b628aae869af791f2f70bb041bd7ebfa658570917f6654a142b05e7ec0289a4f46470be7be5f693b90173eaaa6e84907170f32602204f1f4e1c04b1830116ffd0c54f0b1caa9a5698357bd8aa1f5ac8fc93b405265d824ba0e49f69dab5446653927298e6b7bdc61ee86ff31c07bde86331b4e500d42e4e50417e285502684b7966184505b885b42819a88469d1e9cf55072d7f3510f85580db689302eab377e4e11b14a91fdd0df7627efc048934f0aff8e7eb77eb17b3a95de13678004f2512293891d8baf8dde0ef69be520a58bbd6038ce899c9594cf3e30b8c3d9c7ecc832d4c19a6212747b50724e6f70f6451f78fd27b58ce43ca33b1641304a916186cfbe7dbca224f55d08530ba851e4df22baf7ab7078e9cbea46c0798b35a750f54103b0cdd08c81a6505c4932f6bfbd492a9fced31d54e98b6370d4c96600552fcf5b37780ed18c8787d03200963600db297a8f05dfa551321d17b9917edadcda51e274830749d133ad226f8bb6b94f13b4f77e67b35b71f52112ce9ba5da706ad9573584a2570a4ff25d29ab9761a06bdcf2c33638bf9baf2054825037881c14adf3816ba0cbd0fca689aad3ce16f2fe362c98f48134a9221765d939f0b49677d1c2447e56b46859f1810e2cf23e82a53e0d44f34dae932581b3b7f49eaec59af872cf9de757a964f7b33d143a36c270189508fcafe19398e4d2966948164d40556b05b7ff532f66f5d1edc41334ef742f78221dfe0c7ae2275bb3f24c89ae35f00afeea4e6ed187b866b209dc6e83b660593fce7c40e143beb07ac86c56f39e895385924667efe3a3f031938753c7764a2dbeb0a643fd359c46e614873fd0424e435fa7fac083b9a41a9d6bf7e284eee537ea7c50dd239f359941a43dc982745184bf3ee31a8dc850316aa9c6b66d6985acee814373be3458550659e1a06287c3b3b76a185c5cb93e38c1eebcf34ff072894b6430aed8d34122dafd925c46a515cca79b0269c92b301890ca6b0dc8b679cdac0f23318c105de73d7a46d16d2dad988d49c22e9963c117960bdc70ef0db6b091cf09445a516176b7f6d58ec29539166cc8a38bbff387acefffab2ea5faad0e8bb70625716ef0edf61940733c25993ea3de9f0be23d36e7cb8da10505f9dc426cd0e6e5b173ab4fff8c37e1f1fb56d1ea372013d075e0934c6919393cfc21395eea20718fad03542a4162a9ded66c814ad8320b2d7c2da3ecaf206da34c502db2096d1c46699a91dd1c432f019ad434e2c1ce507f91104f66f491fed37b225b8e0b2888c37276cfa0468fc13b8d593fd9a2675f0f5b20b8a15f8fa7558176a530d6865738ddb25d3426dab905221681cf9da0e0200eea5b2eba3ad3a5237d2a391f9074bf1779a2005cee43eec2b058511532635e0fea61664f531ac2b356f40db5c5d275a4cf5c82d468976455af4e3362cc8f71aa95e71d394aff3ead6f7101279f95bcd8a0fedce1d21cb3c9f6dd3b182fce0db5d6712981b651f29178a24119968b14783cafa713bc5f2a65205a42e4ce9dc7ba462bdb1f3e4553afc15f5f39998fdb53e7e231e3e520a46943734a007c2daa1eda9f495791657eefcac5c32833936e568d06187857ed04d7b97167ae207c5c5ae54e528c36016a984235e9c5b2f0718d7b3aa93c7822ccc772580b6599671b3c02ece8a21399abd33cfd3028790133167d0a97e7de53dc8ff", + ), + KV( + k: "000001", + v: "04000000382c4a332661c7ed0671f32a34d724619f086c61873bce7c99859dd9920aa605755f7c7d27a811596e9fae6dd30ca45be86e901d499909de35b6ff1f699f7ef30000000000000000000000000000000000000000000000000000000000000000e9851358ffff0720000056c2264c31261d597c6fcea7c5e00160cf6be1cd89ca96a0389473e50000fd40050053f4438864bc5d6dfc009d4bba545ac5e5feaaf46f9455b975b02115f842a966e26517ce678f1c074d09cc8d0049a190859eb505af5f3e760312fbbe54da115db2bc03c96408f39b679891790b539d2d9d17a801dc6af9af14ca3f6ba060edce2a1dd45aa45f11fe37dbaf1eb2647ae7c393f6680c3d5d7e53687e34530f48edf58924a04d3e0231c150b1c8218998f674bc171edd222bcb4ac4ba4ea52d7baa86399f371d5284043e1e166f9069dd0f2904ff94c7922a70fa7c660e0553cc40a20d9ee08eb3f47278485801ddae9c270411360773f0b74e03db2d92c50952c9bd4924bbca2a260e1235e99df51fe71e75744232f2d641ef94f394110a5ad05f51a057e4cb515b92c16cb1404a8cdcc43d4a4bb2caa54ca35dccf41aa7d832da65123b7029223c46ed2a13387d598d445435d3cb32fdad9e27672903864c90d86353b162033078327b5b7aaffc89b40096ae004f2d5c6bd2c99188574348518db66e9b6020f93f12ee1c06f7b00fe346fefceaffb1da9e3cdf08285057f549733eb10825737fcd1431bfdfb155f323f24e95a869212baacf445b30f2670206645779110e6547d5da90a5f2fe5151da911d5ecd5a833023661d1356b6c395d85968947678d53efd4db7b06f23b21125e74492644277ea0c1131b80d6a4e3e8093b82332556fbb3255a55ac3f0b7e4844c0e12bf577c37fd02323ae5ef4781772ed501d63b568032a3d31576c5104a48c01ac54f715286932351a8adc8cf2467a84a0572e99f366ee00f82c3735545fd4bb941d591ce70070425a81304272db89887949bc7dd8236bb7e82190f9815da938cd6e8fec7660e91354326a7a9bfe38120e97997fca3c289d54513ed00286c2b825fbe84f91a39528f335674b5e957425a6edfdd00f2feb2c2df575616197998c1e964e069875d4d934f419a9b02b100848d023b76d47bd4e284c3895ef9227a40d8ea8826e86c7155d6aa95b8f9175812523a32cd611efc700688e03f7c245c5bff01718281b5d75cefe8318b2c08962236b14a0bf79534c203df735fd9cced97cbae07c2b4ee9cda8c9993f3f6277ff3fec261fb94d3961c4befe4b0893dcf67b312c7d8d6ff7adc8539cb2b1d3534fccf109efddd07a9f1e77b94ab1e505b164221dca1c34621b1e9d234c31a032a401267d95f65b800d579a2482638dfeade804149c81e95d7ef5510ac0b6212231506b1c635a2e1d2f0c9712989f9f246762fadb4c55c20f707dcc0e510a33e9465fc5d5bdbfa524dab0d7a1c6a1baaa36869cf542aa2257c5c44ef07547a570343442c6091e13bc04d559dc0e6db5b001861914bf956816edce2a86b274bd97f27e2dbb08608c16a3e5d8595952faa91fb162d7fa6a7a47e849a1ad8fab3ba620ee3295a04fe13e5fb655ac92ae60d01020b8999526af8d56b28733e69c9ffb285de27c61edc0bf62261ac0787eff347d0fcd62257301ede9603106ea41650a3e3119bd5c4e86a7f6a3f00934f3a545f7f21d41699f3e35d38cf925a8bdaf2bf7eedea11c31c3d8bf6c527c77c6378281cdf02211a58fa5e46d28d7e7c5fb79d69b31703fd752395da115845952cf99aaeb2155c2ab951a69f67d938f223185567e52cfa3e57b62c790bf78674c4b02c12b7d3225fe8f705b408ba11c24245b3924482e2f3480994461b550641a88cd941d371139f3498afacdcba1249631402b20695760eaada5376e68df0e45139c410700effc9420dc3726515e7fcb3f349320f30511451964bd9b6530682efec65910ceb548aa2ab05ac3309e803161697213631ae8e13cc7d223ac28446c1bf94a19a8782ac16ff57df7ee4f10fb6e488c02c68d6b6dee6987f6d2c39227da366c59f54ff67e312ca530e7c467c3dc8", + ), + KV( + k: "000002", + v: "04000000238d665a062b9007836a7d8f968ba2f3847af5f542733389a952cf9b86795502d5b3ccfd5e7828c4b2d221bae3178c500e21d33399c39a2508a0a82d53c022580000000000000000000000000000000000000000000000000000000000000000898c1358ffff072000005b7d311fedc046109a4482bd0eccdf21a6089c99fce43633d03352530000fd400500282db5ba22a2c122aba42724a991196cd01cc2b7013318f691d61171db79202d2e5979b0b6d5692cd129eb37b7541ff51b7b2a840b45273f86d2509acfaa39183bb3850f9916ec8246ad9ee785462c9cda0ea202f12c7ccba8cc155096016a87a6fc40a6a44f5f3b309a868f30d9080b128c75234a6c3d019fb7fbe29708d01daaab84e4891a00d15ffdd9a598dd678899102265e2090a4b7b26ec55764febbfd1f5fe791aef8500619578359cb2abfb19844981b5c0e67e86b6549765bd638f3a701b0fc8a56d00c4efb87b55883f1d81012e5b02d44e10ec9bf620f20ad62ca549be934d11103f9142b3201ff31b7791c1636aaeadc512b2c0f801a64959300d5d526c2fc58e2838162659fe59168f2214b41d1ec963d543e2660ea630d031e2671c8c841fa9c1b58f7475bfe958724cf89c038d29306dc0043b93148ab95f6e99017ec5863db2f9130c48187bfd013924b34eaefd1db6b2818f4f6a604185fa774c2c069455c6eb195a5382403404c47db312b29b5d84e44c4a645f06ef7899f0b78962e95d5476bc989dcb9458c24733a435b151c9fb46c32cbebd3318cf3ed7310533cfa0b087d58c687505070858765968d1f7077f0e6dd75ebf15d74bb8c7466ef2f4974df537f5dd64097f4adf8b1cff61c00181ad26f94cca9c01960db31edc454c1650da4f4390b4aa0efd46c9ed527ed8bb068494285da2680993e8d355caf6a0bd42a4d681780db2312eef129aa76c6081ceff231311ea93fd65fb0b80df077c49ca69d8996b1ebcfd74bad793d7914b4748af45f31ad018dd12997bfcf809df3894bbd7a10cc585797915356389b744f71ee58ac25484b635fe12a1b20909c97edb1d7ae20b1ef1c776260ebab06e16a34c2789fb5555ddc954cc38f07ac551ac3b46c1370f4fa1ba22ac35d82134eaa0d3f3198eeef723030072214ede447893a03f706d389ea60ef8a81ff7e20ae920cb1a5219e93e1bd2058df6296dc8ba39e4d403199d2c209c3d6b3b2d462aecc04b0e248e7f1e9d204a1f6b7df51073ae2faab55be3353713743c5db40555bebda203a5c79fc3324cb8fb7629c9391931a1268c97fad6d6ab7ebc583330356372df8c5e9e885422c75ab956932351858452c5904a5aad3d9fd840e356abd580479d9a531cda6de08277008bb3a1bdf08604c1df0d8e8cd475cb455161bfe5d9710bc0dfac4214afeeed4bca6148b54241b8f4ab221502917f261705715c7388d9e91d3685a1f67c484a24b716912fe33a89ca7ebc3a5b77e6b36657c7e2b2e1e8b2b699690ca749339b7b2673fb1083496bbc753fdfc49ff6e921c5e35f27d9175afa7da3793d6a7ad5eb0ab8c9ee0e60a8ae438e3145cf64b5f6417625ca934b9d7acc150efa9b53618c15b4d8318be5de0855696d92ef2e018d97ebd24102e824bbd040aed958a51016a91661180e64932f2316b5ee55923263d19d293996118f511f22912e8c9c435af630099fc47b7c4ab581b7d760418314c0e6e814b3bbddb486517436d56ddc774701072cd77beada2cc94cad87f3d1cb83db4da05c2e141bc175bc8848e548c27584995333ef1d9eadd8d7f028cae60d5b0e9642db7245d388ff58c6a31556319a29c0dc14362b957b6220a428966d66d6c3339a12a503806de7dc4c4561bab6968245e41b27ae89fffbfd1bd2f4104d074f0f2b759576f9e16c0e2f73bedc7c0e0da97698e07ca1d729b113938a6b29c3b19d9b8225303f80d6dc0e39bec343ac9a2d23926ab414666e079e68745998ff73dacbe1645bd004dd06236f615f11d47e9b2d54cf8573d9a295bda88af4b2c6c603db0c0757485a543725b1cc04f7e9f38445ed875ec54317418600b4113600e137417e5d1fc333159a7e365d", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap index c943a2f9c5e..e7d21913f0c 100644 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap @@ -1,10 +1,11 @@ --- source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 72 expression: cf_names --- [ "balance_by_transparent_addr", - "block_by_height", + "block_header_by_height", "default", "hash_by_height", "hash_by_tx_loc", diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap index b6fbe93632f..e5e28b2fc3d 100644 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap @@ -1,10 +1,11 @@ --- source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 154 expression: empty_column_families --- [ "balance_by_transparent_addr: no entries", - "block_by_height: no entries", + "block_header_by_height: no entries", "hash_by_height: no entries", "hash_by_tx_loc: no entries", "height_by_hash: no entries", diff --git a/zebra-state/src/service/finalized_state/zebra_db/block.rs b/zebra-state/src/service/finalized_state/zebra_db/block.rs index 3d1d9858337..9a991237110 100644 --- a/zebra-state/src/service/finalized_state/zebra_db/block.rs +++ b/zebra-state/src/service/finalized_state/zebra_db/block.rs @@ -82,7 +82,7 @@ impl ZebraDb { // TODO: move this method to the start of the section pub fn block(&self, hash_or_height: HashOrHeight) -> Option> { // Blocks - let block_header_by_height = self.db.cf_handle("block_by_height").unwrap(); + let block_header_by_height = self.db.cf_handle("block_header_by_height").unwrap(); let height_by_hash = self.db.cf_handle("height_by_hash").unwrap(); let height = @@ -412,7 +412,7 @@ impl DiskWriteBatch { finalized: &FinalizedBlock, ) -> Result<(), BoxError> { // Blocks - let block_header_by_height = db.cf_handle("block_by_height").unwrap(); + let block_header_by_height = db.cf_handle("block_header_by_height").unwrap(); let hash_by_height = db.cf_handle("hash_by_height").unwrap(); let height_by_hash = db.cf_handle("height_by_hash").unwrap(); From 0ce4e9cc3de270b0250414456fe110259235fe6d Mon Sep 17 00:00:00 2001 From: Marek Date: Thu, 16 Jun 2022 21:24:49 +0200 Subject: [PATCH 2/9] Rename `tx_by_hash` to `tx_loc_by_hash` in both (non & fin) states --- .../0004-asynchronous-script-verification.md | 4 +++- book/src/dev/rfcs/0005-state-updates.md | 14 ++++++------ .../src/service/finalized_state/disk_db.rs | 3 +-- .../tests/snapshots/column_family_names.snap | 2 +- .../empty_column_families@no_blocks.snap | 2 +- .../tx_loc_by_hash_raw_data@mainnet_0.snap | 11 ++++++++++ .../tx_loc_by_hash_raw_data@mainnet_1.snap | 15 +++++++++++++ .../tx_loc_by_hash_raw_data@mainnet_2.snap | 19 ++++++++++++++++ .../tx_loc_by_hash_raw_data@testnet_0.snap | 11 ++++++++++ .../tx_loc_by_hash_raw_data@testnet_1.snap | 15 +++++++++++++ .../tx_loc_by_hash_raw_data@testnet_2.snap | 19 ++++++++++++++++ .../service/finalized_state/zebra_db/block.rs | 4 ++-- .../src/service/non_finalized_state/chain.rs | 22 ++++++++++--------- .../non_finalized_state/chain/index.rs | 8 +++---- .../service/non_finalized_state/tests/prop.rs | 2 +- 15 files changed, 122 insertions(+), 29 deletions(-) create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_0.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_1.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_2.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_0.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_1.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_2.snap diff --git a/book/src/dev/rfcs/0004-asynchronous-script-verification.md b/book/src/dev/rfcs/0004-asynchronous-script-verification.md index c442de9d936..dd94072f1eb 100644 --- a/book/src/dev/rfcs/0004-asynchronous-script-verification.md +++ b/book/src/dev/rfcs/0004-asynchronous-script-verification.md @@ -426,10 +426,12 @@ ancestors are downloaded. These optimisations can be delayed until after the initial implementation is complete, and covered by tests: + + - Should we stop storing heights for non-coinbase UTXOs? (#2455) - Should we avoid storing any extra data for UTXOs, and just lookup the coinbase - flag and height using `outpoint.hash` and `tx_by_hash`? (#2455) + flag and height using `outpoint.hash` and `tx_loc_by_hash`? (#2455) - The maturity check can be skipped for UTXOs from the finalized state, because Zebra only finalizes mature UTXOs. We could implement this diff --git a/book/src/dev/rfcs/0005-state-updates.md b/book/src/dev/rfcs/0005-state-updates.md index fcd4100f180..72dedf0ac67 100644 --- a/book/src/dev/rfcs/0005-state-updates.md +++ b/book/src/dev/rfcs/0005-state-updates.md @@ -272,7 +272,7 @@ The `Chain` type is defined by the following struct and API: struct Chain { blocks: BTreeMap>, height_by_hash: HashMap, - tx_by_hash: HashMap, + tx_loc_by_hash: HashMap, created_utxos: HashSet, spent_utxos: HashSet, @@ -293,7 +293,7 @@ Push a block into a chain as the new tip - Add the block's hash to `height_by_hash` - Add work to `self.partial_cumulative_work` - For each `transaction` in `block` - - Add key: `transaction.hash` and value: `(height, tx_index)` to `tx_by_hash` + - Add key: `transaction.hash` and value: `(height, tx_index)` to `tx_loc_by_hash` - Add created utxos to `self.created_utxos` - Add spent utxos to `self.spent_utxos` - Add nullifiers to the appropriate `self._nullifiers` @@ -310,7 +310,7 @@ Remove the lowest height block of the non-finalized portion of a chain. - Remove the block's hash from `self.height_by_hash` - Subtract work from `self.partial_cumulative_work` - For each `transaction` in `block` - - Remove `transaction.hash` from `tx_by_hash` + - Remove `transaction.hash` from `tx_loc_by_hash` - Remove created utxos from `self.created_utxos` - Remove spent utxos from `self.spent_utxos` - Remove the nullifiers from the appropriate `self._nullifiers` @@ -340,7 +340,7 @@ Remove the highest height block of the non-finalized portion of a chain. - Remove the corresponding hash from `self.height_by_hash` - Subtract work from `self.partial_cumulative_work` - for each `transaction` in `block` - - remove `transaction.hash` from `tx_by_hash` + - remove `transaction.hash` from `tx_loc_by_hash` - Remove created utxos from `self.created_utxos` - Remove spent utxos from `self.spent_utxos` - Remove the nullifiers from the appropriate `self._nullifiers` @@ -365,7 +365,7 @@ parent block is the tip of the finalized state. This implementation should be handled by `#[derive(Default)]`. 1. initialise cumulative data members - - Construct an empty `self.blocks`, `height_by_hash`, `tx_by_hash`, + - Construct an empty `self.blocks`, `height_by_hash`, `tx_loc_by_hash`, `self.created_utxos`, `self.spent_utxos`, `self._anchors`, `self._nullifiers` - Zero `self.partial_cumulative_work` @@ -1102,11 +1102,11 @@ Returns Implemented by querying: -- (non-finalized) the `tx_by_hash` map (to get the block that contains the +- (non-finalized) the `tx_loc_by_hash` map (to get the block that contains the transaction) of each chain starting with the best chain, and then find block that chain's `blocks` (to get the block containing the transaction data) -- (finalized) the `tx_by_hash` tree (to get the block that contains the +- (finalized) the `tx_loc_by_hash` tree (to get the block that contains the transaction) and then `block_header_by_height` tree (to get the block containing the transaction data), if the transaction is not in any non-finalized chain diff --git a/zebra-state/src/service/finalized_state/disk_db.rs b/zebra-state/src/service/finalized_state/disk_db.rs index d349b812477..1284e3a7e6e 100644 --- a/zebra-state/src/service/finalized_state/disk_db.rs +++ b/zebra-state/src/service/finalized_state/disk_db.rs @@ -374,8 +374,7 @@ impl DiskDb { // Transactions rocksdb::ColumnFamilyDescriptor::new("tx_by_loc", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new("hash_by_tx_loc", db_options.clone()), - // TODO: rename to tx_loc_by_hash (#3950) - rocksdb::ColumnFamilyDescriptor::new("tx_by_hash", db_options.clone()), + rocksdb::ColumnFamilyDescriptor::new("tx_loc_by_hash", db_options.clone()), // Transparent rocksdb::ColumnFamilyDescriptor::new("balance_by_transparent_addr", db_options.clone()), // TODO: #3951 diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap index e7d21913f0c..4e94e912d60 100644 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap @@ -21,8 +21,8 @@ expression: cf_names "sprout_note_commitment_tree", "sprout_nullifiers", "tip_chain_value_pool", - "tx_by_hash", "tx_by_loc", + "tx_loc_by_hash", "tx_loc_by_transparent_addr_loc", "utxo_by_outpoint", "utxo_loc_by_transparent_addr_loc", diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap index e5e28b2fc3d..aa80ec984af 100644 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap @@ -20,8 +20,8 @@ expression: empty_column_families "sprout_note_commitment_tree: no entries", "sprout_nullifiers: no entries", "tip_chain_value_pool: no entries", - "tx_by_hash: no entries", "tx_by_loc: no entries", + "tx_loc_by_hash: no entries", "tx_loc_by_transparent_addr_loc: no entries", "utxo_by_outpoint: no entries", "utxo_loc_by_transparent_addr_loc: no entries", diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_0.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_0.snap new file mode 100644 index 00000000000..0eb160f547c --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_0.snap @@ -0,0 +1,11 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", + v: "0000000000", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_1.snap new file mode 100644 index 00000000000..08c5693b857 --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_1.snap @@ -0,0 +1,15 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "0946edb9c083c9942d92305444527765fad789c438c717783276a9f7fbf61b85", + v: "0000010000", + ), + KV( + k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", + v: "0000000000", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_2.snap new file mode 100644 index 00000000000..568a4a0babd --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@mainnet_2.snap @@ -0,0 +1,19 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "0946edb9c083c9942d92305444527765fad789c438c717783276a9f7fbf61b85", + v: "0000010000", + ), + KV( + k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", + v: "0000000000", + ), + KV( + k: "f4b084a7c2fc5a5aa2985f2bcb1d4a9a65562a589d628b0d869c5f1c8dd07489", + v: "0000020000", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_0.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_0.snap new file mode 100644 index 00000000000..0eb160f547c --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_0.snap @@ -0,0 +1,11 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", + v: "0000000000", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_1.snap new file mode 100644 index 00000000000..71e76e5b8cc --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_1.snap @@ -0,0 +1,15 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "755f7c7d27a811596e9fae6dd30ca45be86e901d499909de35b6ff1f699f7ef3", + v: "0000010000", + ), + KV( + k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", + v: "0000000000", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_2.snap new file mode 100644 index 00000000000..817a29cc497 --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_loc_by_hash_raw_data@testnet_2.snap @@ -0,0 +1,19 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "755f7c7d27a811596e9fae6dd30ca45be86e901d499909de35b6ff1f699f7ef3", + v: "0000010000", + ), + KV( + k: "d5b3ccfd5e7828c4b2d221bae3178c500e21d33399c39a2508a0a82d53c02258", + v: "0000020000", + ), + KV( + k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", + v: "0000000000", + ), +] diff --git a/zebra-state/src/service/finalized_state/zebra_db/block.rs b/zebra-state/src/service/finalized_state/zebra_db/block.rs index 9a991237110..2c4a49246cf 100644 --- a/zebra-state/src/service/finalized_state/zebra_db/block.rs +++ b/zebra-state/src/service/finalized_state/zebra_db/block.rs @@ -167,7 +167,7 @@ impl ZebraDb { /// Returns the [`TransactionLocation`] for [`transaction::Hash`], /// if it exists in the finalized chain. pub fn transaction_location(&self, hash: transaction::Hash) -> Option { - let tx_loc_by_hash = self.db.cf_handle("tx_by_hash").unwrap(); + let tx_loc_by_hash = self.db.cf_handle("tx_loc_by_hash").unwrap(); self.db.zs_get(&tx_loc_by_hash, &hash) } @@ -419,7 +419,7 @@ impl DiskWriteBatch { // Transactions let tx_by_loc = db.cf_handle("tx_by_loc").unwrap(); let hash_by_tx_loc = db.cf_handle("hash_by_tx_loc").unwrap(); - let tx_loc_by_hash = db.cf_handle("tx_by_hash").unwrap(); + let tx_loc_by_hash = db.cf_handle("tx_loc_by_hash").unwrap(); let FinalizedBlock { block, diff --git a/zebra-state/src/service/non_finalized_state/chain.rs b/zebra-state/src/service/non_finalized_state/chain.rs index eef54f7990e..56aacc7ff89 100644 --- a/zebra-state/src/service/non_finalized_state/chain.rs +++ b/zebra-state/src/service/non_finalized_state/chain.rs @@ -48,7 +48,7 @@ pub struct Chain { pub height_by_hash: HashMap, /// An index of [`TransactionLocation`]s for each transaction hash in `blocks`. - pub tx_by_hash: HashMap, + pub tx_loc_by_hash: HashMap, /// The [`transparent::Utxo`]s created by `blocks`. /// @@ -135,7 +135,7 @@ impl Chain { network, blocks: Default::default(), height_by_hash: Default::default(), - tx_by_hash: Default::default(), + tx_loc_by_hash: Default::default(), created_utxos: Default::default(), sprout_note_commitment_tree, sapling_note_commitment_tree, @@ -177,7 +177,7 @@ impl Chain { // blocks, heights, hashes self.blocks == other.blocks && self.height_by_hash == other.height_by_hash && - self.tx_by_hash == other.tx_by_hash && + self.tx_loc_by_hash == other.tx_loc_by_hash && // transparent UTXOs self.created_utxos == other.created_utxos && @@ -354,7 +354,7 @@ impl Chain { &self, hash: transaction::Hash, ) -> Option<(&Arc, block::Height)> { - self.tx_by_hash.get(&hash).map(|tx_loc| { + self.tx_loc_by_hash.get(&hash).map(|tx_loc| { ( &self.blocks[&tx_loc.height].block.transactions[tx_loc.index.as_usize()], tx_loc.height, @@ -624,7 +624,9 @@ impl Chain { query_height_range: RangeInclusive, ) -> BTreeMap { self.partial_transparent_indexes(addresses) - .flat_map(|transfers| transfers.tx_ids(&self.tx_by_hash, query_height_range.clone())) + .flat_map(|transfers| { + transfers.tx_ids(&self.tx_loc_by_hash, query_height_range.clone()) + }) .collect() } @@ -645,7 +647,7 @@ impl Chain { network: self.network, blocks: self.blocks.clone(), height_by_hash: self.height_by_hash.clone(), - tx_by_hash: self.tx_by_hash.clone(), + tx_loc_by_hash: self.tx_loc_by_hash.clone(), created_utxos: self.created_utxos.clone(), spent_utxos: self.spent_utxos.clone(), sprout_note_commitment_tree, @@ -782,10 +784,10 @@ impl UpdateWith for Chain { ), }; - // add key `transaction.hash` and value `(height, tx_index)` to `tx_by_hash` + // add key `transaction.hash` and value `(height, tx_index)` to `tx_loc_by_hash` let transaction_location = TransactionLocation::from_usize(height, transaction_index); let prior_pair = self - .tx_by_hash + .tx_loc_by_hash .insert(transaction_hash, transaction_location); assert_eq!( prior_pair, None, @@ -925,9 +927,9 @@ impl UpdateWith for Chain { // reset the utxos this consumed self.revert_chain_with(&(inputs, transaction_hash, spent_outputs), position); - // remove `transaction.hash` from `tx_by_hash` + // remove `transaction.hash` from `tx_loc_by_hash` assert!( - self.tx_by_hash.remove(transaction_hash).is_some(), + self.tx_loc_by_hash.remove(transaction_hash).is_some(), "transactions must be present if block was added to chain" ); diff --git a/zebra-state/src/service/non_finalized_state/chain/index.rs b/zebra-state/src/service/non_finalized_state/chain/index.rs index d1f5c2d543b..effe7191c41 100644 --- a/zebra-state/src/service/non_finalized_state/chain/index.rs +++ b/zebra-state/src/service/non_finalized_state/chain/index.rs @@ -210,24 +210,24 @@ impl TransparentTransfers { /// /// The transactions are returned in chain order. /// - /// `chain_tx_by_hash` should be the `tx_by_hash` field from the + /// `chain_tx_loc_by_hash` should be the `tx_loc_by_hash` field from the /// [`Chain`][1] containing this index. /// /// # Panics /// - /// If `chain_tx_by_hash` is missing some transaction hashes from this + /// If `chain_tx_loc_by_hash` is missing some transaction hashes from this /// index. /// /// [1]: super::super::Chain pub fn tx_ids( &self, - chain_tx_by_hash: &HashMap, + chain_tx_loc_by_hash: &HashMap, query_height_range: RangeInclusive, ) -> BTreeMap { self.tx_ids .distinct_elements() .filter_map(|tx_hash| { - let tx_loc = *chain_tx_by_hash + let tx_loc = *chain_tx_loc_by_hash .get(tx_hash) .expect("all hashes are indexed"); diff --git a/zebra-state/src/service/non_finalized_state/tests/prop.rs b/zebra-state/src/service/non_finalized_state/tests/prop.rs index 22a91474002..e5b9393637b 100644 --- a/zebra-state/src/service/non_finalized_state/tests/prop.rs +++ b/zebra-state/src/service/non_finalized_state/tests/prop.rs @@ -592,7 +592,7 @@ fn different_blocks_different_chains() -> Result<()> { // blocks, heights, hashes chain1.blocks = chain2.blocks.clone(); chain1.height_by_hash = chain2.height_by_hash.clone(); - chain1.tx_by_hash = chain2.tx_by_hash.clone(); + chain1.tx_loc_by_hash = chain2.tx_loc_by_hash.clone(); // transparent UTXOs chain1.created_utxos = chain2.created_utxos.clone(); From 3a0f88a3225a24b4064fc5bc4863bbf367b9b623 Mon Sep 17 00:00:00 2001 From: Marek Date: Fri, 17 Jun 2022 14:09:50 +0200 Subject: [PATCH 3/9] Rename `utxo_by_outpoint` to `utxo_by_out_loc` in finalized state --- .../src/service/finalized_state/disk_db.rs | 3 +-- .../tests/snapshots/column_family_names.snap | 2 +- .../empty_column_families@mainnet_0.snap | 3 ++- .../empty_column_families@no_blocks.snap | 2 +- .../empty_column_families@testnet_0.snap | 3 ++- .../utxo_by_out_loc_raw_data@mainnet_1.snap | 15 ++++++++++++ .../utxo_by_out_loc_raw_data@mainnet_2.snap | 23 +++++++++++++++++++ .../utxo_by_out_loc_raw_data@testnet_1.snap | 15 ++++++++++++ .../utxo_by_out_loc_raw_data@testnet_2.snap | 23 +++++++++++++++++++ .../finalized_state/zebra_db/transparent.rs | 6 ++--- 10 files changed, 86 insertions(+), 9 deletions(-) create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@mainnet_1.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@mainnet_2.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@testnet_1.snap create mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@testnet_2.snap diff --git a/zebra-state/src/service/finalized_state/disk_db.rs b/zebra-state/src/service/finalized_state/disk_db.rs index 1284e3a7e6e..7b859d771ea 100644 --- a/zebra-state/src/service/finalized_state/disk_db.rs +++ b/zebra-state/src/service/finalized_state/disk_db.rs @@ -379,8 +379,7 @@ impl DiskDb { rocksdb::ColumnFamilyDescriptor::new("balance_by_transparent_addr", db_options.clone()), // TODO: #3951 //rocksdb::ColumnFamilyDescriptor::new("tx_by_transparent_addr_loc", db_options.clone()), - // TODO: rename to utxo_by_out_loc (#3952) - rocksdb::ColumnFamilyDescriptor::new("utxo_by_outpoint", db_options.clone()), + rocksdb::ColumnFamilyDescriptor::new("utxo_by_out_loc", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new( "utxo_loc_by_transparent_addr_loc", db_options.clone(), diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap index 4e94e912d60..3349d5f806e 100644 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/column_family_names.snap @@ -24,6 +24,6 @@ expression: cf_names "tx_by_loc", "tx_loc_by_hash", "tx_loc_by_transparent_addr_loc", - "utxo_by_outpoint", + "utxo_by_out_loc", "utxo_loc_by_transparent_addr_loc", ] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@mainnet_0.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@mainnet_0.snap index a44c8c51cfa..bd62ada2ef8 100644 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@mainnet_0.snap +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@mainnet_0.snap @@ -1,5 +1,6 @@ --- source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 154 expression: empty_column_families --- [ @@ -13,6 +14,6 @@ expression: empty_column_families "sprout_nullifiers: no entries", "tip_chain_value_pool: no entries", "tx_loc_by_transparent_addr_loc: no entries", - "utxo_by_outpoint: no entries", + "utxo_by_out_loc: no entries", "utxo_loc_by_transparent_addr_loc: no entries", ] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap index aa80ec984af..a304b2879d6 100644 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@no_blocks.snap @@ -23,6 +23,6 @@ expression: empty_column_families "tx_by_loc: no entries", "tx_loc_by_hash: no entries", "tx_loc_by_transparent_addr_loc: no entries", - "utxo_by_outpoint: no entries", + "utxo_by_out_loc: no entries", "utxo_loc_by_transparent_addr_loc: no entries", ] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@testnet_0.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@testnet_0.snap index a44c8c51cfa..bd62ada2ef8 100644 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@testnet_0.snap +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/empty_column_families@testnet_0.snap @@ -1,5 +1,6 @@ --- source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 154 expression: empty_column_families --- [ @@ -13,6 +14,6 @@ expression: empty_column_families "sprout_nullifiers: no entries", "tip_chain_value_pool: no entries", "tx_loc_by_transparent_addr_loc: no entries", - "utxo_by_outpoint: no entries", + "utxo_by_out_loc: no entries", "utxo_loc_by_transparent_addr_loc: no entries", ] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@mainnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@mainnet_1.snap new file mode 100644 index 00000000000..630019412c5 --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@mainnet_1.snap @@ -0,0 +1,15 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "0000010000000000", + v: "50c30000000000002321027a46eb513588b01b37ea24303f4b628afd12cc20df789fede0921e43cad3e875ac", + ), + KV( + k: "0000010000000001", + v: "d43000000000000017a9147d46a730d31f97b1930d3368a967c309bd4d136a87", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@mainnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@mainnet_2.snap new file mode 100644 index 00000000000..1fab1427748 --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@mainnet_2.snap @@ -0,0 +1,23 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "0000010000000000", + v: "50c30000000000002321027a46eb513588b01b37ea24303f4b628afd12cc20df789fede0921e43cad3e875ac", + ), + KV( + k: "0000010000000001", + v: "d43000000000000017a9147d46a730d31f97b1930d3368a967c309bd4d136a87", + ), + KV( + k: "0000020000000000", + v: "a0860100000000002321027a46eb513588b01b37ea24303f4b628afd12cc20df789fede0921e43cad3e875ac", + ), + KV( + k: "0000020000000001", + v: "a86100000000000017a9147d46a730d31f97b1930d3368a967c309bd4d136a87", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@testnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@testnet_1.snap new file mode 100644 index 00000000000..143723d5399 --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@testnet_1.snap @@ -0,0 +1,15 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "0000010000000000", + v: "50c30000000000002321025229e1240a21004cf8338db05679fa34753706e84f6aebba086ba04317fd8f99ac", + ), + KV( + k: "0000010000000001", + v: "d43000000000000017a914ef775f1f997f122a062fff1a2d7443abd1f9c64287", + ), +] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@testnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@testnet_2.snap new file mode 100644 index 00000000000..216474dcb93 --- /dev/null +++ b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_out_loc_raw_data@testnet_2.snap @@ -0,0 +1,23 @@ +--- +source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs +assertion_line: 144 +expression: cf_data +--- +[ + KV( + k: "0000010000000000", + v: "50c30000000000002321025229e1240a21004cf8338db05679fa34753706e84f6aebba086ba04317fd8f99ac", + ), + KV( + k: "0000010000000001", + v: "d43000000000000017a914ef775f1f997f122a062fff1a2d7443abd1f9c64287", + ), + KV( + k: "0000020000000000", + v: "a086010000000000232102acce9f6c16986c525fd34759d851ef5b4b85b5019a57bd59747be0ef1ba62523ac", + ), + KV( + k: "0000020000000001", + v: "a86100000000000017a914ef775f1f997f122a062fff1a2d7443abd1f9c64287", + ), +] diff --git a/zebra-state/src/service/finalized_state/zebra_db/transparent.rs b/zebra-state/src/service/finalized_state/zebra_db/transparent.rs index 756189e2aae..d94c37a9d43 100644 --- a/zebra-state/src/service/finalized_state/zebra_db/transparent.rs +++ b/zebra-state/src/service/finalized_state/zebra_db/transparent.rs @@ -93,7 +93,7 @@ impl ZebraDb { &self, output_location: OutputLocation, ) -> Option { - let utxo_by_out_loc = self.db.cf_handle("utxo_by_outpoint").unwrap(); + let utxo_by_out_loc = self.db.cf_handle("utxo_by_out_loc").unwrap(); let output = self.db.zs_get(&utxo_by_out_loc, &output_location)?; @@ -421,7 +421,7 @@ impl DiskWriteBatch { new_outputs_by_out_loc: &BTreeMap, address_balances: &mut HashMap, ) -> Result<(), BoxError> { - let utxo_by_out_loc = db.cf_handle("utxo_by_outpoint").unwrap(); + let utxo_by_out_loc = db.cf_handle("utxo_by_out_loc").unwrap(); let utxo_loc_by_transparent_addr_loc = db.cf_handle("utxo_loc_by_transparent_addr_loc").unwrap(); let tx_loc_by_transparent_addr_loc = @@ -496,7 +496,7 @@ impl DiskWriteBatch { spent_utxos_by_out_loc: &BTreeMap, address_balances: &mut HashMap, ) -> Result<(), BoxError> { - let utxo_by_out_loc = db.cf_handle("utxo_by_outpoint").unwrap(); + let utxo_by_out_loc = db.cf_handle("utxo_by_out_loc").unwrap(); let utxo_loc_by_transparent_addr_loc = db.cf_handle("utxo_loc_by_transparent_addr_loc").unwrap(); From 3052833e5aa7fdfb104bc43910bce9c85c8fe449 Mon Sep 17 00:00:00 2001 From: Marek Date: Fri, 17 Jun 2022 19:21:28 +0200 Subject: [PATCH 4/9] Reorder the column families so that they match the docs --- zebra-state/src/service/finalized_state/disk_db.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zebra-state/src/service/finalized_state/disk_db.rs b/zebra-state/src/service/finalized_state/disk_db.rs index 7b859d771ea..d4951a6666b 100644 --- a/zebra-state/src/service/finalized_state/disk_db.rs +++ b/zebra-state/src/service/finalized_state/disk_db.rs @@ -368,15 +368,19 @@ impl DiskDb { let column_families = vec![ // Blocks - rocksdb::ColumnFamilyDescriptor::new("block_header_by_height", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new("hash_by_height", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new("height_by_hash", db_options.clone()), + rocksdb::ColumnFamilyDescriptor::new("block_header_by_height", db_options.clone()), // Transactions rocksdb::ColumnFamilyDescriptor::new("tx_by_loc", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new("hash_by_tx_loc", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new("tx_loc_by_hash", db_options.clone()), // Transparent rocksdb::ColumnFamilyDescriptor::new("balance_by_transparent_addr", db_options.clone()), + rocksdb::ColumnFamilyDescriptor::new( + "tx_loc_by_transparent_addr_loc", + db_options.clone(), + ), // TODO: #3951 //rocksdb::ColumnFamilyDescriptor::new("tx_by_transparent_addr_loc", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new("utxo_by_out_loc", db_options.clone()), @@ -384,10 +388,6 @@ impl DiskDb { "utxo_loc_by_transparent_addr_loc", db_options.clone(), ), - rocksdb::ColumnFamilyDescriptor::new( - "tx_loc_by_transparent_addr_loc", - db_options.clone(), - ), // Sprout rocksdb::ColumnFamilyDescriptor::new("sprout_nullifiers", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new("sprout_anchors", db_options.clone()), From 89f4f4e1379769da32cd6ced0d132f9729b71a52 Mon Sep 17 00:00:00 2001 From: Marek Date: Fri, 17 Jun 2022 19:45:58 +0200 Subject: [PATCH 5/9] Update `struct Chain` in the RFCs --- book/src/dev/rfcs/0005-state-updates.md | 98 +++++++++++++++++++++---- 1 file changed, 84 insertions(+), 14 deletions(-) diff --git a/book/src/dev/rfcs/0005-state-updates.md b/book/src/dev/rfcs/0005-state-updates.md index 72dedf0ac67..e47245ad175 100644 --- a/book/src/dev/rfcs/0005-state-updates.md +++ b/book/src/dev/rfcs/0005-state-updates.md @@ -268,20 +268,90 @@ is completely empty. The `Chain` type is defined by the following struct and API: ```rust -#[derive(Debug, Default, Clone)] -struct Chain { - blocks: BTreeMap>, - height_by_hash: HashMap, - tx_loc_by_hash: HashMap, - - created_utxos: HashSet, - spent_utxos: HashSet, - sprout_anchors: HashSet, - sapling_anchors: HashSet, - sprout_nullifiers: HashSet, - sapling_nullifiers: HashSet, - orchard_nullifiers: HashSet, - partial_cumulative_work: PartialCumulativeWork, +#[derive(Debug, Clone)] +pub struct Chain { + // The function `eq_internal_state` must be updated every time a field is added to [`Chain`]. + /// The configured network for this chain. + network: Network, + + /// The contextually valid blocks which form this non-finalized partial chain, in height order. + pub(crate) blocks: BTreeMap, + + /// An index of block heights for each block hash in `blocks`. + pub height_by_hash: HashMap, + + /// An index of [`TransactionLocation`]s for each transaction hash in `blocks`. + pub tx_loc_by_hash: HashMap, + + /// The [`transparent::Utxo`]s created by `blocks`. + /// + /// Note that these UTXOs may not be unspent. + /// Outputs can be spent by later transactions or blocks in the chain. + // + // TODO: replace OutPoint with OutputLocation? + pub(crate) created_utxos: HashMap, + /// The [`transparent::OutPoint`]s spent by `blocks`, + /// including those created by earlier transactions or blocks in the chain. + pub(crate) spent_utxos: HashSet, + + /// The Sprout note commitment tree of the tip of this [`Chain`], + /// including all finalized notes, and the non-finalized notes in this chain. + pub(super) sprout_note_commitment_tree: sprout::tree::NoteCommitmentTree, + /// The Sprout note commitment tree for each anchor. + /// This is required for interstitial states. + pub(crate) sprout_trees_by_anchor: + HashMap, + /// The Sapling note commitment tree of the tip of this [`Chain`], + /// including all finalized notes, and the non-finalized notes in this chain. + pub(super) sapling_note_commitment_tree: sapling::tree::NoteCommitmentTree, + /// The Sapling note commitment tree for each height. + pub(crate) sapling_trees_by_height: BTreeMap, + /// The Orchard note commitment tree of the tip of this [`Chain`], + /// including all finalized notes, and the non-finalized notes in this chain. + pub(super) orchard_note_commitment_tree: orchard::tree::NoteCommitmentTree, + /// The Orchard note commitment tree for each height. + pub(crate) orchard_trees_by_height: BTreeMap, + /// The ZIP-221 history tree of the tip of this [`Chain`], + /// including all finalized blocks, and the non-finalized `blocks` in this chain. + pub(crate) history_tree: HistoryTree, + + /// The Sprout anchors created by `blocks`. + pub(crate) sprout_anchors: MultiSet, + /// The Sprout anchors created by each block in `blocks`. + pub(crate) sprout_anchors_by_height: BTreeMap, + /// The Sapling anchors created by `blocks`. + pub(crate) sapling_anchors: MultiSet, + /// The Sapling anchors created by each block in `blocks`. + pub(crate) sapling_anchors_by_height: BTreeMap, + /// The Orchard anchors created by `blocks`. + pub(crate) orchard_anchors: MultiSet, + /// The Orchard anchors created by each block in `blocks`. + pub(crate) orchard_anchors_by_height: BTreeMap, + + /// The Sprout nullifiers revealed by `blocks`. + pub(super) sprout_nullifiers: HashSet, + /// The Sapling nullifiers revealed by `blocks`. + pub(super) sapling_nullifiers: HashSet, + /// The Orchard nullifiers revealed by `blocks`. + pub(super) orchard_nullifiers: HashSet, + + /// Partial transparent address index data from `blocks`. + pub(super) partial_transparent_transfers: HashMap, + + /// The cumulative work represented by `blocks`. + /// + /// Since the best chain is determined by the largest cumulative work, + /// the work represented by finalized blocks can be ignored, + /// because they are common to all non-finalized chains. + pub(super) partial_cumulative_work: PartialCumulativeWork, + + /// The chain value pool balances of the tip of this [`Chain`], + /// including the block value pool changes from all finalized blocks, + /// and the non-finalized blocks in this chain. + /// + /// When a new chain is created from the finalized tip, + /// it is initialized with the finalized tip chain value pool balances. + pub(crate) chain_value_pools: ValueBalance, } ``` From 68f097f62a196fc61da28fcdfe2787f41c9207cd Mon Sep 17 00:00:00 2001 From: Marek Date: Fri, 17 Jun 2022 19:48:55 +0200 Subject: [PATCH 6/9] Increment `DATABASE_FORMAT_VERSION` to 25 --- zebra-state/src/constants.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra-state/src/constants.rs b/zebra-state/src/constants.rs index 55a92ded64b..956306201d5 100644 --- a/zebra-state/src/constants.rs +++ b/zebra-state/src/constants.rs @@ -18,7 +18,7 @@ pub use zebra_chain::transparent::MIN_TRANSPARENT_COINBASE_MATURITY; pub const MAX_BLOCK_REORG_HEIGHT: u32 = MIN_TRANSPARENT_COINBASE_MATURITY - 1; /// The database format version, incremented each time the database format changes. -pub const DATABASE_FORMAT_VERSION: u32 = 24; +pub const DATABASE_FORMAT_VERSION: u32 = 25; /// The maximum number of blocks to check for NU5 transactions, /// before we assume we are on a pre-NU5 legacy chain. From 41501306409537d99ef83d04b1fbbc4cd5120e11 Mon Sep 17 00:00:00 2001 From: Marek Date: Mon, 20 Jun 2022 15:41:49 +0200 Subject: [PATCH 7/9] Remove obsolete docs from `0004-asynchronous-script-verification.md` --- .../rfcs/0004-asynchronous-script-verification.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/book/src/dev/rfcs/0004-asynchronous-script-verification.md b/book/src/dev/rfcs/0004-asynchronous-script-verification.md index dd94072f1eb..23800002119 100644 --- a/book/src/dev/rfcs/0004-asynchronous-script-verification.md +++ b/book/src/dev/rfcs/0004-asynchronous-script-verification.md @@ -422,18 +422,3 @@ cleaner and the cost is probably not too large. - We need to pick a timeout for UTXO lookup. This should be long enough to account for the fact that we may start verifying blocks before all of their ancestors are downloaded. - -These optimisations can be delayed until after the initial implementation is -complete, and covered by tests: - - - -- Should we stop storing heights for non-coinbase UTXOs? (#2455) - -- Should we avoid storing any extra data for UTXOs, and just lookup the coinbase - flag and height using `outpoint.hash` and `tx_loc_by_hash`? (#2455) - -- The maturity check can be skipped for UTXOs from the finalized state, -because Zebra only finalizes mature UTXOs. We could implement this -optimisation by adding a `Utxo::MatureCoinbase { output: transparent::Output }` -variant, which only performs the spend checks. (#2455) From 615a89f2604c3b9424176a87479766810a75fadc Mon Sep 17 00:00:00 2001 From: Marek Date: Mon, 20 Jun 2022 15:44:12 +0200 Subject: [PATCH 8/9] Remove an obsolete `TODO` from `disk_db.rs` --- zebra-state/src/service/finalized_state/disk_db.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/zebra-state/src/service/finalized_state/disk_db.rs b/zebra-state/src/service/finalized_state/disk_db.rs index d4951a6666b..6c45568ff61 100644 --- a/zebra-state/src/service/finalized_state/disk_db.rs +++ b/zebra-state/src/service/finalized_state/disk_db.rs @@ -381,8 +381,6 @@ impl DiskDb { "tx_loc_by_transparent_addr_loc", db_options.clone(), ), - // TODO: #3951 - //rocksdb::ColumnFamilyDescriptor::new("tx_by_transparent_addr_loc", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new("utxo_by_out_loc", db_options.clone()), rocksdb::ColumnFamilyDescriptor::new( "utxo_loc_by_transparent_addr_loc", From d99d7bfb4a507cff9fc808c8871835e276f1a01f Mon Sep 17 00:00:00 2001 From: Marek Date: Mon, 20 Jun 2022 17:26:33 +0200 Subject: [PATCH 9/9] Delete unused snapshots --- .../block_by_height_raw_data@mainnet_0.snap | 10 --------- .../block_by_height_raw_data@mainnet_1.snap | 14 ------------ .../block_by_height_raw_data@mainnet_2.snap | 18 --------------- .../block_by_height_raw_data@testnet_0.snap | 10 --------- .../block_by_height_raw_data@testnet_1.snap | 14 ------------ .../block_by_height_raw_data@testnet_2.snap | 18 --------------- .../tx_by_hash_raw_data@mainnet_0.snap | 10 --------- .../tx_by_hash_raw_data@mainnet_1.snap | 14 ------------ .../tx_by_hash_raw_data@mainnet_2.snap | 18 --------------- .../tx_by_hash_raw_data@testnet_0.snap | 10 --------- .../tx_by_hash_raw_data@testnet_1.snap | 14 ------------ .../tx_by_hash_raw_data@testnet_2.snap | 18 --------------- .../utxo_by_outpoint_raw_data@mainnet_1.snap | 14 ------------ .../utxo_by_outpoint_raw_data@mainnet_2.snap | 22 ------------------- .../utxo_by_outpoint_raw_data@testnet_1.snap | 14 ------------ .../utxo_by_outpoint_raw_data@testnet_2.snap | 22 ------------------- 16 files changed, 240 deletions(-) delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_0.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_1.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_2.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_0.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_1.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_2.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_0.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_1.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_2.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_0.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_1.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_2.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@mainnet_1.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@mainnet_2.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@testnet_1.snap delete mode 100644 zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@testnet_2.snap diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_0.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_0.snap deleted file mode 100644 index 7fe345a56f8..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_0.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "000000", - v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4000000000000000000000000000000000000000000000000000000000000000090041358ffff071f5712000000000000000000000000000000000000000000000000000000000000fd4005000a889f00854b8665cd555f4656f68179d31ccadc1b1f7fb0952726313b16941da348284d67add4686121d4e3d930160c1348d8191c25f12b267a6a9c131b5031cbf8af1f79c9d513076a216ec87ed045fa966e01214ed83ca02dc1797270a454720d3206ac7d931a0a680c5c5e099057592570ca9bdf6058343958b31901fce1a15a4f38fd347750912e14004c73dfe588b903b6c03166582eeaf30529b14072a7b3079e3a684601b9b3024054201f7440b0ee9eb1a7120ff43f713735494aa27b1f8bab60d7f398bca14f6abb2adbf29b04099121438a7974b078a11635b594e9170f1086140b4173822dd697894483e1c6b4e8b8dcd5cb12ca4903bc61e108871d4d915a9093c18ac9b02b6716ce1013ca2c1174e319c1a570215bc9ab5f7564765f7be20524dc3fdf8aa356fd94d445e05ab165ad8bb4a0db096c097618c81098f91443c719416d39837af6de85015dca0de89462b1d8386758b2cf8a99e00953b308032ae44c35e05eb71842922eb69797f68813b59caf266cb6c213569ae3280505421a7e3a0a37fdf8e2ea354fc5422816655394a9454bac542a9298f176e211020d63dee6852c40de02267e2fc9d5e1ff2ad9309506f02a1a71a0501b16d0d36f70cdfd8de78116c0c506ee0b8ddfdeb561acadf31746b5a9dd32c21930884397fb1682164cb565cc14e089d66635a32618f7eb05fe05082b8a3fae620571660a6b89886eac53dec109d7cbb6930ca698a168f301a950be152da1be2b9e07516995e20baceebecb5579d7cdbc16d09f3a50cb3c7dffe33f26686d4ff3f8946ee6475e98cf7b3cf9062b6966e838f865ff3de5fb064a37a21da7bb8dfd2501a29e184f207caaba364f36f2329a77515dcb710e29ffbf73e2bbd773fab1f9a6b005567affff605c132e4e4dd69f36bd201005458cfbd2c658701eb2a700251cefd886b1e674ae816d3f719bac64be649c172ba27a4fd55947d95d53ba4cbc73de97b8af5ed4840b659370c556e7376457f51e5ebb66018849923db82c1c9a819f173cccdb8f3324b239609a300018d0fb094adf5bd7cbb3834c69e6d0b3798065c525b20f040e965e1a161af78ff7561cd874f5f1b75aa0bc77f720589e1b810f831eac5073e6dd46d00a2793f70f7427f0f798f2f53a67e615e65d356e66fe40609a958a05edb4c175bcc383ea0530e67ddbe479a898943c6e3074c6fcc252d6014de3a3d292b03f0d88d312fe221be7be7e3c59d07fa0f2f4029e364f1f355c5d01fa53770d0cd76d82bf7e60f6903bc1beb772e6fde4a70be51d9c7e03c8d6d8dfb361a234ba47c470fe630820bbd920715621b9fbedb49fcee165ead0875e6c2b1af16f50b5d6140cc981122fcbcf7c5a4e3772b3661b628e08380abc545957e59f634705b1bbde2f0b4e055a5ec5676d859be77e20962b645e051a880fddb0180b4555789e1f9344a436a84dc5579e2553f1e5fb0a599c137be36cabbed0319831fea3fddf94ddc7971e4bcf02cdc93294a9aab3e3b13e3b058235b4f4ec06ba4ceaa49d675b4ba80716f3bc6976b1fbf9c8bf1f3e3a4dc1cd83ef9cf816667fb94f1e923ff63fef072e6a19321e4812f96cb0ffa864da50ad74deb76917a336f31dce03ed5f0303aad5e6a83634f9fcc371096f8288b8f02ddded5ff1bb9d49331e4a84dbe1543164438fde9ad71dab024779dcdde0b6602b5ae0a6265c14b94edd83b37403f4b78fcd2ed555b596402c28ee81d87a909c4e8722b30c71ecdd861b05f61f8b1231795c76adba2fdefa451b283a5d527955b9f3de1b9828e7b2e74123dd47062ddcc09b05e7fa13cb2212a6fdbc65d7e852cec463ec6fd929f5b8483cf3052113b13dac91b69f49d1b7d1aec01c4a68e41ce157", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_1.snap deleted file mode 100644 index 5ddd398fcdc..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_1.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "000000", - v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4000000000000000000000000000000000000000000000000000000000000000090041358ffff071f5712000000000000000000000000000000000000000000000000000000000000fd4005000a889f00854b8665cd555f4656f68179d31ccadc1b1f7fb0952726313b16941da348284d67add4686121d4e3d930160c1348d8191c25f12b267a6a9c131b5031cbf8af1f79c9d513076a216ec87ed045fa966e01214ed83ca02dc1797270a454720d3206ac7d931a0a680c5c5e099057592570ca9bdf6058343958b31901fce1a15a4f38fd347750912e14004c73dfe588b903b6c03166582eeaf30529b14072a7b3079e3a684601b9b3024054201f7440b0ee9eb1a7120ff43f713735494aa27b1f8bab60d7f398bca14f6abb2adbf29b04099121438a7974b078a11635b594e9170f1086140b4173822dd697894483e1c6b4e8b8dcd5cb12ca4903bc61e108871d4d915a9093c18ac9b02b6716ce1013ca2c1174e319c1a570215bc9ab5f7564765f7be20524dc3fdf8aa356fd94d445e05ab165ad8bb4a0db096c097618c81098f91443c719416d39837af6de85015dca0de89462b1d8386758b2cf8a99e00953b308032ae44c35e05eb71842922eb69797f68813b59caf266cb6c213569ae3280505421a7e3a0a37fdf8e2ea354fc5422816655394a9454bac542a9298f176e211020d63dee6852c40de02267e2fc9d5e1ff2ad9309506f02a1a71a0501b16d0d36f70cdfd8de78116c0c506ee0b8ddfdeb561acadf31746b5a9dd32c21930884397fb1682164cb565cc14e089d66635a32618f7eb05fe05082b8a3fae620571660a6b89886eac53dec109d7cbb6930ca698a168f301a950be152da1be2b9e07516995e20baceebecb5579d7cdbc16d09f3a50cb3c7dffe33f26686d4ff3f8946ee6475e98cf7b3cf9062b6966e838f865ff3de5fb064a37a21da7bb8dfd2501a29e184f207caaba364f36f2329a77515dcb710e29ffbf73e2bbd773fab1f9a6b005567affff605c132e4e4dd69f36bd201005458cfbd2c658701eb2a700251cefd886b1e674ae816d3f719bac64be649c172ba27a4fd55947d95d53ba4cbc73de97b8af5ed4840b659370c556e7376457f51e5ebb66018849923db82c1c9a819f173cccdb8f3324b239609a300018d0fb094adf5bd7cbb3834c69e6d0b3798065c525b20f040e965e1a161af78ff7561cd874f5f1b75aa0bc77f720589e1b810f831eac5073e6dd46d00a2793f70f7427f0f798f2f53a67e615e65d356e66fe40609a958a05edb4c175bcc383ea0530e67ddbe479a898943c6e3074c6fcc252d6014de3a3d292b03f0d88d312fe221be7be7e3c59d07fa0f2f4029e364f1f355c5d01fa53770d0cd76d82bf7e60f6903bc1beb772e6fde4a70be51d9c7e03c8d6d8dfb361a234ba47c470fe630820bbd920715621b9fbedb49fcee165ead0875e6c2b1af16f50b5d6140cc981122fcbcf7c5a4e3772b3661b628e08380abc545957e59f634705b1bbde2f0b4e055a5ec5676d859be77e20962b645e051a880fddb0180b4555789e1f9344a436a84dc5579e2553f1e5fb0a599c137be36cabbed0319831fea3fddf94ddc7971e4bcf02cdc93294a9aab3e3b13e3b058235b4f4ec06ba4ceaa49d675b4ba80716f3bc6976b1fbf9c8bf1f3e3a4dc1cd83ef9cf816667fb94f1e923ff63fef072e6a19321e4812f96cb0ffa864da50ad74deb76917a336f31dce03ed5f0303aad5e6a83634f9fcc371096f8288b8f02ddded5ff1bb9d49331e4a84dbe1543164438fde9ad71dab024779dcdde0b6602b5ae0a6265c14b94edd83b37403f4b78fcd2ed555b596402c28ee81d87a909c4e8722b30c71ecdd861b05f61f8b1231795c76adba2fdefa451b283a5d527955b9f3de1b9828e7b2e74123dd47062ddcc09b05e7fa13cb2212a6fdbc65d7e852cec463ec6fd929f5b8483cf3052113b13dac91b69f49d1b7d1aec01c4a68e41ce157", - ), - KV( - k: "000001", - v: "0400000008ce3d9731b000c08338455c8a4a6bd05da16e26b11daa1b917184ece80f04000946edb9c083c9942d92305444527765fad789c438c717783276a9f7fbf61b850000000000000000000000000000000000000000000000000000000000000000ac7a1358ffff071f7534e8cf161ff2e49d54bdb3bfbcde8cdbf2fc5963c9ec7d86aed4a67e975790fd4005002b2ee0d2f5d0c1ebf5a265b6f5b428f2fdc9aaea07078a6c5cab4f1bbfcd56489863deae6ea3fd8d3d0762e8e5295ff2670c9e90d8e8c68a54a40927e82a65e1d44ced20d835818e172d7b7f5ffe0245d0c3860a3f11af5658d68b6a7253b4684ffef5242fefa77a0bfc3437e8d94df9dc57510f5a128e676dd9ddf23f0ef75b460090f507499585541ab53a470c547ea02723d3a979930941157792c4362e42d3b9faca342a5c05a56909b046b5e92e2870fca7c932ae2c2fdd97d75b6e0ecb501701c1250246093c73efc5ec2838aeb80b59577741aa5ccdf4a631b79f70fc419e28714fa22108d991c29052b2f5f72294c355b57504369313470ecdd8e0ae97fc48e243a38c2ee7315bb05b7de9602047e97449c81e46746513221738dc729d7077a1771cea858865d85261e71e82003ccfbba2416358f023251206d6ef4c5596bc35b2b5bce3e9351798aa2c9904723034e5815c7512d260cc957df5db6adf9ed7272483312d1e68c60955a944e713355089876a704aef06359238f6de5a618f7bd0b4552ba72d05a6165e582f62d55ff2e1b76991971689ba3bee16a520fd85380a6e5a31de4dd4654d561101ce0ca390862d5774921eae2c284008692e9e08562144e8aa1f399a9d3fab0c4559c1f12bc945e626f7a89668613e8829767f4116ee9a4f832cf7c3ade3a7aba8cb04de39edd94d0d05093ed642adf9fbd9d373a80832ffd1c62034e4341546b3515f0e42e6d8570393c6754be5cdb7753b4709527d3f164aebf3d315934f7b3736a1b31052f6cc5699758950331163b3df05b9772e9bf99c8c77f8960e10a15edb06200106f45742d740c422c86b7e4f5a52d3732aa79ee54cfc92f76e03c268ae226477c19924e733caf95b8f350233a5312f4ed349d3ad76f032358f83a6d0d6f83b2a456742aad7f3e615fa72286300f0ea1c9793831ef3a5a4ae08640a6e32f53d1cba0be284b25e923d0d110ba227e54725632efcbbe17c05a9cde976504f6aece0c461b562cfae1b85d5f6782ee27b3e332ac0775f681682ce524b32889f1dc4231226f1aada0703beaf8d41732c9647a0a940a86f8a1be7f239c44fcaa7ed7a055506bdbe1df848f9e047226bee1b6d788a03f6e352eead99b419cfc41741942dbeb7a5c55788d5a3e636d8aab7b36b4db71d16700373bbc1cdeba8f9b1db10bf39a621bc737ea4f4e333698d6e09b51ac7a97fb6fd117ccad1d6b6b3a7451699d5bfe448650396d7b58867b3b0872be13ad0b43da267df0ad77025155f04e20c56d6a9befb3e9c7d23b82cbf3a534295ebda540682cc81be9273781b92519c858f9c25294fbacf75c3b3c15bda6d36de1c83336f93e96910dbdcb190d6ef123c98565ff6df1e903f57d4e4df167ba6b829d6d9713eb2126b0cf869940204137babcc6a1b7cb2f0b94318a7460e5d1a605c249bd2e72123ebad332332c18adcb285ed8874dbde084ebcd4f744465350d57110f037fffed1569d642c258749e65b0d13e117eaa37014a769b5ab479b7c77178880e77099f999abe712e543dbbf626ca9bcfddc42ff2f109d21c8bd464894e55ae504fdf81e1a7694180225da7dac8879abd1036cf26bb50532b8cf138b337a1a1bd1a43f8dd70b7399e2690c8e7a5a1fe099026b8f2a6f65fc0dbedda15ba65e0abd66c7176fb426980549892b4817de78e345a7aeab05744c3def4a2f283b4255b02c91c1af7354a368c67a11703c642a385c7453131ce3a78b24c5e22ab7e136a38498ce82082181884418cb4d6c2920f258a3ad20cfbe7104af1c6c6cb5e58bf29a9901721ad19c0a260cd09a3a772443a45aea4a5c439a95834ef5dc2e26343278947b7b796f796ae9bcadb29e2899a1d7313e6f7bfb6f8b", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_2.snap deleted file mode 100644 index d8414b39478..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@mainnet_2.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "000000", - v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4000000000000000000000000000000000000000000000000000000000000000090041358ffff071f5712000000000000000000000000000000000000000000000000000000000000fd4005000a889f00854b8665cd555f4656f68179d31ccadc1b1f7fb0952726313b16941da348284d67add4686121d4e3d930160c1348d8191c25f12b267a6a9c131b5031cbf8af1f79c9d513076a216ec87ed045fa966e01214ed83ca02dc1797270a454720d3206ac7d931a0a680c5c5e099057592570ca9bdf6058343958b31901fce1a15a4f38fd347750912e14004c73dfe588b903b6c03166582eeaf30529b14072a7b3079e3a684601b9b3024054201f7440b0ee9eb1a7120ff43f713735494aa27b1f8bab60d7f398bca14f6abb2adbf29b04099121438a7974b078a11635b594e9170f1086140b4173822dd697894483e1c6b4e8b8dcd5cb12ca4903bc61e108871d4d915a9093c18ac9b02b6716ce1013ca2c1174e319c1a570215bc9ab5f7564765f7be20524dc3fdf8aa356fd94d445e05ab165ad8bb4a0db096c097618c81098f91443c719416d39837af6de85015dca0de89462b1d8386758b2cf8a99e00953b308032ae44c35e05eb71842922eb69797f68813b59caf266cb6c213569ae3280505421a7e3a0a37fdf8e2ea354fc5422816655394a9454bac542a9298f176e211020d63dee6852c40de02267e2fc9d5e1ff2ad9309506f02a1a71a0501b16d0d36f70cdfd8de78116c0c506ee0b8ddfdeb561acadf31746b5a9dd32c21930884397fb1682164cb565cc14e089d66635a32618f7eb05fe05082b8a3fae620571660a6b89886eac53dec109d7cbb6930ca698a168f301a950be152da1be2b9e07516995e20baceebecb5579d7cdbc16d09f3a50cb3c7dffe33f26686d4ff3f8946ee6475e98cf7b3cf9062b6966e838f865ff3de5fb064a37a21da7bb8dfd2501a29e184f207caaba364f36f2329a77515dcb710e29ffbf73e2bbd773fab1f9a6b005567affff605c132e4e4dd69f36bd201005458cfbd2c658701eb2a700251cefd886b1e674ae816d3f719bac64be649c172ba27a4fd55947d95d53ba4cbc73de97b8af5ed4840b659370c556e7376457f51e5ebb66018849923db82c1c9a819f173cccdb8f3324b239609a300018d0fb094adf5bd7cbb3834c69e6d0b3798065c525b20f040e965e1a161af78ff7561cd874f5f1b75aa0bc77f720589e1b810f831eac5073e6dd46d00a2793f70f7427f0f798f2f53a67e615e65d356e66fe40609a958a05edb4c175bcc383ea0530e67ddbe479a898943c6e3074c6fcc252d6014de3a3d292b03f0d88d312fe221be7be7e3c59d07fa0f2f4029e364f1f355c5d01fa53770d0cd76d82bf7e60f6903bc1beb772e6fde4a70be51d9c7e03c8d6d8dfb361a234ba47c470fe630820bbd920715621b9fbedb49fcee165ead0875e6c2b1af16f50b5d6140cc981122fcbcf7c5a4e3772b3661b628e08380abc545957e59f634705b1bbde2f0b4e055a5ec5676d859be77e20962b645e051a880fddb0180b4555789e1f9344a436a84dc5579e2553f1e5fb0a599c137be36cabbed0319831fea3fddf94ddc7971e4bcf02cdc93294a9aab3e3b13e3b058235b4f4ec06ba4ceaa49d675b4ba80716f3bc6976b1fbf9c8bf1f3e3a4dc1cd83ef9cf816667fb94f1e923ff63fef072e6a19321e4812f96cb0ffa864da50ad74deb76917a336f31dce03ed5f0303aad5e6a83634f9fcc371096f8288b8f02ddded5ff1bb9d49331e4a84dbe1543164438fde9ad71dab024779dcdde0b6602b5ae0a6265c14b94edd83b37403f4b78fcd2ed555b596402c28ee81d87a909c4e8722b30c71ecdd861b05f61f8b1231795c76adba2fdefa451b283a5d527955b9f3de1b9828e7b2e74123dd47062ddcc09b05e7fa13cb2212a6fdbc65d7e852cec463ec6fd929f5b8483cf3052113b13dac91b69f49d1b7d1aec01c4a68e41ce157", - ), - KV( - k: "000001", - v: "0400000008ce3d9731b000c08338455c8a4a6bd05da16e26b11daa1b917184ece80f04000946edb9c083c9942d92305444527765fad789c438c717783276a9f7fbf61b850000000000000000000000000000000000000000000000000000000000000000ac7a1358ffff071f7534e8cf161ff2e49d54bdb3bfbcde8cdbf2fc5963c9ec7d86aed4a67e975790fd4005002b2ee0d2f5d0c1ebf5a265b6f5b428f2fdc9aaea07078a6c5cab4f1bbfcd56489863deae6ea3fd8d3d0762e8e5295ff2670c9e90d8e8c68a54a40927e82a65e1d44ced20d835818e172d7b7f5ffe0245d0c3860a3f11af5658d68b6a7253b4684ffef5242fefa77a0bfc3437e8d94df9dc57510f5a128e676dd9ddf23f0ef75b460090f507499585541ab53a470c547ea02723d3a979930941157792c4362e42d3b9faca342a5c05a56909b046b5e92e2870fca7c932ae2c2fdd97d75b6e0ecb501701c1250246093c73efc5ec2838aeb80b59577741aa5ccdf4a631b79f70fc419e28714fa22108d991c29052b2f5f72294c355b57504369313470ecdd8e0ae97fc48e243a38c2ee7315bb05b7de9602047e97449c81e46746513221738dc729d7077a1771cea858865d85261e71e82003ccfbba2416358f023251206d6ef4c5596bc35b2b5bce3e9351798aa2c9904723034e5815c7512d260cc957df5db6adf9ed7272483312d1e68c60955a944e713355089876a704aef06359238f6de5a618f7bd0b4552ba72d05a6165e582f62d55ff2e1b76991971689ba3bee16a520fd85380a6e5a31de4dd4654d561101ce0ca390862d5774921eae2c284008692e9e08562144e8aa1f399a9d3fab0c4559c1f12bc945e626f7a89668613e8829767f4116ee9a4f832cf7c3ade3a7aba8cb04de39edd94d0d05093ed642adf9fbd9d373a80832ffd1c62034e4341546b3515f0e42e6d8570393c6754be5cdb7753b4709527d3f164aebf3d315934f7b3736a1b31052f6cc5699758950331163b3df05b9772e9bf99c8c77f8960e10a15edb06200106f45742d740c422c86b7e4f5a52d3732aa79ee54cfc92f76e03c268ae226477c19924e733caf95b8f350233a5312f4ed349d3ad76f032358f83a6d0d6f83b2a456742aad7f3e615fa72286300f0ea1c9793831ef3a5a4ae08640a6e32f53d1cba0be284b25e923d0d110ba227e54725632efcbbe17c05a9cde976504f6aece0c461b562cfae1b85d5f6782ee27b3e332ac0775f681682ce524b32889f1dc4231226f1aada0703beaf8d41732c9647a0a940a86f8a1be7f239c44fcaa7ed7a055506bdbe1df848f9e047226bee1b6d788a03f6e352eead99b419cfc41741942dbeb7a5c55788d5a3e636d8aab7b36b4db71d16700373bbc1cdeba8f9b1db10bf39a621bc737ea4f4e333698d6e09b51ac7a97fb6fd117ccad1d6b6b3a7451699d5bfe448650396d7b58867b3b0872be13ad0b43da267df0ad77025155f04e20c56d6a9befb3e9c7d23b82cbf3a534295ebda540682cc81be9273781b92519c858f9c25294fbacf75c3b3c15bda6d36de1c83336f93e96910dbdcb190d6ef123c98565ff6df1e903f57d4e4df167ba6b829d6d9713eb2126b0cf869940204137babcc6a1b7cb2f0b94318a7460e5d1a605c249bd2e72123ebad332332c18adcb285ed8874dbde084ebcd4f744465350d57110f037fffed1569d642c258749e65b0d13e117eaa37014a769b5ab479b7c77178880e77099f999abe712e543dbbf626ca9bcfddc42ff2f109d21c8bd464894e55ae504fdf81e1a7694180225da7dac8879abd1036cf26bb50532b8cf138b337a1a1bd1a43f8dd70b7399e2690c8e7a5a1fe099026b8f2a6f65fc0dbedda15ba65e0abd66c7176fb426980549892b4817de78e345a7aeab05744c3def4a2f283b4255b02c91c1af7354a368c67a11703c642a385c7453131ce3a78b24c5e22ab7e136a38498ce82082181884418cb4d6c2920f258a3ad20cfbe7104af1c6c6cb5e58bf29a9901721ad19c0a260cd09a3a772443a45aea4a5c439a95834ef5dc2e26343278947b7b796f796ae9bcadb29e2899a1d7313e6f7bfb6f8b", - ), - KV( - k: "000002", - v: "040000008392336da29773c56b1649ab555156ceb7e700ad7c230ea7a4571c7e22bc0700f4b084a7c2fc5a5aa2985f2bcb1d4a9a65562a589d628b0d869c5f1c8dd074890000000000000000000000000000000000000000000000000000000000000000ca7a1358ffff071fa5556cd346010000000000000000000000000000000000000000000000000002fd4005005605e4490c2e7fc1acf199d7401e18ab8d2be4c843103a7ebdd34046d5514559e6ecbe29c00b9adf6f1aa49f1d63b9c20fd9bca4d9bbb381cb82f59cee9f387deb34ec4fd6b1e12f656a554bc21db88bd1560a033e64099c0bef439cdd6055aaa4f79c360ad37d1f1df1fbd35214e17fc5a0b3c0d272b1e693d6ba9e5e0ae71c6ff58545776838c18b756bf98a83a6b9739b4dec356117b2b227f6f6ea3f04fd854aadf27b40b302d3fa50719aa02f99c2003b51eab8c64cfd145117054dcadb604ba65a8854a095bd9f02884a65225baf0547a7ee44882b11343d40b1a6511cbc4db1d2fd840a8cd63610d29c47bd5c920fe13c349d1044185cd40854f8e60a212d59e1fe281e8bd1343a682e95f3ea23fb5ca83f9913bbcb11232ffd7165ea4a475273df1f3bb53cb721548b28f772acf56060da5d26fab50c4f8b87781bf28843bea805340531a61f002b5aad9a0427b597af1a08659f1a7b4b6d69d53b13191cf35512bc3521359dda47911112d06ae5410281d918bf53049f8295f067f2b3794a90cc15358e294c6cbd7896108d7c897e4bf61aa72451a280cfce72e0515b8dc510a52743b7615b25ba2f13419d562f6148fa36132622953c0fb74ea0b4870f86ccc1ece9661b29516a2226ea16b7100dbeb718a674eedbbe9d23ab02fe1c634234f3c1275ae9d7f74c754c66dec0af7331fc1407075a06cba62098a9be09d24889e7d0a6cf77d875131fe1278e6fdea2bfd9423903e1cb4502edcef971c60b064d4d8a9703ff324574e3d0535a59ab091355185499545be1baffddf6c2b654e5c30e7e1291763fd70896217d91d876a9be914a8472fa292ea3cfdc4be84f4c645f62d8ccff990ac4f5c84e0775b147d1532e2d4f3a8fb92fda899280a3e42f2b927dbef872ec6058254eb20e2770efde7c57905e7741321e833533e0006344a4c6deb9a78e8496de1ae1464ef8367ae97714700e76658e2390cb9702d1413b333d7f04fb89dd09cefeb34e0ead616cd5d352a2f348758e0f5fc4220c6a0693acc90b8dcd7a372ecb688d86356c151d9703576af8e904adea9941d1a6296774ba62b4dae7bf0a078f740af040c584f0245ed2ffa351f0b550c8b80e192ba1a75eb40fc42d67b722ea04ea947ed53e831fe057153a8bd6897ddcd43cb558d2766fb05640ed0c1d14eae0739b11ec07e34f3ea6acbd9f807b9ea6476bda5964a9fca1819c854680f75857e57fbf3fc50e3f5b0d25cadadcd9b3428b85b70b95080c9423a836e9e9e2cbd485075a29452d65acf3d5762111d70a0fd389ac7214b96b11eb14ae48ff1e4930ea50d8261472fd8d04877af717b4d463c0d9a6cf397b5b91fb1a898b329c4b46b8c350e3c0122e186bc393fe6d361e117963d38e44e0ccf1c45f33440aaebd8f99ad7b019c6411bb070178fb6b76e085e3bdae4c883f1f4112e7db91c519c48769fe96f56350cc8687679747730f0aad3bc58b78f87d162104beee449e55eab45558241f32cb5a0f30fea0f38632adfc8a2b7292ff89641581bb6e0111af26dad9199596ce8d432e6f7d0a7415aacc473acfb8af68c9c6ef8b60c535da095cd3a02598fd82fe20481dc87bf6ed25fb95633dc7ff8bcf3f81c323546084170e567536b5c4ce9392ae1dc1f201d732134597e3c9353416fa40ff8f2628815e9b980f27a9c05adefa779ef1a35fdfe6423e9f671677311971bd91d9aeb6adf4c45769d07df7a24955f4082730fb0d3f6467472f75add86b827a7b664005931130029553fdb62ad9ffdb64b44701c0d94e7c5f5ba2340e641d9e34737e29b47e619659f458a161648c9fb81dddbcc73f1eebc92fd7f7b70356635f0de19912d82c9a978c2750aacbfbeee3ab62e96f7df7ce918fa3", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_0.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_0.snap deleted file mode 100644 index 6be07b222ef..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_0.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "000000", - v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac40000000000000000000000000000000000000000000000000000000000000000a11e1358ffff07200600000000000000000000000000000000000000000000000000000000000000fd400500a6a51259c3f6732481e2d035197218b7a69504461d04335503cd69759b2d02bd2b53a9653f42cb33c608511c953673fa9da76170958115fe92157ad3bb5720d927f18e09459bf5c6072973e143e20f9bdf0584058c96b7c2234c7565f100d5eea083ba5d3dbaff9f0681799a113e7beff4a611d2b49590563109962baa149b628aae869af791f2f70bb041bd7ebfa658570917f6654a142b05e7ec0289a4f46470be7be5f693b90173eaaa6e84907170f32602204f1f4e1c04b1830116ffd0c54f0b1caa9a5698357bd8aa1f5ac8fc93b405265d824ba0e49f69dab5446653927298e6b7bdc61ee86ff31c07bde86331b4e500d42e4e50417e285502684b7966184505b885b42819a88469d1e9cf55072d7f3510f85580db689302eab377e4e11b14a91fdd0df7627efc048934f0aff8e7eb77eb17b3a95de13678004f2512293891d8baf8dde0ef69be520a58bbd6038ce899c9594cf3e30b8c3d9c7ecc832d4c19a6212747b50724e6f70f6451f78fd27b58ce43ca33b1641304a916186cfbe7dbca224f55d08530ba851e4df22baf7ab7078e9cbea46c0798b35a750f54103b0cdd08c81a6505c4932f6bfbd492a9fced31d54e98b6370d4c96600552fcf5b37780ed18c8787d03200963600db297a8f05dfa551321d17b9917edadcda51e274830749d133ad226f8bb6b94f13b4f77e67b35b71f52112ce9ba5da706ad9573584a2570a4ff25d29ab9761a06bdcf2c33638bf9baf2054825037881c14adf3816ba0cbd0fca689aad3ce16f2fe362c98f48134a9221765d939f0b49677d1c2447e56b46859f1810e2cf23e82a53e0d44f34dae932581b3b7f49eaec59af872cf9de757a964f7b33d143a36c270189508fcafe19398e4d2966948164d40556b05b7ff532f66f5d1edc41334ef742f78221dfe0c7ae2275bb3f24c89ae35f00afeea4e6ed187b866b209dc6e83b660593fce7c40e143beb07ac86c56f39e895385924667efe3a3f031938753c7764a2dbeb0a643fd359c46e614873fd0424e435fa7fac083b9a41a9d6bf7e284eee537ea7c50dd239f359941a43dc982745184bf3ee31a8dc850316aa9c6b66d6985acee814373be3458550659e1a06287c3b3b76a185c5cb93e38c1eebcf34ff072894b6430aed8d34122dafd925c46a515cca79b0269c92b301890ca6b0dc8b679cdac0f23318c105de73d7a46d16d2dad988d49c22e9963c117960bdc70ef0db6b091cf09445a516176b7f6d58ec29539166cc8a38bbff387acefffab2ea5faad0e8bb70625716ef0edf61940733c25993ea3de9f0be23d36e7cb8da10505f9dc426cd0e6e5b173ab4fff8c37e1f1fb56d1ea372013d075e0934c6919393cfc21395eea20718fad03542a4162a9ded66c814ad8320b2d7c2da3ecaf206da34c502db2096d1c46699a91dd1c432f019ad434e2c1ce507f91104f66f491fed37b225b8e0b2888c37276cfa0468fc13b8d593fd9a2675f0f5b20b8a15f8fa7558176a530d6865738ddb25d3426dab905221681cf9da0e0200eea5b2eba3ad3a5237d2a391f9074bf1779a2005cee43eec2b058511532635e0fea61664f531ac2b356f40db5c5d275a4cf5c82d468976455af4e3362cc8f71aa95e71d394aff3ead6f7101279f95bcd8a0fedce1d21cb3c9f6dd3b182fce0db5d6712981b651f29178a24119968b14783cafa713bc5f2a65205a42e4ce9dc7ba462bdb1f3e4553afc15f5f39998fdb53e7e231e3e520a46943734a007c2daa1eda9f495791657eefcac5c32833936e568d06187857ed04d7b97167ae207c5c5ae54e528c36016a984235e9c5b2f0718d7b3aa93c7822ccc772580b6599671b3c02ece8a21399abd33cfd3028790133167d0a97e7de53dc8ff", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_1.snap deleted file mode 100644 index 406ec0865f7..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_1.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "000000", - v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac40000000000000000000000000000000000000000000000000000000000000000a11e1358ffff07200600000000000000000000000000000000000000000000000000000000000000fd400500a6a51259c3f6732481e2d035197218b7a69504461d04335503cd69759b2d02bd2b53a9653f42cb33c608511c953673fa9da76170958115fe92157ad3bb5720d927f18e09459bf5c6072973e143e20f9bdf0584058c96b7c2234c7565f100d5eea083ba5d3dbaff9f0681799a113e7beff4a611d2b49590563109962baa149b628aae869af791f2f70bb041bd7ebfa658570917f6654a142b05e7ec0289a4f46470be7be5f693b90173eaaa6e84907170f32602204f1f4e1c04b1830116ffd0c54f0b1caa9a5698357bd8aa1f5ac8fc93b405265d824ba0e49f69dab5446653927298e6b7bdc61ee86ff31c07bde86331b4e500d42e4e50417e285502684b7966184505b885b42819a88469d1e9cf55072d7f3510f85580db689302eab377e4e11b14a91fdd0df7627efc048934f0aff8e7eb77eb17b3a95de13678004f2512293891d8baf8dde0ef69be520a58bbd6038ce899c9594cf3e30b8c3d9c7ecc832d4c19a6212747b50724e6f70f6451f78fd27b58ce43ca33b1641304a916186cfbe7dbca224f55d08530ba851e4df22baf7ab7078e9cbea46c0798b35a750f54103b0cdd08c81a6505c4932f6bfbd492a9fced31d54e98b6370d4c96600552fcf5b37780ed18c8787d03200963600db297a8f05dfa551321d17b9917edadcda51e274830749d133ad226f8bb6b94f13b4f77e67b35b71f52112ce9ba5da706ad9573584a2570a4ff25d29ab9761a06bdcf2c33638bf9baf2054825037881c14adf3816ba0cbd0fca689aad3ce16f2fe362c98f48134a9221765d939f0b49677d1c2447e56b46859f1810e2cf23e82a53e0d44f34dae932581b3b7f49eaec59af872cf9de757a964f7b33d143a36c270189508fcafe19398e4d2966948164d40556b05b7ff532f66f5d1edc41334ef742f78221dfe0c7ae2275bb3f24c89ae35f00afeea4e6ed187b866b209dc6e83b660593fce7c40e143beb07ac86c56f39e895385924667efe3a3f031938753c7764a2dbeb0a643fd359c46e614873fd0424e435fa7fac083b9a41a9d6bf7e284eee537ea7c50dd239f359941a43dc982745184bf3ee31a8dc850316aa9c6b66d6985acee814373be3458550659e1a06287c3b3b76a185c5cb93e38c1eebcf34ff072894b6430aed8d34122dafd925c46a515cca79b0269c92b301890ca6b0dc8b679cdac0f23318c105de73d7a46d16d2dad988d49c22e9963c117960bdc70ef0db6b091cf09445a516176b7f6d58ec29539166cc8a38bbff387acefffab2ea5faad0e8bb70625716ef0edf61940733c25993ea3de9f0be23d36e7cb8da10505f9dc426cd0e6e5b173ab4fff8c37e1f1fb56d1ea372013d075e0934c6919393cfc21395eea20718fad03542a4162a9ded66c814ad8320b2d7c2da3ecaf206da34c502db2096d1c46699a91dd1c432f019ad434e2c1ce507f91104f66f491fed37b225b8e0b2888c37276cfa0468fc13b8d593fd9a2675f0f5b20b8a15f8fa7558176a530d6865738ddb25d3426dab905221681cf9da0e0200eea5b2eba3ad3a5237d2a391f9074bf1779a2005cee43eec2b058511532635e0fea61664f531ac2b356f40db5c5d275a4cf5c82d468976455af4e3362cc8f71aa95e71d394aff3ead6f7101279f95bcd8a0fedce1d21cb3c9f6dd3b182fce0db5d6712981b651f29178a24119968b14783cafa713bc5f2a65205a42e4ce9dc7ba462bdb1f3e4553afc15f5f39998fdb53e7e231e3e520a46943734a007c2daa1eda9f495791657eefcac5c32833936e568d06187857ed04d7b97167ae207c5c5ae54e528c36016a984235e9c5b2f0718d7b3aa93c7822ccc772580b6599671b3c02ece8a21399abd33cfd3028790133167d0a97e7de53dc8ff", - ), - KV( - k: "000001", - v: "04000000382c4a332661c7ed0671f32a34d724619f086c61873bce7c99859dd9920aa605755f7c7d27a811596e9fae6dd30ca45be86e901d499909de35b6ff1f699f7ef30000000000000000000000000000000000000000000000000000000000000000e9851358ffff0720000056c2264c31261d597c6fcea7c5e00160cf6be1cd89ca96a0389473e50000fd40050053f4438864bc5d6dfc009d4bba545ac5e5feaaf46f9455b975b02115f842a966e26517ce678f1c074d09cc8d0049a190859eb505af5f3e760312fbbe54da115db2bc03c96408f39b679891790b539d2d9d17a801dc6af9af14ca3f6ba060edce2a1dd45aa45f11fe37dbaf1eb2647ae7c393f6680c3d5d7e53687e34530f48edf58924a04d3e0231c150b1c8218998f674bc171edd222bcb4ac4ba4ea52d7baa86399f371d5284043e1e166f9069dd0f2904ff94c7922a70fa7c660e0553cc40a20d9ee08eb3f47278485801ddae9c270411360773f0b74e03db2d92c50952c9bd4924bbca2a260e1235e99df51fe71e75744232f2d641ef94f394110a5ad05f51a057e4cb515b92c16cb1404a8cdcc43d4a4bb2caa54ca35dccf41aa7d832da65123b7029223c46ed2a13387d598d445435d3cb32fdad9e27672903864c90d86353b162033078327b5b7aaffc89b40096ae004f2d5c6bd2c99188574348518db66e9b6020f93f12ee1c06f7b00fe346fefceaffb1da9e3cdf08285057f549733eb10825737fcd1431bfdfb155f323f24e95a869212baacf445b30f2670206645779110e6547d5da90a5f2fe5151da911d5ecd5a833023661d1356b6c395d85968947678d53efd4db7b06f23b21125e74492644277ea0c1131b80d6a4e3e8093b82332556fbb3255a55ac3f0b7e4844c0e12bf577c37fd02323ae5ef4781772ed501d63b568032a3d31576c5104a48c01ac54f715286932351a8adc8cf2467a84a0572e99f366ee00f82c3735545fd4bb941d591ce70070425a81304272db89887949bc7dd8236bb7e82190f9815da938cd6e8fec7660e91354326a7a9bfe38120e97997fca3c289d54513ed00286c2b825fbe84f91a39528f335674b5e957425a6edfdd00f2feb2c2df575616197998c1e964e069875d4d934f419a9b02b100848d023b76d47bd4e284c3895ef9227a40d8ea8826e86c7155d6aa95b8f9175812523a32cd611efc700688e03f7c245c5bff01718281b5d75cefe8318b2c08962236b14a0bf79534c203df735fd9cced97cbae07c2b4ee9cda8c9993f3f6277ff3fec261fb94d3961c4befe4b0893dcf67b312c7d8d6ff7adc8539cb2b1d3534fccf109efddd07a9f1e77b94ab1e505b164221dca1c34621b1e9d234c31a032a401267d95f65b800d579a2482638dfeade804149c81e95d7ef5510ac0b6212231506b1c635a2e1d2f0c9712989f9f246762fadb4c55c20f707dcc0e510a33e9465fc5d5bdbfa524dab0d7a1c6a1baaa36869cf542aa2257c5c44ef07547a570343442c6091e13bc04d559dc0e6db5b001861914bf956816edce2a86b274bd97f27e2dbb08608c16a3e5d8595952faa91fb162d7fa6a7a47e849a1ad8fab3ba620ee3295a04fe13e5fb655ac92ae60d01020b8999526af8d56b28733e69c9ffb285de27c61edc0bf62261ac0787eff347d0fcd62257301ede9603106ea41650a3e3119bd5c4e86a7f6a3f00934f3a545f7f21d41699f3e35d38cf925a8bdaf2bf7eedea11c31c3d8bf6c527c77c6378281cdf02211a58fa5e46d28d7e7c5fb79d69b31703fd752395da115845952cf99aaeb2155c2ab951a69f67d938f223185567e52cfa3e57b62c790bf78674c4b02c12b7d3225fe8f705b408ba11c24245b3924482e2f3480994461b550641a88cd941d371139f3498afacdcba1249631402b20695760eaada5376e68df0e45139c410700effc9420dc3726515e7fcb3f349320f30511451964bd9b6530682efec65910ceb548aa2ab05ac3309e803161697213631ae8e13cc7d223ac28446c1bf94a19a8782ac16ff57df7ee4f10fb6e488c02c68d6b6dee6987f6d2c39227da366c59f54ff67e312ca530e7c467c3dc8", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_2.snap deleted file mode 100644 index bd58f0be7e7..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/block_by_height_raw_data@testnet_2.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "000000", - v: "040000000000000000000000000000000000000000000000000000000000000000000000db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac40000000000000000000000000000000000000000000000000000000000000000a11e1358ffff07200600000000000000000000000000000000000000000000000000000000000000fd400500a6a51259c3f6732481e2d035197218b7a69504461d04335503cd69759b2d02bd2b53a9653f42cb33c608511c953673fa9da76170958115fe92157ad3bb5720d927f18e09459bf5c6072973e143e20f9bdf0584058c96b7c2234c7565f100d5eea083ba5d3dbaff9f0681799a113e7beff4a611d2b49590563109962baa149b628aae869af791f2f70bb041bd7ebfa658570917f6654a142b05e7ec0289a4f46470be7be5f693b90173eaaa6e84907170f32602204f1f4e1c04b1830116ffd0c54f0b1caa9a5698357bd8aa1f5ac8fc93b405265d824ba0e49f69dab5446653927298e6b7bdc61ee86ff31c07bde86331b4e500d42e4e50417e285502684b7966184505b885b42819a88469d1e9cf55072d7f3510f85580db689302eab377e4e11b14a91fdd0df7627efc048934f0aff8e7eb77eb17b3a95de13678004f2512293891d8baf8dde0ef69be520a58bbd6038ce899c9594cf3e30b8c3d9c7ecc832d4c19a6212747b50724e6f70f6451f78fd27b58ce43ca33b1641304a916186cfbe7dbca224f55d08530ba851e4df22baf7ab7078e9cbea46c0798b35a750f54103b0cdd08c81a6505c4932f6bfbd492a9fced31d54e98b6370d4c96600552fcf5b37780ed18c8787d03200963600db297a8f05dfa551321d17b9917edadcda51e274830749d133ad226f8bb6b94f13b4f77e67b35b71f52112ce9ba5da706ad9573584a2570a4ff25d29ab9761a06bdcf2c33638bf9baf2054825037881c14adf3816ba0cbd0fca689aad3ce16f2fe362c98f48134a9221765d939f0b49677d1c2447e56b46859f1810e2cf23e82a53e0d44f34dae932581b3b7f49eaec59af872cf9de757a964f7b33d143a36c270189508fcafe19398e4d2966948164d40556b05b7ff532f66f5d1edc41334ef742f78221dfe0c7ae2275bb3f24c89ae35f00afeea4e6ed187b866b209dc6e83b660593fce7c40e143beb07ac86c56f39e895385924667efe3a3f031938753c7764a2dbeb0a643fd359c46e614873fd0424e435fa7fac083b9a41a9d6bf7e284eee537ea7c50dd239f359941a43dc982745184bf3ee31a8dc850316aa9c6b66d6985acee814373be3458550659e1a06287c3b3b76a185c5cb93e38c1eebcf34ff072894b6430aed8d34122dafd925c46a515cca79b0269c92b301890ca6b0dc8b679cdac0f23318c105de73d7a46d16d2dad988d49c22e9963c117960bdc70ef0db6b091cf09445a516176b7f6d58ec29539166cc8a38bbff387acefffab2ea5faad0e8bb70625716ef0edf61940733c25993ea3de9f0be23d36e7cb8da10505f9dc426cd0e6e5b173ab4fff8c37e1f1fb56d1ea372013d075e0934c6919393cfc21395eea20718fad03542a4162a9ded66c814ad8320b2d7c2da3ecaf206da34c502db2096d1c46699a91dd1c432f019ad434e2c1ce507f91104f66f491fed37b225b8e0b2888c37276cfa0468fc13b8d593fd9a2675f0f5b20b8a15f8fa7558176a530d6865738ddb25d3426dab905221681cf9da0e0200eea5b2eba3ad3a5237d2a391f9074bf1779a2005cee43eec2b058511532635e0fea61664f531ac2b356f40db5c5d275a4cf5c82d468976455af4e3362cc8f71aa95e71d394aff3ead6f7101279f95bcd8a0fedce1d21cb3c9f6dd3b182fce0db5d6712981b651f29178a24119968b14783cafa713bc5f2a65205a42e4ce9dc7ba462bdb1f3e4553afc15f5f39998fdb53e7e231e3e520a46943734a007c2daa1eda9f495791657eefcac5c32833936e568d06187857ed04d7b97167ae207c5c5ae54e528c36016a984235e9c5b2f0718d7b3aa93c7822ccc772580b6599671b3c02ece8a21399abd33cfd3028790133167d0a97e7de53dc8ff", - ), - KV( - k: "000001", - v: "04000000382c4a332661c7ed0671f32a34d724619f086c61873bce7c99859dd9920aa605755f7c7d27a811596e9fae6dd30ca45be86e901d499909de35b6ff1f699f7ef30000000000000000000000000000000000000000000000000000000000000000e9851358ffff0720000056c2264c31261d597c6fcea7c5e00160cf6be1cd89ca96a0389473e50000fd40050053f4438864bc5d6dfc009d4bba545ac5e5feaaf46f9455b975b02115f842a966e26517ce678f1c074d09cc8d0049a190859eb505af5f3e760312fbbe54da115db2bc03c96408f39b679891790b539d2d9d17a801dc6af9af14ca3f6ba060edce2a1dd45aa45f11fe37dbaf1eb2647ae7c393f6680c3d5d7e53687e34530f48edf58924a04d3e0231c150b1c8218998f674bc171edd222bcb4ac4ba4ea52d7baa86399f371d5284043e1e166f9069dd0f2904ff94c7922a70fa7c660e0553cc40a20d9ee08eb3f47278485801ddae9c270411360773f0b74e03db2d92c50952c9bd4924bbca2a260e1235e99df51fe71e75744232f2d641ef94f394110a5ad05f51a057e4cb515b92c16cb1404a8cdcc43d4a4bb2caa54ca35dccf41aa7d832da65123b7029223c46ed2a13387d598d445435d3cb32fdad9e27672903864c90d86353b162033078327b5b7aaffc89b40096ae004f2d5c6bd2c99188574348518db66e9b6020f93f12ee1c06f7b00fe346fefceaffb1da9e3cdf08285057f549733eb10825737fcd1431bfdfb155f323f24e95a869212baacf445b30f2670206645779110e6547d5da90a5f2fe5151da911d5ecd5a833023661d1356b6c395d85968947678d53efd4db7b06f23b21125e74492644277ea0c1131b80d6a4e3e8093b82332556fbb3255a55ac3f0b7e4844c0e12bf577c37fd02323ae5ef4781772ed501d63b568032a3d31576c5104a48c01ac54f715286932351a8adc8cf2467a84a0572e99f366ee00f82c3735545fd4bb941d591ce70070425a81304272db89887949bc7dd8236bb7e82190f9815da938cd6e8fec7660e91354326a7a9bfe38120e97997fca3c289d54513ed00286c2b825fbe84f91a39528f335674b5e957425a6edfdd00f2feb2c2df575616197998c1e964e069875d4d934f419a9b02b100848d023b76d47bd4e284c3895ef9227a40d8ea8826e86c7155d6aa95b8f9175812523a32cd611efc700688e03f7c245c5bff01718281b5d75cefe8318b2c08962236b14a0bf79534c203df735fd9cced97cbae07c2b4ee9cda8c9993f3f6277ff3fec261fb94d3961c4befe4b0893dcf67b312c7d8d6ff7adc8539cb2b1d3534fccf109efddd07a9f1e77b94ab1e505b164221dca1c34621b1e9d234c31a032a401267d95f65b800d579a2482638dfeade804149c81e95d7ef5510ac0b6212231506b1c635a2e1d2f0c9712989f9f246762fadb4c55c20f707dcc0e510a33e9465fc5d5bdbfa524dab0d7a1c6a1baaa36869cf542aa2257c5c44ef07547a570343442c6091e13bc04d559dc0e6db5b001861914bf956816edce2a86b274bd97f27e2dbb08608c16a3e5d8595952faa91fb162d7fa6a7a47e849a1ad8fab3ba620ee3295a04fe13e5fb655ac92ae60d01020b8999526af8d56b28733e69c9ffb285de27c61edc0bf62261ac0787eff347d0fcd62257301ede9603106ea41650a3e3119bd5c4e86a7f6a3f00934f3a545f7f21d41699f3e35d38cf925a8bdaf2bf7eedea11c31c3d8bf6c527c77c6378281cdf02211a58fa5e46d28d7e7c5fb79d69b31703fd752395da115845952cf99aaeb2155c2ab951a69f67d938f223185567e52cfa3e57b62c790bf78674c4b02c12b7d3225fe8f705b408ba11c24245b3924482e2f3480994461b550641a88cd941d371139f3498afacdcba1249631402b20695760eaada5376e68df0e45139c410700effc9420dc3726515e7fcb3f349320f30511451964bd9b6530682efec65910ceb548aa2ab05ac3309e803161697213631ae8e13cc7d223ac28446c1bf94a19a8782ac16ff57df7ee4f10fb6e488c02c68d6b6dee6987f6d2c39227da366c59f54ff67e312ca530e7c467c3dc8", - ), - KV( - k: "000002", - v: "04000000238d665a062b9007836a7d8f968ba2f3847af5f542733389a952cf9b86795502d5b3ccfd5e7828c4b2d221bae3178c500e21d33399c39a2508a0a82d53c022580000000000000000000000000000000000000000000000000000000000000000898c1358ffff072000005b7d311fedc046109a4482bd0eccdf21a6089c99fce43633d03352530000fd400500282db5ba22a2c122aba42724a991196cd01cc2b7013318f691d61171db79202d2e5979b0b6d5692cd129eb37b7541ff51b7b2a840b45273f86d2509acfaa39183bb3850f9916ec8246ad9ee785462c9cda0ea202f12c7ccba8cc155096016a87a6fc40a6a44f5f3b309a868f30d9080b128c75234a6c3d019fb7fbe29708d01daaab84e4891a00d15ffdd9a598dd678899102265e2090a4b7b26ec55764febbfd1f5fe791aef8500619578359cb2abfb19844981b5c0e67e86b6549765bd638f3a701b0fc8a56d00c4efb87b55883f1d81012e5b02d44e10ec9bf620f20ad62ca549be934d11103f9142b3201ff31b7791c1636aaeadc512b2c0f801a64959300d5d526c2fc58e2838162659fe59168f2214b41d1ec963d543e2660ea630d031e2671c8c841fa9c1b58f7475bfe958724cf89c038d29306dc0043b93148ab95f6e99017ec5863db2f9130c48187bfd013924b34eaefd1db6b2818f4f6a604185fa774c2c069455c6eb195a5382403404c47db312b29b5d84e44c4a645f06ef7899f0b78962e95d5476bc989dcb9458c24733a435b151c9fb46c32cbebd3318cf3ed7310533cfa0b087d58c687505070858765968d1f7077f0e6dd75ebf15d74bb8c7466ef2f4974df537f5dd64097f4adf8b1cff61c00181ad26f94cca9c01960db31edc454c1650da4f4390b4aa0efd46c9ed527ed8bb068494285da2680993e8d355caf6a0bd42a4d681780db2312eef129aa76c6081ceff231311ea93fd65fb0b80df077c49ca69d8996b1ebcfd74bad793d7914b4748af45f31ad018dd12997bfcf809df3894bbd7a10cc585797915356389b744f71ee58ac25484b635fe12a1b20909c97edb1d7ae20b1ef1c776260ebab06e16a34c2789fb5555ddc954cc38f07ac551ac3b46c1370f4fa1ba22ac35d82134eaa0d3f3198eeef723030072214ede447893a03f706d389ea60ef8a81ff7e20ae920cb1a5219e93e1bd2058df6296dc8ba39e4d403199d2c209c3d6b3b2d462aecc04b0e248e7f1e9d204a1f6b7df51073ae2faab55be3353713743c5db40555bebda203a5c79fc3324cb8fb7629c9391931a1268c97fad6d6ab7ebc583330356372df8c5e9e885422c75ab956932351858452c5904a5aad3d9fd840e356abd580479d9a531cda6de08277008bb3a1bdf08604c1df0d8e8cd475cb455161bfe5d9710bc0dfac4214afeeed4bca6148b54241b8f4ab221502917f261705715c7388d9e91d3685a1f67c484a24b716912fe33a89ca7ebc3a5b77e6b36657c7e2b2e1e8b2b699690ca749339b7b2673fb1083496bbc753fdfc49ff6e921c5e35f27d9175afa7da3793d6a7ad5eb0ab8c9ee0e60a8ae438e3145cf64b5f6417625ca934b9d7acc150efa9b53618c15b4d8318be5de0855696d92ef2e018d97ebd24102e824bbd040aed958a51016a91661180e64932f2316b5ee55923263d19d293996118f511f22912e8c9c435af630099fc47b7c4ab581b7d760418314c0e6e814b3bbddb486517436d56ddc774701072cd77beada2cc94cad87f3d1cb83db4da05c2e141bc175bc8848e548c27584995333ef1d9eadd8d7f028cae60d5b0e9642db7245d388ff58c6a31556319a29c0dc14362b957b6220a428966d66d6c3339a12a503806de7dc4c4561bab6968245e41b27ae89fffbfd1bd2f4104d074f0f2b759576f9e16c0e2f73bedc7c0e0da97698e07ca1d729b113938a6b29c3b19d9b8225303f80d6dc0e39bec343ac9a2d23926ab414666e079e68745998ff73dacbe1645bd004dd06236f615f11d47e9b2d54cf8573d9a295bda88af4b2c6c603db0c0757485a543725b1cc04f7e9f38445ed875ec54317418600b4113600e137417e5d1fc333159a7e365d", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_0.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_0.snap deleted file mode 100644 index 4ea246afb4d..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_0.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", - v: "0000000000", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_1.snap deleted file mode 100644 index 5660a3684d2..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_1.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "0946edb9c083c9942d92305444527765fad789c438c717783276a9f7fbf61b85", - v: "0000010000", - ), - KV( - k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", - v: "0000000000", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_2.snap deleted file mode 100644 index b5426feac3f..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@mainnet_2.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "0946edb9c083c9942d92305444527765fad789c438c717783276a9f7fbf61b85", - v: "0000010000", - ), - KV( - k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", - v: "0000000000", - ), - KV( - k: "f4b084a7c2fc5a5aa2985f2bcb1d4a9a65562a589d628b0d869c5f1c8dd07489", - v: "0000020000", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_0.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_0.snap deleted file mode 100644 index 4ea246afb4d..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_0.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", - v: "0000000000", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_1.snap deleted file mode 100644 index 66ff4d26dd3..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_1.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "755f7c7d27a811596e9fae6dd30ca45be86e901d499909de35b6ff1f699f7ef3", - v: "0000010000", - ), - KV( - k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", - v: "0000000000", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_2.snap deleted file mode 100644 index f1a52743b89..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/tx_by_hash_raw_data@testnet_2.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "755f7c7d27a811596e9fae6dd30ca45be86e901d499909de35b6ff1f699f7ef3", - v: "0000010000", - ), - KV( - k: "d5b3ccfd5e7828c4b2d221bae3178c500e21d33399c39a2508a0a82d53c02258", - v: "0000020000", - ), - KV( - k: "db4d7a85b768123f1dff1d4c4cece70083b2d27e117b4ac2e31d087988a5eac4", - v: "0000000000", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@mainnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@mainnet_1.snap deleted file mode 100644 index 09aae4249b0..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@mainnet_1.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "0000010000000000", - v: "50c30000000000002321027a46eb513588b01b37ea24303f4b628afd12cc20df789fede0921e43cad3e875ac", - ), - KV( - k: "0000010000000001", - v: "d43000000000000017a9147d46a730d31f97b1930d3368a967c309bd4d136a87", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@mainnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@mainnet_2.snap deleted file mode 100644 index cfab20035fe..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@mainnet_2.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "0000010000000000", - v: "50c30000000000002321027a46eb513588b01b37ea24303f4b628afd12cc20df789fede0921e43cad3e875ac", - ), - KV( - k: "0000010000000001", - v: "d43000000000000017a9147d46a730d31f97b1930d3368a967c309bd4d136a87", - ), - KV( - k: "0000020000000000", - v: "a0860100000000002321027a46eb513588b01b37ea24303f4b628afd12cc20df789fede0921e43cad3e875ac", - ), - KV( - k: "0000020000000001", - v: "a86100000000000017a9147d46a730d31f97b1930d3368a967c309bd4d136a87", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@testnet_1.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@testnet_1.snap deleted file mode 100644 index 32e0d177bcb..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@testnet_1.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "0000010000000000", - v: "50c30000000000002321025229e1240a21004cf8338db05679fa34753706e84f6aebba086ba04317fd8f99ac", - ), - KV( - k: "0000010000000001", - v: "d43000000000000017a914ef775f1f997f122a062fff1a2d7443abd1f9c64287", - ), -] diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@testnet_2.snap b/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@testnet_2.snap deleted file mode 100644 index c633a918ce4..00000000000 --- a/zebra-state/src/service/finalized_state/disk_format/tests/snapshots/utxo_by_outpoint_raw_data@testnet_2.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: zebra-state/src/service/finalized_state/disk_format/tests/snapshot.rs -expression: cf_data ---- -[ - KV( - k: "0000010000000000", - v: "50c30000000000002321025229e1240a21004cf8338db05679fa34753706e84f6aebba086ba04317fd8f99ac", - ), - KV( - k: "0000010000000001", - v: "d43000000000000017a914ef775f1f997f122a062fff1a2d7443abd1f9c64287", - ), - KV( - k: "0000020000000000", - v: "a086010000000000232102acce9f6c16986c525fd34759d851ef5b4b85b5019a57bd59747be0ef1ba62523ac", - ), - KV( - k: "0000020000000001", - v: "a86100000000000017a914ef775f1f997f122a062fff1a2d7443abd1f9c64287", - ), -]