Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement certificate exchange (#378)
* Implement certificate exchange This implements a basic certificate exchange protocol (which still needs tests and is probably slightly broken at the moment). Importantly, it's missing the ability to fetch power table deltas for validating future instances (beyond the latest certificate). My plan is to implement this as a somewhat separate protocol (likely re-using a lot of the same machinery). However: 1. That protocol is only needed for observer nodes. Active participants in the network will follow the EC chain and will learn these power tables through the EC chain. 2. That protocol won't need as much guessing because we'll _know_ which power tables should be available given the latest certificate we've received. The large remaining TODOs are tests and design documentation. The entire protocol has been in constant flux so... I'm sure there are some inconsistencies... * revert golang version bump * certexchange: []PowerEntry -> PowerEntries * certexchange: better handle setup errors * fix generated files * remove unused parameter * remove preferential new-peer handling It was necessary when we subscribed to new certificates, but not anymore. * remove time from the interval predictor It makes it harder to test. * basic predictor test * test and improve predictor convergence * improve convergence test * test hit/miss tracking * improve initialization * test peer tracker * fix include power-table bug * remove special-casing for zero limit * basic client/server test * don't return instances beyond pending, even if we have them * two final protocol tests * fix request cancellation logic * poll result stringer * test poller * fixes and test subscriber * lints * remove test logging * fix lints * fix peer-tracker off-by-one bug and tests * don't require local stringer install * remove test-only method * use a mock clock * improve timing reliability * improved logging * improve test reliability * cleanup * implement GC * latency tracking * improve reliability of subscribe tests * fix comment * fix build * spelling * fix heap usage * test heap * make the subscribe test pass more reliably
- Loading branch information