Closed bkontur closed 1 year ago
You will need to inject specific types for that chain - it is not something that can be detected and auto-added.
(Well, I suppose there is possibly a way to auto-detect it via select raw RPC queries and then check up/down based on results. This is something you can ask for in the API repo itself - if there is enough requests for it, it can be done on that layer and will perculate to all users)
ok, thank you, also I found something like this bellow, does it look valid? or can you please, share me some valid example for specific types?
{
"--1": "Millau Types",
"MillauAddress": "AccountId",
"MillauLookupSource": "AccountId",
"MillauBalance": "u64",
"MillauBlockHash": "H512",
"MillauBlockNumber": "u64",
"MillauHeader": {
"parent_Hash": "MillauBlockHash",
"number": "Compact<MillauBlockNumber>",
"state_root": "MillauBlockHash",
"extrinsics_root": "MillauBlockHash",
"digest": "MillauDigest"
},
"MillauDigest": {
"logs": "Vec<MillauDigestItem>"
},
"MillauDigestItem": {
"_enum": {
"Other": "Vec<u8>",
"AuthoritiesChange": "Vec<AuthorityId>",
"ChangesTrieRoot": "MillauBlockHash",
"SealV0": "SealV0",
"Consensus": "Consensus",
"Seal": "Seal",
"PreRuntime": "PreRuntime"
}
},
"--2": "Rialto Types",
"RialtoAddress": "MultiAddress",
"RialtoLookupSource": "MultiAddress",
"RialtoBalance": "u128",
"RialtoBlockHash": "H256",
"RialtoBlockNumber": "u32",
"RialtoHeader": {
"parent_Hash": "RialtoBlockHash",
"number": "Compact<RialtoBlockNumber>",
"state_root": "RialtoBlockHash",
"extrinsics_root": "RialtoBlockHash",
"digest": "RialtoDigest"
},
"RialtoDigest": {
"logs": "Vec<RialtoDigestItem>"
},
"RialtoDigestItem": {
"_enum": {
"Other": "Vec<u8>",
"AuthoritiesChange": "Vec<AuthorityId>",
"ChangesTrieRoot": "RialtoBlockHash",
"SealV0": "SealV0",
"Consensus": "Consensus",
"Seal": "Seal",
"PreRuntime": "PreRuntime"
}
},
"--3": "Common types",
"AccountSigner": "MultiSigner",
"SpecVersion": "u32",
"RelayerId": "AccountId",
"SourceAccountId": "AccountId",
"ImportedHeader": {
"header": "BridgedHeader",
"requires_justification": "bool",
"is_finalized": "bool",
"signal_hash": "Option<BridgedBlockHash>"
},
"AuthoritySet": {
"authorities": "AuthorityList",
"set_id": "SetId"
},
"Id": "[u8; 4]",
"ChainId": "Id",
"LaneId": "Id",
"MessageNonce": "u64",
"BridgeMessageId": "(Id, u64)",
"MessageKey": {
"lane_id": "LaneId",
"nonce:": "MessageNonce"
},
"InboundRelayer": "AccountId",
"InboundLaneData": {
"relayers": "Vec<UnrewardedRelayer>",
"last_confirmed_nonce": "MessageNonce"
},
"UnrewardedRelayer": {
"relayer": "RelayerId",
"messages": "DeliveredMessages"
},
"DeliveredMessages": {
"begin": "MessageNonce",
"end": "MessageNonce",
"dispatch_results": "BitVec"
},
"OutboundLaneData": {
"oldest_unpruned_nonce": "MessageNonce",
"latest_received_nonce": "MessageNonce",
"latest_generated_nonce": "MessageNonce"
},
"MessageData": {
"payload": "MessagePayload",
"fee": "Fee"
},
"MessagePayload": "Vec<u8>",
"BridgedOpaqueCall": "Vec<u8>",
"OutboundMessageFee": "Fee",
"OutboundPayload": {
"spec_version": "SpecVersion",
"weight": "Weight",
"origin": "CallOrigin",
"dispatch_fee_payment": "DispatchFeePayment",
"call": "BridgedOpaqueCall"
},
"CallOrigin": {
"_enum": {
"SourceRoot": "()",
"TargetAccount": "(SourceAccountId, MultiSigner, MultiSignature)",
"SourceAccount": "SourceAccountId"
}
},
"DispatchFeePayment": {
"_enum": {
"AtSourceChain": "()",
"AtTargetChain": "()"
}
},
"MultiSigner": {
"_enum": {
"Ed25519": "H256",
"Sr25519": "H256",
"Ecdsa": "[u8;33]"
}
},
"MessagesProofOf": {
"bridged_header_hash": "BridgedBlockHash",
"storage_proof": "Vec<StorageProofItem>",
"lane": "LaneId",
"nonces_start": "MessageNonce",
"nonces_end": "MessageNonce"
},
"StorageProofItem": "Vec<u8>",
"MessagesDeliveryProofOf": {
"bridged_header_hash": "BridgedBlockHash",
"storage_proof": "Vec<StorageProofItem>",
"lane": "LaneId"
},
"UnrewardedRelayersState": {
"unrewarded_relayer_entries": "MessageNonce",
"messages_in_oldest_entry": "MessageNonce",
"total_messages": "MessageNonce"
},
"AncestryProof": "()",
"MessageFeeData": {
"lane_id": "LaneId",
"payload": "OutboundPayload"
},
"Precommit": {
"target_hash": "BridgedBlockHash",
"target_number": "BridgedBlockNumber"
},
"AuthoritySignature": "[u8;64]",
"AuthorityId": "[u8;32]",
"SignedPrecommit": {
"precommit": "Precommit",
"signature": "AuthoritySignature",
"id": "AuthorityId"
},
"Commit": {
"target_hash": "BridgedBlockHash",
"target_number": "BridgedBlockNumber",
"precommits": "Vec<SignedPrecommit>"
},
"GrandpaJustification": {
"round": "u64",
"commit": "Commit",
"votes_ancestries": "Vec<BridgedHeader>"
},
"Address": "MillauAddress",
"LookupSource": "MillauLookupSource",
"Fee": "MillauBalance",
"Balance": "MillauBalance",
"Hash": "MillauBlockHash",
"BlockHash": "MillauBlockHash",
"BlockNumber": "MillauBlockNumber",
"BridgedBlockHash": "RialtoBlockHash",
"BridgedBlockNumber": "RialtoBlockNumber",
"BridgedHeader": "RialtoHeader",
"Parameter": {
"_enum": {
"MillauToRialtoConversionRate": "u128"
}
}
}
this seems to work kind of, I can access but I dont see blocks:
I was told that there is different "hashing algorithm", can polkadot.js.org/apps work with different "hashing algorithm"?
It depends. You can specify as hasher function in your typesBundle and it will use that hasher. For instance on ETH-compatible chains such as Moonbeam this is used to inject keccak. Bear in that case all hashing is be done with the specific function.
do you mean something like this: https://github.com/PureStake/moonbeam/tree/master/moonbeam-types-bundle ?
This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.
I did dig a bit in the API - this is so-able, but I do think there are holes on on-chain vs block hashes in there.
It can o lay be done with testing against the node and seeing what doesn’t work.
This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
I'm submitting a ...
What is the current behavior and expected behavior? I am running local node with 64bytes BlockHash, but https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9945#/explorer cannot connect to that and shows error:
is there any workaround?
What is the motivation for changing the behavior? Testing purposes
Please tell us about your environment: