Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mermaid for migrations graph #1186

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"bierner.markdown-mermaid"
]
}
44 changes: 44 additions & 0 deletions zcash_client_sqlite/src/wallet/init/migrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
This graph can be rendered on github.com or with the `bierner.markdown-mermaid` extension in VS Code.

```mermaid
graph TD;
initial_setup-->utxos_table;

initial_setup-->ufvk_support;

ufvk_support-->addresses_table;

ufvk_support-->sent_notes_to_internal;

utxos_table-->add_utxo_account;
addresses_table-->add_utxo_account;

sent_notes_to_internal-->add_transaction_views;
add_utxo_account-->add_transaction_views;

add_transaction_views-->v_transactions_net;

v_transactions_net-->received_notes_nullable_nf;

received_notes_nullable_nf-->shardtree_support;

received_notes_nullable_nf-->nullifier_map;

received_notes_nullable_nf-->sapling_memo_consistency;

shardtree_support-->add_account_birthdays;

shardtree_support-->receiving_key_scopes;

sapling_memo_consistency-->v_transactions_transparent_history;

add_account_birthdays-->v_sapling_shard_unscanned_ranges;

v_transactions_transparent_history-->v_tx_outputs_use_legacy_false;

v_tx_outputs_use_legacy_false-->v_transactions_shielding_balance;

v_transactions_shielding_balance-->v_transactions_note_uniqueness;

v_sapling_shard_unscanned_ranges-->wallet_summaries;
```
24 changes: 1 addition & 23 deletions zcash_client_sqlite/src/wallet/init/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,8 @@ pub(super) fn all_migrations<P: consensus::Parameters + 'static>(
params: &P,
seed: Option<SecretVec<u8>>,
) -> Vec<Box<dyn RusqliteMigration<Error = WalletMigrationError>>> {
// initial_setup
// / \
// utxos_table ufvk_support
// | / \
// | addresses_table sent_notes_to_internal
// | / /
// add_utxo_account /
// \ /
// add_transaction_views
// |
// v_transactions_net
// |
// received_notes_nullable_nf
// / | \
// shardtree_support nullifier_map sapling_memo_consistency
// / \ |
// add_account_birthdays receiving_key_scopes v_transactions_transparent_history
// | |
// v_sapling_shard_unscanned_ranges v_tx_outputs_use_legacy_false
// | |
// wallet_summaries v_transactions_shielding_balance
// |
// v_transactions_note_uniqueness
vec![
// Update migrations.md with each new migration.
Box::new(initial_setup::Migration {}),
Box::new(utxos_table::Migration {}),
Box::new(ufvk_support::Migration {
Expand Down
Loading