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
proposal: remove ValidatorAddress from Vote #2226
Comments
Its actually at least 21 bytes, b/c protobuf field number.
At 10 second block times (significantly longer then our testnet block times to drive the point) we have
Do you mean amino encoding the struct w/ and w/o the address field and measuring the size difference? Or do you want benchmarks on changes to sync times. |
These votes aren't stored in the blockchain. They're just part of the real time bandwidth cost, not the long term disk cost. So this shouldn't actually affect when we need to implement state-syncing by. Yes we write them to the WAL, but we already rotate that. And the commit is currently being refactored to just be Signature and Timestamp (#2179)
It's strictly about the real-time consensus performance time. Ie. how much faster can the live network commit blocks when its votes are 21 bytes smaller Would you still prioritize this pre-launch? |
I forgot that prevotes / precommits aren't included in a block, its just the commit. My bad. This means that at 1 month, we would expect 1 extra GB between every pair of peers on the gossip network. Given that the average node is set to get 50 peers by default (Perhaps less, since most are inbound), that means 50 GB extra bandwidth per pair of nodes. At 100mbps, that translates to a node taking (at least) an extra 1.1 hours. Figuring out the avg amount of Round trips needed per block in our expected network topology seems super complicated / perhaps impossible to measure, but I don't think 1.1 hours of delay per node over the course of a month should warrant this being a launch priority. I agree then, post-launch sounds good to me. |
I think we should do this as part of #2179. Without removing the |
I don't think we should include this in #2179. We want to try to minimize the number of changes happening at once, even though they're related.
Can we maybe try to minimize the number of places we need to do this conversion?
I don't think that's reasonable. Addresses are too useful a visual crutch for looking at logs, especially as validator set order may be changing rapidly. The whole point of including the addresses in the votes is to ease the debugging/visualization experience. |
Why can't we include the validator address as an unexported variable? If we're auto generating from .proto files, then we could make a wrapper struct. |
For what benefit? |
So that we can print the address in all debug logs in the same manner, but we don't send this field over the wire. |
But what good is printing the field if we're not even going to receive it?! Here is the flow:
|
Maybe I'm misunderstanding. The flow I'm proposing is:
Seems like this minimizes code changes, while enabling us to get what we want. |
I don't think it's worth the trouble. We're not really benefitting by removing the address, just causing more complexity by trying to inject it back in. |
Closing this for now. It will be tracked in the ADR that gets written for #2179 (comment) |
It's useful from a debugging standpoint to have the address in the vote but we don't sign it and its redundant since we include the ValidatorIndex, so it's really just 20-bytes in every vote that we could do without.
Before we remove it we should make sure we can actually measure the performance benefit we'll get. We should also first consider the relationship between validator set, vote set, and consensus state in the code and see if it can be improved.
The text was updated successfully, but these errors were encountered: