-
Notifications
You must be signed in to change notification settings - Fork 246
chore: bump blob size #2877
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
chore: bump blob size #2877
Conversation
Summary of ChangesHello @tac0turtle, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request performs a routine maintenance task by adjusting a system constant. Specifically, it increases the default maximum size allowed for blobs, enabling the system to handle larger data units without requiring explicit configuration overrides. This change ensures greater flexibility and capacity for blob storage operations. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
|
Claude finished @tac0turtle's task —— View job Code Review CompleteReviewing PR #2877: chore: bump blob size Todo List:
SummaryThis PR updates the Critical Issues1. Value Mismatch: 2MB vs 1.9MB
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request increases the DefaultMaxBlobSize. I've identified two issues with the change. First, the comment for the constant is outdated. Second, the new value is a floating-point number that gets truncated when used, which can be confusing and potentially error-prone. I've provided a suggestion that corrects the comment and uses integer arithmetic to make the code clearer and safer.
block/internal/common/consts.go
Outdated
| package common | ||
|
|
||
| const DefaultMaxBlobSize = 1.5 * 1024 * 1024 // 1.5MB fallback blob size limit | ||
| const DefaultMaxBlobSize = 1.9 * 1024 * 1024 // 1.5MB fallback blob size limit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment for DefaultMaxBlobSize is outdated and should be updated to 1.9MB to match the new value.
Additionally, the expression 1.9 * 1024 * 1024 results in a floating-point value (1992294.4), which is then truncated when assigned to integer types (like MaxBlobBytes where this constant is used). The previous value 1.5 * 1024 * 1024 evaluated to an integer. To avoid implicit truncation and make the intent clear, it's better to use integer arithmetic.
| const DefaultMaxBlobSize = 1.9 * 1024 * 1024 // 1.5MB fallback blob size limit | |
| const DefaultMaxBlobSize = 19 * 1024 * 1024 / 10 // 1.9MB fallback blob size limit |
julienrbrt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this value is at more places
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2877 +/- ##
==========================================
- Coverage 64.97% 64.88% -0.10%
==========================================
Files 81 81
Lines 7250 7250
==========================================
- Hits 4711 4704 -7
- Misses 1998 2005 +7
Partials 541 541
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* main: chore: remove extra github action yml file (#2882) fix(execution/evm): verify payload status (#2863) feat: fetch included da height from store (#2880) chore: better output on errors (#2879) refactor!: create da client and split cache interface (#2878) chore!: rename `evm-single` and `grpc-single` (#2839) build(deps): Bump golang.org/x/crypto from 0.42.0 to 0.45.0 in /tools/da-debug in the go_modules group across 1 directory (#2876) chore: parallel cache de/serialization (#2868) chore: bump blob size (#2877)
Overview
mocha has bumped their max so we can go back to our previous size
upstream is now 8mb https://github.com/celestiaorg/celestia-app/blob/v6.2.5/pkg/appconsts/app_consts.go#L25