forked from cerc-io/cosmos-explorer
Merge branch 'master' of https://github.com/ping-pub/explorer
This commit is contained in:
commit
a86b674031
@ -4,7 +4,7 @@
|
||||
|
||||
- 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
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
{
|
||||
"chain_name": "cosmos",
|
||||
"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",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "800",
|
||||
@ -29,7 +29,7 @@
|
||||
```
|
||||
- **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: *`)
|
||||
- **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.
|
||||
# Test
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
"coingecko": "",
|
||||
"api": ["https://api.chihuahua.wtf", "https://chihuahua-api.mercury-nodes.net"],
|
||||
"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",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "5000",
|
||||
|
@ -2,8 +2,8 @@
|
||||
"chain_name": "cosmos",
|
||||
"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"],
|
||||
"snapshot_provider": "d2008adf6d12f1a1951cce2b5ef531fbecb81895@cosmos.rpc.ping.pub:26656,27483c10217c542908a899024ed26ddfefeee9b9@cosmos.rpc.skystarcapital.xyz:26656",
|
||||
"rpc": ["http://cosmos.rpc.skystarcapital.xyz:26657", "https://cosmoshub.validator.network:443"],
|
||||
"snapshot_provider": "d2008adf6d12f1a1951cce2b5ef531fbecb81895@cosmos.statesync.ping.pub:26656,27483c10217c542908a899024ed26ddfefeee9b9@cosmos.rpc.skystarcapital.xyz:26656",
|
||||
"sdk_version": "0.44.3",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "800",
|
||||
|
@ -4,7 +4,7 @@
|
||||
"api": "https://rest.core.persistence.one",
|
||||
"rpc": ["https://rpc.core.persistence.one:443", "https://rpc.core.persistence.one:443"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.42.4",
|
||||
"sdk_version": "0.44.2",
|
||||
"coin_type": "750",
|
||||
"min_tx_fee": "3000",
|
||||
"addr_prefix": "persistence",
|
||||
@ -16,4 +16,4 @@
|
||||
"coingecko_id": "persistence",
|
||||
"logo": "/logos/persistence.png"
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"chain_name": "rizon",
|
||||
"api": ["https://rizon.api.ping.pub"],
|
||||
"rpc": ["http://seed-1.mainnet.rizon.world:26657", "http://seed-1.mainnet.rizon.world:26657"],
|
||||
"snapshot_provider": "",
|
||||
"rpc": ["http://rizon.rpc.ping.pub:26657", "http://seed-1.mainnet.rizon.world:26657"],
|
||||
"snapshot_provider": "66083d10fc1b79c584362dc266f87836455a9169@rizon.rpc.ping.pub:26656",
|
||||
"sdk_version": "v0.42.9",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "8000",
|
||||
|
@ -4,7 +4,7 @@
|
||||
"rpc": ["https://rpc-sentinel.keplr.app:443", "https://rpc-sentinel.keplr.app:443"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.42.6",
|
||||
"coin_type": "750",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "8000",
|
||||
"addr_prefix": "sent",
|
||||
"logo": "/logos/sentinel.png",
|
||||
@ -15,4 +15,4 @@
|
||||
"coingecko_id": "sentinel",
|
||||
"logo": "/logos/sentinel.png"
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
7
src/chains/testnet/persistence.json
Normal file
7
src/chains/testnet/persistence.json
Normal 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"
|
||||
}
|
@ -24,12 +24,14 @@ chains = update
|
||||
localStorage.setItem('chains', JSON.stringify(update))
|
||||
const selected = chains.cosmos
|
||||
|
||||
const avatarcache = localStorage.getItem('avatars')
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
config: chains,
|
||||
selected,
|
||||
avatars: {},
|
||||
avatars: avatarcache ? JSON.parse(avatarcache) : {},
|
||||
height: 0,
|
||||
ibcChannels: {},
|
||||
quotes: {},
|
||||
@ -48,6 +50,7 @@ export default {
|
||||
},
|
||||
cacheAvatar(state, args) {
|
||||
state.chains.avatars[args.identity] = args.url
|
||||
localStorage.setItem('avatars', JSON.stringify(state.chains.avatars))
|
||||
},
|
||||
setHeight(state, height) {
|
||||
state.chains.height = height
|
||||
|
@ -2,15 +2,25 @@
|
||||
<div class="container-md">
|
||||
<b-card>
|
||||
<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
|
||||
</b-badge>
|
||||
</b-card-title>
|
||||
<b class="mt-1">1. What's State Sync? </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.
|
||||
Click <a href="https://blog.cosmos.network/cosmos-sdk-state-sync-guide-99e4cf43be2f">here</a> for more infomation.
|
||||
<b class="mt-1">1. Install Binary</b><br>
|
||||
We need to install the binary first and make sure that the version is the one currently in use on mainnet.
|
||||
<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.
|
||||
<ul class="mt-1">
|
||||
<li
|
||||
@ -31,7 +41,7 @@
|
||||
class="my-1"
|
||||
@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>.
|
||||
<b-form-textarea
|
||||
id="provider"
|
||||
@ -80,7 +90,10 @@ export default {
|
||||
servers = rpc.join(',')
|
||||
}
|
||||
// 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 {
|
||||
snapshot_provider,
|
||||
servers,
|
||||
|
@ -21,7 +21,7 @@
|
||||
show
|
||||
>
|
||||
<div class="alert-heading">
|
||||
Note
|
||||
Tips
|
||||
</div>
|
||||
<div class="alert-body">
|
||||
There are two ways to monitor your validators:
|
||||
|
@ -116,7 +116,43 @@
|
||||
</b-row>
|
||||
</b-card-body>
|
||||
</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
|
||||
v-if="delegations"
|
||||
>
|
||||
@ -358,6 +394,7 @@
|
||||
|
||||
<script>
|
||||
import { $themeColors } from '@themeConfig'
|
||||
import dayjs from 'dayjs'
|
||||
import {
|
||||
BCard, BAvatar, BPopover, BTable, BRow, BCol, BTableSimple, BTr, BTd, BTbody, BCardHeader, BCardTitle, BButton, BCardBody, VBModal,
|
||||
BButtonGroup, VBTooltip, BPagination,
|
||||
@ -434,6 +471,7 @@ export default {
|
||||
unbonding: [],
|
||||
quotes: {},
|
||||
transactions: [],
|
||||
stakingParameters: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -509,6 +547,7 @@ export default {
|
||||
tmp1 += Number(e.balance)
|
||||
})
|
||||
})
|
||||
if (this.stakingParameters) stakingDenom = this.stakingParameters.bond_denom
|
||||
const unbonding = this.formatCurrency(tmp1, stakingDenom)
|
||||
sumCurrency += unbonding
|
||||
sum += tmp1
|
||||
@ -610,6 +649,9 @@ export default {
|
||||
this.$http.getTxsBySender(this.address).then(res => {
|
||||
this.transactions = res
|
||||
})
|
||||
this.$http.getStakingParameters().then(res => {
|
||||
this.stakingParameters = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
formatNumber(v) {
|
||||
@ -644,6 +686,7 @@ export default {
|
||||
}
|
||||
return 0
|
||||
},
|
||||
formatDate: v => dayjs(v).format('YYYY-MM-DD HH:mm:ss'),
|
||||
formatTime: v => toDay(Number(v) * 1000),
|
||||
formatLength: v => toDuration(Number(v) * 1000),
|
||||
copy() {
|
||||
|
@ -271,6 +271,18 @@
|
||||
</b-row>
|
||||
</tab-content>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user