Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need explanation and documentation for some JSON RPC methods #1505

Closed
yangby-cryptape opened this issue Oct 27, 2023 · 0 comments · Fixed by #1651
Closed

Need explanation and documentation for some JSON RPC methods #1505

yangby-cryptape opened this issue Oct 27, 2023 · 0 comments · Fixed by #1651
Assignees
Labels

Comments

@yangby-cryptape
Copy link
Collaborator

yangby-cryptape commented Oct 27, 2023

Contact Details

No response

What happened

I am working on a problem I met when I tried to start an observer node.
p.s. Maybe it is a bug, but I'm not sure, I'm still trying to figure out it.

I need proofs for solve that problem, but I didn't know how to get the proof.

After wasting a lot of time, finally, I found there exists some APIs which are not listed in the APIs document.

pub trait AxonRpc {
#[method(name = "axon_getBlockById")]
async fn get_block_by_id(&self, block_id: BlockId) -> RpcResult<Option<Block>>;
#[method(name = "axon_getProofById")]
async fn get_proof_by_id(&self, block_id: BlockId) -> RpcResult<Option<Proof>>;
#[method(name = "axon_getMetadataByNumber")]
async fn get_metadata_by_number(&self, block_number: U256) -> RpcResult<Metadata>;
#[method(name = "axon_getProposalByNumber")]
async fn get_proposal_by_number(&self, block_number: U256) -> RpcResult<Proposal>;
#[method(name = "axon_getCurrentMetadata")]
async fn get_current_metadata(&self) -> RpcResult<Metadata>;
#[method(name = "axon_getCkbRelatedInfo")]
async fn get_ckb_related_info(&self) -> RpcResult<CkbRelatedInfo>;
#[method(name = "axon_getHardforkInfo")]
async fn hardfork_infos(&self) -> RpcResult<HashMap<HardforkName, HardforkStatus>>;
}

axon/core/api/README.md

Lines 148 to 155 in 9a0bdbd

- [Method `axon_getCurrentMetadata`](#method-axon_getcurrentmetadata)
- [Params](#params-32)
- [Returns](#returns-32)
- [Examples](#examples-32)
- [Method `axon_getHardforkInfo`](#method-axon_gethardforkinfo)
- [Params](#params-33)
- [Returns](#returns-33)
- [Examples](#examples-33)

@yangby-cryptape yangby-cryptape changed the title Need explanation and documentation of some JSON RPC methods Need explanation and documentation for some JSON RPC methods Oct 27, 2023
@Flouse Flouse removed the agenda label Dec 18, 2023
@Flouse Flouse linked a pull request Dec 21, 2023 that will close this issue
3 tasks
@Flouse Flouse assigned driftluo and unassigned KaoImin Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants