Conversation
ab3b9c4 to
c16ee45
Compare
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
e8e2f44 to
003217b
Compare
| func execute(ctx context.Context, cmdString string) (Out, error) { | ||
| // Create the command | ||
| cmd := exec.Command("sh", "-c", cmdString) | ||
| cmd := exec.CommandContext(ctx, "sh", "-c", cmdString) |
Check failure
Code scanning / CodeQL
Command built from user-controlled sources Critical
There was a problem hiding this comment.
Send() checks the validity of the address, even though it would probably be a good idea to also have a check inside the http handler, close to where the parameter is read
📝 Walkthrough## Walkthrough
This update primarily upgrades the golangci-lint GitHub Action from version 7 to 8 and the linter tool from v2.0 to v2.3 across multiple workflow files. Additionally, two linters are disabled in the `.golangci.yml` configuration. The remainder of the changes are minor formatting improvements, code readability enhancements, and context propagation in logging and function calls, with some method reordering and refactoring for consistency.
## Changes
| Files/Groups | Change Summary |
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|
| .github/workflows/*.yml | Upgraded golangci-lint GitHub Action from v7 to v8 and linter tool from v2.0 to v2.3. |
| .golangci.yml | Disabled `goconst` and `noinlineerr` linters. |
| cmd/faucet/faucet.go, cmd/faucet/main.go | Added context.Context parameters to key functions and methods; updated command execution to use context; minor struct field reordering and idiomatic type alias. |
| keychain-sdk/keychain.go, keychain-sdk/key_requests.go, keychain-sdk/sign_requests.go, keychain-sdk/example_keychain_test.go, keychain-sdk/internal/writer/writer.go | Refactored to use context-aware logging (`*Context` methods); passed context to connection initialization; minor formatting. |
| prophet/exec.go, prophet/plugins.go, prophet/prophet.go | Standardized context usage in logging and function calls; added linter directive; minor formatting.|
| warden/x/act/keeper/actions_keeper.go, warden/x/async/keeper/keeper.go, warden/x/warden/keeper/keeper.go, warden/x/warden/keeper/spaces.go, shield/internal/parser/parser.go, go-client/query_client.go | Reordered method definitions for consistency; no logic changes. |
| warden/x/sched/keeper/callbacks.go | Removed duplicate method declarations. |
| tests/framework/ports/ports.go | Changed to use `net.ListenConfig` with context for TCP listeners; grouped var declarations. |
| Various other files across cmd, precompiles, shield, warden, tests, etc. | Added or adjusted blank lines for readability; grouped variable declarations; no logic changes. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant User
participant HTTPServer
participant FaucetApp
participant ExternalCmd
User->>HTTPServer: POST /send-tokens
HTTPServer->>FaucetApp: Send(ctx, address, flag)
FaucetApp->>ExternalCmd: execute(ctx, cmdString)
ExternalCmd-->>FaucetApp: Command result
FaucetApp-->>HTTPServer: Send result
HTTPServer-->>User: ResponsesequenceDiagram
participant App
participant Logger
App->>Logger: InfoContext(ctx, ...)
App->>Logger: ErrorContext(ctx, ...)
App->>Logger: DebugContext(ctx, ...)
Estimated code review effort2 (~15 minutes) Possibly related PRs
Suggested reviewers
|
There was a problem hiding this comment.
Actionable comments posted: 0
🔭 Outside diff range comments (9)
warden/app/config.go (2)
46-54: Potential slice-bounds panic when_or-missing / misplaced inchainID
strings.LastIndexBytereturns-1if the byte is not found.
If either separator is absent, or the-comes before the_,chainID[from+1:to]will panic at runtime.+ if from == -1 || to == -1 || to <= from { + return fmt.Errorf("invalid chainID format %q, expected ..._<evmID>-...", chainID) + } evmChainID, err := strconv.ParseUint(chainID[from+1:to], 10, 64)
41-45:sealedguard is not concurrency-safe
sealedis a plain package-level bool. Concurrent invocations ofsetupEVM(e.g., in tests) can race, violating the guard.Consider protecting the section with
sync.Onceor an atomic flag.-import ( +import ( "errors" "fmt" + "sync" ... -var sealed = false +var setupOnce sync.Oncefunc (app *App) setupEVM() error { var onceErr error setupOnce.Do(func() { ... // existing body without the `sealed` checks }) return onceErr }Also applies to: 70-72
warden/x/sched/simulation/helpers.go (1)
10-14: Avoid panicking in simulation helpers—return a failure flag insteadAcross all four simulation helper files:
- warden/x/warden/simulation/helpers.go
- warden/x/sched/simulation/helpers.go
- warden/x/async/simulation/helpers.go
- warden/x/act/simulation/helpers.go
replace the panic on invalid Bech32 addresses with a simple failure return:
func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { creator, err := sdk.AccAddressFromBech32(address) if err != nil { - panic(err) + return simtypes.Account{}, false } return simtypes.FindAccount(accs, creator) }This aligns with our broader effort to remove panics in favor of error-style handling (see keeper/shield.go).
• Please verify that every call to
FindAccountchecks the returned boolean to avoid silent failures.
• You can run a repo-wide search (rg -n "FindAccount(" .) and inspect each usage.cmd/soliditygen/generator.go (2)
48-52: Handle and propagate errors fromconvertToSolidityStructBoth calls discard the error returned by
convertToSolidityStruct, silently continuing on malformed JSON or invalid identifiers and producing an incomplete/incorrect contract.- inputDefs, _ := convertToSolidityStruct(inputName, inputMap) + inputDefs, err := convertToSolidityStruct(inputName, inputMap) + if err != nil { + return "", fmt.Errorf("converting input JSON: %w", err) + }And likewise for the output branch:
- outputDefs, _ := convertToSolidityStruct(outputName, outputMap) + outputDefs, err := convertToSolidityStruct(outputName, outputMap) + if err != nil { + return "", fmt.Errorf("converting output JSON: %w", err) + }Fail-fast here prevents impossible-to-trace contract bugs later.
Also applies to: 58-61
126-134: Make struct field order deterministicIterating over a Go
mapyields random order, so the generated Solidity struct fields will jump around between runs, breaking reproducible builds and forcing noisy diffs.- for key, val := range value { + keys := make([]string, 0, len(value)) + for k := range value { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, key := range keys { + val := value[key]Add
import "sort"at the top.prophet/plugins/pfp/pfp.go (1)
160-170: Use the correct JPEG MIME type and avoid a future ‘unsupported media type’ errorAWS (and most HTTP clients) expect
"image/jpeg", not"image/jpg".
Failing to use the canonical MIME type can lead to incorrectContent‐Typeinference on download and break downstream processing.- err := p.UploadFile(ctx, "image/jpg", imgFilename, image) + err := p.UploadFile(ctx, "image/jpeg", imgFilename, image)Also applies to: 182-183
warden/repo/seqcollection.go (1)
68-76:Importsilently rewrites IDs – will always trip the mismatch check
Appendallocates a new sequential ID, soactualIDcan never equal the caller-suppliedid.
UseSetinstead so the stored key matches the imported one.- actualID, err := c.Append(ctx, &v) + if err := c.Set(ctx, id, v); err != nil { return fmt.Errorf("ID mismatch: expected %d, got %d: cannot import this list of values", id, actualID) - } + }You may also want to advance the sequence cursor to
max(id)+1after the loop to keep futureAppendcalls monotonic.tests/framework/framework.go (1)
95-108: Potential infinite loop on Windows root path ingoModRoot
filepath.Dir("C:\\")returns"C:\\", soparent == pathat the root level.
Because the loop only stops whenpath == "/"or"", Windows callers can hang forever.- for path != "/" && path != "" { + for { testPath := filepath.Join(path, "go.mod") _, err := os.Stat(testPath) if err == nil { return path } - - path = filepath.Dir(path) + parent := filepath.Dir(path) + if parent == path || parent == "" { // reached FS root + break + } + path = parent }warden/x/async/keeper/tasks.go (1)
84-89: Error fromresults.Hasis silently discarded
Hasreturns(bool, error), but the potentialerroris ignored. If the underlying store returns an error, the function will proceed as if the task already has a result (or not) and might corrupt state.-func (k *TaskKeeper) SetResult(ctx context.Context, task types.Task, result types.TaskResult) error { - if exists, _ := k.results.Has(ctx, result.Id); exists { +func (k *TaskKeeper) SetResult(ctx context.Context, task types.Task, result types.TaskResult) error { + exists, err := k.results.Has(ctx, result.Id) + if err != nil { + return err + } + if exists { return types.ErrTaskAlreadyHasResult }
♻️ Duplicate comments (1)
.github/workflows/shield.yml (1)
20-28: Same Go 1.24 concern applies hereEnsure the image has Go 1.24 or the job will error out. Align with the comment in
go-client.yml.
🧹 Nitpick comments (17)
prophet/plugins/stoicquote/stoicquote_test.go (1)
60-64: Add a negative-path test forVerify
Verifyis only tested for the happy path. Consider adding a case where the encoded output doesn’t match the live API response (or is malformed) to ensure the function correctly returns an error.shield/token/idents.go (1)
12-13: Superfluous blank line beforereturnThe new empty line doesn’t add readability and breaks the otherwise compact early-return pattern in this tiny helper. Consider reverting to keep the function tight.
.golangci.yml (1)
35-36:noinlineerrdisabled – double-check intent
noinlineerrguards against shadowing or ignoring errors in helper functions. Disabling it could let subtle bugs slip. If it’s only failing on a handful of legitimate one-liners, consider suppressing per-line with//nolint:noinlineerrinstead..github/workflows/soliditygen.yml (1)
20-28: Re-evaluatecache: falseAll three workflows disable the built-in Go module cache. With larger deps this inflates CI duration. Unless there’s a reproducibility reason, enabling the cache (default) will speed up lint & test jobs.
- - uses: actions/setup-go@v5 - with: - go-version: "1.24" - cache: false + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + cache: true.github/workflows/keychain-sdk.yml (1)
25-27: Pin the GitHub Action to a commit SHA for reproducibility & supply-chain safetyUsing a floating tag (
golangci/golangci-lint-action@v8) exposes the workflow to unexpected future changes or a malicious re-tag. Pinning to the immutable commit SHA published forv8eliminates that risk while still conveying intent via a comment.- - name: golangci-lint - uses: golangci/golangci-lint-action@v8 + # golangci-lint-action v8 (pinned) + - name: golangci-lint + uses: golangci/golangci-lint-action@<commit-sha>.github/workflows/wardenkms.yml (1)
33-36: Same pinning concern as aboveConsider locking
golangci/golangci-lint-action@v8to its release commit SHA for deterministic builds and tighter supply-chain controls..github/workflows/wardend.yaml (1)
38-41: Lock the linter action to a commit SHAReplicates the recommendation given for the other workflows—pin the action instead of relying on a mutable tag.
.github/workflows/faucet.yml (1)
39-42: Pingolangci-lint-action@v8to an exact commitFor the same determinism & security reasons already mentioned, replace
@v8with its immutable commit SHA.shield/internal/preprocess/preprocess.go (3)
28-35: Avoid re-declaringerrinside every loop iteration
var err erroris declared on every pass through the loop. Declare it once before the loop to keep the loop body cleaner and avoid needless shadowing.-func preprocessElements(ctx context.Context, elements []*ast.Expression, expander ast.Expander) error { - for i, elem := range elements { - var err error +func preprocessElements(ctx context.Context, elements []*ast.Expression, expander ast.Expander) error { + var err error + for i, elem := range elements { elements[i], err = Preprocess(ctx, elem, expander)
40-45: Inline the temporaryerrvariableDeclaring
var err errorone line above its only assignment adds noise. Prefer the shorter form that the compiler already handles well:- var err error - prefix.Right, err = Preprocess(ctx, prefix.Right, expander) - return err + right, err := Preprocess(ctx, prefix.Right, expander) + prefix.Right = right + return err
48-60: Same pattern here—declare once, reuse, or inlineBoth
infix.Leftandinfix.Rightare processed sequentially; you can reuse a singleerrdeclared before the assignments or inline as shown above for consistency.prophet/plugins/pfp/pfp.go (1)
194-205: Loading AWS config on every upload is wasteful
config.LoadDefaultConfigperforms network work (endpoint discovery, credentials) and allocates heavily.
Consider initialising the S3 client once inNew(...)and re-using it; this will reduce latency for everyUploadFilecall.No immediate change required for the PR, but worth a follow-up ticket.
warden/x/act/keeper/keeper.go (1)
110-113: PreferBlockTime()for clarity
sdk.UnwrapSDKContext(ctx).BlockTime()is the idiomatic accessor; it avoids the extra indirection throughHeaderInfo()and is less likely to break on SDK upgrades.-func (k Keeper) getBlockTime(ctx context.Context) time.Time { - return sdk.UnwrapSDKContext(ctx).HeaderInfo().Time +func (k Keeper) getBlockTime(ctx context.Context) time.Time { + return sdk.UnwrapSDKContext(ctx).BlockTime() }prophet/prophet.go (2)
95-100: Prefer explicit unlock instead ofdeferinside the loop
deferruns when the goroutine returns, but placing it inside the loop is slightly unexpected and costs a tiny allocation. An explicit unlock keeps the critical section obvious and avoids the defer cost.- p.selfAddressRwLock.Lock() - defer p.selfAddressRwLock.Unlock() - - p.selfAddress = status.ValidatorInfo.Address + p.selfAddressRwLock.Lock() + p.selfAddress = status.ValidatorInfo.Address + p.selfAddressRwLock.Unlock()
166-170: Consider supplying a context rather than disablingnoctxIf feasible, pass a
context.Contextto satisfy the linter instead of blanket-disabling:- slog.Warn("q.Add: queue is full, dropped item", "item", item) //nolint:noctx + slog.WarnContext(context.TODO(), "q.Add: queue is full, dropped item", "item", item)Using
context.TODO()keeps the call compliant; replace with a real context if/when one is available.keychain-sdk/example_keychain_test.go (1)
38-50: Align code comment spelling with API name to avoid confusionThe method is
Fulfil, but the log message says “fulfill”. This tiny mismatch may cause grep-based searches to miss occurrences.- logger.ErrorContext(ctx, "could not fulfill key request", "error", err) + logger.ErrorContext(ctx, "could not fulfil key request", "error", err)prophet/exec.go (1)
23-23: Context propagation improves observability, but consider avoidingcontext.TODO().The migration to context-aware logging (
DebugContext,ErrorContext) and passing context toExecute/Verifyfunctions is excellent for traceability. However, usingcontext.TODO()is generally discouraged in production code as it's intended for temporary use during development.Consider modifying the function signatures to accept a
context.Contextparameter:-func ExecTasks(r TaskReader, w TaskResultWriter) error { +func ExecTasks(ctx context.Context, r TaskReader, w TaskResultWriter) error {-func ExecVotes(r TaskResultReader, w VoteWriter) error { +func ExecVotes(ctx context.Context, r TaskResultReader, w VoteWriter) error {This would allow proper cancellation and timeout handling for the entire execution pipeline.
Also applies to: 59-59
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (105)
.github/workflows/faucet.yml(1 hunks).github/workflows/go-client.yml(1 hunks).github/workflows/keychain-sdk.yml(1 hunks).github/workflows/shield.yml(1 hunks).github/workflows/soliditygen.yml(1 hunks).github/workflows/wardend.yaml(1 hunks).github/workflows/wardenkms.yml(1 hunks).golangci.yml(2 hunks)cmd/faucet/faucet.go(11 hunks)cmd/faucet/main.go(5 hunks)cmd/faucet/pkg/config/config.go(0 hunks)cmd/shield_repl/main.go(1 hunks)cmd/soliditygen/generator.go(6 hunks)cmd/soliditygen/main.go(4 hunks)cmd/wardenkms/bip44.go(5 hunks)cmd/wardenkms/wardenkms.go(4 hunks)go-client/query_client.go(2 hunks)go-client/tx_client.go(1 hunks)go-client/tx_identity.go(1 hunks)go-client/tx_raw_client.go(2 hunks)keychain-sdk/example_keychain_test.go(1 hunks)keychain-sdk/internal/enc/enc.go(2 hunks)keychain-sdk/internal/enc/enc_test.go(1 hunks)keychain-sdk/internal/tracker/tracker.go(1 hunks)keychain-sdk/internal/writer/writer.go(7 hunks)keychain-sdk/key_requests.go(3 hunks)keychain-sdk/keychain.go(4 hunks)keychain-sdk/sign_requests.go(4 hunks)precompiles/act/act.go(1 hunks)precompiles/async/async.go(1 hunks)precompiles/async/tx.go(1 hunks)precompiles/json/builder.go(15 hunks)precompiles/json/builder_test.go(5 hunks)precompiles/json/json.go(1 hunks)precompiles/json/parser.go(6 hunks)precompiles/json/parser_test.go(5 hunks)precompiles/json/query.go(2 hunks)precompiles/sched/sched.go(1 hunks)precompiles/sched/tx.go(2 hunks)precompiles/slinky/slinky.go(1 hunks)precompiles/warden/events.go(7 hunks)precompiles/warden/warden.go(1 hunks)prophet/dedup.go(1 hunks)prophet/exec.go(2 hunks)prophet/plugins.go(2 hunks)prophet/plugins/http/http.go(1 hunks)prophet/plugins/http/http_test.go(1 hunks)prophet/plugins/pfp/pfp.go(1 hunks)prophet/plugins/stoicquote/stoicquote_test.go(1 hunks)prophet/plugins/veniceimg/veniceimg.go(1 hunks)prophet/prophet.go(2 hunks)prophet/task.go(1 hunks)shield/ast/ast.go(1 hunks)shield/internal/evaluator/evaluator.go(7 hunks)shield/internal/evaluator/evaluator_test.go(1 hunks)shield/internal/lexer/lexer.go(6 hunks)shield/internal/metadata/metadata.go(2 hunks)shield/internal/metadata/metadata_test.go(1 hunks)shield/internal/parser/parser.go(8 hunks)shield/internal/preprocess/preprocess.go(1 hunks)shield/internal/preprocess/preprocess_test.go(3 hunks)shield/shield.go(1 hunks)shield/token/idents.go(1 hunks)tests/cases/async_callbacks.go(2 hunks)tests/cases/create_space.go(1 hunks)tests/cases/reject_any_3_action.go(1 hunks)tests/cases/warden_precompile.go(4 hunks)tests/framework/checks/checks.go(1 hunks)tests/framework/checks/eth_checks.go(1 hunks)tests/framework/exec/exec.go(1 hunks)tests/framework/exec/warden_eth.go(2 hunks)tests/framework/exec/warden_node.go(3 hunks)tests/framework/framework.go(2 hunks)tests/framework/iowriter/iowriter.go(1 hunks)tests/framework/ports/ports.go(1 hunks)tests/framework/snapshot/snapshots.go(5 hunks)tests/integration_test.go(1 hunks)warden/app/ante.go(1 hunks)warden/app/app.go(2 hunks)warden/app/config.go(1 hunks)warden/app/export.go(1 hunks)warden/app/legacy.go(3 hunks)warden/app/sim_test.go(1 hunks)warden/repo/seqcollection.go(2 hunks)warden/x/act/keeper/actions_keeper.go(1 hunks)warden/x/act/keeper/keeper.go(1 hunks)warden/x/act/types/v1beta1/registry.go(2 hunks)warden/x/async/keeper/abci.go(8 hunks)warden/x/async/keeper/genesis.go(1 hunks)warden/x/async/keeper/keeper.go(2 hunks)warden/x/async/keeper/msg_server_add_task.go(1 hunks)warden/x/async/keeper/query_plugin_validators.go(3 hunks)warden/x/async/keeper/queues.go(3 hunks)warden/x/async/keeper/tasks.go(2 hunks)warden/x/sched/keeper/abci.go(4 hunks)warden/x/sched/keeper/callbacks.go(1 hunks)warden/x/sched/keeper/params.go(1 hunks)warden/x/sched/module/module.go(1 hunks)warden/x/sched/module/simulation.go(1 hunks)warden/x/sched/simulation/helpers.go(1 hunks)warden/x/sched/types/v1beta1/codec.go(0 hunks)warden/x/sched/types/v1beta1/genesis.go(0 hunks)warden/x/warden/keeper/keeper.go(1 hunks)warden/x/warden/keeper/spaces.go(1 hunks)warden/x/warden/types/v1beta3/address.go(1 hunks)
🧠 Learnings (53)
📓 Common learnings
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the `Expand` method of `warden/x/warden/keeper/shield.go`, replacing `panic` with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the `Expand` method of `warden/x/warden/keeper/shield.go`, replacing `panic` with error returns.
warden/x/async/keeper/msg_server_add_task.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
cmd/soliditygen/main.go (1)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
precompiles/json/builder_test.go (1)
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
warden/x/async/keeper/queues.go (2)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
tests/framework/exec/warden_node.go (2)
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
warden/x/async/keeper/genesis.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
keychain-sdk/sign_requests.go (1)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
warden/x/warden/keeper/keeper.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
keychain-sdk/example_keychain_test.go (4)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/tracker.go:0-0
Timestamp: 2024-10-24T13:35:40.452Z
Learning: In keychain-sdk/internal/tracker/tracker.go, the statusTracker method is always called with the lock already held by the caller, so it does not need to acquire a lock itself.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
.golangci.yml (1)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
shield/ast/ast.go (2)
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
.github/workflows/keychain-sdk.yml (1)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
precompiles/act/act.go (1)
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
warden/app/export.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
warden/app/ante.go (4)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: backsapc
PR: #1084
File: automated-orders/packages/blockchain-library/src/clients/evm.ts:73-84
Timestamp: 2024-11-22T08:39:50.349Z
Learning: In automated-orders/packages/blockchain-library/src/clients/evm.ts, the method EvmClient.broadcastTx does not require additional error handling or validation beyond what is already implemented.
warden/x/act/keeper/keeper.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
shield/token/idents.go (1)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
warden/x/async/keeper/abci.go (4)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: mn13
PR: #1216
File: warden/x/async/keeper/abci.go:212-216
Timestamp: 2025-02-06T08:48:57.285Z
Learning: In the collections package from Cosmos SDK, calling Keys() on an iterator fully consumes and closes the iterator, making an explicit Close() call unnecessary.
keychain-sdk/key_requests.go (4)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/tracker.go:0-0
Timestamp: 2024-10-24T13:35:40.452Z
Learning: In keychain-sdk/internal/tracker/tracker.go, the statusTracker method is always called with the lock already held by the caller, so it does not need to acquire a lock itself.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
warden/x/sched/simulation/helpers.go (4)
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: #1095
File: warden/app/oracle.go:0-0
Timestamp: 2024-11-21T11:35:35.678Z
Learning: In the Go file warden/app/oracle.go, it is acceptable to panic inside the goroutine that starts the oracle client, because an error here indicates a misconfiguration (e.g., the address was misconfigured), and the application should exit.
tests/cases/warden_precompile.go (4)
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
prophet/dedup.go (1)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
shield/shield.go (2)
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
.github/workflows/wardenkms.yml (1)
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
tests/cases/create_space.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
keychain-sdk/internal/tracker/tracker.go (4)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/tracker.go:0-0
Timestamp: 2024-10-24T13:35:40.452Z
Learning: In keychain-sdk/internal/tracker/tracker.go, the statusTracker method is always called with the lock already held by the caller, so it does not need to acquire a lock itself.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/tracker.go:20-20
Timestamp: 2024-10-23T10:26:05.989Z
Learning: In the keychain-sdk/internal/tracker/tracker.go file, the variable nodeUrl should remain as nodeUrl and not be renamed to nodeURL.
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
warden/x/async/keeper/tasks.go (3)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
warden/x/async/keeper/query_plugin_validators.go (1)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
tests/framework/exec/warden_eth.go (5)
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: mn13
PR: #1195
File: prophet/handlers/pricepred/pricepred.go:255-295
Timestamp: 2025-01-29T08:09:21.980Z
Learning: In the Warden Protocol codebase, when dealing with trusted endpoints (like in prophet/handlers/pricepred/pricepred.go), simple error handling for non-200 responses is preferred as the endpoints are trusted and the approach is sufficient for the current stage.
warden/repo/seqcollection.go (1)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
prophet/prophet.go (3)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/tracker.go:0-0
Timestamp: 2024-10-24T13:35:40.452Z
Learning: In keychain-sdk/internal/tracker/tracker.go, the statusTracker method is always called with the lock already held by the caller, so it does not need to acquire a lock itself.
warden/app/app.go (3)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: mn13
PR: #1195
File: prophet/handlers/pricepred/pricepred.go:255-295
Timestamp: 2025-01-29T08:09:21.980Z
Learning: In the Warden Protocol codebase, when dealing with trusted endpoints (like in prophet/handlers/pricepred/pricepred.go), simple error handling for non-200 responses is preferred as the endpoints are trusted and the approach is sufficient for the current stage.
shield/internal/preprocess/preprocess.go (2)
Learnt from: Pitasi
PR: #1101
File: warden/x/async/keeper/query_futures.go:27-32
Timestamp: 2024-11-26T09:02:20.640Z
Learning: Variable shadowing of err variables within inner functions is acceptable in our Go codebase, as the Uber Go Style Guide does not prohibit it.
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
precompiles/warden/events.go (5)
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
tests/framework/iowriter/iowriter.go (1)
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
cmd/soliditygen/generator.go (3)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
Learnt from: Svetomech
PR: #1201
File: prophet/handlers/pricepred/PricePredictor.sol:24-26
Timestamp: 2025-01-31T08:10:08.200Z
Learning: The PricePredictor.sol contract and its solve function are only used for generating Go types with abigen and are not meant to be deployed or called. The contract serves as a type definition source.
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
warden/app/legacy.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
cmd/wardenkms/wardenkms.go (6)
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: Pitasi
PR: #1095
File: warden/app/oracle.go:0-0
Timestamp: 2024-11-21T11:35:35.678Z
Learning: In the Go file warden/app/oracle.go, it is acceptable to panic inside the goroutine that starts the oracle client, because an error here indicates a misconfiguration (e.g., the address was misconfigured), and the application should exit.
warden/x/sched/keeper/params.go (3)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
warden/x/sched/module/module.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
go-client/tx_identity.go (1)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
warden/x/warden/keeper/spaces.go (2)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: mn13
PR: #1216
File: warden/x/async/keeper/abci.go:212-216
Timestamp: 2025-02-06T08:48:57.285Z
Learning: In the collections package from Cosmos SDK, calling Keys() on an iterator fully consumes and closes the iterator, making an explicit Close() call unnecessary.
precompiles/sched/tx.go (1)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
keychain-sdk/internal/writer/writer.go (2)
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
warden/app/config.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
warden/x/act/keeper/actions_keeper.go (2)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
precompiles/json/query.go (1)
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
warden/x/sched/keeper/abci.go (3)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
warden/x/sched/keeper/callbacks.go (2)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
precompiles/json/builder.go (2)
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
Learnt from: mn13
PR: #1196
File: prophet/handlers/pricepred/pricepred.go:175-236
Timestamp: 2025-01-30T08:02:40.983Z
Learning: In the Warden Protocol codebase, prefer using map-based function lookups over large switch-case blocks for metric type handling. Example implementation:
metricMap := map[MetricName]func(BacktestingMetrics) float64{
MetricType: func(m BacktestingMetrics) float64 { return m.Value },
// ...
}prophet/exec.go (1)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
keychain-sdk/keychain.go (2)
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
Learnt from: Pitasi
PR: #1095
File: warden/app/oracle.go:0-0
Timestamp: 2024-11-21T11:35:35.678Z
Learning: In the Go file warden/app/oracle.go, it is acceptable to panic inside the goroutine that starts the oracle client, because an error here indicates a misconfiguration (e.g., the address was misconfigured), and the application should exit.
🧬 Code Graph Analysis (11)
keychain-sdk/sign_requests.go (3)
go-client/tx_warden.go (1)
SignRequestRejection(55-58)keychain-sdk/keychain.go (1)
App(25-34)keychain-sdk/internal/enc/enc.go (1)
ValidateEncryptionKey(11-19)
cmd/faucet/main.go (1)
cmd/faucet/faucet.go (1)
InitFaucet(129-157)
keychain-sdk/example_keychain_test.go (3)
warden/x/act/cosmoshield/context.go (1)
Context(9-14)keychain-sdk/writer.go (1)
Writer(6-13)keychain-sdk/sign_requests.go (1)
SignRequest(16-16)
keychain-sdk/key_requests.go (4)
go-client/tx_warden.go (2)
KeyRequestFulfilment(9-12)KeyRequestRejection(23-26)warden/x/act/cosmoshield/context.go (1)
Context(9-14)keychain-sdk/keychain.go (1)
App(25-34)warden/app/app.go (1)
App(116-176)
shield/internal/evaluator/evaluator_test.go (1)
shield/object/object.go (1)
Boolean(37-39)
shield/internal/preprocess/preprocess.go (3)
shield/shield.go (1)
Preprocess(35-37)shield/ast/ast.pb.go (6)
PrefixExpression(579-583)PrefixExpression(587-587)PrefixExpression(588-590)InfixExpression(511-516)InfixExpression(520-520)InfixExpression(521-523)shield/ast/expander.go (1)
Expander(5-18)
warden/x/sched/keeper/params.go (2)
warden/x/sched/types/v1beta1/keys.go (1)
ParamsKey(14-14)warden/x/sched/keeper/keeper.go (1)
Keeper(22-34)
shield/internal/evaluator/evaluator.go (2)
shield/object/object.go (5)
Integer(30-32)TRUE(21-21)STRING_OBJ(14-14)FALSE(22-22)Error(61-63)shield/ast/ast.pb.go (5)
Expression_BooleanLiteral(86-88)Expression_BooleanLiteral(107-107)BooleanLiteral(295-298)BooleanLiteral(302-302)BooleanLiteral(303-305)
warden/x/warden/keeper/spaces.go (2)
warden/repo/seqcollection.go (1)
SeqCollection(17-22)warden/x/act/cosmoshield/context.go (1)
Context(9-14)
keychain-sdk/internal/writer/writer.go (2)
warden/x/act/cosmoshield/context.go (1)
Context(9-14)go-client/tx_raw_client.go (3)
DefaultGasLimit(21-21)DefaultFees(22-22)Msger(66-68)
prophet/exec.go (2)
prophet/plugins.go (2)
Execute(22-56)Verify(59-83)prophet/task.go (1)
Vote(39-45)
💤 Files with no reviewable changes (3)
- cmd/faucet/pkg/config/config.go
- warden/x/sched/types/v1beta1/codec.go
- warden/x/sched/types/v1beta1/genesis.go
🧰 Additional context used
🧠 Learnings (53)
📓 Common learnings
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the `Expand` method of `warden/x/warden/keeper/shield.go`, replacing `panic` with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the `Expand` method of `warden/x/warden/keeper/shield.go`, replacing `panic` with error returns.
warden/x/async/keeper/msg_server_add_task.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
cmd/soliditygen/main.go (1)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
precompiles/json/builder_test.go (1)
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
warden/x/async/keeper/queues.go (2)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
tests/framework/exec/warden_node.go (2)
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
warden/x/async/keeper/genesis.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
keychain-sdk/sign_requests.go (1)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
warden/x/warden/keeper/keeper.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
keychain-sdk/example_keychain_test.go (4)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/tracker.go:0-0
Timestamp: 2024-10-24T13:35:40.452Z
Learning: In keychain-sdk/internal/tracker/tracker.go, the statusTracker method is always called with the lock already held by the caller, so it does not need to acquire a lock itself.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
.golangci.yml (1)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
shield/ast/ast.go (2)
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
.github/workflows/keychain-sdk.yml (1)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
precompiles/act/act.go (1)
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
warden/app/export.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
warden/app/ante.go (4)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: backsapc
PR: #1084
File: automated-orders/packages/blockchain-library/src/clients/evm.ts:73-84
Timestamp: 2024-11-22T08:39:50.349Z
Learning: In automated-orders/packages/blockchain-library/src/clients/evm.ts, the method EvmClient.broadcastTx does not require additional error handling or validation beyond what is already implemented.
warden/x/act/keeper/keeper.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
shield/token/idents.go (1)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
warden/x/async/keeper/abci.go (4)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: mn13
PR: #1216
File: warden/x/async/keeper/abci.go:212-216
Timestamp: 2025-02-06T08:48:57.285Z
Learning: In the collections package from Cosmos SDK, calling Keys() on an iterator fully consumes and closes the iterator, making an explicit Close() call unnecessary.
keychain-sdk/key_requests.go (4)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/tracker.go:0-0
Timestamp: 2024-10-24T13:35:40.452Z
Learning: In keychain-sdk/internal/tracker/tracker.go, the statusTracker method is always called with the lock already held by the caller, so it does not need to acquire a lock itself.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
warden/x/sched/simulation/helpers.go (4)
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: #1095
File: warden/app/oracle.go:0-0
Timestamp: 2024-11-21T11:35:35.678Z
Learning: In the Go file warden/app/oracle.go, it is acceptable to panic inside the goroutine that starts the oracle client, because an error here indicates a misconfiguration (e.g., the address was misconfigured), and the application should exit.
tests/cases/warden_precompile.go (4)
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
prophet/dedup.go (1)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
shield/shield.go (2)
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
.github/workflows/wardenkms.yml (1)
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
tests/cases/create_space.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
keychain-sdk/internal/tracker/tracker.go (4)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/tracker.go:0-0
Timestamp: 2024-10-24T13:35:40.452Z
Learning: In keychain-sdk/internal/tracker/tracker.go, the statusTracker method is always called with the lock already held by the caller, so it does not need to acquire a lock itself.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/tracker.go:20-20
Timestamp: 2024-10-23T10:26:05.989Z
Learning: In the keychain-sdk/internal/tracker/tracker.go file, the variable nodeUrl should remain as nodeUrl and not be renamed to nodeURL.
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
warden/x/async/keeper/tasks.go (3)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
warden/x/async/keeper/query_plugin_validators.go (1)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
tests/framework/exec/warden_eth.go (5)
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: mn13
PR: #1195
File: prophet/handlers/pricepred/pricepred.go:255-295
Timestamp: 2025-01-29T08:09:21.980Z
Learning: In the Warden Protocol codebase, when dealing with trusted endpoints (like in prophet/handlers/pricepred/pricepred.go), simple error handling for non-200 responses is preferred as the endpoints are trusted and the approach is sufficient for the current stage.
warden/repo/seqcollection.go (1)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
prophet/prophet.go (3)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/tracker.go:0-0
Timestamp: 2024-10-24T13:35:40.452Z
Learning: In keychain-sdk/internal/tracker/tracker.go, the statusTracker method is always called with the lock already held by the caller, so it does not need to acquire a lock itself.
warden/app/app.go (3)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: mn13
PR: #1195
File: prophet/handlers/pricepred/pricepred.go:255-295
Timestamp: 2025-01-29T08:09:21.980Z
Learning: In the Warden Protocol codebase, when dealing with trusted endpoints (like in prophet/handlers/pricepred/pricepred.go), simple error handling for non-200 responses is preferred as the endpoints are trusted and the approach is sufficient for the current stage.
shield/internal/preprocess/preprocess.go (2)
Learnt from: Pitasi
PR: #1101
File: warden/x/async/keeper/query_futures.go:27-32
Timestamp: 2024-11-26T09:02:20.640Z
Learning: Variable shadowing of err variables within inner functions is acceptable in our Go codebase, as the Uber Go Style Guide does not prohibit it.
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
precompiles/warden/events.go (5)
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
tests/framework/iowriter/iowriter.go (1)
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
cmd/soliditygen/generator.go (3)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
Learnt from: Svetomech
PR: #1201
File: prophet/handlers/pricepred/PricePredictor.sol:24-26
Timestamp: 2025-01-31T08:10:08.200Z
Learning: The PricePredictor.sol contract and its solve function are only used for generating Go types with abigen and are not meant to be deployed or called. The contract serves as a type definition source.
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
warden/app/legacy.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
cmd/wardenkms/wardenkms.go (6)
Learnt from: backsapc
PR: #810
File: cmd/wardenkms/wardenkms.go:45-50
Timestamp: 2024-10-24T13:01:55.558Z
Learning: In the cmd/wardenkms/wardenkms.go file and the codebase, use Grpc instead of GRPC for acronym casing in type names, such as GrpcNodeConfig and GrpcNodeConfigDecoder, even though Go naming conventions suggest capitalizing acronyms.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: Pitasi
PR: #1095
File: warden/app/oracle.go:0-0
Timestamp: 2024-11-21T11:35:35.678Z
Learning: In the Go file warden/app/oracle.go, it is acceptable to panic inside the goroutine that starts the oracle client, because an error here indicates a misconfiguration (e.g., the address was misconfigured), and the application should exit.
warden/x/sched/keeper/params.go (3)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
warden/x/sched/module/module.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
go-client/tx_identity.go (1)
Learnt from: backsapc
PR: #946
File: precompiles/warden/tx_types.go:21-29
Timestamp: 2024-10-21T10:29:27.347Z
Learning: In this Go codebase, use Id instead of ID in identifiers, even for initialisms like "ID".
warden/x/warden/keeper/spaces.go (2)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: mn13
PR: #1216
File: warden/x/async/keeper/abci.go:212-216
Timestamp: 2025-02-06T08:48:57.285Z
Learning: In the collections package from Cosmos SDK, calling Keys() on an iterator fully consumes and closes the iterator, making an explicit Close() call unnecessary.
precompiles/sched/tx.go (1)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
keychain-sdk/internal/writer/writer.go (2)
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
warden/app/config.go (1)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
warden/x/act/keeper/actions_keeper.go (2)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
precompiles/json/query.go (1)
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
warden/x/sched/keeper/abci.go (3)
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-06-10T19:20:04.350Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
Learnt from: Pitasi
PR: warden-protocol/wardenprotocol#0
File: :0-0
Timestamp: 2024-10-16T16:01:11.241Z
Learning: Pitasi has implemented error handling in the Expand method of warden/x/warden/keeper/shield.go, replacing panic with error returns.
warden/x/sched/keeper/callbacks.go (2)
Learnt from: backsapc
PR: #810
File: keychain-sdk/internal/tracker/status_tracker.go:0-0
Timestamp: 2024-10-24T13:03:19.344Z
Learning: The MarkProcessed method has been removed from keychain-sdk/internal/tracker/status_tracker.go in the Go codebase, as it is no longer needed.
Learnt from: backsapc
PR: #975
File: warden/app/app.go:562-562
Timestamp: 2024-11-02T10:21:03.096Z
Learning: In warden/app/app.go, suggestions to handle errors from ParamsKeeper.GetSubspace() may be considered out of scope.
precompiles/json/builder.go (2)
Learnt from: Pitasi
PR: #889
File: precompiles/act/query.go:170-171
Timestamp: 2024-10-16T15:30:41.746Z
Learning: In Go code within precompile methods (e.g., in precompiles/act/query.go), prefer defining and using a custom error type (like WrongArgsNumber) instead of using fmt.Errorf directly for error messages. This enhances error handling and code clarity.
Learnt from: mn13
PR: #1196
File: prophet/handlers/pricepred/pricepred.go:175-236
Timestamp: 2025-01-30T08:02:40.983Z
Learning: In the Warden Protocol codebase, prefer using map-based function lookups over large switch-case blocks for metric type handling. Example implementation:
metricMap := map[MetricName]func(BacktestingMetrics) float64{
MetricType: func(m BacktestingMetrics) float64 { return m.Value },
// ...
}prophet/exec.go (1)
Learnt from: Pitasi
PR: #1141
File: prophet/prophet.go:98-100
Timestamp: 2024-12-13T11:47:21.696Z
Learning: In the prophet/prophet.go file, for the implementation of the non-blocking queue q, prefer using a buffered channel that discards overflowing items instead of spawning a goroutine per item added, to prevent resource exhaustion.
keychain-sdk/keychain.go (2)
Learnt from: backsapc
PR: #810
File: keychain-sdk/keychain.go:74-81
Timestamp: 2024-10-24T13:03:23.718Z
Learning: The team prefers not to refactor the writer.New constructor to use functional options in keychain-sdk/keychain.go.
Learnt from: Pitasi
PR: #1095
File: warden/app/oracle.go:0-0
Timestamp: 2024-11-21T11:35:35.678Z
Learning: In the Go file warden/app/oracle.go, it is acceptable to panic inside the goroutine that starts the oracle client, because an error here indicates a misconfiguration (e.g., the address was misconfigured), and the application should exit.
🧬 Code Graph Analysis (11)
keychain-sdk/sign_requests.go (3)
go-client/tx_warden.go (1)
SignRequestRejection(55-58)keychain-sdk/keychain.go (1)
App(25-34)keychain-sdk/internal/enc/enc.go (1)
ValidateEncryptionKey(11-19)
cmd/faucet/main.go (1)
cmd/faucet/faucet.go (1)
InitFaucet(129-157)
keychain-sdk/example_keychain_test.go (3)
warden/x/act/cosmoshield/context.go (1)
Context(9-14)keychain-sdk/writer.go (1)
Writer(6-13)keychain-sdk/sign_requests.go (1)
SignRequest(16-16)
keychain-sdk/key_requests.go (4)
go-client/tx_warden.go (2)
KeyRequestFulfilment(9-12)KeyRequestRejection(23-26)warden/x/act/cosmoshield/context.go (1)
Context(9-14)keychain-sdk/keychain.go (1)
App(25-34)warden/app/app.go (1)
App(116-176)
shield/internal/evaluator/evaluator_test.go (1)
shield/object/object.go (1)
Boolean(37-39)
shield/internal/preprocess/preprocess.go (3)
shield/shield.go (1)
Preprocess(35-37)shield/ast/ast.pb.go (6)
PrefixExpression(579-583)PrefixExpression(587-587)PrefixExpression(588-590)InfixExpression(511-516)InfixExpression(520-520)InfixExpression(521-523)shield/ast/expander.go (1)
Expander(5-18)
warden/x/sched/keeper/params.go (2)
warden/x/sched/types/v1beta1/keys.go (1)
ParamsKey(14-14)warden/x/sched/keeper/keeper.go (1)
Keeper(22-34)
shield/internal/evaluator/evaluator.go (2)
shield/object/object.go (5)
Integer(30-32)TRUE(21-21)STRING_OBJ(14-14)FALSE(22-22)Error(61-63)shield/ast/ast.pb.go (5)
Expression_BooleanLiteral(86-88)Expression_BooleanLiteral(107-107)BooleanLiteral(295-298)BooleanLiteral(302-302)BooleanLiteral(303-305)
warden/x/warden/keeper/spaces.go (2)
warden/repo/seqcollection.go (1)
SeqCollection(17-22)warden/x/act/cosmoshield/context.go (1)
Context(9-14)
keychain-sdk/internal/writer/writer.go (2)
warden/x/act/cosmoshield/context.go (1)
Context(9-14)go-client/tx_raw_client.go (3)
DefaultGasLimit(21-21)DefaultFees(22-22)Msger(66-68)
prophet/exec.go (2)
prophet/plugins.go (2)
Execute(22-56)Verify(59-83)prophet/task.go (1)
Vote(39-45)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
- GitHub Check: lint
- GitHub Check: test
- GitHub Check: lint
- GitHub Check: test
- GitHub Check: lint
- GitHub Check: test
- GitHub Check: test
- GitHub Check: lint
- GitHub Check: test
- GitHub Check: test
- GitHub Check: lint
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
🔇 Additional comments (120)
warden/x/sched/module/simulation.go (1)
35-35: Readability improvement acknowledgedThe added blank line cleanly separates the account-collection loop from the genesis-state construction block, matching Go style conventions. No further action required.
warden/x/sched/module/module.go (1)
78-79: No-op whitespace change – looks goodThe inserted blank line purely improves readability without altering logic or control flow.
tests/integration_test.go (1)
27-35: Formatting tweak looks goodThe extra blank lines improve console readability without altering logic. No further action required.
warden/app/ante.go (1)
175-183: Readability polish looks goodThe added blank line cleanly separates the early‐exit error check from the happy-path logic, matching the style used elsewhere in the file. No functional impact. 👍
warden/app/export.go (1)
108-113: Whitespace addition improves readabilityThe added blank line cleanly separates the error check from subsequent logic and aligns with the surrounding style. No functional impact—looks good.
warden/x/act/types/v1beta1/registry.go (2)
38-41: Whitespace-only tweak is fineA blank line was inserted for readability. No functional impact.
54-57: Same whitespace fix acknowledgedIdentical readability improvement in
RegisterCtx; no issues.warden/app/app.go (2)
118-118: No functional impact – spacing looks goodPurely stylistic blank line improves readability; no concerns.
209-209: Minor formatting tweak acknowledgedAdditional blank line before URL parsing is harmless and slightly clearer.
warden/app/sim_test.go (1)
178-181: No issues – formatting-only change looks goodThe added blank line slightly improves readability without affecting logic or coverage.
prophet/dedup.go (1)
41-44: LGTM – purely stylistic change
The added blank line improves readability without affecting behavior. No further action required.warden/app/legacy.go (1)
250-251: Stylistic whitespace only—looks goodBlank lines were added after local-variable declarations to improve visual grouping. No functional impact.
Also applies to: 264-265, 280-281
warden/app/config.go (1)
49-50: Whitespace-only change – OK
No functional impact.warden/x/async/keeper/queues.go (4)
92-100: Whitespace cleanup only – logic unchangedThe removal of the blank line here has no impact on functionality or readability.
100-106: Whitespace cleanup only – logic unchangedNo functional changes; the surrounding error-handling remains intact.
123-127: Whitespace cleanup only – logic unchangedThe diff/threshold computation block is unaffected; looks good.
148-154: Whitespace cleanup only – logic unchangedNo behavioral impact; the slide phase logic is preserved.
go-client/tx_client.go (1)
15-18: Whitespace-only change – no action needed
Blank line inserted for readability; no functional impact.go-client/tx_identity.go (1)
33-36: Formatting tweak acknowledged
Extra blank line slightly improves visual grouping; nothing further.go-client/tx_raw_client.go (2)
73-78: No-op whitespace addition
The blank line after the early-return path is fine and keeps the happy-path visually separated.
99-108: Whitespace addition around signature hack
Purely cosmetic; logic unchanged and still clear.go-client/query_client.go (2)
24-31: Verifygrpc.NewClientusage
While only whitespace changed here, the function still callsgrpc.NewClient, which is not part of the upstream gRPC Go API (the usual constructor isgrpc.Dial). Double-check that a project-local wrapper or vendored helper indeed defines this symbol to avoid build breakage after linter upgrades.
45-49: Method relocation looks good
MovingConn()below the constructors improves top-down readability; no behavioral impact.prophet/plugins/stoicquote/stoicquote_test.go (2)
40-42: Purely cosmetic change looks fineA single blank line was inserted to improve readability; no functional impact.
30-33: t.Context() support confirmed in CI environment
CI and local builds are using Go 1.24.5, which includestesting.T.Context()(added in Go 1.22). No changes are required..golangci.yml (1)
19-20: Disablinggoconstmay hide real duplication problems
goconstoften flags hard-coded strings/ints that should be lifted to typed constants, improving maintainability and preventing typos. Unless the new golangci-lint v2.3 rule produces excessive false-positives, it’s worth re-evaluating this blanket disable.Would you run the linter locally with
goconstenabled and share the noisy cases? We can then add path-based excludes instead of turning the rule off globally..github/workflows/go-client.yml (1)
20-28: Confirm Go 1.24 availability on GitHub Actions runnersPlease ensure that Go 1.24 is already available on the hosted runners before upgrading. Automated checks against the runner’s toolcache did not return any versions, so you’ll need to:
- Manually verify which Go versions are installed on the Ubuntu-latest image (e.g. by adding a debug step that runs
go version).- If Go 1.24 isn’t yet supported, pin the action to the latest supported minor (for example,
1.22) until 1.24 is officially available.File: .github/workflows/go-client.yml
Lines: 20–28shield/ast/ast.go (1)
61-66: LGTM – formatting-only blank-line insertionsThe added blank lines improve readability without altering behaviour. No further action required.
Also applies to: 69-75, 77-83, 85-91, 93-99, 101-107, 109-115, 117-123
shield/internal/metadata/metadata.go (1)
29-30: Whitespace-only change is fineThe added blank lines strictly improve readability and do not impact behaviour.
Also applies to: 44-45
shield/internal/parser/parser.go (1)
94-101: Public API moved higher-up – good callPlacing
ParseandErrorsimmediately after the constructor improves discoverability. No functional impact observed.shield/shield.go (1)
25-26: No-op formatting tweakBlank line is purely cosmetic; no concerns.
cmd/shield_repl/main.go (1)
19-20: Whitespace addition acknowledgedReadability only; behaviour unchanged.
shield/internal/metadata/metadata_test.go (1)
94-104: Whitespace-only change looks goodBlank lines increase readability and do not alter test behavior.
shield/internal/evaluator/evaluator_test.go (1)
118-126: Readability improvement acknowledgedThe inserted blank lines around environment setup make the helper clearer; no functional impact.
shield/internal/preprocess/preprocess_test.go (1)
38-70: Stylistic spacing approvedAll added blank lines simply group logical blocks and aid future maintenance.
Also applies to: 92-116
shield/internal/evaluator/evaluator.go (1)
19-35: No-op whitespace editsOnly blank lines were added; functional logic, error handling, and complexity remain unchanged.
No further action required.Also applies to: 57-73, 88-110, 181-207, 229-243, 255-259
shield/internal/lexer/lexer.go (1)
16-19: Lexer formatting acceptedWhitespace additions enhance code clarity without affecting tokenization.
Also applies to: 102-112, 122-131, 133-139, 141-157
cmd/soliditygen/main.go (1)
47-51: Declaration block consolidation looks goodGrouping
inJSONanderrinto a singlevarblock improves readability and keeps the two tightly-coupled variables together. No functional impact detected.prophet/plugins/veniceimg/veniceimg.go (1)
62-64: Whitespace-only tweak looks goodNon-functional blank line improves readability and matches the style adopted across the PR.
precompiles/async/tx.go (1)
29-31: Readability spacing is fineThe extra blank line after
msgServercreation cleanly separates setup from subsequent logic; no concerns.keychain-sdk/internal/enc/enc_test.go (1)
14-16: Minor formatting OKThe inserted blank line following the error assertion is harmless and keeps sections visually distinct.
warden/x/async/keeper/msg_server_add_task.go (1)
27-29: Spacing change acknowledgedBlank line after the variable declaration slightly improves visual separation without affecting logic.
prophet/task.go (1)
22-26: Stylistic newline acceptableThe blank line inside
TaskResultstruct is purely cosmetic and does not violate Go formatting rules.precompiles/slinky/slinky.go (1)
32-38: LGTM – purely stylistic change
The extra blank line after the embeddedcmn.Precompileimproves readability and keeps the struct layout consistent with other precompile packages. No functional impact.precompiles/warden/warden.go (1)
34-41: LGTM – consistent struct formatting
Adding the blank line mirrors the style adopted in other packages; nothing else to flag.precompiles/act/act.go (1)
32-37: LGTM – style-only adjustment
Blank line after the embedded struct keeps spacing uniform across the codebase. No further action required.precompiles/sched/sched.go (1)
32-38: LGTM – whitespace alignment
Matches the formatting convention introduced elsewhere; no behavioural change.precompiles/async/async.go (1)
32-38: LGTM – uniform formatting
Spacing tweak only; code remains functionally identical.precompiles/json/json.go (1)
30-33: Trivial whitespace – no action neededwarden/x/async/keeper/genesis.go (1)
50-54: Pure formatting change acknowledgedwarden/x/sched/keeper/params.go (1)
13-22: Whitespace-only touch – looks goodThe added blank lines improve readability without altering behaviour.
keychain-sdk/internal/enc/enc.go (2)
15-19: Readability improvement acknowledgedPurely stylistic spacing; no functional changes.
27-34: Spacing change – no action neededSame comment as above; nothing else to flag.
keychain-sdk/internal/tracker/tracker.go (3)
18-25: No-op changeExtra blank lines after the read-lock block are benign.
27-33: Write-lock section unchangedSpacing only; concur with intent.
34-39: Delete path unchangedWhitespace only; fine.
warden/x/async/keeper/query_plugin_validators.go (3)
36-43: Whitespace tweaks – fineNo logic altered; implementation remains intact.
49-66: Iteration block unchangedSpacing only; nothing further.
72-99: Second iterator unchangedWhitespace only; approved.
warden/x/async/keeper/abci.go (1)
47-47: LGTM! Improved code readability with strategic blank line additions.The blank lines effectively separate logical blocks, making the code more readable without affecting functionality.
Also applies to: 73-73, 145-145, 353-353, 358-358, 363-363, 368-368, 394-394, 404-404, 436-436, 443-443, 450-450, 458-458
warden/x/sched/keeper/abci.go (1)
45-45: LGTM! Well-placed blank lines improve code organization.The blank lines effectively separate error handling, variable assignments, and logical operations, enhancing readability.
Also applies to: 68-68, 74-74, 79-79, 96-96, 172-172
precompiles/json/builder.go (1)
62-62: LGTM! Comprehensive formatting improvements enhance readability.The strategic placement of blank lines throughout the JSON processing functions significantly improves code readability by separating logical blocks, error handling, and operations.
Also applies to: 81-81, 94-94, 161-161, 181-181, 185-185, 195-195, 198-198, 204-204, 213-213, 219-219, 223-223, 232-232, 241-241, 243-243, 252-252, 254-254, 263-263, 272-272, 274-274, 285-285, 299-299, 304-304, 349-349, 356-356, 361-361, 362-362, 386-386
precompiles/json/builder_test.go (1)
23-23: LGTM! Test code formatting improvements enhance readability.The blank lines in test helper methods and test execution logic make the code easier to follow without affecting test functionality.
Also applies to: 39-39, 47-47, 55-55, 63-63, 72-72, 75-75, 79-79, 94-94, 274-274, 280-280, 282-282, 287-287
cmd/wardenkms/bip44.go (1)
26-26: LGTM! Formatting improvements enhance readability of cryptographic operations.The blank lines effectively separate key generation steps, error handling, and cryptographic operations, making the code easier to follow without affecting security or functionality.
Also applies to: 76-76, 81-81, 86-86, 108-108, 113-113, 118-118, 134-134, 144-144
precompiles/warden/events.go (1)
151-151: LGTM! Consistent formatting improvements enhance readability.The addition of blank lines after error checks follows good Go style practices and likely addresses new linting rules in golangci-lint v2.3. These changes improve visual separation between error handling and subsequent logic without affecting functionality.
Also applies to: 195-195, 226-226, 257-257, 293-293, 418-418, 580-580
warden/x/async/keeper/keeper.go (2)
251-272: LGTM! Method repositioning improves code organization.Moving the
addPluginmethod closer to related functionality liketaskReadyCallbackenhances code readability without changing the implementation.
362-362: Good formatting improvement for readability.The added blank line before address conversion improves visual separation in the
getValidatorAddressmethod.warden/x/sched/keeper/callbacks.go (1)
59-69: LGTM! Duplicate method cleanup improves code quality.The removal of duplicate method definitions while keeping the functional implementations is a good cleanup that addresses potential linting issues and improves code maintainability.
precompiles/sched/tx.go (1)
33-33: Excellent formatting consistency across callback execution logic.The strategically placed blank lines improve readability by separating logical sections: queue initialization, error handling, fee calculations, and cleanup operations. These changes align well with the broader formatting improvements in this PR.
Also applies to: 89-89, 96-96, 100-100, 104-104, 112-112
warden/x/act/keeper/actions_keeper.go (1)
135-169: LGTM! Method organization and receiver consistency improvements.The repositioning of
pruneActionandupdateMentionsmethods improves code organization. The change to pointer receiver inupdateMentionsmethod maintains consistency with other methods and is a good practice for struct methods that may need to modify the receiver in the future.warden/x/warden/types/v1beta3/address.go (1)
62-63: Whitespace-only change looks goodPure formatting – no functional impact. 👍
tests/framework/checks/eth_checks.go (1)
15-16: Readability tweak acknowledgedExtra blank line after slice initialization improves visual separation; no further action.
tests/cases/reject_any_3_action.go (1)
53-54: Spacing nit approvedAdded blank line maintains consistent block spacing across test steps. No issues.
prophet/plugins/http/http.go (1)
107-108: Minor formatting acceptedWhitespace addition aids readability without altering logic or behavior.
prophet/plugins/http/http_test.go (1)
77-78: Formatting change verifiedBlank line before JSON decoding is harmless and enhances clarity.
tests/cases/create_space.go (1)
40-40: LGTM! Formatting improvement enhances readability.The blank line before the return statement improves code readability and likely addresses a new linter rule in golangci-lint v2.3.
tests/framework/exec/warden_node.go (3)
40-40: LGTM! Formatting improvement enhances readability.The blank line after the temporary directory creation improves code structure and likely addresses a new linter rule.
107-107: LGTM! Formatting improvement enhances readability.The blank line before the filtering loop improves code readability and separates logical sections.
151-151: LGTM! Formatting improvement enhances readability.The blank line before the return statement enhances code structure and likely addresses a linter rule.
tests/cases/async_callbacks.go (2)
58-58: LGTM! Formatting improvement enhances test readability.The blank line after the error check improves readability within the eventual consistency test assertion.
79-79: LGTM! Formatting improvement enhances test readability.The blank line after the error check improves readability within the second eventual consistency test assertion.
prophet/plugins.go (3)
36-36: Excellent! Context-aware logging improvement.Updating from
log.Debugtolog.DebugContext(ctx, ...)enables proper context propagation for tracing, cancellation, and observability. This aligns with modern Go logging best practices.Also applies to: 41-41
72-72: Excellent! Context-aware logging improvement.The context-aware logging calls in the
Verifyfunction enable proper request tracing and cancellation support, improving observability.Also applies to: 80-80
39-39: LGTM! Formatting improvement enhances readability.The blank line before the defer statement improves code structure and readability.
tests/framework/ports/ports.go (3)
18-21: LGTM! Variable declaration grouping improves code style.Grouping the variable declarations into a var block improves readability and likely addresses a golangci-lint formatting rule.
24-24: Excellent! Context-aware network operations.Using
net.ListenConfigwitht.Context()enables proper test cancellation and timeout handling, which is a significant improvement over the previousnet.Listenapproach.
26-26: LGTM! Formatting improvement enhances readability.The blank line after the network operation improves code structure and readability.
tests/framework/exec/exec.go (1)
21-37: Readability-only change looks goodWhitespace separation improves readability without altering behaviour. No further action needed.
tests/framework/iowriter/iowriter.go (1)
14-28: Nil-receiver guards and added spacing are fineThe additional blank lines don’t affect logic; nil-receiver handling remains correct.
tests/cases/warden_precompile.go (1)
68-72: Change is whitespace only – no issuestests/framework/exec/warden_eth.go (3)
17-22: Whitespace clarifies struct fields – looks good.
No functional impact; matches nlreturn expectations from golangci-lint 2.3.
78-83: Blank line after error check improves readability.
Keeps style consistent with the rest of the helpers.
85-91: Consistent spacing after assertion – OK.
Nothing else to flag.warden/x/warden/keeper/keeper.go (1)
134-137: Method re-ordering only – implementation unchanged.
Logger helper remains correct and module-scoped.precompiles/json/query.go (1)
38-41: Added blank lines for logical separation – fine.
No behavioural change; keeps functions readable.Also applies to: 67-69
tests/framework/snapshot/snapshots.go (1)
71-71: Formatting tweaks across builder helpers – accepted.
Whitespace additions align with nlreturn style rule; code remains identical in behaviour.Also applies to: 76-76, 94-94, 98-98, 154-154, 260-260, 275-275
tests/framework/checks/checks.go (1)
14-14: Minor spacing only – no action needed.Also applies to: 18-18, 21-21, 24-24
precompiles/json/parser_test.go (1)
24-24: LGTM! Formatting improvements enhance readability.The added blank lines improve code structure by separating logical blocks, error handling sections, and return statements. These changes align with Go formatting best practices and the golangci-lint v2.3 upgrade.
Also applies to: 27-27, 52-52, 61-61, 96-96, 238-238, 244-244, 247-247, 251-251
precompiles/json/parser.go (1)
71-71: LGTM! Consistent formatting improvements throughout the parser.The blank line additions improve code structure by logically separating:
- Error handling blocks from main logic
- Variable assignments from operations
- Loop constructs and conditionals
- Function return statements
These changes enhance readability without affecting the parsing functionality and align with the golangci-lint v2.3 upgrade objectives.
Also applies to: 79-79, 86-86, 90-90, 97-97, 105-105, 115-115, 122-122, 132-132, 139-139, 147-147, 152-152, 186-186, 196-196, 199-199, 203-203, 208-208, 229-229, 233-233, 259-259, 265-265, 269-269, 276-276, 283-283
keychain-sdk/key_requests.go (1)
28-28: Excellent context propagation improvements!The migration from basic logging calls (
Debug,Info,Error) to context-aware variants (DebugContext,InfoContext,ErrorContext) is a significant improvement that:
- Enables better request tracing and observability
- Supports cancellation and timeout handling
- Follows modern Go logging best practices
- Maintains consistency across the keychain SDK
The context is properly threaded through all logging calls, including error handling and panic recovery scenarios.
Also applies to: 34-34, 59-59, 63-63, 67-67, 80-80, 96-96, 98-98
prophet/exec.go (1)
25-25: LGTM! Consistent context-aware logging implementation.The logging calls are properly updated to use context-aware variants, and the context is correctly passed to the
ExecuteandVerifyfunctions from theprophet/plugins.gofile. This improves observability and aligns with the broader context propagation improvements across the codebase.Also applies to: 27-27, 29-29, 35-35, 61-61, 63-63, 68-68
keychain-sdk/sign_requests.go (2)
30-30: Excellent consistency with context-aware logging migration!The changes mirror the improvements made in
keychain-sdk/key_requests.goby:
- Migrating all logging calls to context-aware variants (
DebugContext,InfoContext,ErrorContext)- Properly threading context through all logging operations
- Maintaining context awareness in error handling and panic recovery
- Including encryption key validation errors in the context-aware logging pattern
This creates a consistent and observable logging experience across the keychain SDK.
Also applies to: 48-48, 54-54, 60-60, 73-73, 77-77, 81-81, 94-94, 99-99, 112-112, 121-121
33-33: LGTM! Formatting improvements enhance code readability.The added blank lines appropriately separate logical blocks, error handling sections, and improve the overall structure of the sign request handling code. These changes complement the context propagation improvements nicely.
Also applies to: 61-61, 69-69, 109-109, 114-114, 122-122, 124-124
cmd/wardenkms/wardenkms.go (1)
44-147: LGTM! Proper context propagation and logging improvements.The changes correctly implement context-aware logging throughout the file and properly propagate the context to all relevant functions. Creating the context once at the beginning and reusing it is the right approach.
warden/x/warden/keeper/spaces.go (1)
60-84: Code reorganization looks good.Moving these methods closer to other SpacesKeeper methods improves code organization and readability. No functional changes detected.
cmd/faucet/main.go (2)
85-174: Excellent context propagation implementation.The changes properly implement context propagation from main through to the Send method. Using the request context (
c.Request().Context()) for the Send operation is the correct approach as it respects client cancellations and timeouts.
26-26: Good use of modern Go idiom.Using
anyinstead ofinterface{}is the preferred style in Go 1.18+.keychain-sdk/keychain.go (1)
57-135: Well-implemented context propagation and logging updates.All logging calls have been correctly updated to use context-aware variants, and the context is properly propagated through the initialization flow. The removal of the unused
ioimport and the simplification of the logger method are good improvements.cmd/faucet/faucet.go (3)
49-112: Excellent implementation of context-aware command execution.Using
exec.CommandContextenables proper cancellation of external commands when the context is cancelled. This is particularly important for long-running operations.
159-161: Good use of standard library function.Using
slices.Containsis cleaner and more idiomatic than a manual loop.
345-373: Proper context management in goroutine.Creating a cancellable context for the goroutine's lifecycle is the correct approach. This ensures proper cleanup when the goroutine needs to terminate.
keychain-sdk/internal/writer/writer.go (6)
56-56: Good improvement: Context-aware logging implementation.The change from
Logger.InfotoLogger.InfoContextproperly utilizes the available context for enhanced logging capabilities.
85-85: Consistent context-aware logging implementation.The logging change maintains structured logging format while properly utilizing context.
93-93: Consistent context-aware logging across Flush method.All logging calls properly utilize context while maintaining structured logging format and appropriate log levels.
Also applies to: 139-139, 151-151
119-133: Method relocation improves code organization.The helper methods
gasLimit()andfees()have been repositioned for better code organization while maintaining their functionality.
67-67: Minor formatting improvements enhance readability.The added blank lines improve code readability without affecting functionality.
Also applies to: 112-112, 163-163
181-181: Improved loop idiom for better Go style.The change to
for i := range itemsis more idiomatic Go when only the index is needed and likely addresses a linter warning.warden/x/async/keeper/tasks.go (3)
108-112: Whitespace-only change – no concerns
The added blank line improves readability without affecting logic or performance.
167-172: Whitespace-only change – no concerns
Same here—purely cosmetic.
108-136: Confirmlimit<=0semantics inPendingTasks
Currently, passing0causes unlimited iteration (and negative values panic on slice creation). We couldn’t find any documentation or callers that rely on non-positive limits. Please clarify whether:
limit<=0should be treated as “no limit”- or considered invalid (and return an error)
If you intend “no limit,” you might add at the top of the function in
warden/x/async/keeper/tasks.go(around line 108):+ import ( + "math" + // … + ) func (k *TaskKeeper) PendingTasks(ctx context.Context, solverAddr sdk.ConsAddress, limit int) ([]types.Task, error) { + // Treat non-positive limits as “no limit” + if limit <= 0 { + limit = math.MaxInt + } ranger := collections.NewPrefixedPairRange[sdk.ConsAddress, uint64](solverAddr) // …
8c9ace2 to
eb10490
Compare
eb10490 to
964c327
Compare
This PR updates our CI to use golangci-lint v2.2 and fixes the new linter warnings.