From 17fba7d61e4904afb7a04244da59949bf0444284 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Thu, 24 Mar 2022 11:56:47 +0800 Subject: [PATCH] update block fetching strategy --- src/chains/mainnet/cosmos.json | 1 - src/chains/mainnet/iris.json | 1 - src/views/StateSync.vue | 11 +++++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/chains/mainnet/cosmos.json b/src/chains/mainnet/cosmos.json index 48bcf24e..961851da 100644 --- a/src/chains/mainnet/cosmos.json +++ b/src/chains/mainnet/cosmos.json @@ -3,7 +3,6 @@ "coingecko": "cosmos", "api": ["https://cosmos.api.ping.pub", "https://lcd-cosmoshub.blockapsis.com"], "rpc": ["http://cosmos.rpc.ping.pub:26657", "https://cosmoshub.validator.network:443"], - "state_sync_interval": "1000", "sdk_version": "0.44.3", "coin_type": "118", "min_tx_fee": "800", diff --git a/src/chains/mainnet/iris.json b/src/chains/mainnet/iris.json index 03d59bbb..db2703e9 100644 --- a/src/chains/mainnet/iris.json +++ b/src/chains/mainnet/iris.json @@ -2,7 +2,6 @@ "chain_name": "iris-network", "api": "https://iris.api.ping.pub", "rpc": ["http://34.82.96.8:26657","http://34.77.68.145:26657"], - "state_sync_interval": "400", "sdk_version": "0.42.4", "coin_type": "118", "min_tx_fee": "40000", diff --git a/src/views/StateSync.vue b/src/views/StateSync.vue index e4e94e54..be1d5be2 100644 --- a/src/views/StateSync.vue +++ b/src/views/StateSync.vue @@ -38,12 +38,12 @@ Enable Snapshot For State Sync To make state sync works, We need at least 2 available RPC servers which enabled snapshot. You can configure in $DAEMON_HOME/config/app.toml, - and don't forget to share your RPC server Here + and don't forget to share your snapshot server Here @@ -81,8 +81,8 @@ export default { # taken (0 to disable). Must be a multiple of pruning-keep-every. snapshot-interval = 1000 -# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). -snapshot-keep-recent = 10`, +# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). each snapshot is around 500MiB +snapshot-keep-recent = 2`, } }, // computed: { @@ -107,8 +107,7 @@ snapshot-keep-recent = 10`, // }, // }, created() { - console.log(this.$store.state.chains.selected.state_sync_interval) - const interval = this.$store.state.chains.selected.state_sync_interval || 1000 + const interval = 1000 this.$http.getLatestBlock().then(l => { const { height } = l.block.header if (height > interval) {