From 6c7ca964e443c464baba674d3715a4579a188761 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 28 Oct 2020 22:41:38 +0100 Subject: [PATCH] Remove outdated TODO comments - Metrics tracked in #11. - Timeout and retransmits covered in #21. - Dependency injection doesn't make sense at this scale. - `-1` on `GenerateKeyPair` means "this doesn't make sense for Ed25519, please crash if anyone ever tried to generate RSA keys". ghstack-source-id: 895162835186df360bcc526a5fb904b1567b5da9 Pull Request resolved: https://github.com/certusone/wormhole/pull/66 --- bridge/cmd/guardiand/main.go | 5 ----- bridge/cmd/guardiand/nodekeys.go | 1 - bridge/pkg/processor/processor.go | 3 --- 3 files changed, 9 deletions(-) diff --git a/bridge/cmd/guardiand/main.go b/bridge/cmd/guardiand/main.go index c9894d981..d0bf25f32 100644 --- a/bridge/cmd/guardiand/main.go +++ b/bridge/cmd/guardiand/main.go @@ -54,9 +54,6 @@ var ( rootCtxCancel context.CancelFunc ) -// TODO: prometheus metrics -// TODO: telemetry? - // "Why would anyone do this?" are famous last words. // // We already forcibly override RPC URLs and keys in dev mode to prevent security @@ -201,8 +198,6 @@ func main() { // Run supervisor. supervisor.New(rootCtx, logger, func(ctx context.Context) error { - // TODO: use a dependency injection framework like wire? - if err := supervisor.Run(ctx, "p2p", p2p.Run( obsvC, sendC, priv, *p2pPort, *p2pNetworkID, *p2pBootstrap, *nodeName, rootCtxCancel)); err != nil { return err diff --git a/bridge/cmd/guardiand/nodekeys.go b/bridge/cmd/guardiand/nodekeys.go index d1d0cb777..3bac1c650 100644 --- a/bridge/cmd/guardiand/nodekeys.go +++ b/bridge/cmd/guardiand/nodekeys.go @@ -41,7 +41,6 @@ func getOrCreateNodeKey(logger *zap.Logger, path string) (p2pcrypto.PrivKey, err if os.IsNotExist(err) { logger.Info("No node key found, generating a new one...", zap.String("path", path)) - // TODO(leo): what does -1 mean? priv, _, err := p2pcrypto.GenerateKeyPair(p2pcrypto.Ed25519, -1) if err != nil { panic(err) diff --git a/bridge/pkg/processor/processor.go b/bridge/pkg/processor/processor.go index 90fffeaec..01c270961 100644 --- a/bridge/pkg/processor/processor.go +++ b/bridge/pkg/processor/processor.go @@ -258,9 +258,6 @@ func (p *Processor) Run(ctx context.Context) error { // a valid signature by an active guardian. We still don't fully trust them, as they may be // byzantine, but now we know who we're dealing with. - // TODO: timeout/garbage collection for lockup state - // TODO: rebroadcast signatures for VAAs that fail to reach consensus - // []byte isn't hashable in a map. Paying a small extra cost for encoding for easier debugging. hash := hex.EncodeToString(m.Hash)