polkadot-js / api

Promise and RxJS APIs around Polkadot and Substrate based chains via RPC calls. It is dynamically generated based on what the Substrate runtime provides in terms of metadata.
Apache License 2.0
1.07k stars 350 forks source link

Bridge upgrade on Rococo/Wococo #3734

Closed tomusdrw closed 3 years ago

tomusdrw commented 3 years ago

We're planning to deploy Bridge messaging to Rococo/Wococo soonish (PR has been merged).

After the runtime upgrade I suspect there will be a bunch of missing types. You can find all the custom types we currently expect to be needed for Rococo here.

This issue is just a heads up to avoid the API breaking before the upgrade. The types that will be needed are the ones from pallet-bridge-messages (I think it may end up adding almost all of the types from the linked JSON file).

jacogr commented 3 years ago

Sadly the JSON as presented really helps close to 0.

So working from that is an impossible task.

tomusdrw commented 3 years ago

So working from that is an impossible task.

Let me know how we can make it possible then. From what I've understood marking types that come from pallet-bridge-messages would help, is that correct? What format would suit you best regarding the definition of the types?

If that helps we also have networks with these pallets already deployed, namely: wss://wss.rialto.brucke.link and wss://wss.millau.brucke.link.

jacogr commented 3 years ago

Networks are the best - from there can actually categorize the types into the relevant pallets. (It is the only way this can be managed properly - JSON is great for quick-and dirty, but not for maintaining)

tomusdrw commented 3 years ago

Here is a minimal JSON I came up with after testing with Rococo-local. Please let me know if that's sufficient. Also feel free to test with live networks mentioned earlier (I'd suggest Rialto cause it has closest type definition to Rococo):

If that helps we also have networks with these pallets already deployed, namely: wss://wss.rialto.brucke.link and wss://wss.millau.brucke.link.

```json { "LaneId": "[u8; 4]", "MessageNonce": "u64", "OutboundMessageFee": "Balance", "UnrewardedRelayersState": { "unrewarded_relayer_entries": "MessageNonce", "messages_in_oldest_entry": "MessageNonce", "total_messages": "MessageNonce" }, "MessagesDeliveryProofOf": { "bridged_header_hash": "BlockHash", "storage_proof": "Vec", "lane": "LaneId" }, "StorageProofItem": "Vec", "InboundRelayer": "AccountId", "MessagesProofOf": { "bridged_header_hash": "BridgedBlockHash", "storage_proof": "Vec", "lane": "LaneId", "nonces_start": "MessageNonce", "nonces_end": "MessageNonce" }, "OutboundPayload": { "spec_version": "u32", "weight": "Weight", "origin": "CallOrigin", "dispatch_fee_payment": "DispatchFeePayment", "call": "Vec" }, "DispatchFeePayment": { "_enum": { "AtSourceChain": "()", "AtTargetChain": "()" } }, "CallOrigin": { "_enum": { "SourceRoot": "()", "TargetAccount": "(AccountId, MultiSigner, MultiSignature)", "SourceAccount": "AccountId" } }, "OperatingMode": { "_enum": { "Normal": "()", "RejectingOutboundMessages": "()", "Halted": "()" } }, "Parameter": "()", "InboundLaneData": { "relayers": "Vec", "last_confirmed_nonce": "MessageNonce" }, "UnrewardedRelayer": { "relayer": "RelayerId", "messages": "DeliveredMessages" }, "DeliveredMessages": { "begin": "MessageNonce", "end": "MessageNonce", "dispatch_results": "BitVec" }, "OutboundLaneData": { "latest_generated_nonce": "MessageNonce", "latest_received_nonce": "MessageNonce", "oldest_unpruned_nonce": "MessageNonce" }, "MessageData": { "payload": "Vec", "fee": "Balance" }, "MessageKey": { "lane_id": "LaneId", "nonce:": "MessageNonce" } } ```
jacogr commented 3 years ago

Thank you.

polkadot-js-bot commented 3 years ago

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.