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

Bridge upgrade on Rococo/Wococo #3734

Closed
tomusdrw opened this issue Jul 6, 2021 · 6 comments · Fixed by #3835
Closed

Bridge upgrade on Rococo/Wococo #3734

tomusdrw opened this issue Jul 6, 2021 · 6 comments · Fixed by #3835

Comments

@tomusdrw
Copy link

tomusdrw commented Jul 6, 2021

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
Copy link
Member

jacogr commented Jul 6, 2021

Sadly the JSON as presented really helps close to 0.

  • it doesn't not have any module-specific breakdowns, so it is impossible to see what to add where
  • it cannot be used as-is, since it first need to filter (e.g. stuff like Address -> AccountId is in there)

So working from that is an impossible task.

@tomusdrw
Copy link
Author

tomusdrw commented Jul 6, 2021

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
Copy link
Member

jacogr commented Jul 6, 2021

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
Copy link
Author

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.

{
 "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<StorageProofItem>",
    "lane": "LaneId"
  },
  "StorageProofItem": "Vec<u8>",
  "InboundRelayer": "AccountId",
  "MessagesProofOf": {
    "bridged_header_hash": "BridgedBlockHash",
    "storage_proof": "Vec<StorageProofItem>",
    "lane": "LaneId",
    "nonces_start": "MessageNonce",
    "nonces_end": "MessageNonce"
  },
  "OutboundPayload": {
    "spec_version": "u32",
    "weight": "Weight",
    "origin": "CallOrigin",
    "dispatch_fee_payment": "DispatchFeePayment",
    "call": "Vec<u8>"
  },
    "DispatchFeePayment": {
    "_enum": {
      "AtSourceChain": "()",
      "AtTargetChain": "()"
    }
  },
  "CallOrigin": {
    "_enum": {
      "SourceRoot": "()",
      "TargetAccount": "(AccountId, MultiSigner, MultiSignature)",
      "SourceAccount": "AccountId"
    }
  },
  "OperatingMode": {
    "_enum": {
      "Normal": "()",
      "RejectingOutboundMessages": "()",
       "Halted": "()"
    }
  },
  "Parameter": "()",
    "InboundLaneData": {
    "relayers": "Vec<UnrewardedRelayer>",
    "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<u8>",
    "fee": "Balance"
  },
  "MessageKey": {
    "lane_id": "LaneId",
    "nonce:": "MessageNonce"
  }
}

@jacogr
Copy link
Member

jacogr commented Aug 3, 2021

Thank you.

@jacogr jacogr mentioned this issue Aug 3, 2021
@polkadot-js-bot
Copy link

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.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants