fix(consensus): get votes to actually send and get retained#1196
fix(consensus): get votes to actually send and get retained#1196InKryption wants to merge 9 commits intomainfrom
Conversation
09b7b44 to
6e2dea7
Compare
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
6798730 to
68b68c3
Compare
src/adapter.zig
Outdated
| }; | ||
| errdefer gpa.free(ls2); | ||
| try self.state.put(this_epoch, ctx2); | ||
| } else |e| if (this_epoch == this_epoch) { |
| push_msg_queue.queue.deinit(); | ||
| } | ||
|
|
||
| // self.broker.deinit(); |
There was a problem hiding this comment.
No, nice catch. At some point early on I was debugging gossip, and wanted to fix some leaks for some local testing code, but the specific way in which this works caused issues in the actual validator on exits I believe, so I commented it out. Probably will just delete it, unless you think it's worth handling deallocation here for whatever reason.
| // TODO: This method can result in us signing the same message for the same keypair more than once. | ||
| // Should investigate whether a hashmap to amortize the signing is faster. The current only usecase | ||
| // is when we send votes, and that *does* sign the same message twice. |
There was a problem hiding this comment.
It's rare to have more than 2-3 signers in a transaction so I doubt a hashmap would be favorable over a linear search.
Is "This method can result in us signing the same message for the same keypair more than once." supposed to be part of the todo, or is it a separate note?
There was a problem hiding this comment.
Fair point - I left this in as part of @Rexicon226's original suggestion (pinged in case he has any specific views or intel on this).
The redundant signage should probably be its own comment.
68b68c3 to
6698932
Compare
also replace `catch unreachable` with `expectEqual` in unit test.
the old instance was left over, and using it is a bug
also use unmanaged struct
Add test coverage for this to satisfy codecov
Adjust unit tests to insert a hash into the blockhash, instead of setting the slot's bank hash.
6698932 to
a19dcd6
Compare
This PR does a few things:
tpu_vote_addrin contact info and other relevant places, so that consensus/replay can actually send votes through to the correct place.sendmmsgempty iovecs with empty buffers.latest_validator_votes; one was leftover before the overarchingSlotDatastruct was introduced, meaning there were two inconsistent states tracking things differently.RpcContextServicethat occurs when on epoch 0 (which can arise when starting from genesis/testing on a local cluster).std.posix.errnowithstd.os.linux.E.init.varinto aconst, removing an empty IES,