Skip to content

fix(aggregator): aggregator memory leak could lead to denial of service #977

Description

@entropidelic

When a new task is created, several aggregator maps are written to with task-specific information. If the service runs for long enough, it could run out of memory, causing the Aggregator to stop functioning.

Check aggregator/internal/pkg/aggregator.go
These are the maps we should clean once the task is responded

	agg.batchesIdxByIdentifierHash[batchMerkleRoot] = batchIndex
agg.batchCreatedBlockByIdx[batchIndex] = uint64(taskCreatedBlock)
agg.batchesIdentifierHashByIdx[batchIndex] = batchMerkleRoot
agg.batchDataByIdentifierHash[batchMerkleRoot] = BatchData{
BatchMerkleRoot: batchMerkleRoot,
SenderAddress: [20]byte{},
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions