Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

RFC: trits-t1b1 encoding #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Alex6323
Copy link
Contributor

@Alex6323 Alex6323 commented Sep 25, 2019

@Alex6323 Alex6323 marked this pull request as ready for review September 26, 2019 12:23

# Motivation

This encoding of sequences of balanced trits is necessary for the `Curl` hash function and therefore still necessary to allow for the Bee framework to interoperate with the current IOTA mainnet.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curl can be implemented using a more efficient encoding (64 trits per two 64-bit words). This way memory footprint can be reduced by a factor of 4. When pointer arithmetic is used to access words of Curl state (instead of LUT) then the memory footprint reduces additionally be a factor of 4/3. All in all, optimizing of Curl is worth investigating.

So, it's not a very convincing argument that "balanced trits is necessary for the Curl". Maybe we should talk about Curl-compliant encoding?

t1b1 however is the simplest encoding that could be very useful for tests, to compare invariants when other encodings are used to perform the same trits transformation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not if we actually do a difference between Curl and PCurl. Per se Curl is the one operating on T1B1 while PCurl accepts different encodings. It is briefly mentioned in the base RFC here https://github.com/iotaledger/bee-rfcs/pull/10/files#diff-b075c83057cb59013a66d6ee87aa3986R31.

Copy link
Contributor Author

@Alex6323 Alex6323 Sep 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, I know of BCT-Curl. There is already a Rust port of it btw. But can we use it as a full replacement for Standard-Curl? Or putting this question differently: Is there really no other usecase for T1B1 other than tests, debugging, ....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for single hashing Curl is faster than PCurl because of all the overhead it has. Also, almost all prototyping is done with T1B1.

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 this pull request may close these issues.

3 participants