Zebra/zebra-chain/src
teor 43e80fd61c
6. feat(db): Add a transparent address UTXO index (#3999)
* Add test-only serialization, and make existing serialization test-only

* Make AddressLocations clearer in the API

* Add UnspentOutputAddressLocation

* Add the AddressLocation to the UTXO database value

* Update the snapshot test code for UnspentOutputAddressLocation

* Update the raw data snapshots

* Update the high-level data snapshots

* Increment the database version

* Make serialization clearer

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>

* Fix code formatting

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>

* Add an empty utxo_by_transparent_addr_loc column family

* Update snapshot data for the new column family

* Add an AddressUnspentOutputs type

* Add round-trip tests for AddressUnspentOutputs

* Move address balances into their own method

* Simplify updating address balances

* Fix utxo_by_out_loc column family name

* Implement reads and writes of address UTXOs

* Update raw data snapshots

* Update the snapshot tests for high-level address UTXOs

* Assert rather than taking empty address snapshots for genesis

* Update high-level address UTXO snapshot data, and delete empty snapshots

* Increment the database version

* Use typed values for all ReadDisk methods

* Implement test-only serialization for transparent::Address

* Implement FromDisk for ()

* Store AddressUnspentOutput as the column family key

* Update round-trip serialization tests for AddressUnspentOutput

* Update snapshot test code, and add a UTXO data snapshot

* Update existing snapshot data

* Add new UTXO snapshot data

* Update column family name

```sh
fastmod utxo_by_transparent_addr_loc utxo_loc_by_transparent_addr_loc zebra*
```

* cargo fmt --all

* cargo insta test --review --delete-unreferenced-snapshots

* Explain why it is ok to use invalid database iterator indexes

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

* Add explanations of UTXO database updates

* Simplify an assertion

* Remove UnspentOutputAddressLocation and just store transparent::Output

* Update snapshot test data

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-04-13 04:06:52 +00:00
..
amount Check remaining transaction value & make value balance signs match the spec (#2566) 2021-08-09 14:22:26 -03:00
block feat(state): add transparent address indexes to the non-finalized state (#4022) 2022-04-12 17:21:46 +00:00
chain_tip feat(rpc): Implement `getblockchaininfo` RPC method (#3891) 2022-03-25 12:25:31 +00:00
history_tree refactor(anchorSapling): Change type to force consensus rule validation (#3544) 2022-02-17 03:20:22 +00:00
orchard build(deps): bump serde-big-array from 0.3.2 to 0.4.1 (#4004) 2022-03-31 01:33:52 +00:00
parameters feat(rpc): Implement `getblockchaininfo` RPC method (#3891) 2022-03-25 12:25:31 +00:00
primitives build(deps): bump serde-big-array from 0.3.2 to 0.4.1 (#4004) 2022-03-31 01:33:52 +00:00
sapling build(deps): bump serde-big-array from 0.3.2 to 0.4.1 (#4004) 2022-03-31 01:33:52 +00:00
serialization build(deps): bump serde-big-array from 0.3.2 to 0.4.1 (#4004) 2022-03-31 01:33:52 +00:00
sprout build(deps): bump serde-big-array from 0.3.2 to 0.4.1 (#4004) 2022-03-31 01:33:52 +00:00
transaction feat(rpc): add getrawtransaction (#3908) 2022-03-24 09:45:37 +00:00
transparent 6. feat(db): Add a transparent address UTXO index (#3999) 2022-04-13 04:06:52 +00:00
value_balance Split ValueBalance methods into NegativeAllowed and NonNegative (#2649) 2021-08-20 13:30:38 +00:00
work build(deps): bump serde-big-array from 0.3.2 to 0.4.1 (#4004) 2022-03-31 01:33:52 +00:00
amount.rs 6. add(test): add more tests for height and transaction location serialization (#3879) 2022-03-18 20:30:16 +00:00
block.rs feat(state): add transparent address indexes to the non-finalized state (#4022) 2022-04-12 17:21:46 +00:00
chain_tip.rs feat(rpc): Implement `getblockchaininfo` RPC method (#3891) 2022-03-25 12:25:31 +00:00
fmt.rs Add a TypeNameToDebug formatter to zebra_chain (#2466) 2021-07-09 12:40:19 +10:00
history_tree.rs Tweak some assertions to better match their error messages (#2822) 2021-10-04 10:31:56 -03:00
lib.rs build(deps): bump serde-big-array from 0.3.2 to 0.4.1 (#4004) 2022-03-31 01:33:52 +00:00
orchard.rs ZIP 212: validate Sapling and Orchard output of coinbase transactions (#3029) 2021-11-11 22:18:37 +00:00
parameters.rs Cleanup a few arbitrary impls (#2222) 2021-05-28 09:49:28 -03:00
primitives.rs ZIP 212: validate Sapling and Orchard output of coinbase transactions (#3029) 2021-11-11 22:18:37 +00:00
sapling.rs Update multiple crates to ensure bitvec 0.22.3 is being used (#2351) 2021-06-23 13:16:22 +10:00
serialization.rs Refactor addr v1 serialization using a separate AddrV1 type (#3021) 2021-11-10 06:47:50 +10:00
shutdown.rs Fix shutdown panics (#1637) 2021-02-03 19:03:28 +10:00
sprout.rs Validate JoinSplit proofs (#3128) 2021-12-10 16:33:15 +00:00
transaction.rs feat(rpc): add getrawtransaction (#3908) 2022-03-24 09:45:37 +00:00
transparent.rs 6. feat(db): Add a transparent address UTXO index (#3999) 2022-04-13 04:06:52 +00:00
value_balance.rs Enforce Rust edition 2021 (#3332) 2022-01-14 12:10:18 +00:00
work.rs Replace primitives_types with uint (#2350) 2021-06-18 15:35:05 -03:00