Skip to content

chore(onchain_config): assert RSA JWK oracle path is unreachable#324

Merged
ByteYue merged 1 commit intomainfrom
chore/assert-rsa-jwk-unreachable
Apr 10, 2026
Merged

chore(onchain_config): assert RSA JWK oracle path is unreachable#324
ByteYue merged 1 commit intomainfrom
chore/assert-rsa-jwk-unreachable

Conversation

@ByteYue
Copy link
Copy Markdown
Collaborator

@ByteYue ByteYue commented Apr 10, 2026

Summary

  • Add panic + error log to the RSA JWK branch in construct_oracle_record_transaction
  • This code path is not used in production — all JWK data flows through the UnsupportedJWK (blockchain event / bridge) path via construct_blockchain_batch_transaction
  • If this path is ever entered unexpectedly, the node will fail fast with a clear error message instead of silently producing incorrect state

Context

Follow-up to #323. During investigation we confirmed that:

  1. The RSA JWK path has never been executed on-chain (zero DataRecorded events for sourceType=1)
  2. Bridge data reuses JWK consensus via UnsupportedJWK, which correctly handles nonces from event payloads
  3. The RSA JWK path should remain dead code until explicitly needed

Test plan

  • Verify node starts and processes blocks normally (RSA JWK path not triggered)
  • Verify e2e bridge tests still pass (UnsupportedJWK path unaffected)

🤖 Generated with Claude Code

The RSA JWK path in construct_oracle_record_transaction is not used in
production — all JWK data currently flows through the UnsupportedJWK
(blockchain event / bridge) path. Add a panic with error logging to
catch any unexpected entry into this code path early.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@Richard1048576 Richard1048576 left a comment

Choose a reason for hiding this comment

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

LGTM

@ByteYue ByteYue merged commit d09aa25 into main Apr 10, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants