-
Notifications
You must be signed in to change notification settings - Fork 39
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 method to fetch deployment info of metadata cell
on CKB
#1501
Comments
The deployment info of metadata cell is stored in metadata system contract. Firstly, it should be set by a transaction, and then you can call the |
I refers to metadata contract as the one which are responsible for managing the metadata cell on ckb of Axon-based chain.
|
Test curl --location --request POST 'https://rpc-alphanet-axon.ckbapp.dev/' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 42,
"jsonrpc": "2.0",
"method": "axon_getCkbRelatedInfo",
"params": []
}' Result: None CKB related info{"jsonrpc":"2.0","error":{"code":-49999,
"message":"Internal error",
"data":"[ProtocolError] Kind: Executor, Error: None CKB related info"},
"id":42}% |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
steps:
|
@wenyuanhust I just want metadata cell's type script info, including its |
@ashuralyk this is the infos about a sample metadata cell. The meatadata only contains 1 validator, with bls_key ( [0u8; 48] ). |
The issue is fixed in #1576 |
This comment was marked as outdated.
This comment was marked as outdated.
Forcerelay doesn't need to get metadata cell info from axon system contract. Ibc ckb contracts would have no way to verify that the metadata cell is the same as in axon system contract. It only needs to know the type script of the metadata cell. The validity of the metadata cell must be verified by end users offchain. For forcerelay, it's also not necessary that the metadata cell uses the metadata contract (as type script). The metadata cell could be a normal type-id cell, locked by e.g. multisig. |
What's the specific documentation work needed here? Deploying metadata cell or setting/fetching deployment info of metadata cell? |
If the Axon election feature is not activated, I think you are right. Forcerelay doesn't need axon-contract/metadata contract
But how? I think we need to leave a simple guide docs telling the end users how to verify it. Related Code
|
I think all we need now is the docs explaining how to create an Axon metadata cell. |
Assuming the metadata cell is a normal type-id cell (that doesn't use metadata contract), the user would need to verify two things:
|
LGTM, one more thing, tell the Forcerealy maintainer about the axon_metadata_type_script config? |
no need to fetch metadata cell from an official rpc method, but we really need the type script of it as the config value for forcerelay, so the question is how to get this type script |
If you fetch metadata type id by axon_getCkbRelatedInfo, it means you trust the axon node. There will be no need to verify the data in the corresponding metadata cell. You get the validators by parsing metadata cell data. |
context: https://discord.com/channels/674518700518408213/1173534867296895006/1173534872044843039
The text was updated successfully, but these errors were encountered: