aligned_layer icon indicating copy to clipboard operation
aligned_layer copied to clipboard

perf: reorder + delete AlignedLayerServiceManagerStorage BatchState struct

Open uri-99 opened this issue 1 year ago • 0 comments

Currently

struct BatchState {
    uint32 taskCreatedBlock;
    bool responded;
    address batcherAddress;
}

should be

struct BatchState {
    address batcherAddress;
    uint32 taskCreatedBlock;
    bool responded;
}

Also, batcherAddress should be deleted after its use, at the end of respondToTask.

This reduces gas consumption but breaks the past storage of this contract. This is not a problem since this is why we use testnet. Also, the explorer will be unaffected by this.

uri-99 avatar Jun 27 '24 22:06 uri-99