Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

MPT description #136

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

MPT description #136

wants to merge 92 commits into from

Conversation

miha-stopar
Copy link
Contributor

No description provided.

- `sel2`

Whether the factor 16 is used or not is determined by `sel1/sel2` columns.
`sel1/sel2` are boolean values and it holds `sel1 + sel2 = 0`.

Choose a reason for hiding this comment

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

I guess sel1 + sel2 = 0 would indicate both sel1 and sel2 are 0. Should it be sel1 + sel2 = 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry @noel2004 , I haven't seen the question until now. But you are totally right, I will fix it!

@smtmfft
Copy link
Contributor

smtmfft commented Jun 14, 2022

A dumb question: What does the s_/c_ stand for? state & change?

@miha-stopar
Copy link
Contributor Author

A dumb question: What does the s_/c_ stand for? state & change?

Not dumb at all. I am not sure whether I thought of being state & change when I named it, but it's actually a very good description of what it is about! :) Not sure, maybe it would cause less confusion if I rename it to prev_advices/cur_advices. What do you think?

@smtmfft
Copy link
Contributor

smtmfft commented Jun 14, 2022

prev_advices/cur_advices. What do you think?

maybe they make less confusion, but personally I just thought a new pair of words like these instead of prev_/curr_ is fancier. :)

@miha-stopar
Copy link
Contributor Author

prev_advices/cur_advices. What do you think?

maybe they make less confusion, but personally I just thought a new pair of words like these instead of prev_/curr_ is fancier. :)

Ok, will leave it for now :). Thanks for looking into it!

Copy link
Collaborator

@ChihChengLiang ChihChengLiang left a comment

Choose a reason for hiding this comment

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

I'm slowly crawling through the doc 🐢

Let's say we have a leaf:

```
key = [10,6,3,5,7,0,1,2,12,1,10,3,10,14,0,10,1,7,13,3,0,4,12,9,9,2,0,3,1,0,3,8,2,13,9,6,8,14,11,12,12,4,11,1,7,7,1,15,4,1,12,6,11,3,0,4,2,0,5,11,5,7,0,16]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't follow the part.
A hashed output should be 32 bytes, but the array has 64 elements. Are we representing the key in nibbles here?

If the key is in nibbles, the value in the array should range from 0~15. Why is the last one 16?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a bit of info in 49a36c6.

It's nibbles, yes, just for demonstration, but as it's written down below this gets transformed into bytes (actually a compact form) for a proof witness.

The last byte is a terminator - this is to distinguish between a leaf and extension node (both are using ShortNode struct).

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.

4 participants