Skip to content

Commit

Permalink
Remove outdated TODO comments
Browse files Browse the repository at this point in the history
- 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: #66
  • Loading branch information
Leo committed Oct 28, 2020
1 parent 11c74dd commit 6c7ca96
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
5 changes: 0 additions & 5 deletions bridge/cmd/guardiand/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion bridge/cmd/guardiand/nodekeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions bridge/pkg/processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 6c7ca96

Please sign in to comment.