-
Notifications
You must be signed in to change notification settings - Fork 245
feat: migrate logging to ipfs/go-log/v2 #2411
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
This commit migrates Rollkit's logging from cosmossdk.io/log to github.com/ipfs/go-log/v2.
Key changes include:
- Updated the central SetupLogger function to use ipfs/go-log/v2.
- Replaced cosmossdk.io/log imports and usage with ipfs/go-log/v2 across the codebase.
- Updated logger types (log.Logger to logging.EventLogger).
- Adjusted test logger initialization (NewTestLogger, NewNopLogger) to use ipfs/go-log/v2 equivalents with appropriate log levels.
- Replaced logger.With("module", "name") with logging.Logger("name") for subsystem loggers.
- Removed direct usage of rs/zerolog for log level parsing.
- Ensured all automated tests pass after the migration.
WalkthroughThis change replaces the logging system throughout the codebase, switching from the Changes
Sequence Diagram(s)sequenceDiagram
participant Main as Main Application
participant Logging as go-log/v2
participant Module as Submodule (e.g., BlockManager)
participant Test as Test Suite
Main->>Logging: SetupLogging(config)
Main->>Logging: Logger("main")
Main->>Module: Pass logging.EventLogger
Module->>Logging: Logger("ModuleName")
Module->>Module: Use logger for events
Test->>Logging: Logger("test")
Test->>Logging: SetLogLevel("test", "FATAL")
Test->>Module: Pass logger for testing
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
The latest Buf updates on your PR. Results from workflow CI and Release / buf-check (pull_request).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @tac0turtle, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request undertakes a significant internal refactoring by migrating the entire logging infrastructure from cosmossdk.io/log to ipfs/go-log/v2. This change impacts how loggers are initialized, passed between components, and how log levels and output formats are configured. The migration aims to standardize logging practices and leverage the features of the new library.
Highlights
- Logging Library Migration: The core logging library has been migrated from
cosmossdk.io/logtogithub.com/ipfs/go-log/v2across the entire codebase. This involves updating imports, logger instantiation, and usage patterns. - API Changes for Loggers: The logger type has been updated from
log.Loggertologging.EventLoggerin function signatures and struct fields. Thelogger.With("module", "name")pattern for creating subsystem loggers has been replaced withlogging.Logger("name"), which is the idiomatic way to get named loggers inipfs/go-log/v2. - Test Logger Adjustments: Test utilities like
log.NewTestLoggerandlog.NewNopLoggerhave been replaced withlogging.Logger("test")and explicitlogging.SetLogLevel("test", "FATAL")calls to simulate NOP behavior, or"debug"for verbose testing. Mock logger implementations have also been updated to match the newipfs/go-log/v2variadic argument signature. - Dependency Updates: The
go.modandgo.sumfiles have been updated to removecosmossdk.io/logandgithub.com/rs/zerologdependencies, and to addgo.uber.org/zapwhich is an underlying dependency ofipfs/go-log/v2. - Centralized Logger Setup: The
SetupLoggerfunction inpkg/cmd/run_node.gohas been refactored to useipfs/go-log/v2's configuration (logging.Configandlogging.SetupLogging) for setting log format, level, and handling stack traces.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly migrates the logging library from cosmossdk.io/log to ipfs/go-log/v2. The changes are extensive and applied consistently across the codebase.
I've identified a few areas for improvement. The most critical one is the replacement of log.NewTestLogger, which changes the behavior of tests by no longer failing on error logs. This could potentially mask bugs. I've also pointed out a similar regression for tests that assert on log buffer content. Additionally, there are some opportunities to improve the maintainability of the test mocks.
Overall, this is a solid migration, but addressing the testing-related regressions is important for maintaining code quality.
fcd2fab to
1a168e3
Compare
|
Cannot we just use std slog? |
i thought about this as well. i ended up with this since goheader uses this so it aligns with that. Also since we are focusing on integration with celestia, i thought its best to match logging to node, what people will use to submit. Its what people will be use to seeing. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2411 +/- ##
==========================================
+ Coverage 72.92% 73.92% +1.00%
==========================================
Files 67 67
Lines 6378 6596 +218
==========================================
+ Hits 4651 4876 +225
+ Misses 1329 1318 -11
- Partials 398 402 +4
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:
|
There was a problem hiding this 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
♻️ Duplicate comments (6)
pkg/sync/sync_service_test.go (1)
46-47: Test behavior change: Error/Fatal log detection lost.The migration from
sdklog.NewTestLogger(t)tologging.Logger("test")introduces a behavioral change. The previous test logger would automatically fail the test ifErrororFatallevel logs were emitted, helping catch unexpected errors during testing. The new logger doesn't provide this capability by default.Consider implementing a custom test logger wrapper for
ipfs/go-log/v2that maintains this error detection behavior, or ensure comprehensive error assertions in tests to prevent regressions.block/aggregation_test.go (1)
39-39: Test behavior change and missing explicit log level.The migration from
log.NewTestLogger(t)introduces the same behavioral change mentioned in other test files - automatic test failure on Error/Fatal logs is lost. Additionally, no explicit log level is set here, which may result in verbose logging during tests.Consider adding an explicit log level setting and implementing error detection capabilities.
logger := logging.Logger("test") +_ = logging.SetLogLevel("test", "error")block/sync_test.go (1)
62-62: Test behavior change and missing explicit log level setting.The migration from
log.NewTestLogger(t)tologging.Logger("test")removes the automatic test failure capability on Error/Fatal logs. Additionally, without an explicit log level, tests may produce verbose output.Consider adding explicit log level configuration for cleaner test output.
logger: logging.Logger("test"), +_ = logging.SetLogLevel("test", "error")block/publish_block_test.go (1)
57-60: Test logging capability regression acknowledged.This change replaces the previous buffer-based logger with a named logger, which removes the ability to assert on specific log messages in tests. While this aligns with the migration goals, it does represent a reduction in test verification capabilities as noted in previous review comments.
block/da_includer_test.go (1)
29-40: Consider using a loop to reduce repetition in logger mock setup.The setup for the
MockLoggeris repetitive. This could be simplified using a loop as suggested in a previous review.- logger.On("Debug", mock.AnythingOfType("string")).Maybe() - logger.On("Debug", mock.AnythingOfType("string"), mock.Anything, mock.Anything).Maybe() - logger.On("Debug", mock.AnythingOfType("string"), mock.Anything, mock.Anything, mock.Anything, mock.Anything).Maybe() - logger.On("Info", mock.AnythingOfType("string")).Maybe() - logger.On("Info", mock.AnythingOfType("string"), mock.Anything, mock.Anything).Maybe() - logger.On("Info", mock.AnythingOfType("string"), mock.Anything, mock.Anything, mock.Anything, mock.Anything).Maybe() - logger.On("Warn", mock.AnythingOfType("string")).Maybe() - logger.On("Warn", mock.AnythingOfType("string"), mock.Anything, mock.Anything).Maybe() - logger.On("Warn", mock.AnythingOfType("string"), mock.Anything, mock.Anything, mock.Anything, mock.Anything).Maybe() - logger.On("Error", mock.AnythingOfType("string")).Maybe() - logger.On("Error", mock.AnythingOfType("string"), mock.Anything, mock.Anything).Maybe() - logger.On("Error", mock.AnythingOfType("string"), mock.Anything, mock.Anything, mock.Anything, mock.Anything).Maybe() + for _, level := range []string{"Debug", "Info", "Warn", "Error"} { + logger.On(level, mock.AnythingOfType("string")).Maybe() + logger.On(level, mock.AnythingOfType("string"), mock.Anything, mock.Anything).Maybe() + logger.On(level, mock.AnythingOfType("string"), mock.Anything, mock.Anything, mock.Anything, mock.Anything).Maybe() + }block/test_utils.go (1)
60-66: Remove theWithmethod fromMockLogger.The
Withmethod returns a*zap.SugaredLogger, but thelogging.EventLoggerinterface (which is an alias forlogging.StandardLogger) doesn't have aWithmethod. This is confusing and likely unnecessary.-func (m *MockLogger) With(keyvals ...interface{}) *zap.SugaredLogger { - args := m.Called(append([]interface{}{"With"}, keyvals...)...) - if logger, ok := args.Get(0).(*zap.SugaredLogger); ok { - return logger - } - return nil -}Also remove the
zapimport if it's no longer needed after removing this method:- "go.uber.org/zap" // Needed for potential With behavior
🧹 Nitpick comments (5)
block/aggregation_test.go (1)
134-134: Consistent with migration pattern but missing log level.Same migration pattern as line 39. Consider adding explicit log level setting for consistency.
logger := logging.Logger("test") +_ = logging.SetLogLevel("test", "error")block/sync_test.go (1)
868-868: Missing explicit log level setting for test logger.For consistency with other test files and to control test output verbosity, consider adding an explicit log level setting.
logger: logging.Logger("test"), +_ = logging.SetLogLevel("test", "error")block/publish_block_p2p_test.go (1)
190-195: Improved logger organization for subsystems.The migration from the
.With("module", ...)pattern to separate named loggers is a good improvement. Each subsystem now has its own dedicated logger which enhances debugging capabilities and aligns with ipfs/go-log/v2 best practices.Consider setting explicit log levels for test loggers to control verbosity:
headerSyncLogger := logging.Logger("HeaderSyncService") +_ = logging.SetLogLevel("HeaderSyncService", "FATAL") dataSyncLogger := logging.Logger("DataSyncService") +_ = logging.SetLogLevel("DataSyncService", "FATAL") blockManagerLogger := logging.Logger("BlockManager") +_ = logging.SetLogLevel("BlockManager", "FATAL")pkg/rpc/example/example.go (2)
38-38: Use structured logging format consistently.The error logging call should follow structured logging format for consistency with the rest of the codebase.
- logger.Error("RPC server error", err) + logger.Error("RPC server error", "error", err)
98-98: Consider using the structured logger for consistency.For consistency with the logging migration, consider using the structured logger instead of the standard library log package.
- log.Fatalf("RPC server error: %v", err) + logger.Error("RPC server error", "error", err) + os.Exit(1)Note: You'll need to import
"os"if not already imported.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (8)
apps/evm/based/go.sumis excluded by!**/*.sumapps/evm/single/go.sumis excluded by!**/*.sumapps/testapp/go.sumis excluded by!**/*.sumda/go.sumis excluded by!**/*.sumgo.sumis excluded by!**/*.sumsequencers/based/go.sumis excluded by!**/*.sumsequencers/single/go.sumis excluded by!**/*.sumtest/e2e/go.sumis excluded by!**/*.sum
📒 Files selected for processing (58)
apps/evm/based/go.mod(0 hunks)apps/evm/single/cmd/run.go(1 hunks)apps/evm/single/go.mod(0 hunks)apps/testapp/cmd/run.go(0 hunks)apps/testapp/go.mod(0 hunks)block/aggregation_test.go(3 hunks)block/da_includer_test.go(2 hunks)block/da_speed_test.go(3 hunks)block/lazy_aggregation_test.go(2 hunks)block/manager.go(4 hunks)block/manager_test.go(5 hunks)block/pending_base.go(2 hunks)block/pending_base_test.go(9 hunks)block/pending_data.go(2 hunks)block/pending_headers.go(2 hunks)block/publish_block_p2p_test.go(3 hunks)block/publish_block_test.go(4 hunks)block/reaper.go(2 hunks)block/reaper_test.go(4 hunks)block/retriever_test.go(7 hunks)block/store_test.go(2 hunks)block/submitter_test.go(5 hunks)block/sync_test.go(3 hunks)block/test_utils.go(2 hunks)da/cmd/local-da/local.go(2 hunks)da/cmd/local-da/main.go(2 hunks)da/go.mod(1 hunks)da/jsonrpc/client.go(3 hunks)da/jsonrpc/proxy_test.go(3 hunks)da/jsonrpc/server.go(3 hunks)go.mod(1 hunks)node/full.go(8 hunks)node/full_node_test.go(2 hunks)node/helpers_test.go(5 hunks)node/light.go(2 hunks)node/light_test.go(2 hunks)node/node.go(2 hunks)pkg/cmd/run_node.go(2 hunks)pkg/cmd/run_node_test.go(5 hunks)pkg/p2p/client.go(4 hunks)pkg/p2p/client_test.go(7 hunks)pkg/p2p/utils_test.go(2 hunks)pkg/rpc/client/client_test.go(2 hunks)pkg/rpc/example/example.go(2 hunks)pkg/rpc/server/server.go(3 hunks)pkg/rpc/server/server_test.go(8 hunks)pkg/service/baseservice.go(3 hunks)pkg/service/baseservice_test.go(4 hunks)pkg/sync/sync_service.go(6 hunks)pkg/sync/sync_service_test.go(2 hunks)sequencers/based/go.mod(1 hunks)sequencers/based/sequencer.go(3 hunks)sequencers/based/sequencer_test.go(3 hunks)sequencers/single/go.mod(1 hunks)sequencers/single/sequencer.go(4 hunks)sequencers/single/sequencer_test.go(18 hunks)types/da.go(3 hunks)types/da_test.go(3 hunks)
💤 Files with no reviewable changes (4)
- apps/testapp/cmd/run.go
- apps/testapp/go.mod
- apps/evm/single/go.mod
- apps/evm/based/go.mod
🧰 Additional context used
📓 Path-based instructions (2)
`**/*.go`: Follow standard Go formatting (enforced by golangci-lint). Use meanin...
**/*.go: Follow standard Go formatting (enforced by golangci-lint).
Use meaningful variable names in Go code.
Keep functions small and focused in Go code.
Document exported types and functions in Go code.
Use context.Context for cancellation in Go code.
Wrap errors with context usingfmt.Errorfin Go code.
Return errors early in Go code.
Use custom error types for domain-specific errors in Go code.
Use structured logging and include relevant context in log messages in Go code.
Use appropriate log levels in Go code.
Never expose private keys in logs or errors.
Validate all inputs from external sources.
Use secure random number generation in Go code.
Be careful with concurrent access to shared state in Go code.
Be mindful of goroutine leaks in Go code.
Use buffered channels appropriately in Go code.
Profile before optimizing Go code.
Consider memory allocation in hot paths in Go code.
📄 Source: CodeRabbit Inference Engine (CLAUDE.md)
List of files the instruction was applied to:
apps/evm/single/cmd/run.goblock/store_test.goblock/publish_block_p2p_test.gonode/node.gopkg/p2p/client.goblock/reaper.goblock/reaper_test.gotypes/da_test.gonode/light.gopkg/rpc/client/client_test.gosequencers/single/sequencer_test.goblock/aggregation_test.goblock/pending_base.goblock/submitter_test.gopkg/cmd/run_node_test.goblock/lazy_aggregation_test.goblock/sync_test.gopkg/sync/sync_service_test.goda/cmd/local-da/main.goblock/da_speed_test.goblock/pending_headers.gonode/full_node_test.goda/cmd/local-da/local.goda/jsonrpc/proxy_test.gosequencers/based/sequencer_test.gopkg/service/baseservice_test.goblock/pending_base_test.goblock/da_includer_test.gopkg/rpc/server/server_test.goda/jsonrpc/client.goblock/manager.gopkg/rpc/example/example.goblock/publish_block_test.gonode/light_test.gotypes/da.gopkg/p2p/client_test.gopkg/p2p/utils_test.gopkg/rpc/server/server.gopkg/cmd/run_node.goblock/test_utils.gopkg/sync/sync_service.gonode/full.gosequencers/single/sequencer.goblock/manager_test.goblock/retriever_test.goda/jsonrpc/server.gopkg/service/baseservice.goblock/pending_data.gosequencers/based/sequencer.gonode/helpers_test.go
`**/*_test.go`: Unit tests should be placed in `*_test.go` files alongside the code being tested.
**/*_test.go: Unit tests should be placed in*_test.gofiles alongside the code being tested.
📄 Source: CodeRabbit Inference Engine (CLAUDE.md)
List of files the instruction was applied to:
block/store_test.goblock/publish_block_p2p_test.goblock/reaper_test.gotypes/da_test.gopkg/rpc/client/client_test.gosequencers/single/sequencer_test.goblock/aggregation_test.goblock/submitter_test.gopkg/cmd/run_node_test.goblock/lazy_aggregation_test.goblock/sync_test.gopkg/sync/sync_service_test.goblock/da_speed_test.gonode/full_node_test.goda/jsonrpc/proxy_test.gosequencers/based/sequencer_test.gopkg/service/baseservice_test.goblock/pending_base_test.goblock/da_includer_test.gopkg/rpc/server/server_test.goblock/publish_block_test.gonode/light_test.gopkg/p2p/client_test.gopkg/p2p/utils_test.goblock/manager_test.goblock/retriever_test.gonode/helpers_test.go
🧠 Learnings (55)
📓 Common learnings
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
apps/evm/single/cmd/run.go (8)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Never expose private keys in logs or errors.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors, so no error handling is needed when calling these methods.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use secure random number generation in Go code.
block/store_test.go (5)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
block/publish_block_p2p_test.go (7)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-10-08T18:35:32.960Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-06-10T19:23:16.839Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors, so no error handling is needed when calling these methods.
node/node.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
pkg/p2p/client.go (1)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
block/reaper.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
block/reaper_test.go (5)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
types/da_test.go (5)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
node/light.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
pkg/rpc/client/client_test.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
sequencers/single/sequencer_test.go (5)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: Manav-Aggarwal
PR: rollkit/rollkit#2280
File: sequencers/based/sequencer_test.go:89-89
Timestamp: 2025-05-26T10:26:59.799Z
Learning: In DummyDA test cases, the height ticker (StartHeightTicker/StopHeightTicker) is not needed for tests that don't rely on time-based height progression, such as TestSequencer_GetNextBatch_ExceedsMaxDrift which only tests max drift behavior without requiring height advancement over time.
block/aggregation_test.go (8)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to test/integration/**/*_test.go : Integration tests should be placed in the `test/integration/` directory.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to test/e2e/**/*_test.go : End-to-end (E2E) tests should be placed in the `test/e2e/` directory.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use custom error types for domain-specific errors in Go code.
sequencers/single/go.mod (11)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Never expose private keys in logs or errors.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Be careful with concurrent access to shared state in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Consider memory allocation in hot paths in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Return errors early in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use custom error types for domain-specific errors in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use secure random number generation in Go code.
block/pending_base.go (4)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
block/submitter_test.go (7)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-10-08T18:35:32.960Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-06-10T19:23:16.839Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
go.mod (8)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Be careful with concurrent access to shared state in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Consider memory allocation in hot paths in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Return errors early in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Document exported types and functions in Go code.
pkg/cmd/run_node_test.go (7)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors, so no error handling is needed when calling these methods.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to test/e2e/**/*_test.go : End-to-end (E2E) tests should be placed in the `test/e2e/` directory.
block/lazy_aggregation_test.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
block/sync_test.go (6)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to test/e2e/**/*_test.go : End-to-end (E2E) tests should be placed in the `test/e2e/` directory.
pkg/sync/sync_service_test.go (2)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
da/cmd/local-da/main.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
block/da_speed_test.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
block/pending_headers.go (1)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
node/full_node_test.go (6)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to test/integration/**/*_test.go : Integration tests should be placed in the `test/integration/` directory.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
da/cmd/local-da/local.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
da/jsonrpc/proxy_test.go (5)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
sequencers/based/sequencer_test.go (5)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: Manav-Aggarwal
PR: rollkit/rollkit#2280
File: sequencers/based/sequencer_test.go:89-89
Timestamp: 2025-05-26T10:26:59.799Z
Learning: In DummyDA test cases, the height ticker (StartHeightTicker/StopHeightTicker) is not needed for tests that don't rely on time-based height progression, such as TestSequencer_GetNextBatch_ExceedsMaxDrift which only tests max drift behavior without requiring height advancement over time.
pkg/service/baseservice_test.go (2)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
block/pending_base_test.go (9)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Return errors early in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use custom error types for domain-specific errors in Go code.
Learnt from: Manav-Aggarwal
PR: rollkit/rollkit#2280
File: sequencers/based/sequencer_test.go:89-89
Timestamp: 2025-05-26T10:26:59.799Z
Learning: In DummyDA test cases, the height ticker (StartHeightTicker/StopHeightTicker) is not needed for tests that don't rely on time-based height progression, such as TestSequencer_GetNextBatch_ExceedsMaxDrift which only tests max drift behavior without requiring height advancement over time.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to test/e2e/**/*_test.go : End-to-end (E2E) tests should be placed in the `test/e2e/` directory.
sequencers/based/go.mod (8)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Never expose private keys in logs or errors.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Return errors early in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use custom error types for domain-specific errors in Go code.
da/go.mod (6)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use secure random number generation in Go code.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors, so no error handling is needed when calling these methods.
block/da_includer_test.go (7)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-10-08T18:35:32.960Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-06-10T19:23:16.839Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: Manav-Aggarwal
PR: rollkit/rollkit#2280
File: sequencers/based/sequencer_test.go:89-89
Timestamp: 2025-05-26T10:26:59.799Z
Learning: In DummyDA test cases, the height ticker (StartHeightTicker/StopHeightTicker) is not needed for tests that don't rely on time-based height progression, such as TestSequencer_GetNextBatch_ExceedsMaxDrift which only tests max drift behavior without requiring height advancement over time.
pkg/rpc/server/server_test.go (8)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to test/integration/**/*_test.go : Integration tests should be placed in the `test/integration/` directory.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to test/e2e/**/*_test.go : End-to-end (E2E) tests should be placed in the `test/e2e/` directory.
Learnt from: Manav-Aggarwal
PR: rollkit/rollkit#2280
File: sequencers/based/sequencer_test.go:89-89
Timestamp: 2025-05-26T10:26:59.799Z
Learning: In DummyDA test cases, the height ticker (StartHeightTicker/StopHeightTicker) is not needed for tests that don't rely on time-based height progression, such as TestSequencer_GetNextBatch_ExceedsMaxDrift which only tests max drift behavior without requiring height advancement over time.
da/jsonrpc/client.go (5)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
block/manager.go (5)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-10-08T18:35:32.960Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-06-10T19:23:16.839Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
pkg/rpc/example/example.go (2)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
block/publish_block_test.go (6)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use buffered channels appropriately in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-10-08T18:35:32.960Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-06-10T19:23:16.839Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
node/light_test.go (6)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Never expose private keys in logs or errors.
types/da.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
pkg/p2p/client_test.go (5)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to test/e2e/**/*_test.go : End-to-end (E2E) tests should be placed in the `test/e2e/` directory.
pkg/p2p/utils_test.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
pkg/rpc/server/server.go (4)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
pkg/cmd/run_node.go (5)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Never expose private keys in logs or errors.
block/test_utils.go (4)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
pkg/sync/sync_service.go (4)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
node/full.go (3)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
sequencers/single/sequencer.go (4)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
block/manager_test.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
block/retriever_test.go (7)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-10-08T18:35:32.960Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
Learnt from: S1nus
PR: rollkit/rollkit#1374
File: block/manager.go:0-0
Timestamp: 2024-06-10T19:23:16.839Z
Learning: The overriding of `DataHash` and `Commit` in `block/manager.go` is necessary for the block to pass basic validation when `applyBlock` is called. The user has added a comment to document this requirement.
da/jsonrpc/server.go (4)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
pkg/service/baseservice.go (3)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use context.Context for cancellation in Go code.
block/pending_data.go (2)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
sequencers/based/sequencer.go (5)
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: Manav-Aggarwal
PR: rollkit/rollkit#2280
File: sequencers/based/sequencer_test.go:89-89
Timestamp: 2025-05-26T10:26:59.799Z
Learning: In DummyDA test cases, the height ticker (StartHeightTicker/StopHeightTicker) is not needed for tests that don't rely on time-based height progression, such as TestSequencer_GetNextBatch_ExceedsMaxDrift which only tests max drift behavior without requiring height advancement over time.
node/helpers_test.go (8)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use appropriate log levels in Go code.
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:178-178
Timestamp: 2025-01-27T22:02:44.446Z
Learning: In the test files of rollkit/rollkit repository, the `github.com/rollkit/go-da` package is imported with the alias `da`, while in production code it might use a different alias. The code should maintain consistent import aliases within each file.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*.go : Use structured logging and include relevant context in log messages in Go code.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to test/e2e/**/*_test.go : End-to-end (E2E) tests should be placed in the `test/e2e/` directory.
Learnt from: CR
PR: rollkit/rollkit#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T08:47:52.942Z
Learning: Applies to **/*_test.go : Unit tests should be placed in `*_test.go` files alongside the code being tested.
Learnt from: tac0turtle
PR: rollkit/rollkit#2221
File: types/da.go:26-27
Timestamp: 2025-04-28T07:23:13.738Z
Learning: The hardcoded placeholder namespace (`[]byte("placeholder")`) in the DA helper functions is intentional as a temporary solution to avoid breaking the API until upstream fixes in the node component can be implemented. This is part of a deliberate incremental refactoring strategy.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
🧬 Code Graph Analysis (19)
block/publish_block_p2p_test.go (1)
pkg/sync/sync_service.go (2)
NewHeaderSyncService(74-82)NewDataSyncService(63-71)
block/reaper.go (3)
block/manager.go (1)
Manager(101-171)sequencers/based/sequencer.go (1)
Sequencer(48-72)sequencers/single/sequencer.go (1)
Sequencer(25-38)
node/light.go (1)
pkg/sync/sync_service.go (1)
NewHeaderSyncService(74-82)
pkg/rpc/client/client_test.go (1)
pkg/rpc/server/server.go (1)
NewStoreServer(36-41)
block/aggregation_test.go (1)
block/manager.go (1)
Manager(101-171)
block/submitter_test.go (3)
block/pending_headers.go (1)
NewPendingHeaders(34-40)pkg/store/store.go (1)
New(24-28)block/pending_data.go (2)
PendingData(27-29)NewPendingData(37-43)
pkg/cmd/run_node_test.go (1)
pkg/cmd/run_node.go (1)
StartNode(76-185)
node/full_node_test.go (1)
pkg/service/baseservice.go (2)
BaseService(45-49)NewBaseService(53-64)
da/cmd/local-da/local.go (1)
sequencers/based/sequencer.go (1)
DefaultMaxBlobSize(28-28)
da/jsonrpc/proxy_test.go (1)
core/da/da.go (1)
DA(11-44)
pkg/service/baseservice_test.go (1)
pkg/service/baseservice.go (2)
BaseService(45-49)NewBaseService(53-64)
block/pending_base_test.go (3)
test/mocks/Store.go (1)
NewMockStore(16-26)block/pending_data.go (1)
NewPendingData(37-43)block/pending_headers.go (1)
NewPendingHeaders(34-40)
pkg/rpc/server/server_test.go (1)
pkg/rpc/server/server.go (2)
NewStoreServer(36-41)NewServiceHandler(242-281)
block/manager.go (3)
pkg/genesis/genesis.go (1)
Genesis(11-16)types/signer.go (2)
Signer(13-16)SignaturePayloadProvider(10-10)types/state.go (1)
State(20-39)
pkg/rpc/example/example.go (1)
pkg/rpc/server/server.go (1)
NewServiceHandler(242-281)
pkg/cmd/run_node.go (1)
pkg/config/config.go (2)
LogConfig(175-179)Config(118-143)
node/full.go (1)
pkg/sync/sync_service.go (4)
HeaderSyncService(60-60)NewHeaderSyncService(74-82)DataSyncService(57-57)NewDataSyncService(63-71)
da/jsonrpc/server.go (1)
core/da/da.go (1)
DA(11-44)
node/helpers_test.go (2)
pkg/p2p/client.go (1)
NewClient(65-93)block/metrics.go (1)
NopMetrics(74-82)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: test / Run Unit Tests
- GitHub Check: test / Build All Rollkit Binaries
- GitHub Check: test / Build Rollkit Docker Image
- GitHub Check: test / Build Rollkit EVM Single Docker Image
- GitHub Check: lint / markdown-lint
- GitHub Check: Analyze (go)
- GitHub Check: Summary
🔇 Additional comments (97)
apps/evm/single/cmd/run.go (1)
51-54: LGTM - Good formatting improvement.The multi-line formatting improves readability of the function call.
Likely an incorrect or invalid review comment.
node/light_test.go (2)
10-10: LGTM - Correct logging import migration.The import change from
cosmossdk.io/logtogithub.com/ipfs/go-log/v2aligns with the project's logging migration.
40-41: LGTM - Proper test logger initialization.The logger initialization correctly uses the new logging package with appropriate test configuration:
- Named logger "test" for clarity
- Log level set to "FATAL" to suppress test output noise
block/lazy_aggregation_test.go (2)
10-10: LGTM - Correct logging import migration.The import change from
cosmossdk.io/logtogithub.com/ipfs/go-log/v2aligns with the project's logging migration.
57-57: LGTM - Proper logger initialization in test helper.The logger initialization correctly uses the new logging package. The named logger "test" provides clear context for test logging.
node/node.go (2)
7-7: LGTM - Correct logging import migration.The import change from
cosmossdk.io/logtogithub.com/ipfs/go-log/v2aligns with the project's logging migration.
41-41: LGTM - Proper logger parameter type update.The parameter type change from
log.Loggertologging.EventLoggercorrectly updates the public API for the logging migration. This is a breaking change but intentional as part of the migration.block/reaper_test.go (2)
11-11: LGTM - Correct logging import migration.The import change from
cosmossdk.io/logtogithub.com/ipfs/go-log/v2aligns with the project's logging migration.
26-27: LGTM - Consistent test logger initialization.The logger initialization pattern is correctly applied across all test functions:
- Named logger "test" for clarity
- Log level set to "FATAL" to suppress test output noise
- Consistent usage throughout the file
Also applies to: 64-65, 94-95
block/store_test.go (1)
58-59: Good choice of log level for test setup.The use of "FATAL" log level appropriately replaces the previous
log.NewNopLogger()behavior, ensuring minimal logging output during tests while still allowing critical errors to be logged.da/cmd/local-da/main.go (1)
39-40: Clean migration to ipfs/go-log/v2 with appropriate configuration.The logging setup is well-configured for a main application with stderr output and info-level logging. The migration from chained
.With("module", "da")calls to the named loggerlogging.Logger("da")follows the new pattern correctly.node/full_node_test.go (1)
13-35: LGTM! Clean migration to ipfs/go-log/v2.The logging migration is implemented correctly with proper import aliasing and logger initialization. The added comment about setting log levels is helpful for future test development.
block/pending_data.go (2)
6-6: LGTM! Correct import update for logging migration.The import change to
github.com/ipfs/go-log/v2is consistent with the project-wide logging migration.
37-37: LGTM! Proper logger type update.The parameter type change from
log.Loggertologging.EventLoggercorrectly aligns with the new logging framework interface.block/pending_headers.go (2)
6-6: LGTM! Consistent import update.The import change aligns with the project-wide migration to
github.com/ipfs/go-log/v2.
34-34: LGTM! Correct logger type update.The parameter type change to
logging.EventLoggeris consistent with the new logging framework.pkg/rpc/client/client_test.go (2)
10-10: LGTM! Proper import update for logging migration.The import change to
github.com/ipfs/go-log/v2with aliasloggingis consistent with the project-wide migration.
31-33: LGTM! Excellent test logger setup.The logger initialization follows the new framework correctly:
- Using
logging.Logger("test")for named logger creation- Explicitly setting debug log level for test visibility
- Proper integration with the server constructor
This pattern provides good control over test logging output.
types/da_test.go (2)
9-9: LGTM! Consistent import update.The import change to
github.com/ipfs/go-log/v2aligns with the project-wide logging migration.
19-20: LGTM! Appropriate test logger configuration.The logger setup is well-implemented:
- Using
logging.Logger("test")for named logger creation- Setting log level to "FATAL" to minimize test output noise
- Pattern is consistent across both test functions
The approach provides clean test output while maintaining logging functionality for the tested code.
Also applies to: 141-142
block/manager_test.go (3)
12-12: LGTM: Import updated for logging migration.The import change from
cosmossdk.io/logtogithub.com/ipfs/go-log/v2aligns with the PR's objective to standardize logging with Celestia nodes.
43-43: LGTM: Test logger initialization updated correctly.The change from
log.NewTestLogger(t)tologging.Logger("test")is consistent with the new logging framework.
71-71: LGTM: Test logger initialization updated consistently.All test functions correctly updated to use
logging.Logger("test")pattern, maintaining consistency across the test suite.Also applies to: 107-107, 123-123
da/jsonrpc/proxy_test.go (3)
13-13: LGTM: Import updated for logging migration.The import change is consistent with the broader migration to ipfs/go-log/v2.
48-49: LGTM: Test logger properly configured with explicit log level.The update to
logging.Logger("test")with explicit debug level setting follows best practices for test logging configuration.
245-246: LGTM: Helper function logger updated consistently.The logger configuration in the helper function matches the pattern used in the main test function, ensuring consistent logging behavior.
pkg/p2p/utils_test.go (2)
15-15: LGTM: Import updated for logging migration.The import change is consistent with the broader logging framework migration.
70-70: LGTM: Function parameter type updated for new logging interface.The change from
log.Loggertologging.EventLoggercorrectly updates the function signature to work with the new logging framework.sequencers/based/sequencer_test.go (3)
8-8: LGTM: Import updated for logging migration.The import change aligns with the logging framework migration.
25-27: LGTM: Test logger configured to suppress non-critical output.The replacement of
log.NewNopLogger()withlogging.Logger("test")at FATAL level effectively maintains the no-op behavior while using the new logging framework.
99-101: LGTM: Test-specific logger configuration updated consistently.The logger setup in this test function matches the pattern used in the helper function, ensuring consistent behavior across all tests.
block/pending_base.go (3)
11-11: LGTM: Import updated for logging migration.The import change is consistent with the broader logging framework migration.
20-20: LGTM: Struct field type updated for new logging interface.The change from
log.Loggertologging.EventLoggercorrectly updates the field type to work with the new logging framework.
28-28: LGTM: Constructor parameter type updated consistently.The parameter type change from
log.Loggertologging.EventLoggermaintains consistency with the struct field type and the new logging framework.block/da_speed_test.go (2)
13-13: Import migration correctly implemented.The logging package import has been properly updated to use ipfs/go-log/v2 with appropriate aliasing.
95-96: Logger initialization correctly migrated.The change from
log.NewNopLogger()tologging.Logger("test")with FATAL log level correctly maintains the same behavior of suppressing test output while using the new logging framework.sequencers/based/sequencer.go (2)
11-11: Logging import correctly updated.The import has been properly migrated to ipfs/go-log/v2 with appropriate aliasing.
50-50: Logger type migration correctly implemented.The logger field and constructor parameter have been properly updated from
log.Loggertologging.EventLoggerto match the new logging framework interface.Also applies to: 76-76
sequencers/based/go.mod (1)
12-12: Dependency correctly added for logging migration.The direct dependency on
github.com/ipfs/go-log/v2 v2.6.0has been properly added to support the logging framework migration.block/publish_block_p2p_test.go (2)
17-17: Logging import correctly updated.The import has been properly migrated to ipfs/go-log/v2 with appropriate aliasing.
180-180: Logger initialization correctly migrated.The change from
log.NewTestLogger(t)tologging.Logger("test")correctly adapts to the new logging framework.go.mod (1)
30-30: Zap logging dependency correctly added.The addition of
go.uber.org/zap v1.27.0as a direct dependency correctly supports the logging infrastructure, as ipfs/go-log/v2 likely uses zap as its underlying logging implementation.pkg/service/baseservice_test.go (3)
10-10: LGTM: Import statement correctly updated.The import change from
cosmossdk.io/logtogithub.com/ipfs/go-log/v2with theloggingalias is correct and consistent with the logging migration.
25-27: LGTM: Logger creation correctly updated for the new logging framework.The logger instantiation follows the correct pattern for
github.com/ipfs/go-log/v2:
- Using
logging.Logger("test-nop")to create a named logger- Setting log level to "FATAL" with
logging.SetLogLevel("test-nop", "FATAL")- Appropriate for test environments to minimize log noise
76-78: LGTM: All test logger instances consistently updated.All test cases correctly use the new logging pattern with named loggers and explicit FATAL log level setting. The migration is consistent throughout the file.
Also applies to: 108-110, 118-120, 122-124
da/cmd/local-da/local.go (2)
15-15: LGTM: Import statement correctly updated.The import change to
github.com/ipfs/go-log/v2with theloggingalias is correct and consistent with the logging migration across the codebase.
35-35: LGTM: Logger type and usage correctly updated.The changes properly implement the logging migration:
- Logger field type correctly changed to
logging.EventLogger- Constructor parameter type updated accordingly
- Direct logger assignment is appropriate for the new logging framework (removing the
.With("module", "local-da")pattern)The existing logging calls throughout the file remain compatible with the new logger interface.
Also applies to: 43-43, 49-49
block/manager.go (2)
18-18: LGTM: Import statement correctly updated.The import change to
github.com/ipfs/go-log/v2with theloggingalias is consistent with the logging migration across the codebase.
138-138: LGTM: Logger types correctly updated throughout the file.The logging migration is properly implemented:
- Manager struct's logger field type correctly changed to
logging.EventLogger- Function parameter types updated in
getInitialStateandNewManagerconstructors- All changes maintain compatibility with existing logging calls throughout the file
The migration is consistent and maintains all existing functionality.
Also applies to: 174-174, 282-282
da/go.mod (1)
10-10: LGTM: ipfs/go-log/v2 v2.5.1 added and version verified
- File:
da/go.mod, line 10- Added
github.com/ipfs/go-log/v2 v2.5.1for the DA module logging migration- Confirmed v2.5.1 is the latest stable release (published May 2025)
- No known security vulnerabilities in v2.5.1
Approving this change.
node/light.go (2)
11-11: LGTM: Import statement correctly updated.The import change to
github.com/ipfs/go-log/v2with theloggingalias is consistent with the logging migration across the codebase.
43-43: LGTM: Logger parameter and usage correctly updated.The changes properly implement the logging migration:
- Function parameter type correctly changed to
logging.EventLogger- Logger creation updated to use
logging.Logger("HeaderSyncService")which creates a named logger appropriate for the new framework- This aligns with the
NewHeaderSyncServiceconstructor inpkg/sync/sync_service.gothat expects alogging.EventLoggerAlso applies to: 45-45
block/publish_block_test.go (2)
14-14: LGTM: Logger import updated correctly.The import change aligns with the project-wide migration to ipfs/go-log/v2.
166-167: LGTM: Consistent test logger setup.Using "FATAL" log level appropriately suppresses log output during test execution while maintaining the new logging framework.
Also applies to: 237-238
pkg/service/baseservice.go (3)
7-7: LGTM: Import updated correctly.The logging import change aligns with the project-wide migration.
46-46: LGTM: Logger type migration implemented correctly.All logger type references updated from
log.Loggertologging.EventLoggerconsistently across the struct field, constructor parameter, and setter method.Also applies to: 53-53, 67-67
55-57: LGTM: Nop logger implementation follows correct pattern.Creating a named logger "nop" with FATAL level appropriately suppresses all output for the fallback case.
pkg/p2p/client_test.go (2)
13-13: LGTM: Import updated correctly.The logging import change aligns with the project-wide migration.
37-38: LGTM: Consistent test logger setup across all test functions.The pattern of creating named loggers with appropriate log levels is implemented consistently:
- Using meaningful logger names specific to each test
- Setting "debug" level for tests that need logging visibility
- Setting "FATAL" level for tests that need output suppression
- Following the established migration pattern
Also applies to: 130-131, 150-151, 172-173, 226-227, 291-292
block/submitter_test.go (2)
10-10: LGTM: Import updated correctly.The logging import change aligns with the project-wide migration.
31-32: LGTM: Consistent logger setup throughout the test file.The logging migration is implemented consistently across all test functions and helpers:
- Using appropriate log levels ("FATAL" for output suppression, "debug" for visibility)
- Following the established pattern of named loggers
- Maintaining consistent error handling for
SetLogLevelcallsAlso applies to: 250-252, 395-396, 469-471, 480-481
block/reaper.go (1)
10-10: LGTM! Logging migration implemented correctly.The import replacement and type updates are consistent throughout the file. The structured logging calls already in place align well with the new logging framework.
Also applies to: 25-25, 32-32
pkg/p2p/client.go (1)
12-12: LGTM! Complete and consistent logging migration.All logger type references have been properly updated from
log.Loggertologging.EventLogger. The existing structured logging usage is already compatible with the new framework.Also applies to: 47-47, 69-69, 99-99
da/jsonrpc/server.go (1)
11-11: LGTM! Thorough and consistent logging migration.All logger field types and function parameters have been properly updated. The existing structured logging calls with appropriate context already align well with ipfs/go-log/v2 best practices.
Also applies to: 18-18, 29-29, 88-88
types/da.go (1)
9-9: LGTM! Consistent logging migration for exported functions.The import replacement and function parameter type updates are correct. The structured logging calls with appropriate context fields are already compatible with the new logging framework.
Also applies to: 23-23, 104-104
pkg/rpc/example/example.go (1)
11-11: LGTM! Core logging migration implemented correctly.The import replacement, function parameter type updates, and logger instantiation pattern are consistent with the migration. The explicit log level setting to "FATAL" for the example is appropriate to suppress output.
Also applies to: 18-18, 77-78, 82-82
da/jsonrpc/client.go (4)
11-11: LGTM: Clean import migration to ipfs/go-log/v2The import change properly aliases the new logging package and maintains compatibility with existing code.
24-24: LGTM: Logger type correctly updatedThe logger field type is properly updated to use the new
logging.EventLoggerinterface from ipfs/go-log/v2.
248-250: LGTM: Function signature correctly updatedThe
NewClientfunction signature properly uses the newlogging.EventLoggertype and maintains the same functionality.
253-253: LGTM: Internal function signature updated consistentlyThe
newClientfunction parameter type is correctly updated to match the new logging interface.pkg/rpc/server/server_test.go (3)
15-15: LGTM: Test import correctly updatedThe import properly uses the new ipfs/go-log/v2 package with appropriate aliasing.
47-49: LGTM: Test logger pattern correctly implementedThe new test logger pattern using
logging.Logger("test")with explicit "FATAL" log level is the correct approach for ipfs/go-log/v2. This effectively suppresses log output during tests while maintaining proper logger functionality.
322-324: LGTM: Consistent test logger usageThe same correct logger pattern is applied consistently throughout the test file, ensuring uniform behavior across all test cases.
sequencers/single/sequencer.go (3)
11-11: LGTM: Import correctly updated for sequencerThe import change properly migrates to ipfs/go-log/v2 with appropriate aliasing.
26-26: LGTM: Sequencer logger field type updatedThe logger field type is correctly updated to use the new
logging.EventLoggerinterface.
43-43: LGTM: Constructor parameters consistently updatedBoth
NewSequencerandNewSequencerWithQueueSizefunction parameters are correctly updated to use the new logging interface, maintaining consistency across the API.Also applies to: 57-57
pkg/rpc/server/server.go (3)
16-16: LGTM: Server import correctly updatedThe import properly migrates to ipfs/go-log/v2 with appropriate aliasing.
32-32: LGTM: StoreServer logger field type updatedThe logger field type is correctly updated to use the new
logging.EventLoggerinterface.
36-36: LGTM: Function signatures consistently updatedBoth
NewStoreServerandNewServiceHandlerfunction parameters are correctly updated to use the new logging interface, maintaining API consistency.Also applies to: 242-242
pkg/cmd/run_node_test.go (3)
12-12: LGTM: Command test import correctly updatedThe import properly migrates to ipfs/go-log/v2 with appropriate aliasing.
396-398: LGTM: Test logger pattern correctly implementedThe logger creation using
logging.Logger("TestStartNodeErrors")with explicit "FATAL" log level is the correct approach for ipfs/go-log/v2. The descriptive logger name aids in debugging if needed.
452-455: LGTM: Command handler logger correctly implementedThe
newRunNodeCmdfunction properly creates a named logger for the command execution with appropriate log level settings, and correctly passes it toStartNode.node/helpers_test.go (3)
16-16: LGTM: Import updated for logging migrationThe import has been correctly updated to use the new
github.com/ipfs/go-log/v2logging package with appropriate aliasing.
62-64: LGTM: Appropriate test logger setupThe logger creation follows the new pattern correctly:
- Uses
logging.Logger("test")for consistent test logging- Sets log level to "FATAL" to suppress unnecessary test output
- Maintains test isolation and performance
128-128: LGTM: Consistent logger usage in node creationAll
NewNodecalls have been consistently updated to uselogging.Logger("test")instead of the previous test logger, maintaining consistency with the new logging framework.Also applies to: 193-193, 231-231
pkg/sync/sync_service.go (2)
15-15: LGTM: Import updated for logging migrationThe import statement has been correctly updated to use the new logging package.
40-40: LGTM: Consistent logger type migrationAll logger types have been systematically updated from
log.Loggertologging.EventLoggeracross:
- Struct fields
- Function parameters
- Constructor signatures
The migration maintains full API compatibility while adopting the new logging framework.
Also applies to: 68-68, 79-79, 90-90, 383-383
block/pending_base_test.go (3)
10-10: LGTM: Import updated for logging migrationThe import has been correctly updated to use the new logging package.
33-34: LGTM: Consistent test logger setup patternAll test functions consistently use the new logging pattern:
logging.Logger("test")for logger creationlogging.SetLogLevel("test", "FATAL")to suppress test output- Maintains test performance and readability
Also applies to: 46-47, 104-105, 130-131, 184-185, 228-229, 238-239
225-225: LGTM: Function signatures updated correctlyThe function signature and anonymous function parameters have been properly updated to accept
logging.EventLogger, maintaining consistency with the new logging framework.Also applies to: 285-287, 295-297
sequencers/single/sequencer_test.go (2)
10-10: LGTM: Import updated for logging migrationThe import statement has been correctly updated to use the new logging package.
28-30: LGTM: Excellent consistency in test logger setupAll test functions consistently follow the new logging pattern:
- Use
logging.Logger("test")for creating test loggers- Set log level to "FATAL" to suppress unnecessary test output during testing
- Maintain clean test isolation and performance
This consistent approach across the entire test suite makes the code maintainable and follows best practices for test logging.
Also applies to: 62-64, 117-119, 156-158, 193-195, 254-256, 277-279, 299-301, 321-323, 344-346, 367-369, 398-400, 454-456, 479-481, 504-506, 545-547, 661-663
pkg/cmd/run_node.go (3)
14-14: LGTM: Import updated for logging migrationThe import statement has been correctly updated to use the new logging package.
50-73: LGTM: Well-structured logging setup functionThe
SetupLoggerfunction has been properly migrated to use the new logging framework:
- Uses
logging.Configstruct for configuration- Handles JSON format setting appropriately
- Includes proper error handling for level parsing with sensible fallback to info level
- Returns a logger for the "main" subsystem following the new pattern
The global nature of
logging.SetupLogging()is appropriate for application-level logging configuration.
77-77: LGTM: Function signature updated correctlyThe
StartNodefunction parameter type has been properly updated to acceptlogging.EventLogger, maintaining consistency with the logging migration.node/full.go (1)
16-16: LGTM! Logging migration is correctly implemented.The changes properly migrate from
cosmossdk.io/logtoipfs/go-log/v2:
- Import and type declarations are updated consistently
- Logger instances are created using the idiomatic
logging.Logger("ModuleName")pattern- Method signatures are properly updated
This aligns with the PR objective to migrate to the same logging system used by Celestia nodes.
Also applies to: 83-83, 128-128, 157-157, 159-159, 171-171, 173-173, 197-197, 216-216, 536-536, 541-541
block/retriever_test.go (1)
38-43: Good improvement to logger mock setup!Using a loop to set up mock expectations for different log levels reduces code duplication and improves maintainability. This pattern is now consistent across test files.
| cosmossdk.io/log v1.6.0 | ||
| github.com/go-kit/kit v0.13.0 | ||
| github.com/ipfs/go-datastore v0.8.2 | ||
| github.com/ipfs/go-log/v2 v2.6.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify the ipfs/go-log/v2 version for security and compatibility.
Ensure that v2.6.0 is the latest stable version and check for any known security advisories.
🌐 Web query:
What is the latest stable version of github.com/ipfs/go-log/v2 and are there any known security vulnerabilities in version 2.6.0?
💡 Result:
The latest stable version of github.com/ipfs/go-log/v2 is v2.5.1, released on March 3, 2022. (libraries.io) There is no record of a v2.6.0 release for this package.
Regarding security vulnerabilities, Snyk's analysis indicates that the go-log package has no known direct vulnerabilities. (snyk.io) However, it's important to note that the package has not seen any new versions released in the past 12 months and could be considered inactive. This lack of recent activity may affect its maintenance and security posture.
Citations:
- 1: https://libraries.io/go/github.com%2Fipfs%2Fgo-log%2Fv2?utm_source=openai
- 2: https://snyk.io/advisor/golang/github.com/ipfs/go-log/v2?utm_source=openai
go.mod: Invalid github.com/ipfs/go-log/v2 version
It appears you’ve added v2.6.0, but no such release exists. The latest stable is v2.5.1 (Mar 3, 2022) and there are no known vulnerabilities. Please update the require to:
github.com/ipfs/go-log/v2 v2.5.1
or confirm if you intended a pre-release tag.
[Citations: libraries.io¹, Snyk²]
🤖 Prompt for AI Agents
In sequencers/single/go.mod at line 13, the version v2.6.0 of
github.com/ipfs/go-log/v2 is invalid as it does not exist. Replace v2.6.0 with
the latest stable version v2.5.1 in the require directive to ensure
compatibility and correctness.
|
We can do migration to std/slog altogether at some point. I wish they provided us with standard logging interface much earlier, but it is what it is. |
This reverts commit fa03f78.
|
|
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Overview Duplicate of #2411, was reverted in #2394 <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. Ex: Closes #<issue number> --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a script and documentation for automated setup and management of EVM nodes, including sequencer and full node orchestration, JWT handling, Docker integration, and process monitoring. * **Refactor** * Replaced the previous logging system with a new logging backend throughout the codebase, updating logger types, initialization, and log message formatting for improved consistency. * Updated public interfaces and constructors to use the new logger type. * Adjusted log message formatting for clarity and readability. * Simplified P2P address handling by extracting full multiaddress strings instead of parsing P2P IDs from logs. * **Documentation** * Added and updated documentation to reflect new scripts and clarify execution-layer compatibility. * **Chores** * Cleaned up and updated dependencies, removing unused logging libraries and related packages across multiple modules and test files. * **Tests** * Updated test code to use the new logging system and adjusted logger initialization and configuration in tests. * Removed an obsolete test for transaction submission in the EVM execution layer. * Minor test logic adjustments, including increased block time and improved P2P address retrieval. * Removed redundant comments in test helpers. * **Style** * Improved log message formatting for better clarity in output. * **Bug Fixes** * Added a small delay in an end-to-end test to improve reliability of block height assertions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: tac0turtle <you@example.com> Co-authored-by: Marko <marko@baricevic.me>
* main: feat: fix execution verification (#2433) build(deps): Bump github.com/spf13/viper from 1.19.0 to 1.20.1 (#2431) build(deps): Bump github.com/libp2p/go-libp2p-kad-dht from 0.29.1 to 0.33.1 (#2432) build(deps): Bump github.com/prometheus/client_golang from 1.21.1 to 1.22.0 (#2430) build(deps): Bump alpine from 3.18.3 to 3.22.0 (#2429) ci: fix dependabot patterns (#2427) feat: migrate logging to ipfs/go-log/v2 (#2416) fix: Consolidate some EVM E2E tests into one (#2423) feat: Support GetHeader in store (#2422) fix: Optimize E2E EVM tests (#2421) fix: getPeers size check (#2417) test: Add comprehensive EVM E2E tests (#2394) feat: migrate logging to ipfs/go-log/v2 (#2411) feat: execution verification (#2377)
Overview
This commit migrates Rollkit's logging from cosmossdk.io/log to github.com/ipfs/go-log/v2.
Key changes include:
closes #2395
Summary by CodeRabbit