Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Enhance System Robustness with Improved Validations and Configuration Management #2284

@Psykepro

Description

@Psykepro

Overview:

We need to enhance the robustness of our system by including more stringent validations. Our current framework does not have a mechanism to authenticate X-Forwarded-For headers or manage an overload of transactions that surpass our zkCounter limitations.

Recommended Changes:

  1. Verify IP in the Transaction Pool:

    • Introduce a function within the tryToAddTxToPool method to authenticate IP addresses retrieved from the X-Forwarded-For header.
  2. Verify IP in the Worker:

    • Confirm IP addresses in the Worker.AddTxTracker prior to appending them to the efficiency list. This acts as a secondary check against invalid or suspicious IP addresses.
  3. Refinement of ZKCounters and Shared Configuration:

    • Restructure the BatchConstraints and BatchResourceWeights config parameters into a mutual BatchConfig structure. This structure will be employed by the JSON-RPC to confirm that the resources consumed by a transaction do not exceed the prescribed limits. If a transaction surpasses these limitations, it will be bypassed and not included in the transaction pool. In the same vein, the Sequencer will skip such transactions and not add them to the Worker's efficiencyList.

Objective:

Implementing these changes will contribute to the fortification of our services by safeguarding against potential system overloads and ensuring steady operations. These steps will help prevent undue resource consumption and ensure the maintenance of data consistency.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions