Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Optimistic transaction propagation signal doc #20283

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

jbiseda
Copy link
Contributor

@jbiseda jbiseda commented Sep 28, 2021

Problem

See #17439

Summary of Changes

Fixes #

])
```

First, only epoch staked nodes will be considered regardless of presence of
Copy link
Contributor

Choose a reason for hiding this comment

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

This change will need to be coordinated with some of the RPC providers so that their nodes aren't cut off.

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 don't think this would substantially change the shred distribution to non-staked nodes. It would mostly change the behavior to staked nodes before the next epoch. I'm proposing that we still distribute shreds to other nodes, they just fall outside of the first pass of the calculation which would become deterministic.


### Questions

- Should receiving nodes attempt to verify that the origin of the shred was
Copy link
Contributor

@carllin carllin Sep 28, 2021

Choose a reason for hiding this comment

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

Ah, this is only necessary once a a validator needs to infer from receiving the shred some confidence in the path it went through? Without that need, it doesn't seem like a validator in turbine really cares about where it got the shred from, they just need to decide from the shred seed whether to retransmit the shred.

Could you add a section describing what sort of guarantees we're trying to infer from receiving shreds over turbine? I.e. if we receive X shreds via turbine, what can we deduce about the % confidence that the rest of the network will also get this block, and what is the justification (some quick maths/probability calculation) about why this is the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, checking the packet source address would be more of a sanity check as it wouldn't prevent spoofing. It's not required for expected operation of the retransmission.

Any signal that would be generated would be advisory. This would indicate the following: if the network is following the above retransmission algorithm then when the current shred was received by this node it should also have been attempted to have been sent to nodes covering X stake.

I think a stronger statement would require additional inter-node communication (like some random sampling of nodes that are also expected to have received the shred for confirmation). @aeyakovenko what level of confidence did you have in mind?

Copy link
Member

Choose a reason for hiding this comment

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

we can add signatures on hops sometime later. I think initially I am fine with

  1. assuming UDP spoofing isn't an issue
  2. adding private p2p ports between any two nodes on the network, which would make it hard to do 1
  3. aggregated signatures on hops with BLS (but that will take a while to ship)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Something else we could consider would be to perform the stake distribution calculation on the client side. The validator transmission is made deterministic and the validator simply exposes whether it has received a shred. The client can then perform the stake distribution calculation using validator responses from one or more nodes depending on the client confidence requirements. This would let the client select how much sampling is required for its use case and would offload calculation overhead to the client.

@jbiseda jbiseda marked this pull request as ready for review September 28, 2021 12:30
Shreds are then retransmitted to up to FANOUT neighbors and up to FANOUT
children.

## Deterministic retransmission tree
Copy link
Contributor

Choose a reason for hiding this comment

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

I do already have some draft code related to this part. That was actually the motivation of adding ClusterNodes and ClusterNodesCache, so that I can make this change. I can tidy that out and send that as a pull-request.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, if you already have changes which would separate the retransmission into a deterministic set from the epoch staked nodes that sounds great.

Copy link
Contributor

Choose a reason for hiding this comment

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

#20480
the goal was to reduce reliance on gossip, and impact of unstaked nodes joining and leaving cluster.
but it also makes turbine peers deterministic given the set of staked nodes.

@@ -0,0 +1,109 @@
---
title: Optimistic Transaction Propagation Signal
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the document could expand with more detail on how (after retransmit stage) we will infer "Optimistic Execution" for shreds, and what would happen then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intention is to expose some new commitment level like confirmed/processed to indicate some level of distribution across staked nodes.

Copy link
Member

@aeyakovenko aeyakovenko left a comment

Choose a reason for hiding this comment

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

I think it's fairly close to the right thing. it will take some iteration on the implementation to figure out though

@jbiseda jbiseda merged commit 221b0f6 into solana-labs:master Nov 3, 2021
@jbiseda jbiseda deleted the propagation-signal-doc branch November 3, 2021 21:20
dankelleher pushed a commit to identity-com/solana that referenced this pull request Nov 24, 2021
frits-metalogix added a commit to identity-com/solana that referenced this pull request Nov 24, 2021
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