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 spec for data propagation #975

Closed
wants to merge 3 commits into from
Closed

Conversation

mslipper
Copy link
Contributor

@mslipper mslipper commented Apr 21, 2019

This PR introduces the topics used to propagate data through the ETH 2.0 network. I only included beacon blocks and attestations for now. I've also not made any prescriptions around the specific pubsub implementation we use.

specs/networking/block-propagation.md Outdated Show resolved Hide resolved

### Attestations

**Topic:** `attestations/${subnet}`
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about having ${subnet}/ as the prefix?

Co-Authored-By: mslipper <me@matthewslipper.com>
Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

whoops, just realized going to use #935.
leaving comments here regardless

specs/networking/block-propagation.md Outdated Show resolved Hide resolved
)
```

Notifies interested nodes that a new beacon block has been created. Nodes are expected to use one of the RPC APIs (Method ID `12`, for example) to fill out the block header and block body.
Copy link
Contributor

Choose a reason for hiding this comment

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

Gossiping of full blocks is the current expected behavior rather than multiple rounds of comms via RPC

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Roger, will update.

Co-Authored-By: mslipper <me@matthewslipper.com>
@djrtwo
Copy link
Contributor

djrtwo commented May 1, 2019

safe to close @mslipper ?


## Shard Subnets

Topics involving single shards are mapped to "subnets." A shard's subnet is calculating by calculating `shard_number % SHARD_SUBNET_COUNT`. Grouping shards into subnets as described confers the following benefits:
Copy link

Choose a reason for hiding this comment

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

Suggested change
Topics involving single shards are mapped to "subnets." A shard's subnet is calculating by calculating `shard_number % SHARD_SUBNET_COUNT`. Grouping shards into subnets as described confers the following benefits:
Topics involving single shards are mapped to "subnets". A shard's subnet is calculated by `shard_number % SHARD_SUBNET_COUNT`. Grouping shards into subnets as described confers the following benefits:

Copy link

Choose a reason for hiding this comment

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

Grouping shards into subnets as described confers the following benefits

Does the shard grouping here mean, shards with the same shard_id % SHARD_SUBNET_COUNT are "grouped" together?

Copy link
Member

Choose a reason for hiding this comment

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

yeah, just a way to batch shards into "subnets" in the case that there would be too few nodes in a subnet if we do the natural thing -- one subnet per shard.

so you can imagine there are SHARD_COUNT shards, where each has a unique number from 0..SHARD_COUNT called the shard_id. here we introduce a subnet_id -- if you are curious about a particular shard S you can compute S % SHARD_SUBNET_COUNT to get the subnet_id


Topics involving single shards are mapped to "subnets." A shard's subnet is calculating by calculating `shard_number % SHARD_SUBNET_COUNT`. Grouping shards into subnets as described confers the following benefits:

- Shards using smaller amounts network traffic are grouped with shards with more network traffic, thus increasing the stability of the network by reducing the likelihood that less-used shards will be eclipsed.
Copy link

@mhchia mhchia May 1, 2019

Choose a reason for hiding this comment

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

Shards using smaller amounts network traffic are grouped with shards with more network traffic

Sorry, could you elaborate more on this? Does it assume smaller amounts networks are always grouped with more the ones with more traffic?


Topics involving single shards are mapped to "subnets." A shard's subnet is calculating by calculating `shard_number % SHARD_SUBNET_COUNT`. Grouping shards into subnets as described confers the following benefits:

- Shards using smaller amounts network traffic are grouped with shards with more network traffic, thus increasing the stability of the network by reducing the likelihood that less-used shards will be eclipsed.
Copy link
Member

Choose a reason for hiding this comment

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

yeah, how will this work given that % will produce a uniform distribution b/t namespaces?

@djrtwo
Copy link
Contributor

djrtwo commented May 6, 2019

safe to close @mslipper ?

@mslipper
Copy link
Contributor Author

mslipper commented May 6, 2019

Safe to close.

@djrtwo djrtwo closed this May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants