Skip to content

fix(json-rpc): exclude transaction-not-found errors from error policy - #12682

Open
filipdulic wants to merge 2 commits into
developfrom
consensus/fix/12522-transaction-not-found-weight
Open

fix(json-rpc): exclude transaction-not-found errors from error policy#12682
filipdulic wants to merge 2 commits into
developfrom
consensus/fix/12522-transaction-not-found-weight

Conversation

@filipdulic

@filipdulic filipdulic commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description of change

  • Return a dedicated JSON-RPC error code when a transaction is not found.
  • Exclude this response from the full node error policy.
  • Ensure zero-weight tallies are never sampled.
  • Preserve the JSON-RPC client-error classification in the local Rust SDK.
  • Continue counting the request toward the spam policy.
  • Keep invalid requests and terminal transaction errors fully weighted.

Links to any relevant issues

Fixes #12522.

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes): Full nodes no longer count transaction-not-found responses toward the error policy. Zero-weight tallies are never sampled.
  • Indexer:
  • JSON-RPC: iota_getTransactionBlock now returns error code -32003 when a transaction is not found.
  • GraphQL:
  • CLI:
  • Rust SDK: JSON-RPC errors expose and identify the transaction-not-found error code.
  • gRPC:

@iota-ci iota-ci added consensus Issues related to the Core Consensus team core-protocol labels Aug 17, 2026
@filipdulic
filipdulic force-pushed the consensus/fix/12522-transaction-not-found-weight branch from b1f57e2 to c5aeaa3 Compare August 17, 2026 11:10
@filipdulic
filipdulic marked this pull request as ready for review August 17, 2026 11:17
@filipdulic
filipdulic requested review from a team as code owners August 17, 2026 11:17

@muXxer muXxer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this also exist for the get_object endpoint? If nodes pruned an object, the client also can't know that in advance, and this should not count as an error in the spam tally, but just as spam.

Comment thread crates/iota-types/src/traffic_control.rs
@filipdulic

Copy link
Copy Markdown
Contributor Author

Shouldn't this also exist for the get_object endpoint? If nodes pruned an object, the client also can't know that in advance, and this should not count as an error in the spam tally, but just as spam.

dont we already handle this, a missing or pruned object returns NotExists and is a successfull IotaObjectResponse,

@filipdulic
filipdulic force-pushed the consensus/fix/12522-transaction-not-found-weight branch from c5aeaa3 to 125942e Compare August 18, 2026 07:42
Comment thread crates/iota-sdk/src/json_rpc_error.rs Outdated
@filipdulic
filipdulic force-pushed the consensus/fix/12522-transaction-not-found-weight branch from 125942e to 3fc858d Compare August 18, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus Issues related to the Core Consensus team core-protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pcool: Digest polling and terminal submission errors are spam-weighted, so prescribed recovery can block a client

4 participants