Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

add verifying a merkle tree#29

Open
ZhouHansen wants to merge 1 commit intodat-ecosystem-archive:masterfrom
ZhouHansen:master
Open

add verifying a merkle tree#29
ZhouHansen wants to merge 1 commit intodat-ecosystem-archive:masterfrom
ZhouHansen:master

Conversation

@ZhouHansen
Copy link
Copy Markdown

🔦 documentation change

Add how to verify a merkle tree to ch01-02-merkle-tree.md

Checklist

  • documentation is changed or added

Context

No

Semver Changes

a patch

Copy link
Copy Markdown

@decentral1se decentral1se left a comment

Choose a reason for hiding this comment

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

Thanks for pushing this along!

6: G
7: H
```
Now, Alice wants to recieve and verify the data `D`, to accomplish this, then she need to recieve: (marked with `~`)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
Now, Alice wants to recieve and verify the data `D`, to accomplish this, then she need to recieve: (marked with `~`)
Now, Alice wants to recieve and verify the data `D`. To accomplish this she needs to recieve: (marked with `~`)

```

We will first verify the signature on hash #7: `verify(#7, signature, publickey)`,
then we verify the chunk 3:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
then we verify the chunk 3:
then we verify chunk 3

2. hash #6 and recieved #4: #5 = hash(#6 + #4)
3. hash #5 and recieved #1: #3 = hash(#1 + #5)
4. hash #3 and recieved #11: #7 = hash(#3 + #11)
5. if our calculated #7 is equal to our received signed #7, then we know the chunk3 we received is valid.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
5. if our calculated #7 is equal to our received signed #7, then we know the chunk3 we received is valid.
5. if our calculated #7 is equal to our received signed #7, then we know the chunk #3 we received is valid.

6: G
7: H
```
Now, Alice wants to recieve and verify the data `D`, to accomplish this, then she need to recieve: (marked with `~`)
Copy link
Copy Markdown
Contributor

@yoshuawuyts yoshuawuyts Jul 26, 2019

Choose a reason for hiding this comment

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

Suggested change
Now, Alice wants to recieve and verify the data `D`, to accomplish this, then she need to recieve: (marked with `~`)
Now, Alice wants to receive and verify the data `D`, to accomplish this, then she need to receive: (marked with `~`)

@yoshuawuyts
Copy link
Copy Markdown
Contributor

@ZhouHansen this makes a lot of sense; thanks for writing!

@ZhouHansen
Copy link
Copy Markdown
Author

ZhouHansen commented Aug 3, 2019

I only know a little bit of verifying a merkle tree. I want to know how bitfield works with merkle tree, but found no doc.

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