feat(blocks/tx): Display raw blob data content via Beacon API#332
feat(blocks/tx): Display raw blob data content via Beacon API#332AugustoL merged 5 commits intoopenscan-explorer:devfrom
Conversation
Add EIP-4844 blob data display by fetching from the Beacon Chain API. Super user mode only. Includes BeaconService for blob sidecar fetching, KZG commitment to versioned hash matching via Web Crypto SHA-256, configurable Beacon API endpoints in Settings, and blob viewer with hex/UTF-8 toggle. Block page shows all blobs in a collapsible section, transaction page adds a Blob Data tab in the TX Analyser. Default public Beacon API endpoints provided for Ethereum and Sepolia. Blob pruning (~18 days) handled gracefully with clear user messaging. i18n translations added for all 5 supported languages. Closes openscan-explorer#301
|
🚀 Preview: https://pr-332--openscan.netlify.app |
…l CSS Rename tx-analyser-* and analyser-* CSS classes to detail-panel-* for reuse across pages. Create BlockAnalyser tabbed panel for block details (More Details, Transactions, Withdrawals, Blob Data) mirroring the TxAnalyser pattern. Simplify BlockDisplay by replacing collapsible sections with the new BlockAnalyser component.
Merge openscan-explorer/dev into feat/beacon-blob-data, incorporating helper tooltips, knowledge levels, raw trace tab, FieldLabel component, Hardhat adapter, and Etherscan worker proxy alongside our beacon blob and block analyser changes.
…-blob-data # Conflicts: # .claude/rules/architecture.md # .claude/rules/patterns.md # src/components/pages/evm/block/BlockDisplay.tsx # src/components/pages/evm/tx/TxAnalyser.tsx # src/components/pages/evm/tx/analyser/types.ts # src/locales/en/settings.json # src/locales/es/settings.json # src/locales/ja/settings.json # src/locales/pt-BR/settings.json # src/locales/zh/settings.json # src/types/index.ts
josealoha666
left a comment
There was a problem hiding this comment.
Nice feature overall. One thing I'd tighten before merging: BeaconService.getBlobSidecars() currently returns null for any non-OK response (500, 429, bad gateway, temporary network failure, etc.), and useBeaconBlobs() treats null as isPruned=true.
That means transient Beacon API failures will be shown to the user as “blob data was pruned”, which is misleading and makes debugging harder. I’d keep 404 as the pruned/unavailable case, but surface other failures separately (for example by throwing or returning a distinct error state) so the UI can show a real fetch error instead of the pruning message.
There was a problem hiding this comment.
I cannot see the blob data. This blocks shows blob information but not the content.
https://pr-332--openscan.netlify.app/#/1/block/24698978
| */ | ||
|
|
||
| /** Default public Beacon API endpoints per network (CAIP-2 format) */ | ||
| export const DEFAULT_BEACON_URLS: Record<string, string> = { |
There was a problem hiding this comment.
We should move this to configs
There was a problem hiding this comment.
for now we have hardcoded beacon api urls, it is a super user feature. There ar enot much,m we can add more later or move it to the config seciton if needed.
Only super user mode can see that data, I think the base user wont be interested by it. wdyt? |

Description
Display actual EIP-4844 blob content by integrating with the Beacon Chain API (consensus layer). This builds on the blob metadata display from #300, allowing users to inspect the raw data submitted in blob transactions.
Related Issue
Closes #301
Type of Change
Changes Made
src/services/BeaconService.ts): Beacon API client that fetches blob sidecars, computes KZG → versioned hash mapping via Web Crypto SHA-256, and matches blobs to transactionssrc/config/beaconConfig.ts): Default public Beacon API endpoints (publicnode.com) for Ethereum and Sepolia, beacon genesis timestamps, and slot computation from execution block timestampssrc/hooks/useBeaconBlobs.ts): React hook with lazy-loading, loading/error/pruned state, and optional blob-to-transaction filteringsrc/components/common/BlobDataDisplay.tsx): Reusable blob viewer with hex/UTF-8 toggle, expand/collapse, KZG commitment/proof display, effective data sizeKey design decisions
isSuperUserflagScreenshots (if applicable)
Test with block
24690689or tx0x148288e55992ca9dd42e08cb921927cfd70d45919b5415d83499dd51ddd368dfon Ethereum mainnet (super user mode required).Checklist
npm run format:fixandnpm run lint:fixnpm run typecheckwith no errorsnpm run test:runAdditional Notes
crypto.subtle.digest) for SHA-256 computation (zero dependencies added)BlobDataDisplaycomponent is reusable and used in both block and transaction views