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

feat: decode Starknet blobs #370

Merged
merged 17 commits into from
May 12, 2024
Merged

Conversation

PJColombo
Copy link
Member

@PJColombo PJColombo commented Apr 11, 2024

It adds the following:

  • Set up a blob decoder package to handle all rollup blob decoding logic
  • Adds Starknet blob decoding logic
  • Adds a new view on the blob details web page to visualize Starknet's decoded blobs
image

Copy link

changeset-bot bot commented Apr 11, 2024

🦋 Changeset detected

Latest commit: cfb5178

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@blobscan/web Minor
@blobscan/blob-decoder Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Apr 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blobscan-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2024 2:23pm
5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
blobscan-docs ⬜️ Ignored (Inspect) Visit Preview May 12, 2024 2:23pm
blobscan-gnosis ⬜️ Ignored (Inspect) Visit Preview May 12, 2024 2:23pm
blobscan-holesky ⬜️ Ignored (Inspect) Visit Preview May 12, 2024 2:23pm
blobscan-mainnet ⬜️ Ignored (Inspect) Visit Preview May 12, 2024 2:23pm
blobscan-sepolia ⬜️ Ignored (Inspect) Visit Preview May 12, 2024 2:23pm

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (next@1abc00a). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             next     #370   +/-   ##
=======================================
  Coverage        ?   89.64%           
=======================================
  Files           ?      152           
  Lines           ?     9580           
  Branches        ?      987           
=======================================
  Hits            ?     8588           
  Misses          ?      992           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Apr 11, 2024

📦 Next.js Bundle Analysis for @blobscan/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 237.67 KB (🟡 +890 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/blob/[hash] 39.48 KB 277.15 KB 79.19% (🟡 +8.00%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

Copy link
Member

@PabloCastellano PabloCastellano left a comment

Choose a reason for hiding this comment

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

Good job! I think you should add this to the Features section of the documentation. Also some README file explaining where the .wasm file comes from would be nice.

Copy link
Member

@0xGabi 0xGabi left a comment

Choose a reason for hiding this comment

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

Amazing work adding the worker and the new blob decoder view!

I left a few suggestions. Other than that I think is ready to be merged!

packages/blob-decoder/src/blob-decoder.ts Outdated Show resolved Hide resolved
packages/blob-decoder/src/starknet.ts Outdated Show resolved Hide resolved
apps/web/src/providers/BlobDecoderWorker.tsx Outdated Show resolved Hide resolved
@PJColombo PJColombo merged commit ca70779 into next May 12, 2024
15 checks passed
@PJColombo PJColombo deleted the feat/web/starknet-blobs-decoding branch May 12, 2024 14:25
@github-actions github-actions bot mentioned this pull request May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants