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

fix(rollapp): logo size now 40kib #1092

Merged
merged 1 commit into from
Aug 13, 2024
Merged

Conversation

danwt
Copy link
Contributor

@danwt danwt commented Aug 13, 2024

Description


Closes #1091

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.

PR review checkboxes:

I have...

  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Targeted PR against the correct branch
  • included the correct type prefix in the PR title
  • Linked to the GitHub issue with discussion and accepted design
  • Targets only one GitHub issue
  • Wrote unit and integration tests
  • Wrote relevant migration scripts if necessary
  • All CI checks have passed
  • Added relevant godoc comments
  • Updated the scripts for local run, e.g genesis_config_commands.sh if the PR changes parameters
  • Add an issue in the e2e-tests repo if necessary

SDK Checklist

  • Import/Export Genesis
  • Registered Invariants
  • Registered Events
  • Updated openapi.yaml
  • No usage of go map
  • No usage of time.Now()
  • Used fixed point arithmetic and not float arithmetic
  • Avoid panicking in Begin/End block as much as possible
  • No unexpected math Overflow
  • Used sendCoin and not SendCoins
  • Out-of-block compute is bounded
  • No serialized ID at the end of store keys
  • UInt to byte conversion should use BigEndian

Full security checklist here

----;

For Reviewer:

  • Confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • Confirmed all author checklist items have been addressed

---;

After reviewer approval:

  • In case the PR targets the main branch, PR should not be squash merge in order to keep meaningful git history.
  • In case the PR targets a release branch, PR must be rebased.

Summary by CodeRabbit

  • New Features

    • Updated maximum allowable length for data URIs from 25KB to 40KB, enabling larger data payloads.
  • Documentation

    • Revised comments for size limitations on logo data fields to simplify language, removing specific size constraints.

@danwt danwt requested a review from a team as a code owner August 13, 2024 10:26
Copy link
Contributor

coderabbitai bot commented Aug 13, 2024

Walkthrough

The recent changes enhance flexibility in handling data URIs within the RollappMetadata structure. Comments regarding size limitations have been simplified, while the actual maximum length for data URIs has been increased from 25KB to 40KB. This adjustment allows for larger data payloads, providing developers with more freedom in their implementations without altering the core functionality of the application.

Changes

File Change Summary
proto/dymensionxyz/dymension/rollapp/metadata.proto Simplified comments for logo_data_uri and token_logo_data_uri fields; no explicit size limit mentioned.
x/rollapp/types/rollapp.go Updated maxDataURILength constant from 25 * 1024 to 40 * 1024, allowing for larger data URIs.

Poem

In a meadow bright, with data to share,
A tweak was made, with love and care.
Size limits softened, oh what a delight,
Larger payloads dance in the moonlight.
Hopping with joy, the Rabbit sings,
For changes like these bring delightful things! 🐇🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5933d5c and 5145414.

Files selected for processing (2)
  • proto/dymensionxyz/dymension/rollapp/metadata.proto (1 hunks)
  • x/rollapp/types/rollapp.go (1 hunks)
Additional comments not posted (1)
x/rollapp/types/rollapp.go (1)

45-45: LGTM! Ensure documentation reflects the updated size limit.

The increase of maxDataURILength from 25KB to 40KB is consistent with the PR objectives. Ensure that any related documentation or comments are updated to reflect this new limit.

Comment on lines +11 to +13
// logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Size limited
string logo_data_uri = 3;
// token_logo_data_uri is a URI to the native token logo. Should be limited to 25kb.
// token_logo_data_uri is a URI to the native token logo. Size limited
Copy link
Contributor

Choose a reason for hiding this comment

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

Clarify the size limitations in comments.

The comments for logo_data_uri and token_logo_data_uri have been simplified to "Size limited," which might lead to ambiguity. Consider specifying the size limit to avoid confusion among developers.

- // logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Size limited
+ // logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Max size: 40KB

- // token_logo_data_uri is a URI to the native token logo. Size limited
+ // token_logo_data_uri is a URI to the native token logo. Max size: 40KB
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Size limited
string logo_data_uri = 3;
// token_logo_data_uri is a URI to the native token logo. Should be limited to 25kb.
// token_logo_data_uri is a URI to the native token logo. Size limited
// logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Max size: 40KB
string logo_data_uri = 3;
// token_logo_data_uri is a URI to the native token logo. Max size: 40KB

@omritoptix omritoptix merged commit a1395f1 into main Aug 13, 2024
114 of 117 checks passed
@omritoptix omritoptix deleted the danwt/1091-make-logos-40kib branch August 13, 2024 11:49
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.

Change logo size restriction to 40kib
2 participants