This commit is contained in:
donne 2022-04-04 20:28:21 +08:00
commit a86b674031
12 changed files with 100 additions and 22 deletions

View File

@ -4,7 +4,7 @@
- Submit configs for mainnet, go to https://github.com/ping-pub/explorer/tree/master/src/chains/mainnet - Submit configs for mainnet, go to https://github.com/ping-pub/explorer/tree/master/src/chains/mainnet
- Submit configs for testnet, go to https://github.com/ping-pub/explorer/tree/testnet/src/chains/testnet - Submit configs for testnet, go to https://github.com/ping-pub/explorer/tree/master/src/chains/testnet
# Sample of Config # Sample of Config
@ -12,7 +12,7 @@
{ {
"chain_name": "cosmos", "chain_name": "cosmos",
"api": ["https://cosmos.api.ping.pub"], "api": ["https://cosmos.api.ping.pub"],
"rpc": ["https://cosmos.rpc.ping.pub:443","http://your-host:26657"] "rpc": ["https://cosmos.rpc.ping.pub:443","http://your-host:26657"],
"sdk_version": "0.42.6", "sdk_version": "0.42.6",
"coin_type": "118", "coin_type": "118",
"min_tx_fee": "800", "min_tx_fee": "800",
@ -29,7 +29,7 @@
``` ```
- **chain_name** the name to identify the chain on ping.pub - **chain_name** the name to identify the chain on ping.pub
- **api** the rest api endpoint.(make sure that CORS is enabled: `Allow-Control-Allow-Origin: *`) - **api** the rest api endpoint.(make sure that CORS is enabled: `Allow-Control-Allow-Origin: *`)
- **rpc** the rpc endpoint, make sure that the port is added. - **rpc** the rpc endpoint, make sure that the port is added. rpc endpoint is only used for state sync. it's optional.
- **assets** Native Assets on blockchain. - **assets** Native Assets on blockchain.
# Test # Test

View File

@ -3,7 +3,7 @@
"coingecko": "", "coingecko": "",
"api": ["https://api.chihuahua.wtf", "https://chihuahua-api.mercury-nodes.net"], "api": ["https://api.chihuahua.wtf", "https://chihuahua-api.mercury-nodes.net"],
"rpc": ["https://rpc.chihuahua.wtf:443", "https://rpc.chihuahua.wtf:443"], "rpc": ["https://rpc.chihuahua.wtf:443", "https://rpc.chihuahua.wtf:443"],
"snapshot_provider": "", "snapshot_provider": "df2dffa0560e41c682b6b2e150524859e41ec1d8@chihuahua.rpc.ping.pub:26656",
"sdk_version": "0.44.3", "sdk_version": "0.44.3",
"coin_type": "118", "coin_type": "118",
"min_tx_fee": "5000", "min_tx_fee": "5000",

View File

@ -2,8 +2,8 @@
"chain_name": "cosmos", "chain_name": "cosmos",
"coingecko": "cosmos", "coingecko": "cosmos",
"api": ["https://cosmos.api.ping.pub", "https://lcd-cosmoshub.blockapsis.com"], "api": ["https://cosmos.api.ping.pub", "https://lcd-cosmoshub.blockapsis.com"],
"rpc": ["http://cosmos.rpc.ping.pub:26657", "https://cosmoshub.validator.network:443"], "rpc": ["http://cosmos.rpc.skystarcapital.xyz:26657", "https://cosmoshub.validator.network:443"],
"snapshot_provider": "d2008adf6d12f1a1951cce2b5ef531fbecb81895@cosmos.rpc.ping.pub:26656,27483c10217c542908a899024ed26ddfefeee9b9@cosmos.rpc.skystarcapital.xyz:26656", "snapshot_provider": "d2008adf6d12f1a1951cce2b5ef531fbecb81895@cosmos.statesync.ping.pub:26656,27483c10217c542908a899024ed26ddfefeee9b9@cosmos.rpc.skystarcapital.xyz:26656",
"sdk_version": "0.44.3", "sdk_version": "0.44.3",
"coin_type": "118", "coin_type": "118",
"min_tx_fee": "800", "min_tx_fee": "800",

View File

@ -4,7 +4,7 @@
"api": "https://rest.core.persistence.one", "api": "https://rest.core.persistence.one",
"rpc": ["https://rpc.core.persistence.one:443", "https://rpc.core.persistence.one:443"], "rpc": ["https://rpc.core.persistence.one:443", "https://rpc.core.persistence.one:443"],
"snapshot_provider": "", "snapshot_provider": "",
"sdk_version": "0.42.4", "sdk_version": "0.44.2",
"coin_type": "750", "coin_type": "750",
"min_tx_fee": "3000", "min_tx_fee": "3000",
"addr_prefix": "persistence", "addr_prefix": "persistence",
@ -16,4 +16,4 @@
"coingecko_id": "persistence", "coingecko_id": "persistence",
"logo": "/logos/persistence.png" "logo": "/logos/persistence.png"
}] }]
} }

View File

