Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get batch data by number api #1090

Closed
wants to merge 3 commits into from
Closed

get batch data by number api #1090

wants to merge 3 commits into from

Conversation

ARR552
Copy link

@ARR552 ARR552 commented Sep 3, 2024

This PR adds a modification in GetBatchDataByNumbers endpoint to avoid calculate batchData when it is stored in db

@cla-bot cla-bot bot added the cla-signed label Sep 3, 2024
@revitteth
Copy link
Collaborator

Looks like this breaks kurtosis - please investigate!

Copy link
Collaborator

@mandrigin mandrigin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small stuff

@@ -320,6 +320,16 @@ func (api *ZkEvmAPIImpl) GetBatchDataByNumbers(ctx context.Context, batchNumbers
continue
}

// try to find the BatchData in db to avoid calculate it when it is possible
batchData, err := hermezDb.GetL1BatchData(batchNumber.Uint64())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should extract the rest as “GenerateL1BatchData” to have the whole structure more clear. Otherwise it’s okay.

@V-Staykov
Copy link
Collaborator

This is already done, closing.

@V-Staykov V-Staykov closed this Sep 26, 2024
Copy link

sonarcloud bot commented Sep 26, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants