ICP vs ckBTC ledgers

Hi @lastmjs,
Yes I can explain. What you are seeing is the result of two actions: consolidation of the did files into one per canister and the lack of ICRC-3, which is a standard way to access the transaction log.

The consolidation of did files happened with 3a207e. Before that we had several files per ledger. Specifically we had one file for the standard endpoints and one for the non-standard ones. The reason why we had to move away from having multiple files is that we can attach only one file to a canister and this file should have all the public endpoints. That’s why we had to consolidate them and that’s why you are seeing a single file with a mixture of standard and non-standard endpoint. This shouldn’t be a problem because the standard endpoints are prefixed with icrc*_.

About the standards themselves, both ledgers support ICRC-1 and will support ICRC-2 but only ckBTC ledger can support ICRC-3. ICRC-3 is still under development and because of this it cannot be supported yet. Still, the ckBTC ledger needs a way to access the the transaction log right now and cannot wait for ICRC-3. Therefore:

  1. The ICP ledger has a custom endpoint called query_blocks which returns its blocks. This endpoint is unique to the ICP ledger and it exists only because of account identifiers which are not compatible with ICRC-1
  2. The ckBTC ledger needs a way to fetch blocks and transactions while we are waiting for ICRC-3. Therefore two endpoints called get_blocks and get_transactions have been added. These two endpoints are shaped around the proposal for ICRC-3 (but may very well end up being incompatible with it).

I hope this clarifies the changes to the repository. Happy to clarify more if needed.

1 Like