@ -1,8 +1,8 @@
{ {
"chain_name": "rizon", "chain_name": "rizon",
"api": ["https://rizon.api.ping.pub"], "api": ["https://rizon.api.ping.pub"],
"rpc": ["http://seed-1.mainnet.rizon.world:26657", "http://seed-1.mainnet.rizon.world:26657"], "rpc": ["http://rizon.rpc.ping.pub:26657", "http://seed-1.mainnet.rizon.world:26657"],
"snapshot_provider": "", "snapshot_provider": "66083d10fc1b79c584362dc266f87836455a9169@rizon.rpc.ping.pub:26656",
"sdk_version": "v0.42.9", "sdk_version": "v0.42.9",
"coin_type": "118", "coin_type": "118",
"min_tx_fee": "8000", "min_tx_fee": "8000",

View File

@ -4,7 +4,7 @@
"rpc": ["https://rpc-sentinel.keplr.app:443", "https://rpc-sentinel.keplr.app:443"], "rpc": ["https://rpc-sentinel.keplr.app:443", "https://rpc-sentinel.keplr.app:443"],
"snapshot_provider": "", "snapshot_provider": "",
"sdk_version": "0.42.6", "sdk_version": "0.42.6",
"coin_type": "750", "coin_type": "118",
"min_tx_fee": "8000", "min_tx_fee": "8000",
"addr_prefix": "sent", "addr_prefix": "sent",
"logo": "/logos/sentinel.png", "logo": "/logos/sentinel.png",
@ -15,4 +15,4 @@
"coingecko_id": "sentinel", "coingecko_id": "sentinel",
"logo": "/logos/sentinel.png" "logo": "/logos/sentinel.png"
}] }]
} }

View File

@ -0,0 +1,7 @@
{
"chain_name": "test-core-1",
"api":"https://rest.testnet.persistence.one",
"sdk_version": "0.44.2",
"addr_prefix": "persistence",
"logo": "https://raw.githubusercontent.com/auditOne/explorer/master/public/logos/persistence.png"
}

View File

@ -24,12 +24,14 @@ chains = update
localStorage.setItem('chains', JSON.stringify(update)) localStorage.setItem('chains', JSON.stringify(update))
const selected = chains.cosmos const selected = chains.cosmos
const avatarcache = localStorage.getItem('avatars')
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
config: chains, config: chains,
selected, selected,
avatars: {}, avatars: avatarcache ? JSON.parse(avatarcache) : {},
height: 0, height: 0,
ibcChannels: {}, ibcChannels: {},
quotes: {}, quotes: {},
@ -48,6 +50,7 @@ export default {
}, },
cacheAvatar(state, args) { cacheAvatar(state, args) {
state.chains.avatars[args.identity] = args.url state.chains.avatars[args.identity] = args.url
localStorage.setItem('avatars', JSON.stringify(state.chains.avatars))
}, },
setHeight(state, height) { setHeight(state, height) {
state.chains.height = height state.chains.height = height

View File

@ -2,15 +2,25 @@
<div class="container-md"> <div class="container-md">
<b-card> <b-card>
<b-card-title> <b-card-title>
Starting New Node From State Sync <b-badge variant="danger"> What's State Sync?
</b-card-title>
The Tendermint Core 0.34 release includes support for state sync, which allows a new node to join a network by fetching a snapshot of the application state at a recent height instead of fetching and replaying all historical blocks. This can reduce the time needed to sync with the network from days to minutes.
Click <a href="https://blog.cosmos.network/cosmos-sdk-state-sync-guide-99e4cf43be2f">here</a> for more infomation.
</b-card>
<b-card>
<b-card-title>
Starting New Node From State Sync
<b-badge
v-if="snapshot_provider?false:true"
variant="danger"
>
WIP WIP
</b-badge> </b-badge>
</b-card-title> </b-card-title>
<b class="mt-1">1. What's State Sync? </b><br> <b class="mt-1">1. Install Binary</b><br>
The Tendermint Core 0.34 release includes support for state sync, which allows a new node to join a network by fetching a snapshot of the application state at a recent height instead of fetching and replaying all historical blocks. This can reduce the time needed to sync with the network from days to minutes. We need to install the binary first and make sure that the version is the one currently in use on mainnet.
Click <a href="https://blog.cosmos.network/cosmos-sdk-state-sync-guide-99e4cf43be2f">here</a> for more infomation.
<br><br> <br><br>
<b class="mt-1">2. How to use it? </b><br> <b class="mt-1">2. Enable State Sync</b><br>
We can configure Tendermint to use state sync in <code>$DAEMON_HOME/config/config.toml</code>, then start daemon. We can configure Tendermint to use state sync in <code>$DAEMON_HOME/config/config.toml</code>, then start daemon.
<ul class="mt-1"> <ul class="mt-1">
<li <li
@ -31,7 +41,7 @@
class="my-1" class="my-1"
@change="check()" @change="check()"
/> />
<b class="mt-1">3. Snapshot Providers </b><br> <b class="mt-1">3. (Optional) Add Snapshot Providers </b><br>
To reduce the time of snapshot discovering, we can add providers into persistent_peers in <code>$DAEMON_HOME/config/config.toml</code>. To reduce the time of snapshot discovering, we can add providers into persistent_peers in <code>$DAEMON_HOME/config/config.toml</code>.
<b-form-textarea <b-form-textarea
id="provider" id="provider"
@ -80,7 +90,10 @@ export default {
servers = rpc.join(',') servers = rpc.join(',')
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
const providers = snapshot_provider ? `# Comma separated list of nodes to keep persistent connections to \npersistent_peers = "${snapshot_provider}" ` : 'OMG NO available providers' const peers = snapshot_provider
const providers = peers
? `# Comma separated list of nodes to keep persistent connections to \npersistent_peers = "${peers}" `
: 'OMG There is NO available providers, but you can try it.'
return { return {
snapshot_provider, snapshot_provider,
servers, servers,

View File

@ -21,7 +21,7 @@
show show
> >
<div class="alert-heading"> <div class="alert-heading">
Note Tips
</div> </div>
<div class="alert-body"> <div class="alert-body">
There are two ways to monitor your validators: There are two ways to monitor your validators:

View File

@ -116,7 +116,43 @@
</b-row> </b-row>
</b-card-body> </b-card-body>
</b-card> </b-card>
<b-card
v-if="unbonding && unbonding.length > 0"
>
<b-card-header class="pt-0 pl-0 pr-0">
<b-card-title>Unbonding Tokens</b-card-title>
</b-card-header>
<b-card-body class="pl-0 pr-0">
<b-row
v-for="item in unbonding"
:key="item.validator_address"
>
<b-col cols="12">
<span class="font-weight-bolder">From: <router-link :to="`../staking/${item.validator_address}`">{{ item.validator_address }}</router-link></span>
</b-col>
<b-col cols="12">
<b-table
:items="item.entries"
class="mt-1"
striped
hover
responsive="sm"
stacked="sm"
>
<template #cell(completion_time)="data">
{{ formatDate(data.item.completion_time) }}
</template>
<template #cell(initial_balance)="data">
{{ data.item.initial_balance }}{{ stakingParameters.bond_denom }}
</template>
<template #cell(balance)="data">
{{ data.item.balance }}{{ stakingParameters.bond_denom }}
</template>
</b-table>
</b-col>
</b-row>
</b-card-body>
</b-card>
<b-card <b-card
v-if="delegations" v-if="delegations"
> >
@ -358,6 +394,7 @@
<script> <script>
import { $themeColors } from '@themeConfig' import { $themeColors } from '@themeConfig'
import dayjs from 'dayjs'
import { import {
BCard, BAvatar, BPopover, BTable, BRow, BCol, BTableSimple, BTr, BTd, BTbody, BCardHeader, BCardTitle, BButton, BCardBody, VBModal, BCard, BAvatar, BPopover, BTable, BRow, BCol, BTableSimple, BTr, BTd, BTbody, BCardHeader, BCardTitle, BButton, BCardBody, VBModal,
BButtonGroup, VBTooltip, BPagination, BButtonGroup, VBTooltip, BPagination,
@ -434,6 +471,7 @@ export default {
unbonding: [], unbonding: [],
quotes: {}, quotes: {},
transactions: [], transactions: [],
stakingParameters: {},
} }
}, },
computed: { computed: {
@ -509,6 +547,7 @@ export default {
tmp1 += Number(e.balance) tmp1 += Number(e.balance)
}) })
}) })
if (this.stakingParameters) stakingDenom = this.stakingParameters.bond_denom
const unbonding = this.formatCurrency(tmp1, stakingDenom) const unbonding = this.formatCurrency(tmp1, stakingDenom)
sumCurrency += unbonding sumCurrency += unbonding
sum += tmp1 sum += tmp1
@ -610,6 +649,9 @@ export default {
this.$http.getTxsBySender(this.address).then(res => { this.$http.getTxsBySender(this.address).then(res => {
this.transactions = res this.transactions = res
}) })
this.$http.getStakingParameters().then(res => {
this.stakingParameters = res
})
}, },
methods: { methods: {
formatNumber(v) { formatNumber(v) {
@ -644,6 +686,7 @@ export default {
} }
return 0 return 0
}, },
formatDate: v => dayjs(v).format('YYYY-MM-DD HH:mm:ss'),
formatTime: v => toDay(Number(v) * 1000), formatTime: v => toDay(Number(v) * 1000),
formatLength: v => toDuration(Number(v) * 1000), formatLength: v => toDuration(Number(v) * 1000),
copy() { copy() {

View File

@ -271,6 +271,18 @@
</b-row> </b-row>
</tab-content> </tab-content>
</form-wizard> </form-wizard>
<b-alert
variant="danger"
:show="true"
>
<h4 class="alert-heading">
DISCLAIMER:
</h4>
<div class="alert-body">
<span>Ping.pub is maintained by the community, Everyone could add a chain to ping.pub. Some of those blockchains are not fully tested, Use at your own risk.</span>
</div>
</b-alert>
</div> </div>
</template> </template>