# Subquery Migration
## 9/9/2022 Update
Subquery projects migration (4 DBs x2 Prod ENVs)
1. Migrate to AliYun (8/8) by Qiuhao
2. Reindex (4/8)
3. QA regression test pass (0/22)
4. Products new version release (0/8)
EVM Subquery and Eth RPC (1 DB x3 Prod ENVs, x2 Test ENVs)
1. Migrate to AWS (0/5) by Bryan
2. Reindex Subquery (0/5)
3. QA regression test pass (0/7)
4. Eth RPC go-live - [configuration doc](https://evmdocs.acala.network/network/network-configuration)
- Acala and Karura remain the same - we will switch service behind the URL
- **Projects on Mandala is required to update their URL to the new ones when available, and updated on configuration doc.**
5. Product new version release (0/3) - for blockscout only, no change required on other products
## Project Usage
| Projects | Service / Product |
| ----------------------------------------------------------- | -------------------------------------------------------- |
| Dex (Acala,Karura) | stats, dapp, sdk |
| Stats (Acala,Karura) | stats, dapp, height_time_avg server (for incentive), sdk |
| Loan (Acala,Karura) | gauntlet APIs, sdk |
| History (Acala,Karura) | dapp |
| EVM (Acala, Karura, Mandala, Acala testnet, Karura testnet) | ETH PRC, blockscout |
## Test Progress
| Tested | Product Link | Product | Dex | Stats | Loan | History | ETH RPC/EVM | Remarks |
| --- | --- | ----------------------------- | --- | ----- | ---- | ------- | ----------- | -------------------------------------------------------------------------------------------------- |
| | | Acala Dapp | ✅ | ✅ | ✅ | ✅ | ✅ | 注意 1. history的部分,2.會用到Metamask的部分,i.e. bind account, Acala<>Moonbeam |
| | | Karura Dapp | ✅ | ✅ | ✅ | ✅ | ✅ | 注意 1. 同上, 2. 會用到Metamask的部分,i.e. bind account, Acala<>Moonriver, karura<>Eth |
| | | Mandala Dapp | | | | | | 沒有用任何 subquery |
| | | Acala Stats | ✅ | ✅ | ✅ | ✅ | | |
| | | Karura Stats | ✅ | ✅ | ✅ | ✅ | | |
| | | Acala Gauntlet API | ✅ | | ✅ | | | 注意檢查清算處理,可以固定塊高用腳本檢查數據準確 |
| | | Karura Gauntlet API | ✅ | | ✅ | | | 注意檢查清算處理,可以固定塊高用腳本檢查數據準確 |
| | | Acala Blockscout | | | | | ✅ | |
| | | Karura Blockscout | | | | | ✅ | |
| | | Mandala Blockscout | | | | | ✅ | |
| | | Acala Auction (Low Priority) | | | | ✅ | | |
| | | Karura Auction (Low Priority) | | | | ✅ | | |
| | | Acala Testnet | | | | | ✅ | |
| | | Karura Testnet | | | | | ✅ | |
| | | | 6 | 4 | 6 | 6 | 7 | Total |
## New Subquery URL
| Name | URL |
| ------- | ------------------------------------------------------------------------------------------------------------------ |
| Dex | Acala https://api.polkawallet.io/acala-dex-subql <br> Karura https://api.polkawallet.io/karura-dex-subql |
| Loan | Acala https://api.polkawallet.io/acala-loan-subql <br> Karura https://api.polkawallet.io/karura-loan-subql |
| Stats | Acala https://api.polkawallet.io/acala-stats-subql <br> Karura https://api.polkawallet.io/karura-stats-subql |
| History | Acala https://api.polkawallet.io/acala-history-subql <br> Karura https://api.polkawallet.io/karura-history-subql |
| EVM | Acala https://subql-query-acala.aca-api.network <br> Karura https://subql-query-karura.aca-api.network <br> Mandala https://subql-query-mandala.aca-dev.network <br> Acala testnet https://subql-query-acala-testnet.aca-staging.network <br> Karura testnet https://subql-query-karura-testnet.aca-staging.network |
## Subquery Consolidations
| Deleted | subquery server | use | 新subquery 名稱 |
| ------- | -------------------- | ------------------------------------- | ------------------- |
| ✅ | evm karura | karura evm 数据 | subql-query-karura |
| ✅ | evm mandala | mandala evm 数据 | subql-query-mandala |
| ✅ | evm acala | acala evm 数据 | subql-query-acala |
| ✅ | evm karura testnet | karura evm 测试网 | subql-query-karura-testnet |
| ✅ | evm acala testnet | acala evm 测试网 | subql-query-acala-testnet |
| ✅ | karura loan | 历史记录 & position 状态 !gauntlet! | karura loan |
| ✅ | acala loan | 历史记录 & position 状态 !gauntlet! | acala loan |
| ✅ | karura dex | 历史记录 & pool 状态 | karura dex |
| ✅ | acala dex | 历史记录 & pool 状态 | acala dex |
| ✅ | karura block | 出块时间,算homa staking收益 | karuar chain states |
| ✅ | acala block | 出块时间,算homa staking收益 | acala chain states |
| ✅ | karura tokens ipfs | tokens 状态 | karuar chain states |
| ✅ | acala tokens ipfs | tokens 状态 | acala chain states |
| ✅ | karura auction | Auction 记录 | karura histories |
| ✅ | acala auction | Auction 记录 | acala histories |
| ✅ | karura incentive | 历史记录 | karura histories |
| ✅ | acala incentives | 历史记录 | acala histories |
| ✅ | karura homa | 历史记录 | karura histories |
| ✅ | acala homa | 历史记录 | acala histories |
| ✅ | karura transfer | transfer 历史记录 | karura histories |
| ✅ | acala tranfser | transfer 历史记录 | acala histories |
| ✅ | acala early adopters | Early adopter accounts (沒有個人資料) | Deleted |
| ✅ | karura | 最旧的全量数据,已经没有使用 | Deleted |
| ✅ | acala | 最旧的全量数据,已经没有使用 | Deleted |
## Post Deletion Checks/Tasks
1. Two endpoints for Coingecko ([info](https://acalaworkspace.slack.com/archives/C0148EY7LBT/p1663821232109489))
i. https://acala-swap-api.aca-api.network
ii. https://karura-swap-api.aca-api.network
3. Dapp showing histories
4. Stats showing token and dex data
5. Update Auction site