Skip to content

Conversation

TylerAPfledderer
Copy link
Contributor

@TylerAPfledderer TylerAPfledderer commented Apr 21, 2025

Description

In the resource page section "Scaling Ethereum" add the date for the Pectra upgrade, and show total blobs and average blob fee.

Related Issue

Closes #15219

@github-actions github-actions bot added the tooling 🔧 Changes related to tooling of the project label Apr 21, 2025
Copy link

netlify bot commented Apr 21, 2025

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit bf9423a
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/683074749fef010008ffbe83
😎 Deploy Preview https://deploy-preview-15324--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 46 (🔴 down 9 from production)
Accessibility: 94 (no change from production)
Best Practices: 91 (🔴 down 8 from production)
SEO: 98 (🔴 down 2 from production)
PWA: 59 (🟢 up 1 from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@TylerAPfledderer TylerAPfledderer marked this pull request as ready for review April 28, 2025 03:39
Copy link
Contributor Author

@TylerAPfledderer TylerAPfledderer left a comment

Choose a reason for hiding this comment

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

Comments for @pettinarip and @wackerow here. The formatted values of the two numbers don't seem right to me. 😅 I had to remove the "billion" abbreviation from the formatted "Average blob fee".

Comment on lines 71 to 77
const ethPrice = useEthPrice()
const avgBlobFeeUsd = formatSmallUSD(
// Converting value from gwei to USD
avgBlobFee * 1e-9 * ethPrice,
localeForNumberFormat
).replace(/[A-Za-z]$/, "")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I double-checked in a converter, and this value should be correct, returning $2.4 here.

Copy link
Member

Choose a reason for hiding this comment

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

Hey @TylerAPfledderer I think that the problem is that avgBlobFee is in wei, not gwei. That is why we get it in billions. So, if we do

Suggested change
const ethPrice = useEthPrice()
const avgBlobFeeUsd = formatSmallUSD(
// Converting value from gwei to USD
avgBlobFee * 1e-9 * ethPrice,
localeForNumberFormat
).replace(/[A-Za-z]$/, "")
const ethPrice = useEthPrice()
const avgBlobFeeUsd = formatSmallUSD(
// Converting value from wei to USD
avgBlobFee * 1e-18 * ethPrice,
localeForNumberFormat
)

we shouldn't need to replace anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pettinarip ah, that did it! Pushed the change 😄

<div className="text-sm">Next upgrade</div>
<div className="text-5xl font-bold">Pectra</div>
{/* TODO: Convert date to a countdown */}
<div className="text-xl font-bold text-body-medium">07 May 2025</div>
Copy link
Contributor Author

@TylerAPfledderer TylerAPfledderer Apr 28, 2025

Choose a reason for hiding this comment

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

Any suggestions on which way to go here? Kinda already doing an approach in useResources for "Time to next block". Use that approach for this?

There is also something more robust like the react-countdown component if this is to used again for something else.

@nloureiro
Copy link
Contributor

nloureiro commented May 5, 2025

@TylerAPfledderer, did you manage to see why the page doesn't load?

https://deploy-preview-15324--ethereumorg.netlify.app/en/resources/

@TylerAPfledderer
Copy link
Contributor Author

@TylerAPfledderer, did you manage to see why the page doesn't load?

https://deploy-preview-15324--ethereumorg.netlify.app/en/resources/

@nloureiro

I'm not able to check this. Everything works fine in local dev, and when attempting to build locally, I have issues getting the build to complete successfully for unrelated reasons.

I can try that again today

@nloureiro
Copy link
Contributor

@TylerAPfledderer, did you manage to see why the page doesn't load?
https://deploy-preview-15324--ethereumorg.netlify.app/en/resources/

@nloureiro

I'm not able to check this. Everything works fine in local dev, and when attempting to build locally, I have issues getting the build to complete successfully for unrelated reasons.

I can try that again today

nice, thank you!

@TylerAPfledderer
Copy link
Contributor Author

@nloureiro apologies for the delay. I am still not able to recreate the problem locally. When I attempt to run the build locally, I still get unrelated errors that prevent the build from completing.

@pettinarip @wackerow any input here with the resource not working through the deploy link?

@pettinarip
Copy link
Member

@nloureiro apologies for the delay. I am still not able to recreate the problem locally. When I attempt to run the build locally, I still get unrelated errors that prevent the build from completing.

@pettinarip @wackerow any input here with the resource not working through the deploy link?

@TylerAPfledderer sorry about this. Here is the error log
image

The problem is coming from the dataloader layer. In preview deploy envs, we are using mocked data by default, and the loader is failing to load that mocked data because it doesn't exist. You can find these files in https://github.com/ethereum/ethereum-org-website/tree/dev/src/data/mocks

I'll add a new json file to provide the response for the new query we're making in this PR. That should resolve the issue.

Copy link
Member

Choose a reason for hiding this comment

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

added this file. If you run with USE_MOCK_DATA=true this will be used

Comment on lines -56 to -59
notation: "compact",
minimumSignificantDigits: 2,
maximumSignificantDigits: 2,
Copy link
Contributor Author

@TylerAPfledderer TylerAPfledderer May 8, 2025

Choose a reason for hiding this comment

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

Simplify the price formatting for formatSmallUSD(), so that two decimal places are always shown, no matter the number of significant figures. (i.e. $xx.xx versus $x.xx)

@TylerAPfledderer
Copy link
Contributor Author

@pettinarip @nloureiro should be all set here.

Since the Pectra Upgrade should already be live at this point (May 7th 2025) then the "Live" tag is rendered, but I still set up the countdown for any future upgrade that might be added here.

// TODO: Add metric
metric: (
<div className="grid place-items-center py-5">
<div className="text-sm">Next upgrade</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

@TylerAPfledderer from my end we just need to change this details to "Latest upgrade" because it's live now

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the Status: Stale This issue is stale because it has been open 30 days with no activity. label Jun 23, 2025
Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Thanks a lot @TylerAPfledderer! Sorry for delays here, pulling in

@wackerow
Copy link
Member

Ah spoke too soon, forgot this got refactored to server-side without hooks. Will need to refactor this a bit

@github-actions github-actions bot removed the Status: Stale This issue is stale because it has been open 30 days with no activity. label Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling 🔧 Changes related to tooling of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Pectra countdown and API integration to the dashboards page
4 participants