-
Notifications
You must be signed in to change notification settings - Fork 408
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 tvu port binding info to docs #4948
Conversation
d0edede
to
47e883c
Compare
@gregcusack do you like this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for putting this together! just a few thoughts. biggest thing is that we should probably differentiate TVU quic and udp sockets. And then somewhere add that TPU is setup somewhat similarly. Although TPU also uses bind_more_with_config
which I believe just enables more connections and ability to distribute load better.
docs/src/validator/tvu.md
Outdated
|
||
## TVU sockets | ||
|
||
Externally, TVU appears to bind to one port, typically 8002 UDP. Internally, TVU is actually bound with multiple sockets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we have both UDP and QUIC ports for TVU. Probably makes sense to differentiate these two somewhere. UDP multibind with reuseport works on OS level. For quic tvu, we only bind to one socket. and the multiplexing is done at the protocol level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docs/src/validator/tvu.md
Outdated
## TVU sockets | ||
|
||
Externally, TVU appears to bind to one port, typically 8002 UDP. Internally, TVU is actually bound with multiple sockets | ||
to improve kernel's handling of the packet queues. It is setup so that a node can advertise one external ip/port for TVU/TPU. We're binding multiple sockets to the same port using SO_REUSEPORT: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
external ip/port for TVU/TPU.
would maybe leave out TPU inline here. Maybe we can add something right after or even at the top saying TPU runs on similar port management logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added note about TPU
Co-authored-by: Greg Cusack <greg.cusack@anza.xyz>
Co-authored-by: Greg Cusack <greg.cusack@anza.xyz>
fd8e765
to
0bcd846
Compare
| | Turbine | | | +--+---------+ | | +-+------------+ | | | ||
+------------+ Forwards | +-------+ ^ | | | | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is Turbine Forwards
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Packets that are getting produced by the Forwarding stage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe i don't understand the nomenclature but I've never heard of "turbine forwards". Are you sure this shouldn't remain "TVU Forwards"? Is turbine the one doing the forwarding in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we have 2 principal flows of shreds in TVU - one that lands in them in the blockstore, and another one that sends them to the retransmit stage. Those are the packets to be forwarded via turbine tree. I guess we can call them turbine retransmits, but that could imply some sort of ARQ which is not what is happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ya i see what you're saying. turbine forwards are just when a node receives a shred in the turbine tree and needs to forward it to the next layer/its neighbors. got it
TVU (Transaction Validation Unit) is the logic of the validator | ||
responsible for validating and propagating blocks and processing | ||
those blocks' transactions through the runtime. | ||
responsible for propagating blocks between validators and ensuring that | ||
those blocks' transactions reach the replay stage. Its principal external | ||
interface is the turbine protocol. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure i completely agree with this. TVU validates the transactions it has received from turbine. turbine's role is propagating blocks between valdiators. TVU's role is validating those blocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well in this case the picture is all wrong (and it predates this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TVU is also responnsible for validator the blocks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possible reword here:
TVU (Transaction Validation Unit) is the logic of the validator | |
responsible for validating and propagating blocks and processing | |
those blocks' transactions through the runtime. | |
responsible for propagating blocks between validators and ensuring that | |
those blocks' transactions reach the replay stage. Its principal external | |
interface is the turbine protocol. | |
TVU (Transaction Validation Unit) is the validator component responsible for receiving, verifying, and propagating blocks between validators. It ensures transactions from blocks reach the replay stage for execution. Its principal external interface for block propagation is the Turbine protocol, which distributes blocks efficiently across the network. |
Co-authored-by: Greg Cusack <greg.cusack@anza.xyz>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Summary of Changes