Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clarifiication on uncle headers #158

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion history-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,11 @@ ssz_uncles = SSZList(encoded_uncles: Byte, max_length=MAX_ENCODED_U
encoded_uncles = rlp.encode(list_of_uncle_headers)
```

Note the type-specific encoding might be different in future transaction types, but this encoding
Note 1: The type-specific encoding might be different in future transaction types, but this encoding
works for all current transaction types.

Note 2: The `list_of_uncle_headers` refers to the array of uncle headers [defined in the devp2p spec](https://github.com/ethereum/devp2p/blob/master/caps/eth.md#block-encoding-and-validity).
Copy link
Contributor

Choose a reason for hiding this comment

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

Using devp2p as the reference is not wrong, but also not helpful, maybe? It's really the yellow paper spec that defines it. That format is consensus-relevant, because the uncles hash found in the block header is the hash of rlp.encode(list_of_uncle_headers). That's the primary reason for the choice. I would have a hard time using "devp2p did it this way" as a primary justification for any of our design choices :P

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, gotcha, sorry. I remember that in your PR and I'm good with it. I just wanted to explain what list_of_uncle_headers actually was since it's not clearly defined that it's an array of byte arrays where each byte array is the raw bytes representation of the uncle header.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I revised my reference to point to the yellow paper and then further define in hopefully clear language how the uncles should be represented.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool looks good, thanks for adding!


#### Receipts

```
Expand Down