Skip to content

Commit

Permalink
feat(api): Remove unused and obsolete token info (#1071)
Browse files Browse the repository at this point in the history
## What ❔

- Soft-removes fields from the tokens table that are currently not used
or are used only by the `zks_getTokenPrice` method: `usd_price`,
`usd_price_updated_at`, `market_volume`, `market_volume_updated_at`,
`token_list_name`, `token_list_symbol`, `token_list_decimals`.
- Removes `zks_getTokenPrice` method (deprecated for some time; returns
incorrect or severely outdated data).

## Why ❔

- Codebase maintenance.
- Part of preparations to support tokens on EN after snapshot recovery.

## Checklist

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] Code has been formatted via `zk fmt` and `zk lint`.
- [x] Spellcheck has been run via `zk spellcheck`.
- [x] Linkcheck has been run via `zk linkcheck`.
  • Loading branch information
slowli committed Feb 15, 2024
1 parent 6d54010 commit e920897
Show file tree
Hide file tree
Showing 41 changed files with 381 additions and 705 deletions.
4 changes: 1 addition & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions core/bin/snapshots_creator/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ async fn create_miniblock(
.unwrap();
conn.storage_logs_dal()
.insert_storage_logs(miniblock_number, &[(H256::zero(), block_logs)])
.await;
.await
.unwrap();
}

async fn create_l1_batch(
Expand All @@ -179,7 +180,8 @@ async fn create_l1_batch(
written_keys.sort_unstable();
conn.storage_logs_dedup_dal()
.insert_initial_writes(l1_batch_number, &written_keys)
.await;
.await
.unwrap();
}

async fn prepare_postgres(
Expand Down

This file was deleted.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion core/lib/dal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bigdecimal = "0.3.0"
bincode = "1"
num = "0.4.0"
hex = "0.4"
once_cell = "1.7"
strum = { version = "0.24", features = ["derive"] }
Expand Down
1 change: 0 additions & 1 deletion core/lib/dal/src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pub mod storage_log;
pub mod storage_protocol_version;
pub mod storage_prover_job_info;
pub mod storage_sync;
pub mod storage_token;
pub mod storage_transaction;
pub mod storage_verification_request;
pub mod storage_witness_job_info;
32 changes: 0 additions & 32 deletions core/lib/dal/src/models/storage_token.rs

This file was deleted.

0 comments on commit e920897

Please sign in to comment.