Closed liangping closed 1 year ago
Thanks for raising this!
Hello!
Can you share the command you are using to start the node?
Interchain-secured chains (aka consumer chains) do not require or use the staking
module since they are secured by the stake of the provider
chain, so the endpoint /cosmos/staking/v1beta1/validators
is indeed unimplemented.
Consumer chains have the same validator set as their respective provider chain.
If you need validator info, you can check tendermint endpoints:
<consumer_chain_binary> query tendermint-validator-set
https://apollo-rpc.ztake.org/validators?height=100562&page=1&per_page=100
(got from another node running GoC apollo, the link might not work in the future)These are not as pretty as you might need since they don't show validator info such as moniker, contacts etc. only their consensus address and pubkey.
{
"jsonrpc": "2.0",
"id": -1,
"result": {
"block_height": "100562",
"validators": [
{
"address": "6A3CACEAEA586C9AF3051249D6FF34942835DF10",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "QVGxt7g4K/NWFw/8Zr3UX4M53l28bHq/aOhDNAD6NJo="
},
"voting_power": "670100004",
"proposer_priority": "-169193046"
}
]
}
Hey, @MSalopek , thanks for feedback.
Can you share the command you are using to start the node?
we simply run apollod start
.
the above staking endpoint is an example of most of them.
https://apollo-rpc.ztake.org/validators?height=100562&page=1&per_page=100 returns too few infomation, and not readable for normal users.
For many front-end tools like Ping Dashboard, It heavily depend on the endpoint implementation.
Is it possible to remove the endpoints from swagger if we didn't implement. and add the new ones.
If consumer chain don't have the most endpoint, I need to figure out a way for consumer chain. do you have any suggestion?
@MSalopek , I got an idea.
Can I just fetch staking related data from provider staking endpoints.
it should be ok, if consumer chains are as exactly same as the provider.
I found that staking, distribution, gov module have been removed on consumer chains.
@liangping
Can I just fetch staking related data from provider staking endpoints.
This should be safe to do. Infractions on any of the consumer chains will cause slashing/jaling/tombstoning on the provider. Likewise, an infraction on the provider chain will be reflected in all consumer chain validator sets.
The consumer chain does not store all metadata about each validator in the set, only the consensus address, power and pubkey since they are needed for module operation.
// CrossChainValidator defines the validators for CCV consumer module
message CrossChainValidator {
bytes address = 1;
int64 power = 2;
// pubkey is the consensus public key of the validator, as a Protobuf Any.
google.protobuf.Any pubkey = 3 [
(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey",
(gogoproto.moretags) = "yaml:\"consensus_pubkey\""
];
}
Adding a separate query on the consumer would yield a result identical to chaind query tendermint-validator-set
query.
I found that staking, distribution, gov module have been removed on consumer chains.
Please bear in mind that this statement is not valid for all consumer chains, only the ones currently running in Game of Chains testnet. A consumer chain may choose to use those modules, as interchain security can be viewed as just another SDK module.
You can check the democracy
consumer chain in the ICS codebase - it implements the staking, governance and distribution modules, alongside interchain security - it should have the APIs you mentioned enabled.
Thanks,
Closing for now. Will repoen if anything new emerges.
Problem
I am setting up rest server for GoC.
you can visit here. https://apollo.api.ping.pub/swagger/
Actually, there are listed in swagger, but it's return unimplement when you call it.
for example:
returns:
version:
Closing criteria
TODOs