Will motoko canister/dfx support protobuf?

I found that ledger canister has some interfaces that use protobuf for canister interface:

I guess this is done for efficiency.

But currently dfx and motoko canister only support candid-based interface calls, and cannot call this protobuf-based interface:

The Replica returned an error: code 4, message: "IC0503: Canister ryjl3-tyaaa-aaaaa-aaaba-cai trapped explicitly: Panicked at 'Deserialization Failed: "failed to decode Protobuf message: unexpected end group tag"', /home/peter/ic/rs/rust_canisters/dfn_core/src/endpoint.rs:34:41"

So will motoko canister/dfx support protobuf?

1 Like

Related: https://twitter.com/floatfloatboat/status/1399955112915726345?s=19

It seems like if you want to integrate the registry from a motoko canister, you’ll have to build protobufs yourself :grimacing:

2 Likes

Plus Motoko doesn’t even allow you to send “raw” IC messages, i.e. it only talks Candid.

You see, Candid is the official interop language for the Internet Computer, but not the only one. Or something like that…

2 Likes

@claudio ran into this recently trying to fetch subnet information from the nns registry canister

Looks like there may have been some ideas to implement this on the canister level in 2022, but not sure if that went anywhere…

1 Like

I think all the protobuff stuff was retired a while ago wasn’t it?