ICRC-3 Rosetta and Certification

Congrats DFINITY and @mariop on the new rosetta!

I do have a question about ICRC-3 native tokens that don’t support the old query_blocks interface. I was thinking I could just add this endpoint and translate the blocks, but then the hash of the blocks won’t match. If we are certifying on ICRC-3 block types are we just stuck until you guys have time to get ICRC-3 into the schema?

Since this should be a pretty straightforward mapping is it a possible community initiative that we could find a solid rust developer to pull off while you all focus on other things?

5 Likes

It is possible to translate most query_blocks Blocks into the ICRC-3 blocks. The mapping is fine as the only difference is Nat64 which has the same hash as Nat. But why doing the translation? Wouldn’t it make sense and be more secure to start supporting ICRC-3 on the clients side?

1 Like

So for ICDV it has native ICRC3, meaning there is no query_blocks endpoint. I was considering adding it for Rosetta compatibility but was concerned that the hash might not work. Since I’m putting both btype at the top and op in the tx I’m thinking rosetta is going to calculate different hashes then my native ICRC3 code is providing and won’t like the blockchain.

See icrc3_get_block at Canister: agtsn-xyaaa-aaaag-ak3kq-cai - ICP Dashboard

The RepIndy hash of an ICRC3 block will be different than a legacy block because of the type.

Maybe rosetta will ignore the hashes not matching, but I assumed it would check them.