Skip to content

Organize devnet errors, remove unneeded Result#904

Merged
3alpha merged 3 commits intomainfrom
organize-devnet-errors
Jan 29, 2026
Merged

Organize devnet errors, remove unneeded Result#904
3alpha merged 3 commits intomainfrom
organize-devnet-errors

Conversation

@3alpha
Copy link
Copy Markdown
Collaborator

@3alpha 3alpha commented Jan 22, 2026

Usage related changes

Resolves #897 .

Development related changes

Checklist:

  • Checked out the contribution guidelines
  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/clippy_check.sh
  • No unused dependencies - ./scripts/check_unused_deps.sh
  • No spelling errors - ./scripts/check_spelling.sh
  • Performed code self-review
  • Rebased to the latest commit of the target branch (or merged it into my branch)
    • Once you make the PR reviewable, please avoid force-pushing
  • Updated the docs if needed - ./website/README.md
  • Linked the issues resolvable by this PR - linking info
  • Updated the tests if needed; all passing - execution info

Summary by CodeRabbit

  • Bug Fixes

    • API error responses now provide specific error types (dump, messaging, minting, invalid address, state, and type errors) instead of generic error references for better clarity and debugging.
  • Refactor

    • Simplified error handling across core operations and block generation for improved reliability and consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 22, 2026

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'auto_resolve_threads'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

This PR refactors the hashing trait system by splitting the existing HashProducer trait into two separate traits: HashProducer for non-fallible hash generation returning Felt directly, and TryHashProducer for fallible hash generation returning Result<Felt, Error>. Additionally, several block creation and state management methods in the Starknet struct are changed from returning DevnetResult<_> to returning non-Result types. All implementation sites and call sites across the codebase are updated to use the appropriate trait and method signatures. RPC error definitions in the API specification are refined from generic to specific error types.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

maintenance

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 77.42% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive PR description lacks essential details about usage impact and the nature of the refactoring. While checklist items are completed, the changes are not clearly explained. Add detailed explanation of how these changes affect users/developers, clarify what 'remove unneeded Result' entails, and explain the error organization changes in the devnet_api.json file.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Organize devnet errors, remove unneeded Result' accurately summarizes the main changes: refactoring error handling and removing Result wrappers from functions that don't need fallible returns.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@3alpha 3alpha marked this pull request as ready for review January 27, 2026 11:36
@3alpha
Copy link
Copy Markdown
Collaborator Author

3alpha commented Jan 27, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 27, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@3alpha 3alpha merged commit 674e27a into main Jan 29, 2026
4 checks passed
@3alpha 3alpha deleted the organize-devnet-errors branch January 29, 2026 18:12
@3alpha 3alpha added the enhancement New feature or request label Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Devnet-specific error handling

1 participant