-
Notifications
You must be signed in to change notification settings - Fork 246
fix:da visualiser namespace #2895
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
Conversation
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
|
Claude finished @tac0turtle's task —— View job Code Review CompleteTasks
SummaryThis PR fixes the DA visualizer by adding namespace support for blob retrieval. The changes enable the visualization dashboard to properly fetch blob details by passing the namespace parameter through the submission recording, URL links, and blob retrieval logic. Overall Assessment: Good implementation with minor improvement opportunities The core functionality is solid and addresses the namespace requirement correctly. The changes are backward-compatible, well-tested, and follow Go conventions. However, there are some areas for improvement around error handling, test coverage, and potential edge cases. Detailed Feedback1. Code Quality & Architecture ✅Strengths:
Minor Improvements: da_visualization.go:182-190 - Namespace parsing logic could benefit from explicit error logging: if nsParam != "" {
if ns, err := coreda.ParseHexNamespace(nsParam); err == nil {
namespace = ns.Bytes()
found = true
} else {
ns := coreda.NamespaceFromString(nsParam)
namespace = ns.Bytes()
found = true
}
}Consider logging when if ns, err := coreda.ParseHexNamespace(nsParam); err == nil {
namespace = ns.Bytes()
found = true
} else {
s.logger.Debug().Err(err).Str("namespace_param", nsParam).Msg("failed to parse hex namespace, falling back to string namespace")
ns := coreda.NamespaceFromString(nsParam)
namespace = ns.Bytes()
found = true
}da_visualization.go:193-212 - Nested loops with early break pattern is correct but could be slightly cleaner: func (s *DAVisualizationServer) findNamespaceForBlob(blobID string) ([]byte, bool) {
s.mutex.RLock()
defer s.mutex.RUnlock()
for _, submission := range s.submissions {
for _, subBlobID := range submission.BlobIDs {
if subBlobID == blobID {
if submission.Namespace != "" {
if ns, err := hex.DecodeString(submission.Namespace); err == nil {
return ns, true
}
}
return nil, false
}
}
}
return nil, false
}2. Error Handling & Resilience
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2895 +/- ##
==========================================
- Coverage 64.81% 64.59% -0.23%
==========================================
Files 81 81
Lines 7347 7374 +27
==========================================
+ Hits 4762 4763 +1
- Misses 2043 2069 +26
Partials 542 542
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: build(deps): Bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /docs in the npm_and_yarn group across 1 directory (#2900) refactor(block): centralize timeout in client (#2903) build(deps): Bump the all-go group across 2 directories with 3 updates (#2898) chore: bump default timeout (#2902) fix: revert default db (#2897) refactor: remove obsolete // +build tag (#2899) fix:da visualiser namespace (#2895) refactor: omit unnecessary reassignment (#2892) build(deps): Bump the all-go group across 5 directories with 6 updates (#2881) chore: fix inconsistent method name in retryWithBackoffOnPayloadStatus comment (#2889) fix: ensure consistent network ID usage in P2P subscriber (#2884) build(deps): Bump golangci/golangci-lint-action from 9.0.0 to 9.1.0 (#2885) build(deps): Bump actions/checkout from 5 to 6 (#2886)
* main: refactor(sequencers): persist prepended batch (#2907) feat(evm): add force inclusion command (#2888) feat: DA client, remove interface part 1: copy subset of types needed for the client using blob rpc. (#2905) feat: forced inclusion (#2797) fix: fix and cleanup metrics (sequencers + block) (#2904) build(deps): Bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /docs in the npm_and_yarn group across 1 directory (#2900) refactor(block): centralize timeout in client (#2903) build(deps): Bump the all-go group across 2 directories with 3 updates (#2898) chore: bump default timeout (#2902) fix: revert default db (#2897) refactor: remove obsolete // +build tag (#2899) fix:da visualiser namespace (#2895)
Overview
since we never looked at blobids it was set to an empty namespace this pr replaces it with what is needed