# ICRC-3 Draft and Next Steps

**URL:** <https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295>\
**Category:** Developers\
**Tags:** community-consideration\
**Created:** [July 11, 2023, 5:02pm UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295 "2023-07-11T17:02:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mariop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/mariop/32/5114_2.png) [@mariop](https://forum.dfinity.org/u/mariop)\
**Post date:** [July 11, 2023, 5:02pm UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295/1 "2023-07-11T17:02:01Z")

</div>

Hi,

The draft for [ICRC-3: A standard to access the Transaction Log](https://github.com/dfinity/ICRC-1/pull/128) is ready for reviews. The timeline for the feature is the following:

1. the WG is going to address the comments during the 25 Jul meeting
2. after that, the WG will vote the ICRC-3 proposal
3. if the vote is positive then a NNS motion proposal will be submitted
4. if approved then ICRC-3 will be official 🎉

Thanks everyone.

Best,  
Mario

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [October 27, 2023, 7:14pm UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295/2 "2023-10-27T19:14:19Z")

</div>

In the draft there is a specification for calculating the hash of a transaction:

> <https://github.com/dfinity/ICRC-1/blob/icrc-3/standards/ICRC-3/README.md>

```auto
This hash function should be used by Ledgers to calculate the hash of the parent of a transaction and by clients to verify the downloaded transaction log.

The hash function is the representation-independent hashing of structured data used by the IC:

the hash of a Blob is the hash of the bytes themselves
the hash of a Text is the hash of the bytes representing the text
the hash of a Nat is the leb128 encoding of the number
the hash of an Int is the sleb128 encoding of the number
the hash of an Array is the hash of the concatenation of the hashes of all the elements of the array
the hash of a Map is the hash of the concatenation of all the hashed items of the map sorted. A hashed item is the tuple composed by the hash of the key and the hash of the value.

```

A couple of questions:

1. It isn’t specified what hashing function to use. Is it sha256?
2. Do we have a leb128 encoding and sleb128 encoding for Motoko anywhere?
3. What about very large nats and ints that may not fit into 128?

ccing @timo and @quint as I know they’ve done some hashing stuff.

---

<div class="post-metadata">

**Author:** ![timo](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/timo/32/5543_2.png) [@timo](https://forum.dfinity.org/u/timo)\
**Post date:** [October 27, 2023, 7:28pm UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295/3 "2023-10-27T19:28:36Z")

</div>

> [@skilesare](#):
>
> What about very large nats and ints that may not fit into 128?

The 128 in leb128 is just the base, it doesn’t limit the size of what can be encoded.

I don’t know about the other two questions.

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [November 2, 2023, 4:28pm UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295/4 "2023-11-02T16:28:42Z")

</div>

I created a ticket here:

> <https://github.com/dfinity/ICRC-1/issues/164>
>
> https://github.com/dfinity/ICRC-1/tree/icrc-3/standards/ICRC-3#icrc3\_get\_transac…tions
> 
> The certificate here supposes that a canister certifying icrc3 transactions only certifies its own transactions. In reality, many canisters that have a ledger will have many other things they want to certify.
> 
> examples:
> \- certifying json endpoint to retrieve blocks
> \- NFT canisters certifying content in the canister.
> 
> This x-refs with what @nathanosdev is working on with v2 certification.

The certificate here supposes that a canister certifying icrc3 transactions only certifies its own transactions. In reality, many canisters that have a ledger will have many other things they want to certify.

examples:

- certifying json endpoint to retrieve blocks
- NFT canisters certifying content in the canister.

This x-refs with what [@nathanosdev](https://github.com/nathanosdev) is working on with v2 certification.

cc @mariop

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [November 9, 2023, 8:13pm UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295/5 "2023-11-09T20:13:05Z")

</div>

This section is confusing: [https://github.com/dfinity/ICRC-1/blob/icrc-3/standards/ICRC-3/README.md#interaction-with-other-standards](https://github.com/dfinity/ICRC-1/blob/icrc-3/standards/ICRC-3/README.md#interaction-with-other-standards)

The block in the example looks wrong. The ts and the fee seem to be at the top level, but the description describes that the only top level items should be tx and phash. Shouldn’t ts and fee be inside the tx map?

---

<div class="post-metadata">

**Author:** ![icper](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@icper](https://forum.dfinity.org/u/icper)\
**Post date:** [November 9, 2023, 10:12pm UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295/6 "2023-11-09T22:12:02Z")

</div>

Hello, my friend! I am not a tech developer and I was wondering if icrc3 could support SNS token listings on cex exchanges, or would it significantly help?

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [November 9, 2023, 10:52pm UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295/7 "2023-11-09T22:52:27Z")

</div>

CEXs typically need a rosetta node. ICRC3 is nice for storing data to serve a rosetta node. They aren’t directly related, but support each other.

---

<div class="post-metadata">

**Author:** ![mariop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/mariop/32/5114_2.png) [@mariop](https://forum.dfinity.org/u/mariop)\
**Post date:** [November 10, 2023, 8:55am UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295/8 "2023-11-10T08:55:42Z")

</div>

> [@icper](#):
>
> Hello, my friend! I am not a tech developer and I was wondering if icrc3 could support SNS token listings on cex exchanges, or would it significantly help?

The ability to fetch blocks, which is what icrc3 is about, is required for listing but the current SNS Ledgers already have something in place. What is missing for CEX integration are two features:

1. The ability to send pre-signed transactions to the Ledger ([ICRC-24](https://github.com/dfinity/ICRC/issues/24))
2. The Rosetta node implementation. We are already working on it and you can see the prototype [here](https://github.com/dfinity/ic/tree/master/rs/rosetta-api/icrc1/rosetta).

The ability to list on CEX is a priority for my team and we should be able to deliver it in the next months.

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [November 10, 2023, 10:42am UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295/9 "2023-11-10T10:42:39Z")

</div>

I see that the spec now designates that the values should be at leafs in a certification tree.

> <https://github.com/dfinity/ICRC-1/blob/icrc-3/standards/ICRC-3/README.md#blocks-verification>

last\_block\_index and last\_block\_tree.

I’ll be difficult and ask what if the canister has two kinds of ledgers? Imagine an icrc7 nft that has an icrc3 ledger composed with an icrc 1/2 fungible token used for governance.

I guess you could combine them into the same ledger, but another option would be to have some kind of namespace.

I’m either car, should the leaf include the icrc namespace?

---

<div class="post-metadata">

**Author:** ![gatsby\_esp](https://avatars.discourse-cdn.com/v4/letter/g/e95f7d/32.png) [@gatsby\_esp](https://forum.dfinity.org/u/gatsby_esp)\
**Post date:** [November 10, 2023, 11:32am UTC](https://forum.dfinity.org/t/icrc-3-draft-and-next-steps/21295/10 "2023-11-10T11:32:23Z")

</div>

It’s been 3 years… Right on time
