Skip to content

TODO items mentioned in the codebase #625

Description

@dean-amar

TODO Items - Fabric-X Committer

Total Items: 23


Configuration (9 items)

  • Make retry configurable in Signature Verifier Manager
    File: service/coordinator/signature_verifier_manager.go:113

    // TODO: initialize retry from config.
    return retry.Sustain(eCtx, nil, func() error {
  • Make retry configurable in Validator Committer Manager
    File: service/coordinator/validator_committer_manager.go:123

    // TODO: initialize retry from config.
    return retry.Sustain(eCtx, nil, func() (err error) {
  • Make retry configurable in Sidecar
    File: service/sidecar/sidecar.go:158

    // TODO: initialize retry from config.
    return retry.Sustain(gCtx, nil, func() error {
  • Make chunk size configurable in Coordinator
    File: service/coordinator/coordinator.go:349

    // TODO: make it configurable.
    chunkSizeForDepGraph := min(c.config.DependencyGraph.WaitingTxsLimit, 500)
  • Make sampling time configurable in Coordinator queue monitor
    File: service/coordinator/coordinator.go:403

    // TODO: make sampling time configurable
    ticker := time.NewTicker(100 * time.Millisecond)
  • Make sampling time configurable in Dependency Graph Manager
    File: service/coordinator/dependencygraph/manager.go:79

    // TODO: make sampling time configurable
    ticker := time.NewTicker(100 * time.Millisecond)
  • Make queue multiplier configurable in VC Service
    File: service/vc/validator_committer_service.go:81

    // TODO: make queueMultiplier configurable
    queueMultiplier := 1
  • Make sampling time configurable in VC Service queue monitor
    File: service/vc/validator_committer_service.go:171

    // TODO: make sampling time configurable
    ticker := time.NewTicker(250 * time.Millisecond)
  • Move MaxMsgSize constant to fabric-x-common
    File: utils/connection/client.go:41

    // TODO: All services including the orderer must use the same default maximum message size.
    //       Hence, we need to move this constant to fabric-x-common.

Code Refactoring (4 items)

  • Rename channel variable in Coordinator
    File: service/coordinator/coordinator.go:85

    // TODO: As signValidatedTxsNode and vcServiceToDepGraphValidatedTxs can cause confusion, it would be better to
    //       rename vcServiceToDepGraphValidatedTxs to committedOrAbortedTxsNode.
  • Split signature verification file
    File: utils/signature/verify.go:21

    // TODO: Move channelPolicyVerifier, mspPolicyVerifier, and keyVerifier to their own files.
    //       It is difficult to read the current file due to the interleaving of methods from different objects.
  • Merge database files
    File: service/vc/dbinit.go:80

    // TODO: merge this file with database.go.
  • Remove unused ChannelHeader fields
    File: service/sidecar/mapping.go:104

    // skips unused ChannelHeader fields (version, timestamp, channel_id, epoch,
    // extension, tls_cert_hash) and the Header's signature_header. Corruption in
    // those fields will go undetected. This is acceptable because the committer
    // does not use them, and for the same reason, they are not validated in the
    // sidecar. TODO: remove unused fields from the ChannelHeader proto.

Testing (3 items)

  • Use real signature verifier in coordinator tests
    File: service/coordinator/coordinator_test.go:381

    // TODO: Use real signature verifier instead of mocks.
  • Add test for commit retry
    File: service/vc/committer.go:80

    // TODO: Add test to ensure commit is retried.
  • Improve block store test verification
    File: service/sidecar/block_store_test.go:93

    // TODO: appendBlock forces fsync (Append) for single-tx blocks since they may be config blocks,
    //       but we cannot verify Append vs AppendNoSync here because the ledger field is a concrete
    //       *fileledger.FileLedger (not an interface). To properly test this, the ledger dependency
    //       would need to be behind an interface so we can assert which method was called.

Performance (2 items)

  • Evaluate parallel namespace validation
    File: service/vc/validator.go:98

    // TODO: We can run per namespace validation in parallel. However, we should not
    // 		 over parallelize and make contention among preparer, validator, and committer
    //       goroutines to acquire the CPU. Based on performance evaluation, we can decide
    //       to run per namespace validation in parallel.
  • Evaluate parallel blind write processing
    File: service/vc/committer.go:190

    // TODO: Though we could run the following in a goroutine per namespace, we restrain
    // 		 from doing so till we evaluate the performance

Security (2 items)

  • Pass database password via environment variable - VC Config
    File: cmd/config/samples/vc.yaml:58

    # TODO: pass password via environment variable for better security.
    password: "yugabyte"
  • Pass database password via environment variable - Query Config
    File: cmd/config/samples/query.yaml:62

    # TODO: pass password via environment variable for better security.
    password: "yugabyte"

Documentation (1 item)

  • Add channel flow diagram
    File: service/coordinator/dependencygraph/global_dependency_manager.go:38
    // TODO: add a text figure explaining how the input and output channels
    //       are being used.

Feature Implementation (1 item)

  • Implement seek info for ledger service
    File: utils/deliver/delivery.go:143
    // TODO: We have seek info only for the orderer but not for the ledger service. It needs
    //       to implemented as fabric ledger also allows different seek info.

Metrics (1 item)

  • Add lock duration metrics
    File: service/coordinator/signature_verifier_manager.go:318
    // TODO: introduce metrics to measure the lock wait/holding duration.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions